File: MyGUI_Export_Window.h

package info (click to toggle)
mygui 3.2.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,224 kB
  • sloc: cpp: 118,031; ansic: 30,202; xml: 15,544; cs: 12,602; tcl: 776; python: 417; makefile: 34
file content (176 lines) | stat: -rw-r--r-- 5,731 bytes parent folder | download | duplicates (6)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*!
	@file
	@author		Generate utility by Albert Semenov
	@date		01/2009
	@module
*/

#ifndef EXPORT_WIDGET_Window_H_
#define EXPORT_WIDGET_Window_H_

#include "../ExportDefine.h"
#include "../ExportMarshaling.h"
#include "MyGUI_Export_MarshalingWidget.h"
#include "../ExportMarshalingType.h"
#include <MyGUI.h>

namespace Export
{
	//InsertPoint

	namespace ScopeWindowEvent_WindowChangeCoord
	{
		typedef void (MYGUICALLBACK *ExportHandle)(
			MyGUI::Window *);
		ExportHandle mExportHandle = nullptr;
		
		void OnEvent(
			MyGUI::Window * _sender)
		{
			mExportHandle(
				_sender);
		}
		
		MYGUIEXPORT void MYGUICALL ExportWindowEvent_DelegateWindowChangeCoord(ExportHandle _delegate)
		{
			mExportHandle = _delegate;
		}
		MYGUIEXPORT void MYGUICALL ExportWindowEvent_AdviseWindowChangeCoord(MyGUI::Widget* _widget, bool _advise)
		{
			if (_advise)
				static_cast<MyGUI::Window*>(_widget)->eventWindowChangeCoord += MyGUI::newDelegate(OnEvent);
			else
				static_cast<MyGUI::Window*>(_widget)->eventWindowChangeCoord -= MyGUI::newDelegate(OnEvent);
		}
	}
	namespace ScopeWindowEvent_WindowButtonPressed
	{
		typedef void (MYGUICALLBACK *ExportHandle)(
			MyGUI::Window *,
			Convert<const std::string &>::Type);
		ExportHandle mExportHandle = nullptr;
		
		void OnEvent(
			MyGUI::Window * _sender,
			const std::string & _name)
		{
			mExportHandle(
				_sender,
				Convert<const std::string &>::To(_name));
		}
		
		MYGUIEXPORT void MYGUICALL ExportWindowEvent_DelegateWindowButtonPressed(ExportHandle _delegate)
		{
			mExportHandle = _delegate;
		}
		MYGUIEXPORT void MYGUICALL ExportWindowEvent_AdviseWindowButtonPressed(MyGUI::Widget* _widget, bool _advise)
		{
			if (_advise)
				static_cast<MyGUI::Window*>(_widget)->eventWindowButtonPressed += MyGUI::newDelegate(OnEvent);
			else
				static_cast<MyGUI::Window*>(_widget)->eventWindowButtonPressed -= MyGUI::newDelegate(OnEvent);
		}
	}
	namespace ScopeWindowMethod_SetMaxSize
	{
		MYGUIEXPORT void MYGUICALL ExportWindow_SetMaxSize__width__height(MyGUI::Widget* _native,
			Convert<int>::Type _width,
			Convert<int>::Type _height)
		{
			static_cast<MyGUI::Window*>(_native)->setMaxSize(
				Convert<int>::From(_width),
				Convert<int>::From(_height));
		}
	}
	namespace ScopeWindowMethod_SetMinSize
	{
		MYGUIEXPORT void MYGUICALL ExportWindow_SetMinSize__width__height(MyGUI::Widget* _native,
			Convert<int>::Type _width,
			Convert<int>::Type _height)
		{
			static_cast<MyGUI::Window*>(_native)->setMinSize(
				Convert<int>::From(_width),
				Convert<int>::From(_height));
		}
	}
	namespace ScopeWindowMethod_SetVisibleSmooth
	{
		MYGUIEXPORT void MYGUICALL ExportWindow_SetVisibleSmooth__value(MyGUI::Widget* _native,
			Convert<bool>::Type _value)
		{
			static_cast<MyGUI::Window*>(_native)->setVisibleSmooth(
				Convert<bool>::From(_value));
		}
	}
	namespace ScopeWindowProperty_Movable
	{
		MYGUIEXPORT Convert<bool>::Type MYGUICALL ExportWindow_GetMovable(MyGUI::Widget* _native)
		{
			return Convert<bool>::To(static_cast<MyGUI::Window*>(_native)->getMovable());
		}
		MYGUIEXPORT void MYGUICALL ExportWindow_SetMovable(MyGUI::Widget* _native, Convert<bool>::Type _value)
		{
			static_cast<MyGUI::Window*>(_native)->setMovable(Convert<bool>::From(_value));
		}
	}
	namespace ScopeWindowProperty_ActionScale
	{
		MYGUIEXPORT Convert<const MyGUI::types::TCoord < int > &>::Type MYGUICALL ExportWindow_GetActionScale(MyGUI::Widget* _native)
		{
			return Convert<const MyGUI::types::TCoord < int > &>::To(static_cast<MyGUI::Window*>(_native)->getActionScale());
		}
	}
	namespace ScopeWindowProperty_Snap
	{
		MYGUIEXPORT Convert<bool>::Type MYGUICALL ExportWindow_GetSnap(MyGUI::Widget* _native)
		{
			return Convert<bool>::To(static_cast<MyGUI::Window*>(_native)->getSnap());
		}
		MYGUIEXPORT void MYGUICALL ExportWindow_SetSnap(MyGUI::Widget* _native, Convert<bool>::Type _value)
		{
			static_cast<MyGUI::Window*>(_native)->setSnap(Convert<bool>::From(_value));
		}
	}
	namespace ScopeWindowProperty_MaxSize
	{
		MYGUIEXPORT Convert<MyGUI::types::TSize < int >>::Type MYGUICALL ExportWindow_GetMaxSize(MyGUI::Widget* _native)
		{
			return Convert<MyGUI::types::TSize < int >>::To(static_cast<MyGUI::Window*>(_native)->getMaxSize());
		}
		MYGUIEXPORT void MYGUICALL ExportWindow_SetMaxSize(MyGUI::Widget* _native, Convert<const MyGUI::types::TSize < int > &>::Type _value)
		{
			static_cast<MyGUI::Window*>(_native)->setMaxSize(Convert<const MyGUI::types::TSize < int > &>::From(_value));
		}
	}
	namespace ScopeWindowProperty_MinSize
	{
		MYGUIEXPORT Convert<MyGUI::types::TSize < int >>::Type MYGUICALL ExportWindow_GetMinSize(MyGUI::Widget* _native)
		{
			return Convert<MyGUI::types::TSize < int >>::To(static_cast<MyGUI::Window*>(_native)->getMinSize());
		}
		MYGUIEXPORT void MYGUICALL ExportWindow_SetMinSize(MyGUI::Widget* _native, Convert<const MyGUI::types::TSize < int > &>::Type _value)
		{
			static_cast<MyGUI::Window*>(_native)->setMinSize(Convert<const MyGUI::types::TSize < int > &>::From(_value));
		}
	}
	namespace ScopeWindowProperty_CaptionWidget
	{
		MYGUIEXPORT Convert<MyGUI::TextBox *>::Type MYGUICALL ExportWindow_GetCaptionWidget(MyGUI::Widget* _native)
		{
			return Convert<MyGUI::TextBox *>::To(static_cast<MyGUI::Window*>(_native)->getCaptionWidget());
		}
	}
	namespace ScopeWindowProperty_AutoAlpha
	{
		MYGUIEXPORT Convert<bool>::Type MYGUICALL ExportWindow_GetAutoAlpha(MyGUI::Widget* _native)
		{
			return Convert<bool>::To(static_cast<MyGUI::Window*>(_native)->getAutoAlpha());
		}
		MYGUIEXPORT void MYGUICALL ExportWindow_SetAutoAlpha(MyGUI::Widget* _native, Convert<bool>::Type _value)
		{
			static_cast<MyGUI::Window*>(_native)->setAutoAlpha(Convert<bool>::From(_value));
		}
	}
}

#endif