Crazy Eddie's GUI System  0.8.7
SectionSpecification.h
1 /***********************************************************************
2  created: Mon Jun 13 2005
3  author: Paul D Turner <paul@cegui.org.uk>
4 *************************************************************************/
5 /***************************************************************************
6  * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining
9  * a copy of this software and associated documentation files (the
10  * "Software"), to deal in the Software without restriction, including
11  * without limitation the rights to use, copy, modify, merge, publish,
12  * distribute, sublicense, and/or sell copies of the Software, and to
13  * permit persons to whom the Software is furnished to do so, subject to
14  * the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be
17  * included in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  ***************************************************************************/
27 #ifndef _CEGUIFalSectionSpecification_h_
28 #define _CEGUIFalSectionSpecification_h_
29 
30 #include "../Window.h"
31 #include "../ColourRect.h"
32 
33 
34 // Start of CEGUI namespace section
35 namespace CEGUI
36 {
37  // forward refs
38  class WidgetLookFeel;
39 
47  class CEGUIEXPORT SectionSpecification :
48  public AllocatedObject<SectionSpecification>
49  {
50  public:
52 
81  SectionSpecification(const String& owner, const String& sectionName,
82  const String& controlPropertySource,
83  const String& controlPropertyValue,
84  const String& controlPropertyWidget);
85 
117  SectionSpecification(const String& owner, const String& sectionName,
118  const String& controlPropertySource,
119  const String& controlPropertyValue,
120  const String& controlPropertyWidget,
121  const ColourRect& cols);
122 
133  void render(Window& srcWindow, const ColourRect* modcols = 0, const Rectf* clipper = 0, bool clipToDisplay = false) const;
134 
148  void render(Window& srcWindow, const Rectf& baseRect, const ColourRect* modcols = 0, const Rectf* clipper = 0, bool clipToDisplay = false) const;
149 
157  const String& getOwnerWidgetLookFeel() const;
158 
169  void setOwnerWidgetLookFeel(const String& owner);
170 
178  const String& getSectionName() const;
189  void setSectionName(const String& name);
190 
199  const ColourRect& getOverrideColours() const;
200 
211  void setOverrideColours(const ColourRect& cols);
212 
221  bool isUsingOverrideColours() const;
222 
234  void setUsingOverrideColours(bool setting = true);
242  const String& getOverrideColoursPropertySource() const;
243 
254  void setOverrideColoursPropertySource(const String& property);
255 
264  const String& getRenderControlPropertySource() const;
265 
277  void setRenderControlPropertySource(const String& property);
278 
290  const String& getRenderControlValue() const;
291 
303  void setRenderControlValue(const String& value);
304 
319  const String& getRenderControlWidget() const;
320 
335  void setRenderControlWidget(const String& widget);
336 
348  void writeXMLToStream(XMLSerializer& xml_stream) const;
349 
350  protected:
361  void initColourRectForOverride(const Window& wnd, ColourRect& cr) const;
362 
366  bool shouldBeDrawn(const Window& wnd) const;
367 
368  private:
369  String d_owner;
370  String d_sectionName;
371  ColourRect d_coloursOverride;
372  bool d_usingColourOverride;
373  String d_colourPropertyName;
374  String d_renderControlProperty;
377  String d_renderControlValue;
379  String d_renderControlWidget;
380  };
381 
382 
383 } // End of CEGUI namespace section
384 
385 
386 #endif // end of guard _CEGUIFalSectionSpecification_h_
Definition: MemoryAllocatedObject.h:109
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Class that holds details of colours for the four corners of a rectangle.
Definition: ColourRect.h:43
Class that represents a simple 'link' to an ImagerySection.
Definition: SectionSpecification.h:47
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:149
Class used to create XML Document.
Definition: XMLSerializer.h:85
String class used within the GUI system.
Definition: String.h:62