00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _CEGUIFalSectionSpecification_h_
00029 #define _CEGUIFalSectionSpecification_h_
00030
00031 #include "../CEGUIWindow.h"
00032 #include "../CEGUIColourRect.h"
00033
00034
00035
00036 namespace CEGUI
00037 {
00038
00039 class WidgetLookFeel;
00040
00048 class CEGUIEXPORT SectionSpecification
00049 {
00050 public:
00079 SectionSpecification(const String& owner, const String& sectionName,
00080 const String& controlPropertySource,
00081 const String& controlPropertyValue,
00082 const String& controlPropertyWidget);
00083
00115 SectionSpecification(const String& owner, const String& sectionName,
00116 const String& controlPropertySource,
00117 const String& controlPropertyValue,
00118 const String& controlPropertyWidget,
00119 const ColourRect& cols);
00120
00131 void render(Window& srcWindow, const ColourRect* modcols = 0, const Rect* clipper = 0, bool clipToDisplay = false) const;
00132
00146 void render(Window& srcWindow, const Rect& baseRect, const ColourRect* modcols = 0, const Rect* clipper = 0, bool clipToDisplay = false) const;
00147
00155 const String& getOwnerWidgetLookFeel() const;
00156
00164 const String& getSectionName() const;
00165
00174 const ColourRect& getOverrideColours() const;
00175
00186 void setOverrideColours(const ColourRect& cols);
00187
00196 bool isUsingOverrideColours() const;
00197
00209 void setUsingOverrideColours(bool setting = true);
00210
00221 void setOverrideColoursPropertySource(const String& property);
00222
00234 void setOverrideColoursPropertyIsColourRect(bool setting = true);
00235
00247 void setRenderControlPropertySource(const String& property);
00248
00260 void setRenderControlValue(const String& value);
00261
00276 void setRenderControlWidget(const String& widget);
00277
00289 void writeXMLToStream(XMLSerializer& xml_stream) const;
00290
00291 protected:
00302 void initColourRectForOverride(const Window& wnd, ColourRect& cr) const;
00303
00307 bool shouldBeDrawn(const Window& wnd) const;
00308
00309 private:
00310 String d_owner;
00311 String d_sectionName;
00312 ColourRect d_coloursOverride;
00313 bool d_usingColourOverride;
00314 String d_colourPropertyName;
00315 bool d_colourProperyIsRect;
00316
00317 String d_renderControlProperty;
00319 String d_renderControlValue;
00321 String d_renderControlWidget;
00322 };
00323
00324
00325 }
00326
00327
00328 #endif // end of guard _CEGUIFalSectionSpecification_h_