Blender
V3.3
|
#include <GHOST_WindowManager.h>
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 (void) const |
GHOST_IWindow * | getFullScreenWindow (void) const |
GHOST_TSuccess | beginFullScreen (GHOST_IWindow *window, const bool stereoVisual) |
GHOST_TSuccess | endFullScreen (void) |
GHOST_TSuccess | setActiveWindow (GHOST_IWindow *window) |
GHOST_IWindow * | getActiveWindow (void) const |
void | setWindowInactive (const GHOST_IWindow *window) |
const std::vector< GHOST_IWindow * > & | getWindows () const |
GHOST_IWindow * | getWindowAssociatedWithOSWindow (void *osWindow) |
Protected Attributes | |
std::vector< GHOST_IWindow * > | m_windows |
GHOST_IWindow * | m_fullScreenWindow |
GHOST_IWindow * | m_activeWindow |
GHOST_IWindow * | m_activeWindowBeforeFullScreen |
Manages system windows (platform independent implementation).
Definition at line 19 of file GHOST_WindowManager.h.
GHOST_WindowManager::GHOST_WindowManager | ( | ) |
Constructor.
Copyright (C) 2001 NaN Technologies B.V.
Definition at line 17 of file GHOST_WindowManager.cpp.
GHOST_WindowManager::~GHOST_WindowManager | ( | ) |
Destructor.
Definition at line 22 of file GHOST_WindowManager.cpp.
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.
window | Pointer to the window to be added. |
Definition at line 27 of file GHOST_WindowManager.cpp.
References getWindowFound(), GHOST_kFailure, GHOST_kSuccess, and m_windows.
Referenced by GHOST_SystemWayland::createWindow(), GHOST_SystemWin32::createWindow(), GHOST_SystemX11::createWindow(), and GHOST_SystemCocoa::createWindow().
GHOST_TSuccess GHOST_WindowManager::beginFullScreen | ( | GHOST_IWindow * | window, |
const bool | stereoVisual | ||
) |
Activates full-screen mode for a window.
window | The window displayed full-screen. |
Definition at line 88 of file GHOST_WindowManager.cpp.
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().
GHOST_TSuccess GHOST_WindowManager::endFullScreen | ( | void | ) |
Closes full-screen mode down.
Definition at line 103 of file GHOST_WindowManager.cpp.
References GHOST_IWindow::endFullScreen(), getFullScreen(), GHOST_kFailure, GHOST_kSuccess, m_activeWindowBeforeFullScreen, m_fullScreenWindow, setActiveWindow(), and setWindowInactive().
Referenced by GHOST_System::endFullScreen(), and removeWindow().
GHOST_IWindow * GHOST_WindowManager::getActiveWindow | ( | void | ) | const |
Returns the active window (the window receiving events). There can be only one window active which should be in the current window list.
Definition at line 137 of file GHOST_WindowManager.cpp.
References m_activeWindow.
Referenced by beginFullScreen(), GHOST_SystemWin32::driveTrackpad(), GHOST_SystemCocoa::handleApplicationBecomeActiveEvent(), GHOST_SystemCocoa::handleMouseEvent(), GHOST_SystemCocoa::handleOpenDocumentRequest(), GHOST_SystemCocoa::handleQuitRequest(), GHOST_SystemWin32::processTrackpad(), GHOST_NDOFManager::sendMotionEvent(), GHOST_DisplayManagerSDL::setCurrentDisplaySetting(), GHOST_SystemCocoa::setCursorPosition(), GHOST_SystemCocoa::setMouseCursorPosition(), and GHOST_NDOFManager::updateButton().
Returns whether one of the windows is full-screen.
Definition at line 78 of file GHOST_WindowManager.cpp.
References m_fullScreenWindow.
Referenced by GHOST_System::beginFullScreen(), beginFullScreen(), GHOST_System::endFullScreen(), endFullScreen(), GHOST_System::getFullScreen(), getWindowFound(), and GHOST_System::updateFullScreen().
GHOST_IWindow * GHOST_WindowManager::getFullScreenWindow | ( | void | ) | const |
Returns pointer to the full-screen window.
Definition at line 83 of file GHOST_WindowManager.cpp.
References m_fullScreenWindow.
Referenced by GHOST_System::disposeWindow().
GHOST_IWindow * GHOST_WindowManager::getWindowAssociatedWithOSWindow | ( | void * | osWindow | ) |
Finds the window associated with an OS window object/handle.
osWindow | The OS window object/handle. |
Definition at line 154 of file GHOST_WindowManager.cpp.
References m_windows.
Referenced by GHOST_SystemCocoa::getWindowUnderCursor(), GHOST_SystemCocoa::handleKeyEvent(), GHOST_SystemCocoa::handleMouseEvent(), and GHOST_SystemCocoa::handleTabletEvent().
bool GHOST_WindowManager::getWindowFound | ( | const GHOST_IWindow * | window | ) | const |
Returns whether the window is in our list.
window | Pointer to the window to query. |
Definition at line 60 of file GHOST_WindowManager.cpp.
References getFullScreen(), m_fullScreenWindow, m_windows, and result.
Referenced by addWindow(), GHOST_System::disposeWindow(), setActiveWindow(), and GHOST_System::validWindow().
const std::vector< GHOST_IWindow * > & GHOST_WindowManager::getWindows | ( | ) | const |
Return a vector of the windows currently managed by this class.
Definition at line 149 of file GHOST_WindowManager.cpp.
References m_windows.
Referenced by GHOST_SystemX11::getClipboard(), GHOST_SystemX11::getClipboard_xcout(), GHOST_System::getWindowUnderCursor(), GHOST_SystemCocoa::handleApplicationBecomeActiveEvent(), GHOST_SystemCocoa::hasDialogWindow(), output_handle_scale(), GHOST_SystemX11::putClipboard(), GHOST_SystemWin32::setTabletAPI(), and GHOST_WindowWin32::~GHOST_WindowWin32().
GHOST_TSuccess GHOST_WindowManager::removeWindow | ( | const GHOST_IWindow * | window | ) |
Remove a window from our list.
window | Pointer to the window to be removed. |
Definition at line 40 of file GHOST_WindowManager.cpp.
References endFullScreen(), GHOST_kFailure, GHOST_kSuccess, m_fullScreenWindow, m_windows, result, and setWindowInactive().
Referenced by GHOST_System::disposeWindow().
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.
window | The new active window. |
Definition at line 123 of file GHOST_WindowManager.cpp.
References getWindowFound(), GHOST_kFailure, GHOST_kSuccess, and m_activeWindow.
Referenced by GHOST_WindowWayland::activate(), beginFullScreen(), GHOST_SystemWayland::createWindow(), GHOST_SystemWin32::createWindow(), GHOST_SystemX11::createWindow(), GHOST_SystemCocoa::createWindow(), endFullScreen(), GHOST_SystemCocoa::handleWindowEvent(), and GHOST_SystemWin32::processWindowEvent().
void GHOST_WindowManager::setWindowInactive | ( | const GHOST_IWindow * | window | ) |
Set this window to be inactive (not receiving events).
window | The window to deactivate. |
Definition at line 142 of file GHOST_WindowManager.cpp.
References m_activeWindow.
Referenced by GHOST_WindowWayland::deactivate(), endFullScreen(), GHOST_SystemCocoa::handleWindowEvent(), and removeWindow().
|
protected |
The active window.
Definition at line 120 of file GHOST_WindowManager.h.
Referenced by getActiveWindow(), setActiveWindow(), and setWindowInactive().
|
protected |
Window that was active before entering fullscreen state.
Definition at line 123 of file GHOST_WindowManager.h.
Referenced by beginFullScreen(), and endFullScreen().
|
protected |
Window in fullscreen state. There can be only one of this which is not in or window list.
Definition at line 117 of file GHOST_WindowManager.h.
Referenced by beginFullScreen(), endFullScreen(), getFullScreen(), getFullScreenWindow(), getWindowFound(), and removeWindow().
|
protected |
The list of windows managed
Definition at line 114 of file GHOST_WindowManager.h.
Referenced by addWindow(), getWindowAssociatedWithOSWindow(), getWindowFound(), getWindows(), and removeWindow().