3
@author Generate utility by Albert Semenov
9
using System.Runtime.InteropServices;
14
public class Button : TextBox
19
protected override string GetWidgetType() { return "Button"; }
21
internal static BaseWidget RequestWrapButton(BaseWidget _parent, IntPtr _widget)
23
Button widget = new Button();
24
widget.WrapWidget(_parent, _widget);
28
internal static BaseWidget RequestCreateButton(BaseWidget _parent, WidgetStyle _style, string _skin, IntCoord _coord, Align _align, string _layer, string _name)
30
Button widget = new Button();
31
widget.CreateWidget(_parent, _style, _skin, _coord, _align, _layer, _name);
40
#region Method SetImageName
42
[DllImport("MyGUI_Export", CallingConvention = CallingConvention.Cdecl)]
43
private static extern void ExportButton_SetImageName_name( IntPtr _native ,
44
[MarshalAs(UnmanagedType.LPStr)] string _name );
46
public void SetImageName(
49
ExportButton_SetImageName_name( mNative ,
57
#region Method SetImageGroup
59
[DllImport("MyGUI_Export", CallingConvention = CallingConvention.Cdecl)]
60
private static extern void ExportButton_SetImageGroup_name( IntPtr _native ,
61
[MarshalAs(UnmanagedType.LPStr)] string _name );
63
public void SetImageGroup(
66
ExportButton_SetImageGroup_name( mNative ,
74
#region Method SetImageResource
76
[DllImport("MyGUI_Export", CallingConvention = CallingConvention.Cdecl)]
77
private static extern void ExportButton_SetImageResource_name( IntPtr _native ,
78
[MarshalAs(UnmanagedType.LPStr)] string _name );
80
public void SetImageResource(
83
ExportButton_SetImageResource_name( mNative ,
91
#region Property ModeImage
93
[DllImport("MyGUI_Export", CallingConvention = CallingConvention.Cdecl)]
94
[return: MarshalAs(UnmanagedType.U1)]
95
private static extern bool ExportButton_GetModeImage( IntPtr _widget );
96
[DllImport("MyGUI_Export", CallingConvention = CallingConvention.Cdecl)]
97
private static extern void ExportButton_SetModeImage( IntPtr _widget, [MarshalAs(UnmanagedType.U1)] bool _value );
101
get { return ExportButton_GetModeImage( mNative ) ; }
102
set { ExportButton_SetModeImage( mNative, value ); }
109
#region Property StateSelected
111
[DllImport("MyGUI_Export", CallingConvention = CallingConvention.Cdecl)]
112
[return: MarshalAs(UnmanagedType.U1)]
113
private static extern bool ExportButton_GetStateSelected( IntPtr _widget );
114
[DllImport("MyGUI_Export", CallingConvention = CallingConvention.Cdecl)]
115
private static extern void ExportButton_SetStateSelected( IntPtr _widget, [MarshalAs(UnmanagedType.U1)] bool _value );
117
public bool StateSelected
119
get { return ExportButton_GetStateSelected( mNative ) ; }
120
set { ExportButton_SetStateSelected( mNative, value ); }