CEGUIFalImagerySection.h

00001 /***********************************************************************
00002     filename:   CEGUIFalImagerySection.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 _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 // Start of CEGUI namespace section
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 } // End of  CEGUI namespace section
00275 
00276 
00277 #if defined(_MSC_VER)
00278 #       pragma warning(pop)
00279 #endif
00280 
00281 #endif  // end of guard _CEGUIFalImagerySection_h_

Generated on Sun Nov 5 14:35:28 2006 for Crazy Eddies GUI System by  doxygen 1.4.7