Crazy Eddie's GUI System  0.8.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
StateImagery.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 _CEGUIFalStateImagery_h_
28 #define _CEGUIFalStateImagery_h_
29 
30 #include "./LayerSpecification.h"
31 #include "../Window.h"
32 #include <set>
33 
34 #if defined(_MSC_VER)
35 # pragma warning(push)
36 # pragma warning(disable : 4251)
37 #endif
38 
39 // Start of CEGUI namespace section
40 namespace CEGUI
41 {
46  class CEGUIEXPORT StateImagery :
47  public AllocatedObject<StateImagery>
48  {
49  public:
55  d_clipToDisplay(false)
56  {}
57 
65  StateImagery(const String& name);
66 
77  void render(Window& srcWindow, const ColourRect* modcols = 0, const Rectf* clipper = 0) const;
78 
92  void render(Window& srcWindow, const Rectf& baseRect, const ColourRect* modcols = 0, const Rectf* clipper = 0) const;
93 
104  void addLayer(const LayerSpecification& layer);
105 
113  void clearLayers();
114 
122  const String& getName() const;
123 
131  void setName(const String& name);
132 
143  bool isClippedToDisplay() const;
144 
158  void setClippedToDisplay(bool setting);
159 
171  void writeXMLToStream(XMLSerializer& xml_stream) const;
172 
173  private:
174  typedef std::multiset<LayerSpecification> LayersList;
175 
176  CEGUI::String d_stateName;
177  LayersList d_layers;
178  bool d_clipToDisplay;
179  public:
180  typedef ConstVectorIterator<LayersList> LayerIterator;
181 
182  LayerIterator getLayerIterator() const;
183 
184  };
185 
186 } // End of CEGUI namespace section
187 
188 
189 #if defined(_MSC_VER)
190 # pragma warning(pop)
191 #endif
192 
193 #endif // end of guard _CEGUIFalStateImagery_h_