File: TextureBrowseControl.h

package info (click to toggle)
mygui 3.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,800 kB
  • sloc: cpp: 122,825; ansic: 30,231; xml: 15,792; cs: 12,601; tcl: 776; python: 397; makefile: 38
file content (60 lines) | stat: -rw-r--r-- 1,516 bytes parent folder | download | duplicates (2)
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
60
/*!
	@file
	@author		Albert Semenov
	@date		10/2008
*/

#ifndef _2122a0ba_a0a9_497c_8186_e1fa60400305_
#define _2122a0ba_a0a9_497c_8186_e1fa60400305_

#include <MyGUI.h>
#include "Dialog.h"
#include "ItemBox/BaseItemBox.h"
#include "TextureBrowseCell.h"
#include "Control.h"

namespace tools
{

	ATTRIBUTE_CLASS_LAYOUT(TextureBrowseControl, "TextureBrowseControl.layout");
	class MYGUI_EXPORT_DLL TextureBrowseControl :
		public Dialog,
		public Control
	{
	public:
		TextureBrowseControl();
		~TextureBrowseControl() override;

		const std::string& getTextureName() const;
		void setTextureName(const std::string& _value);

		void setTextures(const MyGUI::VectorString& _textures);

	protected:
		void OnInitialise(Control* _parent, MyGUI::Widget* _place, const std::string& _layoutName) override;

		void onDoModal() override;
		void onEndModal() override;

	private:
		void notifyMouseButtonClickOk(MyGUI::Widget* _sender);
		void notifyMouseButtonClickCancel(MyGUI::Widget* _sender);
		void notifyWindowButtonPressed(MyGUI::Window* _sender, const std::string& _name);
		void notifyChangeItemPosition(MyGUI::ItemBox* _sender, size_t _index);
		void notifySelectItemAccept(MyGUI::ItemBox* _sender, size_t _index);

	private:
		ATTRIBUTE_FIELD_WIDGET_NAME(TextureBrowseControl, mOk, "OK");
		MyGUI::Button* mOk;

		ATTRIBUTE_FIELD_WIDGET_NAME(TextureBrowseControl, mCancel, "Cancel");
		MyGUI::Button* mCancel;

		wraps::BaseItemBox<TextureBrowseCell>* mTextures;

		std::string mCurrentTextureName;
	};

}

#endif