Blender V2.61 - r43446
|
#include <GHOST_WindowManager.h>
Public Member Functions | |
GHOST_WindowManager () | |
virtual | ~GHOST_WindowManager () |
virtual GHOST_TSuccess | addWindow (GHOST_IWindow *window) |
virtual GHOST_TSuccess | removeWindow (const GHOST_IWindow *window) |
virtual bool | getWindowFound (const GHOST_IWindow *window) const |
virtual bool | getFullScreen (void) const |
virtual GHOST_IWindow * | getFullScreenWindow (void) const |
virtual GHOST_TSuccess | beginFullScreen (GHOST_IWindow *window, const bool stereoVisual) |
virtual GHOST_TSuccess | endFullScreen (void) |
virtual GHOST_TSuccess | setActiveWindow (GHOST_IWindow *window) |
virtual GHOST_IWindow * | getActiveWindow (void) const |
virtual void | setWindowInactive (const GHOST_IWindow *window) |
std::vector< GHOST_IWindow * > & | getWindows () |
virtual GHOST_IWindow * | getWindowAssociatedWithOSWindow (void *osWindow) |
bool | getAnyModifiedState () |
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 47 of file GHOST_WindowManager.h.
GHOST_WindowManager::GHOST_WindowManager | ( | ) |
Constructor.
Copyright (C) 2001 NaN Technologies B.V.
Definition at line 46 of file GHOST_WindowManager.cpp.
GHOST_WindowManager::~GHOST_WindowManager | ( | ) | [virtual] |
Destructor.
Definition at line 54 of file GHOST_WindowManager.cpp.
GHOST_TSuccess GHOST_WindowManager::addWindow | ( | GHOST_IWindow * | window | ) | [virtual] |
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 60 of file GHOST_WindowManager.cpp.
References getWindowFound(), GHOST_kFailure, GHOST_kSuccess, and m_windows.
Referenced by GHOST_SystemCocoa::createWindow(), GHOST_SystemWin32::createWindow(), GHOST_SystemCarbon::createWindow(), and GHOST_SystemX11::createWindow().
GHOST_TSuccess GHOST_WindowManager::beginFullScreen | ( | GHOST_IWindow * | window, |
const bool | stereoVisual | ||
) | [virtual] |
Activates fullscreen mode for a window.
window | The window displayed fullscreen. |
Definition at line 124 of file GHOST_WindowManager.cpp.
References 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 | ) | [virtual] |
Closes fullscreen mode down.
Definition at line 140 of file GHOST_WindowManager.cpp.
References 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 [virtual] |
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 175 of file GHOST_WindowManager.cpp.
References m_activeWindow.
Referenced by beginFullScreen(), GHOST_SystemCocoa::handleApplicationBecomeActiveEvent(), GHOST_SystemCarbon::handleKeyEvent(), GHOST_SystemCarbon::handleMouseEvent(), GHOST_SystemCocoa::handleOpenDocumentRequest(), GHOST_SystemCocoa::handleQuitRequest(), GHOST_SystemCarbon::handleTabletEvent(), GHOST_NDOFManager::sendMotionEvent(), GHOST_SystemCocoa::setCursorPosition(), GHOST_SystemCocoa::setMouseCursorPosition(), GHOST_SystemCarbon::sEventHandlerProc(), and GHOST_NDOFManager::updateButton().
bool GHOST_WindowManager::getAnyModifiedState | ( | ) |
Return true if any windows has a modified status
Definition at line 207 of file GHOST_WindowManager.cpp.
References m_windows.
Referenced by GHOST_SystemCocoa::handleOpenDocumentRequest(), and GHOST_SystemCocoa::handleQuitRequest().
bool GHOST_WindowManager::getFullScreen | ( | void | ) | const [virtual] |
Returns whether one of the windows is fullscreen.
Definition at line 112 of file GHOST_WindowManager.cpp.
References m_fullScreenWindow.
Referenced by beginFullScreen(), GHOST_System::beginFullScreen(), GHOST_System::endFullScreen(), endFullScreen(), GHOST_System::getFullScreen(), and getWindowFound().
GHOST_IWindow * GHOST_WindowManager::getFullScreenWindow | ( | void | ) | const [virtual] |
Returns pointer to the full-screen window.
Definition at line 118 of file GHOST_WindowManager.cpp.
References m_fullScreenWindow.
Referenced by GHOST_System::disposeWindow(), and GHOST_SystemCarbon::processEvents().
GHOST_IWindow * GHOST_WindowManager::getWindowAssociatedWithOSWindow | ( | void * | osWindow | ) | [virtual] |
Finds the window associated with an OS window object/handle
osWindow | The OS window object/handle |
Definition at line 195 of file GHOST_WindowManager.cpp.
References m_windows, and NULL.
Referenced by GHOST_SystemCocoa::handleKeyEvent(), GHOST_SystemCocoa::handleMouseEvent(), and GHOST_SystemCocoa::handleTabletEvent().
bool GHOST_WindowManager::getWindowFound | ( | const GHOST_IWindow * | window | ) | const [virtual] |
Returns whether the window is in our list.
window | Pointer to the window to query. |
Definition at line 94 of file GHOST_WindowManager.cpp.
References find(), getFullScreen(), m_fullScreenWindow, and m_windows.
Referenced by addWindow(), GHOST_System::disposeWindow(), setActiveWindow(), and GHOST_System::validWindow().
std::vector< GHOST_IWindow * > & GHOST_WindowManager::getWindows | ( | ) |
Return a vector of the windows currently managed by this class.
Definition at line 189 of file GHOST_WindowManager.cpp.
References m_windows.
Referenced by GHOST_SystemX11::getClipboard(), GHOST_SystemX11::getClipboard_xcout(), and GHOST_SystemX11::putClipboard().
GHOST_TSuccess GHOST_WindowManager::removeWindow | ( | const GHOST_IWindow * | window | ) | [virtual] |
Remove a window from our list.
window | Pointer to the window to be removed. |
Definition at line 74 of file GHOST_WindowManager.cpp.
References endFullScreen(), find(), GHOST_kFailure, GHOST_kSuccess, m_fullScreenWindow, m_windows, and setWindowInactive().
Referenced by GHOST_System::disposeWindow().
GHOST_TSuccess GHOST_WindowManager::setActiveWindow | ( | GHOST_IWindow * | window | ) | [virtual] |
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 160 of file GHOST_WindowManager.cpp.
References getWindowFound(), GHOST_kFailure, GHOST_kSuccess, and m_activeWindow.
Referenced by beginFullScreen(), GHOST_SystemCocoa::createWindow(), GHOST_SystemWin32::createWindow(), GHOST_SystemCarbon::createWindow(), GHOST_SystemX11::createWindow(), endFullScreen(), GHOST_SystemCocoa::handleWindowEvent(), GHOST_SystemCarbon::handleWindowEvent(), and GHOST_SystemWin32::processWindowEvent().
void GHOST_WindowManager::setWindowInactive | ( | const GHOST_IWindow * | window | ) | [virtual] |
Set this window to be inactive (not receiving events).
window | The window to decativate. |
Definition at line 181 of file GHOST_WindowManager.cpp.
References m_activeWindow.
Referenced by endFullScreen(), GHOST_SystemCocoa::handleWindowEvent(), GHOST_SystemCarbon::handleWindowEvent(), and removeWindow().
GHOST_IWindow* GHOST_WindowManager::m_activeWindow [protected] |
The active window.
Definition at line 159 of file GHOST_WindowManager.h.
Referenced by getActiveWindow(), setActiveWindow(), and setWindowInactive().
Window that was active before entering fullscreen state.
Definition at line 162 of file GHOST_WindowManager.h.
Referenced by beginFullScreen(), and endFullScreen().
GHOST_IWindow* GHOST_WindowManager::m_fullScreenWindow [protected] |
Window in fullscreen state. There can be only one of this which is not in or window list.
Definition at line 156 of file GHOST_WindowManager.h.
Referenced by beginFullScreen(), endFullScreen(), getFullScreen(), getFullScreenWindow(), getWindowFound(), and removeWindow().
std::vector<GHOST_IWindow*> GHOST_WindowManager::m_windows [protected] |
The list of windows managed
Definition at line 153 of file GHOST_WindowManager.h.
Referenced by addWindow(), getAnyModifiedState(), getWindowAssociatedWithOSWindow(), getWindowFound(), getWindows(), and removeWindow().