Blender V2.61 - r43446

GHOST_WindowManager.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00033 #ifndef _GHOST_WINDOW_MANAGER_H_
00034 #define _GHOST_WINDOW_MANAGER_H_
00035 
00036 #include <vector>
00037 
00038 #include "GHOST_Rect.h"
00039 #include "GHOST_IWindow.h"
00040 
00041 
00047 class GHOST_WindowManager
00048 {
00049 public:
00053     GHOST_WindowManager();
00054 
00058     virtual ~GHOST_WindowManager();
00059 
00066     virtual GHOST_TSuccess addWindow(GHOST_IWindow* window);
00067 
00073     virtual GHOST_TSuccess removeWindow(const GHOST_IWindow* window);
00074 
00080     virtual bool getWindowFound(const GHOST_IWindow* window) const;
00081 
00086     virtual bool getFullScreen(void) const;
00087 
00092     virtual GHOST_IWindow* getFullScreenWindow(void) const;
00093 
00099     virtual GHOST_TSuccess beginFullScreen(GHOST_IWindow* window, const bool stereoVisual);
00100 
00105     virtual GHOST_TSuccess endFullScreen(void);
00106 
00112     virtual GHOST_TSuccess setActiveWindow(GHOST_IWindow* window);
00113     
00119     virtual GHOST_IWindow* getActiveWindow(void) const;
00120     
00121 
00126     virtual void setWindowInactive(const GHOST_IWindow* window);
00127     
00128 
00136     std::vector<GHOST_IWindow *> & getWindows();
00137     
00143     virtual GHOST_IWindow* getWindowAssociatedWithOSWindow(void* osWindow);
00144     
00149     bool getAnyModifiedState();
00150 
00151 protected:
00153     std::vector<GHOST_IWindow*> m_windows;
00154 
00156     GHOST_IWindow* m_fullScreenWindow;
00157 
00159     GHOST_IWindow* m_activeWindow;
00160 
00162     GHOST_IWindow* m_activeWindowBeforeFullScreen;
00163 
00164 #ifdef WITH_CXX_GUARDEDALLOC
00165 public:
00166     void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_WindowManager"); }
00167     void operator delete( void *mem ) { MEM_freeN(mem); }
00168 #endif
00169     
00170 };
00171 
00172 #endif // _GHOST_WINDOW_MANAGER_H_
00173