File: MyGUI_Sharp_MenuItem.cs

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 (173 lines) | stat: -rw-r--r-- 5,159 bytes parent folder | download | duplicates (7)
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
/*!
	@file
	@author		Generate utility by Albert Semenov
	@date		01/2009
	@module
*/

using System;
using System.Runtime.InteropServices;

namespace MyGUI.Sharp
{
    public  class MenuItem :
		Widget
    {
        #region MenuItem

        protected override string GetWidgetType() { return "MenuItem"; }

        internal static BaseWidget RequestWrapMenuItem(BaseWidget _parent, IntPtr _widget)
        {
			MenuItem widget = new MenuItem();
			widget.WrapWidget(_parent, _widget);
            return widget;
        }

        internal static BaseWidget RequestCreateMenuItem(BaseWidget _parent, WidgetStyle _style, string _skin, IntCoord _coord, Align _align, string _layer, string _name)
        {
			MenuItem widget = new MenuItem();
			widget.CreateWidgetImpl(_parent, _style, _skin, _coord, _align, _layer, _name);
            return widget;
        }
        
		#endregion
	
		
		//InsertPoint
		#region Method SetItemChildVisible

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
		private static extern void ExportMenuItem_SetItemChildVisible__value(IntPtr _native,
			[MarshalAs(UnmanagedType.U1)] bool _value);

		public void SetItemChildVisible(
			bool _value)
		{
			ExportMenuItem_SetItemChildVisible__value(Native,
				_value);
		}

		#endregion
		#region Method CreateItemChild

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern IntPtr ExportMenuItem_CreateItemChild(IntPtr _native);

		public MenuControl CreateItemChild( )
		{
			return (MenuControl)BaseWidget.GetByNative(ExportMenuItem_CreateItemChild(Native));
		}

		#endregion
		#region Method RemoveItem

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
		private static extern void ExportMenuItem_RemoveItem(IntPtr _native);

		public void RemoveItem( )
		{
			ExportMenuItem_RemoveItem(Native);
		}

		#endregion
		#region Property ItemChecked

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern bool ExportMenuItem_GetItemChecked(IntPtr _widget);
		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
		private static extern void ExportMenuItem_SetItemChecked(IntPtr _widget, [MarshalAs(UnmanagedType.U1)] bool _value);

		public bool ItemChecked
		{
			get { return ExportMenuItem_GetItemChecked(Native); }
			set { ExportMenuItem_SetItemChecked(Native, value); }
		}

		#endregion
		#region Property ItemChild

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern IntPtr ExportMenuItem_GetItemChild(IntPtr _native);

		public MenuControl ItemChild
		{
			get { return (MenuControl)BaseWidget.GetByNative(ExportMenuItem_GetItemChild(Native)); }
		}

		#endregion
		#region Property MenuCtrlParent

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern IntPtr ExportMenuItem_GetMenuCtrlParent(IntPtr _native);

		public MenuControl MenuCtrlParent
		{
			get { return (MenuControl)BaseWidget.GetByNative(ExportMenuItem_GetMenuCtrlParent(Native)); }
		}

		#endregion
		#region Property ItemType

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern MenuItemType ExportMenuItem_GetItemType(IntPtr _widget);
		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
		private static extern void ExportMenuItem_SetItemType(IntPtr _widget, [MarshalAs(UnmanagedType.I4)] MenuItemType _value);

		public MenuItemType ItemType
		{
			get { return ExportMenuItem_GetItemType(Native); }
			set { ExportMenuItem_SetItemType(Native, value); }
		}

		#endregion
		#region Property ItemIndex

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern uint ExportMenuItem_GetItemIndex(IntPtr _native);

		public uint ItemIndex
		{
			get { return ExportMenuItem_GetItemIndex(Native); }
		}

		#endregion
		#region Property ItemId

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern IntPtr ExportMenuItem_GetItemId(IntPtr _widget);
		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
		private static extern void ExportMenuItem_SetItemId(IntPtr _widget, [MarshalAs(UnmanagedType.LPStr)] string _value);

		public string ItemId
		{
			get { return Marshal.PtrToStringAnsi(ExportMenuItem_GetItemId(Native)); }
			set { ExportMenuItem_SetItemId(Native, value); }
		}

		#endregion
		#region Property ItemName

		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
        
		private static extern IntPtr ExportMenuItem_GetItemName(IntPtr _widget);
		[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
		private static extern void ExportMenuItem_SetItemName(IntPtr _widget, [MarshalAs(UnmanagedType.LPWStr)] string _value);

		public string ItemName
		{
			get { return Marshal.PtrToStringUni(ExportMenuItem_GetItemName(Native)); }
			set { ExportMenuItem_SetItemName(Native, value); }
		}

		#endregion
		
    }
}