File: Application.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 (57 lines) | stat: -rw-r--r-- 1,500 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
#ifndef _d79dc96f_0f50_4950_b515_9a5deafd511b_
#define _d79dc96f_0f50_4950_b515_9a5deafd511b_

#include "Base/BaseDemoManager.h"
#include "sigslot.h"
#include "Control.h"

namespace tools
{

	class Application : public base::BaseDemoManager, public sigslot::has_slots<>
	{
		MYGUI_SINGLETON_DECLARATION(Application);

	public:
		Application();
		~Application() override;

		void createScene() override;
		void destroyScene() override;
		void setupResources() override;

		void injectKeyPress(MyGUI::KeyCode _key, MyGUI::Char _text) override;
		void injectKeyRelease(MyGUI::KeyCode _key) override;

		void prepare() override;
		void onFileDrop(const std::wstring& _filename) override;
		bool onWindowClose(size_t _handle) override;

		using VectorWString = std::vector<std::wstring>;
		const VectorWString& getParams();

	private:
		void command_StatisticInfo(const MyGUI::UString& _commandName, bool& _result);
		void command_FocusVisible(const MyGUI::UString& _commandName, bool& _result);
		void command_ScreenShot(const MyGUI::UString& _commandName, bool& _result);
		void command_QuitApp(const MyGUI::UString& _commandName, bool& _result);
		void command_UpdateAppCaption(const MyGUI::UString& _commandName, bool& _result);

		void saveSettings();

		void LoadStates();
		void LoadGuiSettings();

		void CreateControls();
		void DestroyControls();

	private:
		VectorWString mParams;
		std::string mLocale;
		using VectorControl = std::vector<Control*>;
		VectorControl mControls;
	};

}

#endif