Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUIWindowManager.h

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIWindowManager.h
00003         created:        21/2/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Defines the interface for the WindowManager object
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 *************************************************************************/
00026 #ifndef _CEGUIWindowManager_h_
00027 #define _CEGUIWindowManager_h_
00028 
00029 #include "CEGUIBase.h"
00030 #include "CEGUIString.h"
00031 #include "CEGUISingleton.h"
00032 #include "CEGUILogger.h"
00033 #include "CEGUIIteratorBase.h"
00034 #include <map>
00035 
00036 #if defined(_MSC_VER)
00037 #       pragma warning(push)
00038 #       pragma warning(disable : 4275)
00039 #       pragma warning(disable : 4251)
00040 #endif
00041 
00042 
00043 // Start of CEGUI namespace section
00044 namespace CEGUI
00045 {
00055 class CEGUIBASE_API WindowManager : public Singleton <WindowManager>
00056 {
00057 public:
00079         typedef bool PropertyCallback(Window* window, String& propname, String& propvalue, void* userdata);
00080         
00081         /*************************************************************************
00082                 Construction and Destruction
00083         *************************************************************************/
00092         WindowManager(void) { Logger::getSingleton().logEvent((utf8*)"CEGUI::WindowManager singleton created"); }
00093 
00094 
00102         ~WindowManager(void);
00103 
00104 
00112         static  WindowManager&  getSingleton(void);
00113 
00114 
00122         static  WindowManager*  getSingletonPtr(void);
00123 
00124 
00125         /*************************************************************************
00126                 Window Related Methods
00127         *************************************************************************/
00145         Window* createWindow(const String& type, const String& name);
00146 
00147 
00160         void    destroyWindow(Window* window);
00161 
00162 
00175         void    destroyWindow(const String& window);
00176 
00177 
00190         Window* getWindow(const String& name) const;
00191 
00192 
00203         bool    isWindowPresent(const String& name) const;
00204 
00205 
00215         void    destroyAllWindows(void);
00216 
00217 
00246         Window* loadWindowLayout(const String& filename, const String& name_prefix = "", const String& resourceGroup = "", PropertyCallback* callback = NULL, void* userdata = NULL);
00247 
00248 
00249 private:
00250         /*************************************************************************
00251                 Implementation Constants
00252         *************************************************************************/
00253         static const char       GUILayoutSchemaName[];                  
00254 
00255 
00256         /*************************************************************************
00257                 Implementation Data
00258         *************************************************************************/
00259         typedef std::map<String, Window*>                       WindowRegistry;                         
00260 
00261         WindowRegistry                  d_windowRegistry;                       
00262 
00263 
00264 public:
00265         /*************************************************************************
00266                 Iterator stuff
00267         *************************************************************************/
00268         typedef ConstBaseIterator<WindowRegistry>       WindowIterator;
00269 
00274         WindowIterator  getIterator(void) const;
00275 };
00276 
00277 } // End of  CEGUI namespace section
00278 
00279 #if defined(_MSC_VER)
00280 #       pragma warning(pop)
00281 #endif
00282 
00283 #endif  // end of guard _CEGUIWindowManager_h_

Generated on Wed Feb 16 12:41:08 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1