00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
00034 namespace CEGUI
00035 {
00036
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
00072
00073 void elementStart(const String& element, const XMLAttributes& attributes);
00074 void elementEnd(const String& element);
00075
00076 private:
00077
00078
00079
00080
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
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
00145
00146 static argb_t hexStringToARGB(const String& str);
00147
00148
00149
00150
00151 void assignAreaDimension(Dimension& dim);
00152
00153 void doBaseDimStart(const BaseDim* dim);
00154 void doBaseDimEnd();
00155
00156
00157
00158
00159 WidgetLookManager* d_manager;
00160
00161
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 }
00179
00180
00181 #endif // end of guard _CEGUIFalagard_xmlHandler_h_