CEGUIFalagard_xmlHandler.h

00001 /************************************************************************
00002     filename:   CEGUIFalagard_xmlHandler.h
00003     created:    Fri Jun 17 2005
00004     author:     Paul D Turner <paul@cegui.org.uk>
00005 *************************************************************************/
00006 /*************************************************************************
00007     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00008     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00009  
00010     This library is free software; you can redistribute it and/or
00011     modify it under the terms of the GNU Lesser General Public
00012     License as published by the Free Software Foundation; either
00013     version 2.1 of the License, or (at your option) any later version.
00014  
00015     This library is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018     Lesser General Public License for more details.
00019  
00020     You should have received a copy of the GNU Lesser General Public
00021     License along with this library; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 *************************************************************************/
00024 #ifndef _CEGUIFalagard_xmlHandler_h_
00025 #define _CEGUIFalagard_xmlHandler_h_
00026 
00027 #include "CEGUIXMLHandler.h"
00028 #include "CEGUIcolour.h"
00029 #include "falagard/CEGUIFalDimensions.h"
00030 #include "CEGUIWindow.h"
00031 #include <vector>
00032 
00033 // Start of CEGUI namespace section
00034 namespace CEGUI
00035 {
00036     // forward refs
00037     class WidgetLookManager;
00038     class WidgetLookFeel;
00039     class WidgetComponent;
00040     class ImagerySection;
00041     class StateImagery;
00042     class LayerSpecification;
00043     class SectionSpecification;
00044     class ImageryComponent;
00045     class ComponentArea;
00046     class Dimension;
00047     class TextComponent;
00048     class NamedArea;
00049     class FrameComponent;
00050 
00055     class Falagard_xmlHandler : public XMLHandler
00056     {
00057     public:
00062         Falagard_xmlHandler(WidgetLookManager* mgr);
00063 
00068         ~Falagard_xmlHandler();
00069 
00070         /*************************************************************************
00071             XMLHandler base class overrides
00072         *************************************************************************/
00073         void elementStart(const String& element, const XMLAttributes& attributes);
00074         void elementEnd(const String& element);
00075 
00076     private:
00077         /*************************************************************************
00078             Implementation Constants
00079         *************************************************************************/
00080         // element names
00081         static const String FalagardElement;            
00082         static const String WidgetLookElement;          
00083         static const String ChildElement;               
00084         static const String ImagerySectionElement;      
00085         static const String StateImageryElement;        
00086         static const String LayerElement;               
00087         static const String SectionElement;             
00088         static const String ImageryComponentElement;    
00089         static const String TextComponentElement;       
00090         static const String FrameComponentElement;      
00091         static const String AreaElement;                
00092         static const String ImageElement;               
00093         static const String ColoursElement;             
00094         static const String VertFormatElement;          
00095         static const String HorzFormatElement;          
00096         static const String VertAlignmentElement;       
00097         static const String HorzAlignmentElement;       
00098         static const String PropertyElement;            
00099                 static const String DimElement;                 
00100                 static const String UnifiedDimElement;          
00101         static const String AbsoluteDimElement;         
00102         static const String ImageDimElement;            
00103         static const String WidgetDimElement;           
00104         static const String FontDimElement;             
00105         static const String PropertyDimElement;         
00106         static const String TextElement;                
00107         static const String ColourPropertyElement;      
00108         static const String ColourRectPropertyElement;  
00109         static const String NamedAreaElement;           
00110         static const String PropertyDefinitionElement;  
00111         static const String DimOperatorElement;         
00112         static const String VertFormatPropertyElement;  
00113         static const String HorzFormatPropertyElement;  
00114         static const String AreaPropertyElement;        
00115         static const String ImagePropertyElement;       
00116         // attribute names
00117         static const String TopLeftAttribute;           
00118         static const String TopRightAttribute;          
00119         static const String BottomLeftAttribute;        
00120         static const String BottomRightAttribute;       
00121         static const String ImagesetAttribute;          
00122         static const String ImageAttribute;             
00123         static const String TypeAttribute;              
00124         static const String NameAttribute;              
00125         static const String PriorityAttribute;          
00126         static const String SectionNameAttribute;       
00127         static const String NameSuffixAttribute;        
00128         static const String LookAttribute;              
00129         static const String ScaleAttribute;             
00130         static const String OffsetAttribute;            
00131         static const String ValueAttribute;             
00132         static const String DimensionAttribute;         
00133         static const String WidgetAttribute;            
00134         static const String StringAttribute;            
00135         static const String FontAttribute;              
00136         static const String InitialValueAttribute;      
00137         static const String ClippedAttribute;           
00138         static const String OperatorAttribute;          
00139         static const String PaddingAttribute;           
00140         static const String LayoutOnWriteAttribute;     
00141         static const String RedrawOnWriteAttribute;     
00142 
00143         /*************************************************************************
00144             helper methods
00145         **************************************************************************/
00146         static argb_t hexStringToARGB(const String& str);
00147 
00148         /*************************************************************************
00149             implementation methods
00150         **************************************************************************/
00151         void assignAreaDimension(Dimension& dim);
00152 
00153         void doBaseDimStart(const BaseDim* dim);
00154         void doBaseDimEnd();
00155 
00156         /*************************************************************************
00157             Implementation Data
00158         *************************************************************************/
00159         WidgetLookManager* d_manager;
00160 
00161         // these hold pointers to various objects under construction.
00162         WidgetLookFeel*     d_widgetlook;
00163         WidgetComponent*    d_childcomponent;
00164         ImagerySection*     d_imagerysection;
00165         StateImagery*       d_stateimagery;
00166         LayerSpecification* d_layer;
00167         SectionSpecification* d_section;
00168         ImageryComponent*   d_imagerycomponent;
00169         ComponentArea*   d_area;
00170         Dimension       d_dimension;
00171         TextComponent*  d_textcomponent;
00172         NamedArea*      d_namedArea;
00173         FrameComponent*  d_framecomponent;
00174 
00175         std::vector<BaseDim*>    d_dimStack;
00176     };
00177 
00178 } // End of  CEGUI namespace section
00179 
00180 
00181 #endif  // end of guard _CEGUIFalagard_xmlHandler_h_

Generated on Sat Nov 26 10:09:54 2005 for Crazy Eddies GUI System by  doxygen 1.4.5