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