CEGUIFalWidgetLookFeel.h

00001 /************************************************************************
00002     filename:   CEGUIFalWidgetLookFeel.h
00003     created:    Mon Jun 13 2005
00004     author:     Paul D Turner <paul@cegui.org.uk>
00005 *************************************************************************/
00006 /*************************************************************************
00007     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00008     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00009  
00010     This library is free software; you can redistribute it and/or
00011     modify it under the terms of the GNU Lesser General Public
00012     License as published by the Free Software Foundation; either
00013     version 2.1 of the License, or (at your option) any later version.
00014  
00015     This library is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018     Lesser General Public License for more details.
00019  
00020     You should have received a copy of the GNU Lesser General Public
00021     License along with this library; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 *************************************************************************/
00024 #ifndef _CEGUIFalWidgetLookFeel_h_
00025 #define _CEGUIFalWidgetLookFeel_h_
00026 
00027 #include "falagard/CEGUIFalStateImagery.h"
00028 #include "falagard/CEGUIFalWidgetComponent.h"
00029 #include "falagard/CEGUIFalImagerySection.h"
00030 #include "falagard/CEGUIFalPropertyInitialiser.h"
00031 #include "falagard/CEGUIFalPropertyDefinition.h"
00032 #include "falagard/CEGUIFalNamedArea.h"
00033 #include <map>
00034 
00035 #if defined(_MSC_VER)
00036 #       pragma warning(push)
00037 #       pragma warning(disable : 4251)
00038 #endif
00039 
00040 
00041 // Start of CEGUI namespace section
00042 namespace CEGUI
00043 {
00048     class CEGUIEXPORT WidgetLookFeel
00049     {
00050     public:
00051         WidgetLookFeel(const String& name);
00052         WidgetLookFeel() {}
00053 
00061         const StateImagery& getStateImagery(const CEGUI::String& state) const;
00062 
00070         const ImagerySection& getImagerySection(const CEGUI::String& section) const;
00071 
00079         const String& getName() const;
00080 
00090         void addImagerySection(const ImagerySection& section);
00091 
00101         void addWidgetComponent(const WidgetComponent& widget);
00102 
00112         void addStateSpecification(const StateImagery& state);
00113 
00123         void addPropertyInitialiser(const PropertyInitialiser& initialiser);
00124 
00132         void clearImagerySections();
00133 
00141         void clearWidgetComponents();
00142 
00150         void clearStateSpecifications();
00151 
00159         void clearPropertyInitialisers();
00160 
00172         void initialiseWidget(Window& widget) const;
00173 
00185         bool isStateImageryPresent(const String& state) const;
00186 
00197         void addNamedArea(const NamedArea& area);
00198 
00206         void clearNamedAreas();
00207 
00218         const NamedArea& getNamedArea(const String& name) const;
00219 
00231         bool isNamedAreaDefined(const String& name) const;
00232 
00243         void layoutChildWidgets(const Window& owner) const;
00244 
00255         void addPropertyDefinition(const PropertyDefinition& propdef);
00256 
00264         void clearPropertyDefinitions();
00265 
00276         void writeXMLToStream(OutStream& out_stream) const;
00277 
00291         void renameChildren(const Window& widget, const String& newBaseName) const;
00292 
00293     private:
00294         typedef std::map<String, StateImagery>    StateList;
00295         typedef std::map<String, ImagerySection>  ImageryList;
00296         typedef std::map<String, NamedArea>       NamedAreaList;
00297         typedef std::vector<WidgetComponent>      WidgetList;
00298         typedef std::vector<PropertyInitialiser>  PropertyList;
00299         typedef std::vector<PropertyDefinition>   PropertyDefinitionList;
00300 
00301         CEGUI::String   d_lookName;         
00302         ImageryList     d_imagerySections;  
00303         WidgetList      d_childWidgets;     
00304         StateList       d_stateImagery;     
00305         PropertyList    d_properties;       
00306         NamedAreaList   d_namedAreas;       
00307         mutable PropertyDefinitionList  d_propertyDefinitions;  
00308     };
00309 
00310 
00311 } // End of  CEGUI namespace section
00312 
00313 
00314 #if defined(_MSC_VER)
00315 #       pragma warning(pop)
00316 #endif
00317 
00318 #endif  // end of guard _CEGUIFalWidgetLookFeel_h_

Generated on Sat Nov 26 10:09:54 2005 for Crazy Eddies GUI System by  doxygen 1.4.5