1
2
3
4
5
6 using System;
7
8 namespace System.Windows
9 {
10 public const int CW_USEDEFAULT = cast<int>(0x80000000);
11
12 public enum ShowCommand : int
13 {
14 SW_HIDE = 0,
15 SW_SHOWNORMAL = 1,
16 SW_SHOWMINIMIZED = 2,
17 SW_MAXIMIZE = 3,
18 SW_SHOWNOACTIVATE = 4,
19 SW_SHOW = 5,
20 SW_MINIMIZE = 6,
21 SW_SHOWMINNOACTIVE = 7,
22 SW_SHOWNA = 8,
23 SW_RESTORE = 9,
24 SW_SHOWDEFAULT = 10,
25 SW_FORCEMINIMIZE = 11
26 }
27
28 public enum SystemColor : int
29 {
30 COLOR_3DDKSHADOW = 21,
31 COLOR_3DFACE = 15,
32 COLOR_3DHIGHLIGHT = 20,
33 COLOR_3DHILIGHT = 20,
34 COLOR_3DLIGHT = 22,
35 COLOR_3DSHADOW = 16,
36 COLOR_ACTIVEBORDER = 10,
37 COLOR_ACTIVECAPTION = 2,
38 COLOR_APPWORKSPACE = 12,
39 COLOR_BACKGROUND = 1,
40 COLOR_BTNFACE = 15,
41 COLOR_BTNHIGHLIGHT = 20,
42 COLOR_BTNHILIGHT = 20,
43 COLOR_BTNSHADOW = 16,
44 COLOR_BTNTEXT = 18,
45 COLOR_CAPTIONTEXT = 9,
46 COLOR_DESKTOP = 1,
47 COLOR_GRADIENTACTIVECAPTION = 27,
48 COLOR_GRADIENTINACTIVECAPTION = 28,
49 COLOR_GRAYTEXT = 17,
50 COLOR_HIGHLIGHT = 13,
51 COLOR_HIGHLIGHTTEXT = 14,
52 COLOR_HOTLIGHT = 26,
53 COLOR_INACTIVEBORDER = 11,
54 COLOR_INACTIVECAPTION = 3,
55 COLOR_INACTIVECAPTIONTEXT = 19,
56 COLOR_INFOBK = 24,
57 COLOR_INFOTEXT = 23,
58 COLOR_MENU = 4,
59 COLOR_MENUHILIGHT = 29,
60 COLOR_MENUBAR = 30,
61 COLOR_MENUTEXT = 7,
62 COLOR_SCROLLBAR = 0,
63 COLOR_WINDOW = 5,
64 COLOR_WINDOWFRAME = 6,
65 COLOR_WINDOWTEXT = 8
66 }
67
68 public enum WindowClassStyle : uint
69 {
70 CS_DEFAULT = 0u,
71 CS_VREDRAW = 1u,
72 CS_HREDRAW = 2u,
73 CS_DBLCLKS = 8u,
74 CS_OWNDC = 0x20u,
75 CS_CLASSDC = 0x40u,
76 CS_PARENTDC = 0x80u,
77 CS_NOCLOSE = 0x200u,
78 CS_SAVEBITS = 0x800u,
79 CS_BYTEALIGNCLIENT = 0x1000u,
80 CS_BYTEALIGNWINDOW = 0x2000u,
81 CS_GLOBALCLASS = 0x4000u,
82 CS_DROPSHADOW = 0x20000u
83 }
84
85 public enum WindowStyle : long
86 {
87 WS_BORDER = 0x00800000,
88 WS_CAPTION = 0x00C00000,
89 WS_CHILD = 0x40000000,
90 WS_CHILDWINDOW = 0x40000000,
91 WS_CLIPCHILDREN = 0x02000000,
92 WS_CLIPSIBLINGS = 0x04000000,
93 WS_DISABLED = 0x08000000,
94 WS_DLGFRAME = 0x00400000,
95 WS_GROUP = 0x00020000,
96 WS_HSCROLL = 0x00100000,
97 WS_ICONIC = 0x20000000,
98 WS_MAXIMIZE = 0x01000000,
99 WS_MAXIMIZEBOX = 0x00010000,
100 WS_MINIMIZE = 0x20000000,
101 WS_MINIMIZEBOX = 0x00020000,
102 WS_OVERLAPPED = 0x00000000,
103 WS_POPUP = 0x80000000,
104 WS_SIZEBOX = 0x00040000,
105 WS_SYSMENU = 0x00080000,
106 WS_TABSTOP = 0x00010000,
107 WS_THICKFRAME = 0x00040000,
108 WS_TILED = 0x00000000,
109 WS_VISIBLE = 0x10000000,
110 WS_VSCROLL = 0x00200000,
111 WS_POPUPWINDOW = (WS_POPUP | WS_BORDER | WS_SYSMENU),
112 WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX),
113 WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW
114 }
115
116 public enum ExtendedWindowStyle : long
117 {
118 WS_EX_DEFAULT = 0x00000000,
119 WS_EX_ACCEPTFILES = 0x00000010,
120 WS_EX_APPWINDOW = 0x00040000,
121 WS_EX_CLIENTEDGE = 0x00000200,
122 WS_EX_COMPOSITED = 0x02000000,
123 WS_EX_CONTEXTHELP = 0x00000400,
124 WS_EX_CONTROLPARENT = 0x00010000,
125 WS_EX_DLGMODALFRAME = 0x00000001,
126 WS_EX_LAYERED = 0x00080000,
127 WS_EX_LAYOUTRTL = 0x00400000,
128 WS_EX_LEFT = 0x00000000,
129 WS_EX_LEFTSCROLLBAR = 0x00004000,
130 WS_EX_LTRREADING = 0x00000000,
131 WS_EX_MDICHILD = 0x00000040,
132 WS_EX_NOACTIVATE = 0x08000000,
133 WS_EX_NOINHERITLAYOUT = 0x00100000,
134 WS_EX_NOPARENTNOTIFY = 0x00000004,
135 WS_EX_NOREDIRECTIONBITMAP = 0x00200000,
136 WS_EX_RIGHT = 0x00001000,
137 WS_EX_RIGHTSCROLLBAR = 0x00000000,
138 WS_EX_RTLREADING = 0x00002000,
139 WS_EX_STATICEDGE = 0x00020000,
140 WS_EX_TOOLWINDOW = 0x00000080,
141 WS_EX_TOPMOST = 0x00000008,
142 WS_EX_TRANSPARENT = 0x00000020,
143 WS_EX_WINDOWEDGE = 0x00000100,
144 WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST),
145 WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
146 }
147
148 public class WinRect
149 {
150 public nothrow WinRect() : left(0), top(0), right(0), bottom(0)
151 {
152 }
153 public nothrow WinRect(int left_, int top_, int right_, int bottom_) : left(left_), top(top_), right(right_), bottom(bottom_)
154 {
155 }
156 public int left;
157 public int top;
158 public int right;
159 public int bottom;
160 }
161
162 public enum WindowState : sbyte
163 {
164 normal, minimized, maximized
165 }
166
167 public enum DialogResult : int
168 {
169 none = 0, ok = 1, cancel = 2, abort = 3, retry = 4, ignore = 5, yes = 6, no = 7
170 }
171
172 public nothrow string ToString(DialogResult dialogResult)
173 {
174 switch (dialogResult)
175 {
176 case DialogResult.none: return "DialogResult.none";
177 case DialogResult.ok: return "DialogResult.ok";
178 case DialogResult.cancel: return "DialogResult.cancel";
179 case DialogResult.abort: return "DialogResult.abort";
180 case DialogResult.retry: return "DialogResult.retry";
181 case DialogResult.ignore: return "DialogResult.ignore";
182 case DialogResult.yes: return "DialogResult.yes";
183 case DialogResult.no: return "DialogResult.no";
184 }
185 return string();
186 }
187
188 public enum Anchors : sbyte
189 {
190 none = 0, top = 1 << 0, bottom = 1 << 1, left = 1 << 2, right = 1 << 3
191 }
192
193 public enum Dock : sbyte
194 {
195 none = 0, top = 1, bottom = 2, left = 3, right = 4, fill = 5
196 }
197
198 public class Padding
199 {
200 public nothrow Padding() : left(0), top(0), right(0), bottom(0)
201 {
202 }
203 public nothrow Padding(int left_, int top_, int right_, int bottom_) : left(left_), top(top_), right(right_), bottom(bottom_)
204 {
205 }
206 public inline nothrow int Vertical() const
207 {
208 return top + bottom;
209 }
210 public inline nothrow int Horizontal() const
211 {
212 return left + right;
213 }
214 public int left;
215 public int top;
216 public int right;
217 public int bottom;
218 }
219
220 public bool operator==(const Padding& left, const Padding& right)
221 {
222 return left.left == right.left && left.top == right.top && left.right == right.right && left.bottom == right.bottom;
223 }
224 }