00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _CEGUIFalImagerySection_h_
00029 #define _CEGUIFalImagerySection_h_
00030
00031 #include "falagard/CEGUIFalImageryComponent.h"
00032 #include "falagard/CEGUIFalTextComponent.h"
00033 #include "falagard/CEGUIFalFrameComponent.h"
00034 #include "CEGUIXMLSerializer.h"
00035
00036 #if defined(_MSC_VER)
00037 # pragma warning(push)
00038 # pragma warning(disable : 4251)
00039 #endif
00040
00041
00042 namespace CEGUI
00043 {
00048 class CEGUIEXPORT ImagerySection
00049 {
00050 public:
00055 ImagerySection();
00056
00064 ImagerySection(const String& name);
00065
00082 void render(Window& srcWindow, float base_z, const CEGUI::ColourRect* modColours = 0, const Rect* clipper = 0, bool clipToDisplay = false) const;
00083
00103 void render(Window& srcWindow, const Rect& baseRect, float base_z, const CEGUI::ColourRect* modColours = 0, const Rect* clipper = 0, bool clipToDisplay = false) const;
00104
00115 void addImageryComponent(const ImageryComponent& img);
00116
00124 void clearImageryComponents();
00125
00136 void addTextComponent(const TextComponent& text);
00137
00145 void clearTextComponents();
00146
00154 void clearFrameComponents();
00155
00166 void addFrameComponent(const FrameComponent& frame);
00167
00175 const ColourRect& getMasterColours() const;
00176
00187 void setMasterColours(const ColourRect& cols);
00188
00196 const String& getName() const;
00197
00208 void setMasterColoursPropertySource(const String& property);
00209
00221 void setMasterColoursPropertyIsColourRect(bool setting = true);
00222
00227 Rect getBoundingRect(const Window& wnd) const;
00228
00233 Rect getBoundingRect(const Window& wnd, const Rect& rect) const;
00234
00246 void writeXMLToStream(XMLSerializer& xml_stream) const;
00247
00248 protected:
00258 void initMasterColourRect(const Window& wnd, ColourRect& cr) const;
00259
00260 private:
00261 typedef std::vector<ImageryComponent> ImageryList;
00262 typedef std::vector<TextComponent> TextList;
00263 typedef std::vector<FrameComponent> FrameList;
00264
00265 CEGUI::String d_name;
00266 CEGUI::ColourRect d_masterColours;
00267 FrameList d_frames;
00268 ImageryList d_images;
00269 TextList d_texts;
00270 String d_colourPropertyName;
00271 bool d_colourProperyIsRect;
00272 };
00273
00274 }
00275
00276
00277 #if defined(_MSC_VER)
00278 # pragma warning(pop)
00279 #endif
00280
00281 #endif // end of guard _CEGUIFalImagerySection_h_