File: PanelMainProperties.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 (56 lines) | stat: -rw-r--r-- 1,656 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
/*!
	@file
	@author		Georgiy Evmenov
	@date		09/2008
*/

#ifndef _bdc81da4_7bc6_4966_9409_cdb3d2011d75_
#define _bdc81da4_7bc6_4966_9409_cdb3d2011d75_

#include "BaseLayout/BaseLayout.h"
#include "PanelView/BasePanelViewItem.h"
#include "IPropertyField.h"
#include "WidgetTypes.h"
#include "EditorWidgets.h"

namespace tools
{

	class PanelMainProperties : public wraps::BasePanelViewItem
	{
	public:
		PanelMainProperties();

		void initialise() override;
		void shutdown() override;

		void update(MyGUI::Widget* _currentWidget);

	private:
		void notifyAction(std::string_view _name, std::string_view _value, bool _final);
		void notifyActionSkin(std::string_view _type, std::string_view _value, bool _final);
		void notifyActionLayer(std::string_view _type, std::string_view _value, bool _final);
		void notifyActionName(std::string_view _type, std::string_view _value, bool _final);
		void notifyActionType(std::string_view _type, std::string_view _value, bool _final);
		void notifyActionAlign(std::string_view _type, std::string_view _value, bool _final);
		void notifyActionTemplate(std::string_view _type, std::string_view _value, bool _final);

		void destroyPropertyFields();
		void hidePropertyFields();
		void updateSize();

		bool isSkinExist(std::string_view _skinName);
		bool checkTemplate(std::string_view _skinName);

		IPropertyField* getPropertyField(MyGUI::Widget* _client, std::string_view _name, std::string_view _type);

	private:
		MyGUI::Widget* mCurrentWidget{nullptr};
		using MapPropertyField = std::map<std::string, IPropertyField*, std::less<>>;
		MapPropertyField mFields;
		std::string mUserDataTargetType;
	};

}

#endif