Blender V5.3
GHOST_WindowManager Class Reference

#include <GHOST_WindowManager.hh>

Public Member Functions

 GHOST_WindowManager ()
 ~GHOST_WindowManager ()
GHOST_TSuccess addWindow (GHOST_IWindow *window)
GHOST_TSuccess removeWindow (const GHOST_IWindow *window)
bool getWindowFound (const GHOST_IWindow *window) const
GHOST_TSuccess setActiveWindow (GHOST_IWindow *window)
GHOST_IWindow * getActiveWindow () const
void setWindowInactive (const GHOST_IWindow *window)
const std::vector< GHOST_IWindow * > & getWindows () const
GHOST_IWindow * getWindowAssociatedWithOSWindow (const void *osWindow)

Protected Attributes

std::vector< GHOST_IWindow * > windows_
GHOST_IWindow * active_window_

Detailed Description

Manages system windows (platform independent implementation).

Definition at line 19 of file GHOST_WindowManager.hh.

Constructor & Destructor Documentation

◆ GHOST_WindowManager()

GHOST_WindowManager::GHOST_WindowManager ( )

Constructor.

Copyright (C) 2001 NaN Technologies B.V.

Definition at line 18 of file GHOST_WindowManager.cc.

References active_window_.

Referenced by GHOST_System::init().

◆ ~GHOST_WindowManager()

GHOST_WindowManager::~GHOST_WindowManager ( )
default

Member Function Documentation

◆ addWindow()

GHOST_TSuccess GHOST_WindowManager::addWindow ( GHOST_IWindow * window)

Add a window to our list. It is only added if it is not already in the list.

Parameters
windowPointer to the window to be added.
Returns
Indication of success.

Definition at line 23 of file GHOST_WindowManager.cc.

References getWindowFound(), GHOST_kFailure, GHOST_kSuccess, and windows_.

Referenced by GHOST_SystemCocoa::createWindow(), GHOST_SystemWayland::createWindow(), GHOST_SystemWin32::createWindow(), GHOST_SystemX11::createWindow(), and ~GHOST_WindowManager().

◆ getActiveWindow()

GHOST_IWindow * GHOST_WindowManager::getActiveWindow ( ) const

◆ getWindowAssociatedWithOSWindow()

GHOST_IWindow * GHOST_WindowManager::getWindowAssociatedWithOSWindow ( const void * osWindow)

Finds the window associated with an OS window object/handle.

Parameters
osWindowThe OS window object/handle.
Returns
The associated window, null if none corresponds.

Definition at line 94 of file GHOST_WindowManager.cc.

References GHOST_Window::getOSWindow(), and windows_.

Referenced by GHOST_SystemCocoa::getWindowUnderCursor(), GHOST_SystemWin32::getWindowUnderCursor(), GHOST_SystemCocoa::handleKeyEvent(), GHOST_SystemCocoa::handleTabletEvent(), and ~GHOST_WindowManager().

◆ getWindowFound()

bool GHOST_WindowManager::getWindowFound ( const GHOST_IWindow * window) const

Returns whether the window is in our list.

Parameters
windowPointer to the window to query.
Returns
A boolean indicator.

Definition at line 50 of file GHOST_WindowManager.cc.

References windows_.

Referenced by addWindow(), GHOST_System::disposeWindow(), setActiveWindow(), GHOST_System::validWindow(), and ~GHOST_WindowManager().

◆ getWindows()

◆ removeWindow()

GHOST_TSuccess GHOST_WindowManager::removeWindow ( const GHOST_IWindow * window)

Remove a window from our list.

Parameters
windowPointer to the window to be removed.
Returns
Indication of success.

Definition at line 36 of file GHOST_WindowManager.cc.

References GHOST_kFailure, GHOST_kSuccess, setWindowInactive(), and windows_.

Referenced by GHOST_System::disposeWindow(), and ~GHOST_WindowManager().

◆ setActiveWindow()

GHOST_TSuccess GHOST_WindowManager::setActiveWindow ( GHOST_IWindow * window)

Sets new window as active window (the window receiving events). There can be only one window active which should be in the current window list.

Parameters
windowThe new active window.

Definition at line 63 of file GHOST_WindowManager.cc.

References active_window_, getWindowFound(), GHOST_kFailure, and GHOST_kSuccess.

Referenced by GHOST_SystemCocoa::createWindow(), GHOST_SystemWayland::createWindow(), GHOST_SystemWin32::createWindow(), GHOST_SystemX11::createWindow(), GHOST_SystemCocoa::handleWindowEvent(), GHOST_SystemWayland::processEvents(), GHOST_SystemWin32::processWindowEvent(), and ~GHOST_WindowManager().

◆ setWindowInactive()

void GHOST_WindowManager::setWindowInactive ( const GHOST_IWindow * window)

Set this window to be inactive (not receiving events).

Parameters
windowThe window to deactivate.

Definition at line 82 of file GHOST_WindowManager.cc.

References active_window_.

Referenced by GHOST_SystemCocoa::handleWindowEvent(), GHOST_SystemWayland::processEvents(), GHOST_SystemWin32::processWindowEvent(), removeWindow(), and ~GHOST_WindowManager().

Member Data Documentation

◆ active_window_

GHOST_IWindow* GHOST_WindowManager::active_window_
protected

The active window.

Definition at line 92 of file GHOST_WindowManager.hh.

Referenced by getActiveWindow(), GHOST_WindowManager(), setActiveWindow(), and setWindowInactive().

◆ windows_

std::vector<GHOST_IWindow *> GHOST_WindowManager::windows_
protected

The list of windows managed

Definition at line 89 of file GHOST_WindowManager.hh.

Referenced by addWindow(), getWindowAssociatedWithOSWindow(), getWindowFound(), getWindows(), and removeWindow().


The documentation for this class was generated from the following files: