1 #ifndef _65c6bab3_d7e3_4691_999e_653b8974ff23_
2 #define _65c6bab3_d7e3_4691_999e_653b8974ff23_
3 
4 #include "SkinInfo.h"
5 #include "WidgetStyle.h"
6 #include "PossibleValue.h"
7 
8 namespace tools
9 {
10 
11 	class WidgetTypes :
12 		public MyGUI::Singleton<WidgetTypes>
13 	{
14 	public:
15 		void initialise();
16 		void shutdown();
17 
18 		WidgetStyle* findWidgetStyle(const std::string& _type);
19 		WidgetStyle* findWidgetStyleBySkin(const std::string& _skinName);
20 		typedef std::vector<std::string> VectorString;
21 		VectorString findPossibleValues(const std::string& _name);
22 
23 		void clearAllSkins();
24 
25 		void addWidgetSkinType(const std::string& _type, const std::string& _skin, const std::string& _group, const std::string& _button_name);
26 
27 		const SkinGroups& getSkinGroups() const;
28 
29 		VectorWidgetType getWidgetTypes() const;
30 
31 	private:
32 		void loadWidgets(MyGUI::xml::ElementPtr _node, const std::string& _file, MyGUI::Version _version);
33 		void loadValues(MyGUI::xml::ElementPtr _node, const std::string& _file, MyGUI::Version _version);
34 
35 		WidgetStyle* getWidgetType(const std::string& _name);
36 
37 		PossibleValue* getPossibleValue(const std::string& _name);
38 
39 		void updateDepth();
40 		size_t updateDepth(WidgetStyle* _style);
41 
42 	private:
43 		VectorWidgetType mWidgetTypes;
44 		SkinGroups mSkinGroups;
45 		VectorPossibleValue mPossibleValues;
46 	};
47 
48 }
49 
50 #endif
51