Crazy Eddies GUI System: CEGUIFalSectionSpecification.h Source File

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

CEGUIFalSectionSpecification.h

    00001 /***********************************************************************
    00002     filename:   CEGUIFalSectionSpecification.h
    00003     created:    Mon Jun 13 2005
    00004     author:     Paul D Turner <paul@cegui.org.uk>
    00005 *************************************************************************/
    00006 /***************************************************************************
    00007  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
    00008  *
    00009  *   Permission is hereby granted, free of charge, to any person obtaining
    00010  *   a copy of this software and associated documentation files (the
    00011  *   "Software"), to deal in the Software without restriction, including
    00012  *   without limitation the rights to use, copy, modify, merge, publish,
    00013  *   distribute, sublicense, and/or sell copies of the Software, and to
    00014  *   permit persons to whom the Software is furnished to do so, subject to
    00015  *   the following conditions:
    00016  *
    00017  *   The above copyright notice and this permission notice shall be
    00018  *   included in all copies or substantial portions of the Software.
    00019  *
    00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
    00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    00026  *   OTHER DEALINGS IN THE SOFTWARE.
    00027  ***************************************************************************/
    00028 #ifndef _CEGUIFalSectionSpecification_h_
    00029 #define _CEGUIFalSectionSpecification_h_
    00030
    00031 #include "../CEGUIWindow.h"
    00032 #include "../CEGUIColourRect.h"
    00033
    00034
    00035 // Start of CEGUI namespace section
    00036 namespace CEGUI
    00037 {
    00038     // forward refs
    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 } // End of  CEGUI namespace section
    00326
    00327
    00328 #endif  // end of guard _CEGUIFalSectionSpecification_h_