Crazy Eddie's GUI System  0.8.7
LayerSpecification.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 _CEGUIFalLayerSpecification_h_
28 #define _CEGUIFalLayerSpecification_h_
29 
30 #include "./SectionSpecification.h"
31 #include "../Window.h"
32 
33 #if defined(_MSC_VER)
34 # pragma warning(push)
35 # pragma warning(disable : 4251)
36 #endif
37 
38 // Start of CEGUI namespace section
39 namespace CEGUI
40 {
45  class CEGUIEXPORT LayerSpecification :
46  public AllocatedObject<LayerSpecification>
47  {
48  public:
50  typedef std::vector<SectionSpecification*
52 
53 
62  LayerSpecification(uint priority = 0);
63 
74  void render(Window& srcWindow, const ColourRect* modcols = 0, const Rectf* clipper = 0, bool clipToDisplay = false) const;
75 
89  void render(Window& srcWindow, const Rectf& baseRect, const ColourRect* modcols = 0, const Rectf* clipper = 0, bool clipToDisplay = false) const;
90 
103  void addSectionSpecification(const SectionSpecification& section);
104 
112  void clearSectionSpecifications();
113 
121  uint getLayerPriority() const;
129  void setLayerPriority(uint priority);
130 
142  void writeXMLToStream(XMLSerializer& xml_stream) const;
143 
153  SectionSpecificationPointerList getSectionSpecificationPointers();
154 
155 
157  bool operator< (const LayerSpecification& otherLayerSpec) const;
158 
159  private:
161  typedef std::vector<SectionSpecification
162  CEGUI_VECTOR_ALLOC(SectionSpecification)> SectionList;
163 
164  SectionList d_sections;
165  uint d_layerPriority;
166  public:
170  SectionIterator getSectionIterator() const;
171  };
172 
173 } // End of CEGUI namespace section
174 
175 
176 #if defined(_MSC_VER)
177 # pragma warning(pop)
178 #endif
179 
180 #endif // end of guard _CEGUIFalLayerSpecification_h_
ConstVectorIterator< SectionList > SectionIterator
Definition: LayerSpecification.h:168
std::vector< SectionSpecification *CEGUI_VECTOR_ALLOC(SectionSpecification *)> SectionSpecificationPointerList
The container type for SectionSpecifications.
Definition: LayerSpecification.h:51
Class that encapsulates a single layer of imagery.
Definition: LayerSpecification.h:45
Definition: MemoryAllocatedObject.h:109
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
iterator for vectors
Definition: IteratorBase.h:287
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
bool CEGUIEXPORT operator<(const String &str1, const String &str2)
Return true if String str1 is lexicographically less than String str2.
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