Crazy Eddie's GUI System  0.8.4
SectionSpecification.h
00001 /***********************************************************************
00002     created:    Mon Jun 13 2005
00003     author:     Paul D Turner <paul@cegui.org.uk>
00004 *************************************************************************/
00005 /***************************************************************************
00006  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
00007  *
00008  *   Permission is hereby granted, free of charge, to any person obtaining
00009  *   a copy of this software and associated documentation files (the
00010  *   "Software"), to deal in the Software without restriction, including
00011  *   without limitation the rights to use, copy, modify, merge, publish,
00012  *   distribute, sublicense, and/or sell copies of the Software, and to
00013  *   permit persons to whom the Software is furnished to do so, subject to
00014  *   the following conditions:
00015  *
00016  *   The above copyright notice and this permission notice shall be
00017  *   included in all copies or substantial portions of the Software.
00018  *
00019  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00020  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00021  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00022  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00023  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00024  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00025  *   OTHER DEALINGS IN THE SOFTWARE.
00026  ***************************************************************************/
00027 #ifndef _CEGUIFalSectionSpecification_h_
00028 #define _CEGUIFalSectionSpecification_h_
00029 
00030 #include "../Window.h"
00031 #include "../ColourRect.h"
00032 
00033 
00034 // Start of CEGUI namespace section
00035 namespace CEGUI
00036 {
00037     // forward refs
00038     class WidgetLookFeel;
00039 
00047     class CEGUIEXPORT SectionSpecification :
00048         public AllocatedObject<SectionSpecification>
00049     {
00050     public:
00051         SectionSpecification();
00052 
00081         SectionSpecification(const String& owner, const String& sectionName,
00082                              const String& controlPropertySource,
00083                              const String& controlPropertyValue,
00084                              const String& controlPropertyWidget);
00085 
00117         SectionSpecification(const String& owner, const String& sectionName,
00118                              const String& controlPropertySource,
00119                              const String& controlPropertyValue,
00120                              const String& controlPropertyWidget,
00121                              const ColourRect& cols);
00122 
00133         void render(Window& srcWindow, const ColourRect* modcols = 0, const Rectf* clipper = 0, bool clipToDisplay = false) const;
00134 
00148         void render(Window& srcWindow, const Rectf& baseRect, const ColourRect* modcols = 0, const Rectf* clipper = 0, bool clipToDisplay = false) const;
00149 
00157         const String& getOwnerWidgetLookFeel() const;
00158 
00169         void setOwnerWidgetLookFeel(const String& owner);
00170 
00178         const String& getSectionName() const;
00189         void setSectionName(const String& name);
00190 
00199         const ColourRect& getOverrideColours() const;
00200 
00211         void setOverrideColours(const ColourRect& cols);
00212 
00221         bool isUsingOverrideColours() const;
00222 
00234         void setUsingOverrideColours(bool setting = true);
00242         const String& getOverrideColoursPropertySource() const;
00243 
00254         void setOverrideColoursPropertySource(const String& property);
00255 
00264         const String& getRenderControlPropertySource() const;
00265 
00277         void setRenderControlPropertySource(const String& property);
00278 
00290         const String& getRenderControlValue() const;
00291 
00303         void setRenderControlValue(const String& value);
00304 
00319         const String& getRenderControlWidget() const;
00320 
00335         void setRenderControlWidget(const String& widget);
00336 
00348         void writeXMLToStream(XMLSerializer& xml_stream) const;
00349 
00350     protected:
00361         void initColourRectForOverride(const Window& wnd, ColourRect& cr) const;
00362 
00366         bool shouldBeDrawn(const Window& wnd) const;
00367 
00368     private:
00369         String          d_owner;                
00370         String          d_sectionName;          
00371         ColourRect      d_coloursOverride;      
00372         bool            d_usingColourOverride;  
00373         String          d_colourPropertyName;   
00374 
00375         String d_renderControlProperty;
00377         String d_renderControlValue;
00379         String d_renderControlWidget;
00380     };
00381 
00382 
00383 } // End of  CEGUI namespace section
00384 
00385 
00386 #endif  // end of guard _CEGUIFalSectionSpecification_h_
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends