1 /*!
2 	@file
3 	@author		Generate utility by Albert Semenov
4 	@date		01/2009
5 	@module
6 */
7 #pragma once
8 
9 #include "MyGUI_Managed_Widget.h"
10 
11 namespace MyGUI
12 {
13 	namespace Managed
14 	{
15 
16 		public ref class TextBox : public Widget
17 		{
18 
19 		private:
20 			typedef MyGUI::TextBox ThisType;
21 
22 		public:
TextBox()23 			TextBox() : Widget() { }
24 
25 		internal:
TextBox(MyGUI::TextBox * _native)26 			TextBox( MyGUI::TextBox* _native ) : Widget(_native) { }
27 			TextBox( BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name )
28 			{
29 				CreateWidget(_parent, _style, _skin, _coord, _align, _layer, _name);
30 			}
31 
getClassTypeName()32 			virtual const std::string& getClassTypeName() override { return ThisType::getClassTypeName(); }
33 
34 			static BaseWidget^ WidgetCreator(BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name)
35 			{
36 				return gcnew TextBox(_parent, _style, _skin, _coord, _align, _layer, _name);
37 			}
38 
39 
40 			//InsertPoint
41 
42 	public:
SetCaptionWithReplacing(Convert<const std::string &>::Type _value)43 		void SetCaptionWithReplacing(
44 			Convert<const std::string &>::Type _value )
45 		{
46 			MMYGUI_CHECK_NATIVE(mNative);
47 			static_cast<ThisType*>(mNative)->setCaptionWithReplacing(
48 				Convert<const std::string &>::From(_value) );
49 		}
50 	public:
51 		property Convert<bool>::Type TextShadow
52 		{
get()53 			Convert<bool>::Type get( )
54 			{
55 				MMYGUI_CHECK_NATIVE(mNative);
56 				return Convert<bool>::To( static_cast<ThisType*>(mNative)->getTextShadow() );
57 			}
set(Convert<bool>::Type _value)58 			void set(Convert<bool>::Type _value)
59 			{
60 				MMYGUI_CHECK_NATIVE(mNative);
61 				static_cast<ThisType*>(mNative)->setTextShadow( Convert<bool>::From(_value) );
62 			}
63 		}
64 
65 	public:
66 		property Convert<const MyGUI::Colour &>::Type TextShadowColour
67 		{
get()68 			Convert<const MyGUI::Colour &>::Type get( )
69 			{
70 				MMYGUI_CHECK_NATIVE(mNative);
71 				return Convert<const MyGUI::Colour &>::To( static_cast<ThisType*>(mNative)->getTextShadowColour() );
72 			}
set(Convert<const MyGUI::Colour &>::Type _value)73 			void set(Convert<const MyGUI::Colour &>::Type _value)
74 			{
75 				MMYGUI_CHECK_NATIVE(mNative);
76 				static_cast<ThisType*>(mNative)->setTextShadowColour( Convert<const MyGUI::Colour &>::From(_value) );
77 			}
78 		}
79 
80 	public:
81 		property Convert<const MyGUI::Colour &>::Type TextColour
82 		{
get()83 			Convert<const MyGUI::Colour &>::Type get( )
84 			{
85 				MMYGUI_CHECK_NATIVE(mNative);
86 				return Convert<const MyGUI::Colour &>::To( static_cast<ThisType*>(mNative)->getTextColour() );
87 			}
set(Convert<const MyGUI::Colour &>::Type _value)88 			void set(Convert<const MyGUI::Colour &>::Type _value)
89 			{
90 				MMYGUI_CHECK_NATIVE(mNative);
91 				static_cast<ThisType*>(mNative)->setTextColour( Convert<const MyGUI::Colour &>::From(_value) );
92 			}
93 		}
94 
95 	public:
96 		property Convert<MyGUI::Align>::Type TextAlign
97 		{
get()98 			Convert<MyGUI::Align>::Type get( )
99 			{
100 				MMYGUI_CHECK_NATIVE(mNative);
101 				return Convert<MyGUI::Align>::To( static_cast<ThisType*>(mNative)->getTextAlign() );
102 			}
set(Convert<MyGUI::Align>::Type _value)103 			void set(Convert<MyGUI::Align>::Type _value)
104 			{
105 				MMYGUI_CHECK_NATIVE(mNative);
106 				static_cast<ThisType*>(mNative)->setTextAlign( Convert<MyGUI::Align>::From(_value) );
107 			}
108 		}
109 
110 	public:
111 		property Convert<int>::Type FontHeight
112 		{
get()113 			Convert<int>::Type get( )
114 			{
115 				MMYGUI_CHECK_NATIVE(mNative);
116 				return Convert<int>::To( static_cast<ThisType*>(mNative)->getFontHeight() );
117 			}
set(Convert<int>::Type _value)118 			void set(Convert<int>::Type _value)
119 			{
120 				MMYGUI_CHECK_NATIVE(mNative);
121 				static_cast<ThisType*>(mNative)->setFontHeight( Convert<int>::From(_value) );
122 			}
123 		}
124 
125 	public:
126 		property Convert<const std::string &>::Type FontName
127 		{
get()128 			Convert<const std::string &>::Type get( )
129 			{
130 				MMYGUI_CHECK_NATIVE(mNative);
131 				return Convert<const std::string &>::To( static_cast<ThisType*>(mNative)->getFontName() );
132 			}
set(Convert<const std::string &>::Type _value)133 			void set(Convert<const std::string &>::Type _value)
134 			{
135 				MMYGUI_CHECK_NATIVE(mNative);
136 				static_cast<ThisType*>(mNative)->setFontName( Convert<const std::string &>::From(_value) );
137 			}
138 		}
139 
140 	public:
141 		property Convert<const MyGUI::UString &>::Type Caption
142 		{
get()143 			Convert<const MyGUI::UString &>::Type get( )
144 			{
145 				MMYGUI_CHECK_NATIVE(mNative);
146 				return Convert<const MyGUI::UString &>::To( static_cast<ThisType*>(mNative)->getCaption() );
147 			}
set(Convert<const MyGUI::UString &>::Type _value)148 			void set(Convert<const MyGUI::UString &>::Type _value)
149 			{
150 				MMYGUI_CHECK_NATIVE(mNative);
151 				static_cast<ThisType*>(mNative)->setCaption( Convert<const MyGUI::UString &>::From(_value) );
152 			}
153 		}
154 
155 	public:
156 		property Convert<MyGUI::types::TSize < int >>::Type TextSize
157 		{
get()158 			Convert<MyGUI::types::TSize < int >>::Type get( )
159 			{
160 				MMYGUI_CHECK_NATIVE(mNative);
161 				return Convert<MyGUI::types::TSize < int >>::To( static_cast<ThisType*>(mNative)->getTextSize() );
162 			}
163 		}
164 
165 	public:
166 		property Convert<MyGUI::types::TCoord < int >>::Type TextRegion
167 		{
get()168 			Convert<MyGUI::types::TCoord < int >>::Type get( )
169 			{
170 				MMYGUI_CHECK_NATIVE(mNative);
171 				return Convert<MyGUI::types::TCoord < int >>::To( static_cast<ThisType*>(mNative)->getTextRegion() );
172 			}
173 		}
174 
175 		};
176 
177 	} // namespace Managed
178 } // namespace MyGUI
179