3
@author Generate utility by Albert Semenov
9
using System.Runtime.InteropServices;
13
public class TextBox :
18
protected override string GetWidgetType() { return "TextBox"; }
20
internal static BaseWidget RequestWrapTextBox(BaseWidget _parent, IntPtr _widget)
22
TextBox widget = new TextBox();
23
widget.WrapWidget(_parent, _widget);
27
internal static BaseWidget RequestCreateTextBox(BaseWidget _parent, WidgetStyle _style, string _skin, IntCoord _coord, Align _align, string _layer, string _name)
29
TextBox widget = new TextBox();
30
widget.CreateWidgetImpl(_parent, _style, _skin, _coord, _align, _layer, _name);
38
#region Method SetCaptionWithReplacing
40
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
41
private static extern void ExportTextBox_SetCaptionWithReplacing__value(IntPtr _native,
42
[MarshalAs(UnmanagedType.LPStr)] string _value);
44
public void SetCaptionWithReplacing(
47
ExportTextBox_SetCaptionWithReplacing__value(Native,
52
#region Property TextShadow
54
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
56
private static extern bool ExportTextBox_GetTextShadow(IntPtr _widget);
57
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
58
private static extern void ExportTextBox_SetTextShadow(IntPtr _widget, [MarshalAs(UnmanagedType.U1)] bool _value);
60
public bool TextShadow
62
get { return ExportTextBox_GetTextShadow(Native); }
63
set { ExportTextBox_SetTextShadow(Native, value); }
67
#region Property TextShadowColour
69
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
71
private static extern IntPtr ExportTextBox_GetTextShadowColour(IntPtr _widget);
72
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
73
private static extern void ExportTextBox_SetTextShadowColour(IntPtr _widget, [In] ref Colour _value);
75
public Colour TextShadowColour
77
get { return (Colour)Marshal.PtrToStructure(ExportTextBox_GetTextShadowColour(Native), typeof(Colour)); }
78
set { ExportTextBox_SetTextShadowColour(Native, ref value); }
82
#region Property TextColour
84
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
86
private static extern IntPtr ExportTextBox_GetTextColour(IntPtr _widget);
87
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
88
private static extern void ExportTextBox_SetTextColour(IntPtr _widget, [In] ref Colour _value);
90
public Colour TextColour
92
get { return (Colour)Marshal.PtrToStructure(ExportTextBox_GetTextColour(Native), typeof(Colour)); }
93
set { ExportTextBox_SetTextColour(Native, ref value); }
97
#region Property TextAlign
99
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
101
private static extern Align ExportTextBox_GetTextAlign(IntPtr _widget);
102
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
103
private static extern void ExportTextBox_SetTextAlign(IntPtr _widget, [MarshalAs(UnmanagedType.I4)] Align _value);
105
public Align TextAlign
107
get { return ExportTextBox_GetTextAlign(Native); }
108
set { ExportTextBox_SetTextAlign(Native, value); }
112
#region Property FontHeight
114
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
116
private static extern int ExportTextBox_GetFontHeight(IntPtr _widget);
117
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
118
private static extern void ExportTextBox_SetFontHeight(IntPtr _widget, int _value);
120
public int FontHeight
122
get { return ExportTextBox_GetFontHeight(Native); }
123
set { ExportTextBox_SetFontHeight(Native, value); }
127
#region Property FontName
129
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
131
private static extern IntPtr ExportTextBox_GetFontName(IntPtr _widget);
132
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
133
private static extern void ExportTextBox_SetFontName(IntPtr _widget, [MarshalAs(UnmanagedType.LPStr)] string _value);
135
public string FontName
137
get { return Marshal.PtrToStringAnsi(ExportTextBox_GetFontName(Native)); }
138
set { ExportTextBox_SetFontName(Native, value); }
142
#region Property Caption
144
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
146
private static extern IntPtr ExportTextBox_GetCaption(IntPtr _widget);
147
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
148
private static extern void ExportTextBox_SetCaption(IntPtr _widget, [MarshalAs(UnmanagedType.LPWStr)] string _value);
150
public string Caption
152
get { return Marshal.PtrToStringUni(ExportTextBox_GetCaption(Native)); }
153
set { ExportTextBox_SetCaption(Native, value); }
157
#region Property TextSize
159
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
161
private static extern IntPtr ExportTextBox_GetTextSize(IntPtr _native);
163
public IntSize TextSize
165
get { return (IntSize)Marshal.PtrToStructure(ExportTextBox_GetTextSize(Native), typeof(IntSize)); }
169
#region Property TextRegion
171
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
173
private static extern IntPtr ExportTextBox_GetTextRegion(IntPtr _native);
175
public IntCoord TextRegion
177
get { return (IntCoord)Marshal.PtrToStructure(ExportTextBox_GetTextRegion(Native), typeof(IntCoord)); }