File: SkinDataUtility.h

package info (click to toggle)
mygui 3.4.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 38,792 kB
  • sloc: cpp: 133,849; ansic: 30,249; xml: 15,794; cs: 12,601; tcl: 776; python: 400; makefile: 35; sh: 4
file content (59 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*!
	@file
	@author		Albert Semenov
	@date		07/2012
*/

#ifndef _eeb02a46_5598_4667_b6e5_24165ec13db3_
#define _eeb02a46_5598_4667_b6e5_24165ec13db3_

#include "Data.h"

namespace tools
{

	class SkinDataUtility
	{
	public:
		enum RegionIndex
		{
			RegionLeftTop,
			RegionTop,
			RegionRightTop,
			RegionLeft,
			RegionCenter,
			RegionRight,
			RegionLeftBottom,
			RegionBottom,
			RegionRightBottom,
			RegionMax
		};

		static void CreateSkinData(DataPtr _skinData);

		using VectorCoord = std::vector<MyGUI::IntCoord>;
		static VectorCoord getRegions(const MyGUI::IntSize& _size, const MyGUI::IntRect& _separators);

		static MyGUI::IntSize getSkinSize(DataPtr _skinData);
		static MyGUI::IntRect getSeparatorsOffset(DataPtr _skinData);

		using RectVisible = MyGUI::types::TRect<bool>;
		static RectVisible getSeparatorsVisible(DataPtr _skinData);

		using VectorString = std::vector<std::string>;
		static const VectorString& getRegionNames();

		static void fillRegionCoords(DataPtr _skinData, const VectorCoord& _value);
		static void fillRegionEnable(DataPtr _skinData, const RectVisible& _value);

		static void ShowRegions(DataPtr _skinData);

	private:
		static void CreateStates(DataPtr _skinData);
		static void CreateSeparators(DataPtr _skinData);
		static void CreateRegions(DataPtr _skinData);
	};

}

#endif