00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
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
00278 private:
00279 typedef std::map<String, StateImagery> StateList;
00280 typedef std::map<String, ImagerySection> ImageryList;
00281 typedef std::map<String, NamedArea> NamedAreaList;
00282 typedef std::vector<WidgetComponent> WidgetList;
00283 typedef std::vector<PropertyInitialiser> PropertyList;
00284 typedef std::vector<PropertyDefinition> PropertyDefinitionList;
00285
00286 CEGUI::String d_lookName;
00287 ImageryList d_imagerySections;
00288 WidgetList d_childWidgets;
00289 StateList d_stateImagery;
00290 PropertyList d_properties;
00291 NamedAreaList d_namedAreas;
00292 mutable PropertyDefinitionList d_propertyDefinitions;
00293 };
00294
00295
00296 }
00297
00298
00299 #if defined(_MSC_VER)
00300 # pragma warning(pop)
00301 #endif
00302
00303 #endif // end of guard _CEGUIFalWidgetLookFeel_h_