Blender V4.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
 
bool getFullScreen () const
 
GHOST_IWindowgetFullScreenWindow () const
 
GHOST_TSuccess beginFullScreen (GHOST_IWindow *window, const bool stereoVisual)
 
GHOST_TSuccess endFullScreen ()
 
GHOST_TSuccess setActiveWindow (GHOST_IWindow *window)
 
GHOST_IWindowgetActiveWindow () const
 
void setWindowInactive (const GHOST_IWindow *window)
 
const std::vector< GHOST_IWindow * > & getWindows () const
 
GHOST_IWindowgetWindowAssociatedWithOSWindow (const void *osWindow)
 

Protected Attributes

std::vector< GHOST_IWindow * > m_windows
 
GHOST_IWindowm_fullScreenWindow
 
GHOST_IWindowm_activeWindow
 
GHOST_IWindowm_activeWindowBeforeFullScreen
 

Detailed Description

Manages system windows (platform independent implementation).

Definition at line 20 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.

◆ ~GHOST_WindowManager()

GHOST_WindowManager::~GHOST_WindowManager ( )

Destructor.

Definition at line 23 of file GHOST_WindowManager.cc.

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 28 of file GHOST_WindowManager.cc.

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

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

◆ beginFullScreen()

GHOST_TSuccess GHOST_WindowManager::beginFullScreen ( GHOST_IWindow * window,
const bool stereoVisual )

Activates full-screen mode for a window.

Parameters
windowThe window displayed full-screen.
Returns
Indication of success.

Definition at line 89 of file GHOST_WindowManager.cc.

References GHOST_IWindow::beginFullScreen(), getActiveWindow(), getFullScreen(), GHOST_IWindow::getValid(), GHOST_ASSERT, GHOST_kFailure, GHOST_kSuccess, m_activeWindowBeforeFullScreen, m_fullScreenWindow, and setActiveWindow().

Referenced by GHOST_System::beginFullScreen().

◆ endFullScreen()

GHOST_TSuccess GHOST_WindowManager::endFullScreen ( )

◆ getActiveWindow()

GHOST_IWindow * GHOST_WindowManager::getActiveWindow ( ) const

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

Returns
window The active window (or nullptr if there is none).

Definition at line 138 of file GHOST_WindowManager.cc.

References m_activeWindow.

Referenced by beginFullScreen(), GHOST_SystemWin32::driveTrackpad(), gwl_window_activate(), gwl_window_frame_update_from_pending_no_lock(), GHOST_SystemWin32::processTrackpad(), GHOST_NDOFManager::sendMotionEvent(), GHOST_DisplayManagerSDL::setCurrentDisplaySetting(), GHOST_WindowWayland::setWindowCursorShape(), GHOST_WindowWayland::setWindowCustomCursorShape(), and GHOST_NDOFManager::updateButton().

◆ getFullScreen()

bool GHOST_WindowManager::getFullScreen ( ) const

Returns whether one of the windows is full-screen.

Returns
A boolean indicator.

Definition at line 79 of file GHOST_WindowManager.cc.

References m_fullScreenWindow.

Referenced by GHOST_System::beginFullScreen(), beginFullScreen(), GHOST_System::endFullScreen(), endFullScreen(), GHOST_System::getFullScreen(), getWindowFound(), and GHOST_System::updateFullScreen().

◆ getFullScreenWindow()

GHOST_IWindow * GHOST_WindowManager::getFullScreenWindow ( ) const

Returns pointer to the full-screen window.

Returns
The full-screen window (nullptr if not in full-screen).

Definition at line 84 of file GHOST_WindowManager.cc.

References m_fullScreenWindow.

Referenced by GHOST_System::disposeWindow().

◆ 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 155 of file GHOST_WindowManager.cc.

References m_windows.

Referenced by GHOST_SystemWin32::getWindowUnderCursor().

◆ 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 61 of file GHOST_WindowManager.cc.

References getFullScreen(), m_fullScreenWindow, and m_windows.

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

◆ getWindows()

const std::vector< GHOST_IWindow * > & GHOST_WindowManager::getWindows ( ) const

◆ 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 41 of file GHOST_WindowManager.cc.

References endFullScreen(), GHOST_kFailure, GHOST_kSuccess, m_fullScreenWindow, m_windows, and setWindowInactive().

Referenced by GHOST_System::disposeWindow().

◆ 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 124 of file GHOST_WindowManager.cc.

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

Referenced by GHOST_WindowWayland::activate(), beginFullScreen(), GHOST_SystemWayland::createWindow(), GHOST_SystemWin32::createWindow(), GHOST_SystemX11::createWindow(), endFullScreen(), GHOST_SystemWayland::processEvents(), and GHOST_SystemWin32::processWindowEvent().

◆ 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 143 of file GHOST_WindowManager.cc.

References m_activeWindow.

Referenced by GHOST_WindowWayland::deactivate(), endFullScreen(), GHOST_SystemWayland::processEvents(), and removeWindow().

Member Data Documentation

◆ m_activeWindow

GHOST_IWindow* GHOST_WindowManager::m_activeWindow
protected

The active window.

Definition at line 121 of file GHOST_WindowManager.hh.

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

◆ m_activeWindowBeforeFullScreen

GHOST_IWindow* GHOST_WindowManager::m_activeWindowBeforeFullScreen
protected

Window that was active before entering full-screen state.

Definition at line 124 of file GHOST_WindowManager.hh.

Referenced by beginFullScreen(), and endFullScreen().

◆ m_fullScreenWindow

GHOST_IWindow* GHOST_WindowManager::m_fullScreenWindow
protected

Window in full-screen state. There can be only one of this which is not in or window list.

Definition at line 118 of file GHOST_WindowManager.hh.

Referenced by beginFullScreen(), endFullScreen(), getFullScreen(), getFullScreenWindow(), getWindowFound(), and removeWindow().

◆ m_windows

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

The list of windows managed

Definition at line 115 of file GHOST_WindowManager.hh.

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


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