Blender V2.61 - r43446
Public Member Functions | Protected Attributes

GHOST_WindowManager Class Reference

#include <GHOST_WindowManager.h>

List of all members.

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_IWindowgetFullScreenWindow (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_IWindowgetActiveWindow (void) const
virtual void setWindowInactive (const GHOST_IWindow *window)
std::vector< GHOST_IWindow * > & getWindows ()
virtual GHOST_IWindowgetWindowAssociatedWithOSWindow (void *osWindow)
bool getAnyModifiedState ()

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).

Author:
Maarten Gribnau
Date:
May 11, 2001

Definition at line 47 of file GHOST_WindowManager.h.


Constructor & Destructor Documentation

GHOST_WindowManager::GHOST_WindowManager ( )

Constructor.

Copyright (C) 2001 NaN Technologies B.V.

Author:
Maarten Gribnau
Date:
May 11, 2001

Definition at line 46 of file GHOST_WindowManager.cpp.

GHOST_WindowManager::~GHOST_WindowManager ( ) [virtual]

Destructor.

Definition at line 54 of file GHOST_WindowManager.cpp.


Member Function Documentation

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.

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

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.

Parameters:
windowThe window displayed fullscreen.
Returns:
Indication of success.

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.

Returns:
Indication of success.

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]
bool GHOST_WindowManager::getAnyModifiedState ( )

Return true if any windows has a modified status

Returns:
True if any window has unsaved changes

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.

Returns:
A boolean indicator.

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.

Returns:
The fll-screen window (0 if not in full-screen).

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

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

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.

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

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.

Warning:
It is very dangerous to mess with the contents of this vector. Please do not destroy or add windows use the interface above for this,

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.

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

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.

Parameters:
windowThe 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).

Parameters:
windowThe 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().


Member Data Documentation

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().

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().


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