]>
Commit | Line | Data |
---|---|---|
7bf85405 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: _defs.i | |
3 | // Purpose: Definitions and stuff | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 6/24/97 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 1998 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | ||
dd9f7fea RD |
14 | // Globally turn on the autodoc feature |
15 | %feature("autodoc", "1"); // 0 == no param types, 1 == show param types | |
16 | ||
7bf85405 RD |
17 | |
18 | //--------------------------------------------------------------------------- | |
d14a1e28 | 19 | // some type definitions to simplify things for SWIG |
af309447 | 20 | |
dd9f7fea RD |
21 | // typedef int wxWindowID; |
22 | // typedef int wxCoord; | |
23 | // typedef int wxInt32; | |
24 | // typedef unsigned int wxUint32; | |
d14a1e28 RD |
25 | typedef int wxEventType; |
26 | typedef unsigned int size_t; | |
27 | typedef unsigned int time_t; | |
28 | typedef unsigned char byte; | |
29 | ||
dd9f7fea RD |
30 | #define wxWindowID int |
31 | #define wxCoord int | |
32 | #define wxInt32 int | |
33 | #define wxUint32 unsigned int | |
34 | //#define wxEventType int | |
35 | //#define size_t unsigned int | |
36 | //#define time_t unsigned int | |
37 | //#define byte unsigned char | |
38 | ||
d14a1e28 RD |
39 | |
40 | //---------------------------------------------------------------------- | |
41 | // Various SWIG macros and such | |
42 | ||
2b9048c5 RD |
43 | #define %pythonAppend %feature("pythonappend") |
44 | #define %pythonPrepend %feature("pythonprepend") | |
d14a1e28 RD |
45 | #define %kwargs %feature("kwargs") |
46 | #define %nokwargs %feature("nokwargs") | |
d14a1e28 | 47 | |
2b9048c5 RD |
48 | //#ifndef %shadow |
49 | //#define %shadow %insert("shadow") | |
50 | //#endif | |
d14a1e28 RD |
51 | |
52 | #ifndef %pythoncode | |
53 | #define %pythoncode %insert("python") | |
dd9f7fea | 54 | #endif |
d14a1e28 RD |
55 | |
56 | #define WXUNUSED(x) x | |
57 | ||
58 | ||
59 | // Given the name of a wxChar (or wxString) constant in C++, make | |
60 | // a static wxString for wxPython, and also let SWIG wrap it. | |
61 | %define MAKE_CONST_WXSTRING(strname) | |
62 | %{ static const wxString wxPy##strname(wx##strname); %} | |
63 | %immutable; | |
64 | %name(strname) const wxString wxPy##strname; | |
65 | %mutable; | |
66 | %enddef | |
67 | ||
b2dc1044 | 68 | %define MAKE_CONST_WXSTRING2(strname, val) |
089142a5 | 69 | %{ static const wxString wxPy##strname(val); %} |
b2dc1044 RD |
70 | %immutable; |
71 | %name(strname) const wxString wxPy##strname; | |
72 | %mutable; | |
73 | %enddef | |
74 | ||
75 | %define MAKE_CONST_WXSTRING_NOSWIG(strname) | |
76 | %{ static const wxString wxPy##strname(wx##strname); %} | |
77 | %enddef | |
b1462dfa | 78 | |
d14a1e28 RD |
79 | // Generate code in the module init for the event types, since they may not be |
80 | // initialized yet when they are used in the static swig_const_table. | |
81 | %typemap(consttab) wxEventType; // TODO: how to prevent code inserted into the consttab? | |
82 | %typemap(constcode) wxEventType "PyDict_SetItemString(d, \"$symname\", PyInt_FromLong($value));"; | |
83 | ||
84 | ||
dd9f7fea | 85 | |
d07d2bc9 RD |
86 | //---------------------------------------------------------------------- |
87 | // Macros for the docstring and autodoc features of SWIG. These will | |
88 | // help make the code look more readable, and pretty, as well as help | |
89 | // reduce typing in some cases. | |
dd9f7fea RD |
90 | |
91 | // Set the docsring for the given full or partial declaration | |
d07d2bc9 RD |
92 | #ifdef _DO_FULL_DOCS |
93 | %define DocStr(decl, docstr, details) | |
94 | %feature("docstring") decl docstr details; | |
95 | %enddef | |
96 | #else | |
97 | %define DocStr(decl, docstr, details) | |
98 | %feature("docstring") decl docstr; | |
99 | %enddef | |
100 | #endif | |
101 | ||
dd9f7fea RD |
102 | |
103 | // Set the autodoc string for a full or partial declaration | |
b2dc1044 RD |
104 | %define DocA(decl, astr) |
105 | %feature("autodoc") decl astr; | |
106 | %enddef | |
dd9f7fea | 107 | |
dd9f7fea | 108 | |
d07d2bc9 RD |
109 | // Set both the autodoc and docstring for a full or partial declaration |
110 | #ifdef _DO_FULL_DOCS | |
111 | %define DocAStr(decl, astr, docstr, details) | |
112 | %feature("autodoc") decl astr; | |
113 | %feature("docstring") decl docstr details | |
114 | %enddef | |
115 | #else | |
116 | %define DocAStr(decl, astr, docstr, details) | |
117 | %feature("autodoc") decl astr; | |
118 | %feature("docstring") decl docstr | |
119 | %enddef | |
120 | #endif | |
dd9f7fea | 121 | |
d07d2bc9 | 122 | |
dd9f7fea RD |
123 | |
124 | ||
125 | // Set the docstring for a decl and then define the decl too. Must use the | |
126 | // full declaration of the item. | |
d07d2bc9 RD |
127 | #ifdef _DO_FULL_DOCS |
128 | %define DocDeclStr(type, decl, docstr, details) | |
129 | %feature("docstring") decl docstr details; | |
130 | type decl | |
131 | %enddef | |
132 | #else | |
133 | %define DocDeclStr(type, decl, docstr, details) | |
134 | %feature("docstring") decl docstr; | |
135 | type decl | |
136 | %enddef | |
137 | #endif | |
dd9f7fea | 138 | |
d07d2bc9 RD |
139 | |
140 | ||
dd9f7fea | 141 | // As above, but also give the decl a new %name |
d07d2bc9 RD |
142 | #ifdef _DO_FULL_DOCS |
143 | %define DocDeclStrName(type, decl, docstr, details, newname) | |
144 | %feature("docstring") decl docstr details; | |
145 | %name(newname) type decl | |
146 | %enddef | |
147 | #else | |
148 | %define DocDeclStrName(type, decl, docstr, details, newname) | |
149 | %feature("docstring") decl docstr; | |
150 | %name(newname) type decl | |
151 | %enddef | |
152 | #endif | |
153 | ||
dd9f7fea RD |
154 | |
155 | // Set the autodoc string for a decl and then define the decl too. Must use the | |
156 | // full declaration of the item. | |
157 | %define DocDeclA(type, decl, astr) | |
158 | %feature("autodoc") decl astr; | |
159 | type decl | |
160 | %enddef | |
161 | ||
162 | // As above, but also give the decl a new %name | |
163 | %define DocDeclAName(type, decl, astr, newname) | |
164 | %feature("autodoc") decl astr; | |
165 | %name(newname) type decl | |
166 | %enddef | |
167 | ||
168 | ||
169 | ||
170 | // Set the autodoc and the docstring for a decl and then define the decl too. | |
171 | // Must use the full declaration of the item. | |
d07d2bc9 RD |
172 | #ifdef _DO_FULL_DOCS |
173 | %define DocDeclAStr(type, decl, astr, details, docstr) | |
174 | %feature("autodoc") decl astr; | |
175 | %feature("docstring") decl docstr details; | |
176 | type decl | |
177 | %enddef | |
178 | #else | |
179 | %define DocDeclAStr(type, decl, astr, details, docstr) | |
180 | %feature("autodoc") decl astr; | |
181 | %feature("docstring") decl docstr; | |
182 | type decl | |
183 | %enddef | |
184 | #endif | |
dd9f7fea | 185 | |
d07d2bc9 | 186 | |
dd9f7fea | 187 | // As above, but also give the decl a new %name |
d07d2bc9 RD |
188 | #ifdef _DO_FULL_DOCS |
189 | %define DocDeclAStrName(type, decl, astr, docstr, details, newname) | |
190 | %feature("autodoc") decl astr; | |
191 | %feature("docstring") decl docstr details; | |
192 | %name(newname) type decl | |
193 | %enddef | |
194 | #else | |
195 | %define DocDeclAStrName(type, decl, astr, docstr, details, newname) | |
196 | %feature("autodoc") decl astr; | |
197 | %feature("docstring") decl docstr; | |
198 | %name(newname) type decl | |
199 | %enddef | |
200 | #endif | |
dd9f7fea RD |
201 | |
202 | ||
203 | ||
204 | // Set the docstring for a constructor decl and then define the decl too. | |
205 | // Must use the full declaration of the item. | |
d07d2bc9 RD |
206 | #ifdef _DO_FULL_DOCS |
207 | %define DocCtorStr(decl, docstr, details) | |
208 | %feature("docstring") decl docstr details; | |
209 | decl | |
210 | %enddef | |
211 | #else | |
212 | %define DocCtorStr(decl, docstr, details) | |
213 | %feature("docstring") decl docstr; | |
214 | decl | |
215 | %enddef | |
216 | #endif | |
dd9f7fea | 217 | |
d07d2bc9 | 218 | |
dd9f7fea | 219 | // As above, but also give the decl a new %name |
d07d2bc9 RD |
220 | #ifdef _DO_FULL_DOCS |
221 | %define DocCtorStrName(decl, docstr, details, newname) | |
222 | %feature("docstring") decl docstr details; | |
223 | %name(newname) decl | |
224 | %enddef | |
225 | #else | |
226 | %define DocCtorStrName(decl, docstr, details, newname) | |
227 | %feature("docstring") decl docstr; | |
228 | %name(newname) decl | |
229 | %enddef | |
230 | #endif | |
dd9f7fea | 231 | |
d07d2bc9 RD |
232 | |
233 | ||
234 | // Set the autodoc string for a constructor decl and then define the decl too. | |
235 | // Must use the full declaration of the item. | |
dd9f7fea RD |
236 | %define DocCtorA(decl, astr) |
237 | %feature("autodoc") decl astr; | |
238 | decl | |
239 | %enddef | |
240 | ||
241 | // As above, but also give the decl a new %name | |
d07d2bc9 | 242 | %define DocCtorAName(decl, astr, newname) |
dd9f7fea RD |
243 | %feature("autodoc") decl astr; |
244 | %name(newname) decl | |
245 | %enddef | |
246 | ||
247 | ||
248 | ||
d07d2bc9 RD |
249 | // Set the autodoc and the docstring for a constructor decl and then define |
250 | // the decl too. Must use the full declaration of the item. | |
251 | #ifdef _DO_FULL_DOCS | |
252 | %define DocCtorAStr(decl, astr, docstr, details) | |
253 | %feature("autodoc") decl astr; | |
254 | %feature("docstring") decl docstr details; | |
255 | decl | |
256 | %enddef | |
257 | #else | |
258 | %define DocCtorAStr(decl, astr, docstr, details) | |
259 | %feature("autodoc") decl astr; | |
260 | %feature("docstring") decl docstr; | |
261 | decl | |
262 | %enddef | |
263 | #endif | |
dd9f7fea | 264 | |
dd9f7fea | 265 | |
d07d2bc9 RD |
266 | |
267 | // As above, but also give the decl a new %name | |
268 | #ifdef _DO_FULL_DOCS | |
269 | %define DocCtorAStrName(decl, astr, docstr, details, newname) | |
270 | %feature("autodoc") decl astr; | |
271 | %feature("docstring") decl docstr details; | |
272 | %name(newname) decl | |
273 | %enddef | |
274 | #else | |
275 | %define DocCtorAStrName(decl, astr, docstr, details, newname) | |
276 | %feature("autodoc") decl astr; | |
277 | %feature("docstring") decl docstr; | |
278 | %name(newname) decl | |
279 | %enddef | |
280 | #endif | |
1e0c8722 | 281 | |
d07d2bc9 | 282 | |
dd9f7fea | 283 | |
d14a1e28 RD |
284 | %define %newgroup |
285 | %pythoncode { | |
286 | %#--------------------------------------------------------------------------- | |
dd9f7fea | 287 | } |
d14a1e28 | 288 | %enddef |
7bf85405 | 289 | |
64e8a1f0 RD |
290 | //--------------------------------------------------------------------------- |
291 | // Forward declarations and %renames for some classes, so the autodoc strings | |
292 | // will be able to use the right types even when the real class declaration is | |
293 | // not in the module being processed. | |
294 | ||
295 | #ifdef BUILDING_RENAMERS | |
296 | #define FORWARD_DECLARE(wxName, Name) | |
297 | #else | |
298 | %define FORWARD_DECLARE(wxName, Name) | |
299 | %rename(Name) wxName; | |
300 | class wxName; | |
301 | %enddef | |
302 | #endif | |
303 | ||
b2dc1044 RD |
304 | FORWARD_DECLARE(wxString, String); |
305 | FORWARD_DECLARE(wxBitmap, Bitmap); | |
306 | FORWARD_DECLARE(wxDateTime, DateTime); | |
307 | FORWARD_DECLARE(wxInputStream, InputStream); | |
308 | FORWARD_DECLARE(wxDC, DC); | |
309 | FORWARD_DECLARE(wxCursor, Cursor); | |
310 | FORWARD_DECLARE(wxRegion, Region); | |
311 | FORWARD_DECLARE(wxColour, Colour); | |
312 | FORWARD_DECLARE(wxFont, Font); | |
313 | FORWARD_DECLARE(wxCaret, Caret); | |
314 | FORWARD_DECLARE(wxToolTip, ToolTip); | |
d7466b1d | 315 | FORWARD_DECLARE(wxPyDropTarget, DropTarget); |
b2dc1044 RD |
316 | FORWARD_DECLARE(wxImageList, ImageList); |
317 | FORWARD_DECLARE(wxMemoryDC, MemoryDC); | |
318 | FORWARD_DECLARE(wxHtmlTagHandler, HtmlTagHandler); | |
319 | FORWARD_DECLARE(wxConfigBase, ConfigBase); | |
320 | FORWARD_DECLARE(wxIcon, Icon); | |
321 | ||
64e8a1f0 | 322 | |
7bf85405 RD |
323 | //--------------------------------------------------------------------------- |
324 | ||
325 | // General numeric #define's and etc. Making them all enums makes SWIG use the | |
326 | // real macro when making the Python Int | |
327 | ||
328 | enum { | |
d14a1e28 RD |
329 | // wxMAJOR_VERSION, |
330 | // wxMINOR_VERSION, | |
331 | // wxRELEASE_NUMBER, | |
7bf85405 | 332 | |
08127323 | 333 | wxNOT_FOUND, |
7bf85405 RD |
334 | |
335 | wxVSCROLL, | |
336 | wxHSCROLL, | |
337 | wxCAPTION, | |
338 | wxDOUBLE_BORDER, | |
339 | wxSUNKEN_BORDER, | |
340 | wxRAISED_BORDER, | |
341 | wxBORDER, | |
342 | wxSIMPLE_BORDER, | |
343 | wxSTATIC_BORDER, | |
344 | wxTRANSPARENT_WINDOW, | |
345 | wxNO_BORDER, | |
9cbf6f6e | 346 | |
7bf85405 | 347 | wxTAB_TRAVERSAL, |
1afc06c2 | 348 | wxWANTS_CHARS, |
0122b7e3 | 349 | wxPOPUP_WINDOW, |
7bf85405 | 350 | wxCENTER_FRAME, |
1afc06c2 RD |
351 | wxCENTRE_ON_SCREEN, |
352 | wxCENTER_ON_SCREEN, | |
353 | ||
1afc06c2 RD |
354 | wxED_CLIENT_MARGIN, |
355 | wxED_BUTTONS_BOTTOM, | |
356 | wxED_BUTTONS_RIGHT, | |
357 | wxED_STATIC_LINE, | |
358 | wxEXT_DIALOG_STYLE, | |
bb0054cd | 359 | |
08127323 | 360 | wxCLIP_CHILDREN, |
edf2f43e | 361 | wxCLIP_SIBLINGS, |
b8b8dda7 | 362 | |
6cffbf02 RD |
363 | wxALWAYS_SHOW_SB, |
364 | ||
7bf85405 RD |
365 | wxRETAINED, |
366 | wxBACKINGSTORE, | |
b96c7a38 | 367 | |
7bf85405 RD |
368 | wxCOLOURED, |
369 | wxFIXED_LENGTH, | |
1b62f00d | 370 | |
7bf85405 RD |
371 | wxLB_NEEDED_SB, |
372 | wxLB_ALWAYS_SB, | |
373 | wxLB_SORT, | |
374 | wxLB_SINGLE, | |
375 | wxLB_MULTIPLE, | |
376 | wxLB_EXTENDED, | |
377 | wxLB_OWNERDRAW, | |
378 | wxLB_HSCROLL, | |
379 | wxPROCESS_ENTER, | |
380 | wxPASSWORD, | |
b1e930a5 | 381 | |
7bf85405 RD |
382 | wxCB_SIMPLE, |
383 | wxCB_DROPDOWN, | |
384 | wxCB_SORT, | |
385 | wxCB_READONLY, | |
386 | wxRA_HORIZONTAL, | |
387 | wxRA_VERTICAL, | |
ed175610 RD |
388 | wxRA_SPECIFY_ROWS, |
389 | wxRA_SPECIFY_COLS, | |
7bf85405 | 390 | wxRB_GROUP, |
1e4a197e | 391 | wxRB_SINGLE, |
7bf85405 RD |
392 | wxSL_HORIZONTAL, |
393 | wxSL_VERTICAL, | |
394 | wxSL_AUTOTICKS, | |
395 | wxSL_LABELS, | |
396 | wxSL_LEFT, | |
397 | wxSL_TOP, | |
398 | wxSL_RIGHT, | |
399 | wxSL_BOTTOM, | |
400 | wxSL_BOTH, | |
401 | wxSL_SELRANGE, | |
402 | wxSB_HORIZONTAL, | |
403 | wxSB_VERTICAL, | |
cf694132 | 404 | wxST_SIZEGRIP, |
2abc0a0f | 405 | wxST_NO_AUTORESIZE, |
203c2f9a | 406 | |
7bf85405 RD |
407 | wxFLOOD_SURFACE, |
408 | wxFLOOD_BORDER, | |
409 | wxODDEVEN_RULE, | |
410 | wxWINDING_RULE, | |
411 | wxTOOL_TOP, | |
412 | wxTOOL_BOTTOM, | |
413 | wxTOOL_LEFT, | |
414 | wxTOOL_RIGHT, | |
415 | wxOK, | |
416 | wxYES_NO, | |
417 | wxCANCEL, | |
418 | wxYES, | |
419 | wxNO, | |
1afc06c2 RD |
420 | wxNO_DEFAULT, |
421 | wxYES_DEFAULT, | |
7bf85405 RD |
422 | wxICON_EXCLAMATION, |
423 | wxICON_HAND, | |
424 | wxICON_QUESTION, | |
425 | wxICON_INFORMATION, | |
426 | wxICON_STOP, | |
427 | wxICON_ASTERISK, | |
428 | wxICON_MASK, | |
1afc06c2 RD |
429 | wxICON_WARNING, |
430 | wxICON_ERROR, | |
431 | ||
432 | wxFORWARD, | |
433 | wxBACKWARD, | |
434 | wxRESET, | |
435 | wxHELP, | |
436 | wxMORE, | |
437 | wxSETUP, | |
438 | ||
f3d9dc1d | 439 | |
7bf85405 RD |
440 | wxSIZE_AUTO_WIDTH, |
441 | wxSIZE_AUTO_HEIGHT, | |
442 | wxSIZE_AUTO, | |
443 | wxSIZE_USE_EXISTING, | |
444 | wxSIZE_ALLOW_MINUS_ONE, | |
7bf85405 RD |
445 | wxPORTRAIT, |
446 | wxLANDSCAPE, | |
bb0054cd RD |
447 | wxPRINT_QUALITY_HIGH, |
448 | wxPRINT_QUALITY_MEDIUM, | |
449 | wxPRINT_QUALITY_LOW, | |
450 | wxPRINT_QUALITY_DRAFT, | |
26e335b8 | 451 | |
3eb221f6 RD |
452 | wxID_ANY, |
453 | wxID_SEPARATOR, | |
454 | ||
d14a1e28 | 455 | wxID_LOWEST, |
7bf85405 RD |
456 | wxID_OPEN, |
457 | wxID_CLOSE, | |
458 | wxID_NEW, | |
459 | wxID_SAVE, | |
460 | wxID_SAVEAS, | |
461 | wxID_REVERT, | |
462 | wxID_EXIT, | |
463 | wxID_UNDO, | |
464 | wxID_REDO, | |
465 | wxID_HELP, | |
466 | wxID_PRINT, | |
467 | wxID_PRINT_SETUP, | |
468 | wxID_PREVIEW, | |
469 | wxID_ABOUT, | |
470 | wxID_HELP_CONTENTS, | |
471 | wxID_HELP_COMMANDS, | |
472 | wxID_HELP_PROCEDURES, | |
473 | wxID_HELP_CONTEXT, | |
b5a5d647 | 474 | wxID_CLOSE_ALL, |
1a10a058 | 475 | wxID_PREFERENCES, |
26e335b8 | 476 | |
7bf85405 RD |
477 | wxID_CUT, |
478 | wxID_COPY, | |
479 | wxID_PASTE, | |
480 | wxID_CLEAR, | |
481 | wxID_FIND, | |
d56cebe7 RD |
482 | wxID_DUPLICATE, |
483 | wxID_SELECTALL, | |
26e335b8 | 484 | |
3ef86e32 RD |
485 | wxID_DELETE, |
486 | wxID_REPLACE, | |
487 | wxID_REPLACE_ALL, | |
488 | wxID_PROPERTIES, | |
489 | ||
490 | wxID_VIEW_DETAILS, | |
491 | wxID_VIEW_LARGEICONS, | |
492 | wxID_VIEW_SMALLICONS, | |
493 | wxID_VIEW_LIST, | |
494 | wxID_VIEW_SORTDATE, | |
495 | wxID_VIEW_SORTNAME, | |
496 | wxID_VIEW_SORTSIZE, | |
497 | wxID_VIEW_SORTTYPE, | |
498 | ||
7bf85405 RD |
499 | wxID_FILE1, |
500 | wxID_FILE2, | |
501 | wxID_FILE3, | |
502 | wxID_FILE4, | |
503 | wxID_FILE5, | |
504 | wxID_FILE6, | |
505 | wxID_FILE7, | |
506 | wxID_FILE8, | |
507 | wxID_FILE9, | |
26e335b8 | 508 | |
7bf85405 RD |
509 | wxID_OK, |
510 | wxID_CANCEL, | |
511 | wxID_APPLY, | |
512 | wxID_YES, | |
513 | wxID_NO, | |
cf694132 | 514 | wxID_STATIC, |
f3d9dc1d RD |
515 | wxID_FORWARD, |
516 | wxID_BACKWARD, | |
26e335b8 | 517 | wxID_DEFAULT, |
f3d9dc1d | 518 | wxID_MORE, |
26e335b8 RD |
519 | wxID_SETUP, |
520 | wxID_RESET, | |
521 | wxID_CONTEXT_HELP, | |
522 | wxID_YESTOALL, | |
523 | wxID_NOTOALL, | |
524 | wxID_ABORT, | |
525 | wxID_RETRY, | |
526 | wxID_IGNORE, | |
f3d9dc1d | 527 | |
d14a1e28 | 528 | wxID_HIGHEST, |
dd9f7fea | 529 | |
7bf85405 RD |
530 | wxOPEN, |
531 | wxSAVE, | |
532 | wxHIDE_READONLY, | |
533 | wxOVERWRITE_PROMPT, | |
2abc0a0f | 534 | wxFILE_MUST_EXIST, |
f6bcfd97 | 535 | wxMULTIPLE, |
1b62f00d | 536 | wxCHANGE_DIR, |
7bf85405 RD |
537 | |
538 | wxACCEL_ALT, | |
539 | wxACCEL_CTRL, | |
540 | wxACCEL_SHIFT, | |
f6bcfd97 | 541 | wxACCEL_NORMAL, |
bb0054cd RD |
542 | |
543 | wxPD_AUTO_HIDE, | |
544 | wxPD_APP_MODAL, | |
545 | wxPD_CAN_ABORT, | |
a08cbc01 RD |
546 | wxPD_ELAPSED_TIME, |
547 | wxPD_ESTIMATED_TIME, | |
548 | wxPD_REMAINING_TIME, | |
bb0054cd | 549 | |
7cdaed0b | 550 | wxDD_NEW_DIR_BUTTON, |
daa3eac9 | 551 | wxDD_DEFAULT_STYLE, |
7cdaed0b | 552 | |
8bf5d46e | 553 | wxMENU_TEAROFF, |
1afc06c2 | 554 | wxMB_DOCKABLE, |
8bf5d46e | 555 | wxNO_FULL_REPAINT_ON_RESIZE, |
6a8b9da4 RD |
556 | wxFULL_REPAINT_ON_RESIZE, |
557 | ||
1afc06c2 RD |
558 | wxLI_HORIZONTAL, |
559 | wxLI_VERTICAL, | |
560 | ||
d1679124 | 561 | wxWS_EX_VALIDATE_RECURSIVELY, |
0122b7e3 | 562 | wxWS_EX_BLOCK_EVENTS, |
78e8819c | 563 | wxWS_EX_TRANSIENT, |
ecc08ead | 564 | |
3ef86e32 RD |
565 | wxWS_EX_THEMED_BACKGROUND, |
566 | wxWS_EX_PROCESS_IDLE, | |
567 | wxWS_EX_PROCESS_UI_UPDATES, | |
568 | ||
569 | ||
ecc08ead RD |
570 | // Mapping modes (as per Windows) |
571 | wxMM_TEXT, | |
572 | wxMM_LOMETRIC, | |
573 | wxMM_HIMETRIC, | |
574 | wxMM_LOENGLISH, | |
575 | wxMM_HIENGLISH, | |
576 | wxMM_TWIPS, | |
577 | wxMM_ISOTROPIC, | |
578 | wxMM_ANISOTROPIC, | |
579 | wxMM_POINTS, | |
580 | wxMM_METRIC, | |
581 | ||
3eb221f6 | 582 | |
1e4a197e RD |
583 | // It looks like wxTabCtrl may rise from the dead. Uncomment these if |
584 | // it gets an implementation for all platforms... | |
585 | // wxTC_RIGHTJUSTIFY, | |
586 | // wxTC_FIXEDWIDTH, | |
587 | // wxTC_TOP, | |
588 | // wxTC_LEFT, | |
589 | // wxTC_RIGHT, | |
590 | // wxTC_BOTTOM, | |
591 | // wxTC_MULTILINE, | |
592 | // wxTC_OWNERDRAW, | |
593 | ||
7bf85405 RD |
594 | }; |
595 | ||
596 | ||
69d81895 RD |
597 | #ifdef __WXGTK__ |
598 | #define wxDEFAULT_STATUSBAR_STYLE wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE | |
599 | #else | |
600 | #define wxDEFAULT_STATUSBAR_STYLE wxST_SIZEGRIP | |
601 | #endif | |
602 | ||
603 | ||
d14a1e28 RD |
604 | |
605 | enum wxGeometryCentre | |
606 | { | |
607 | wxCENTRE = 0x0001, | |
608 | wxCENTER = wxCENTRE | |
609 | }; | |
610 | ||
611 | ||
612 | enum wxOrientation | |
613 | { | |
614 | wxHORIZONTAL, | |
615 | wxVERTICAL, | |
616 | wxBOTH | |
617 | }; | |
618 | ||
619 | enum wxDirection | |
620 | { | |
621 | wxLEFT, | |
622 | wxRIGHT, | |
623 | wxUP, | |
624 | wxDOWN, | |
625 | ||
626 | wxTOP, | |
627 | wxBOTTOM, | |
628 | ||
629 | wxNORTH, | |
630 | wxSOUTH, | |
631 | wxWEST, | |
632 | wxEAST, | |
633 | ||
634 | wxALL | |
635 | }; | |
636 | ||
637 | enum wxAlignment | |
638 | { | |
639 | wxALIGN_NOT, | |
640 | wxALIGN_CENTER_HORIZONTAL, | |
641 | wxALIGN_CENTRE_HORIZONTAL, | |
642 | wxALIGN_LEFT, | |
643 | wxALIGN_TOP, | |
644 | wxALIGN_RIGHT, | |
645 | wxALIGN_BOTTOM, | |
646 | wxALIGN_CENTER_VERTICAL, | |
647 | wxALIGN_CENTRE_VERTICAL, | |
648 | ||
649 | wxALIGN_CENTER, | |
650 | wxALIGN_CENTRE, | |
651 | ||
652 | wxALIGN_MASK, | |
653 | }; | |
654 | ||
655 | enum wxStretch | |
656 | { | |
657 | wxSTRETCH_NOT, | |
658 | wxSHRINK, | |
659 | wxGROW, | |
660 | wxEXPAND, | |
661 | wxSHAPED, | |
f52e0cf4 | 662 | wxFIXED_MINSIZE, |
d14a1e28 | 663 | wxTILE, |
33e10b88 | 664 | wxADJUST_MINSIZE, |
d14a1e28 RD |
665 | }; |
666 | ||
667 | ||
ebf4302c RD |
668 | enum wxBorder |
669 | { | |
670 | wxBORDER_DEFAULT, | |
671 | wxBORDER_NONE, | |
672 | wxBORDER_STATIC, | |
673 | wxBORDER_SIMPLE, | |
674 | wxBORDER_RAISED, | |
675 | wxBORDER_SUNKEN, | |
676 | wxBORDER_DOUBLE, | |
677 | wxBORDER_MASK, | |
678 | }; | |
679 | ||
680 | ||
7bf85405 RD |
681 | enum { |
682 | wxDEFAULT , | |
683 | wxDECORATIVE, | |
684 | wxROMAN, | |
685 | wxSCRIPT, | |
686 | wxSWISS, | |
687 | wxMODERN, | |
688 | wxTELETYPE, | |
689 | wxVARIABLE, | |
690 | wxFIXED, | |
691 | wxNORMAL, | |
692 | wxLIGHT, | |
693 | wxBOLD, | |
694 | wxITALIC, | |
695 | wxSLANT, | |
696 | wxSOLID, | |
697 | wxDOT, | |
698 | wxLONG_DASH, | |
699 | wxSHORT_DASH, | |
700 | wxDOT_DASH, | |
701 | wxUSER_DASH, | |
702 | wxTRANSPARENT, | |
703 | wxSTIPPLE, | |
704 | wxBDIAGONAL_HATCH, | |
705 | wxCROSSDIAG_HATCH, | |
706 | wxFDIAGONAL_HATCH, | |
707 | wxCROSS_HATCH, | |
708 | wxHORIZONTAL_HATCH, | |
709 | wxVERTICAL_HATCH, | |
710 | wxJOIN_BEVEL, | |
711 | wxJOIN_MITER, | |
712 | wxJOIN_ROUND, | |
713 | wxCAP_ROUND, | |
714 | wxCAP_PROJECTING, | |
715 | wxCAP_BUTT | |
716 | }; | |
717 | ||
718 | typedef enum { | |
719 | wxCLEAR, // 0 | |
720 | wxXOR, // src XOR dst | |
721 | wxINVERT, // NOT dst | |
722 | wxOR_REVERSE, // src OR (NOT dst) | |
723 | wxAND_REVERSE,// src AND (NOT dst) | |
724 | wxCOPY, // src | |
725 | wxAND, // src AND dst | |
726 | wxAND_INVERT, // (NOT src) AND dst | |
727 | wxNO_OP, // dst | |
728 | wxNOR, // (NOT src) AND (NOT dst) | |
729 | wxEQUIV, // (NOT src) XOR dst | |
730 | wxSRC_INVERT, // (NOT src) | |
731 | wxOR_INVERT, // (NOT src) OR dst | |
732 | wxNAND, // (NOT src) OR (NOT dst) | |
733 | wxOR, // src OR dst | |
734 | wxSET, // 1 | |
26b9cf27 RD |
735 | // wxSRC_OR, // source _bitmap_ OR destination |
736 | // wxSRC_AND // source _bitmap_ AND destination | |
7bf85405 RD |
737 | } form_ops_t; |
738 | ||
65fe3842 RD |
739 | enum wxKeyCode { |
740 | WXK_BACK = 8, | |
741 | WXK_TAB = 9, | |
742 | WXK_RETURN = 13, | |
743 | WXK_ESCAPE = 27, | |
744 | WXK_SPACE = 32, | |
745 | WXK_DELETE = 127, | |
746 | ||
747 | WXK_START = 300, | |
748 | WXK_LBUTTON, | |
749 | WXK_RBUTTON, | |
750 | WXK_CANCEL, | |
751 | WXK_MBUTTON, | |
752 | WXK_CLEAR, | |
753 | WXK_SHIFT, | |
754 | WXK_ALT, | |
755 | WXK_CONTROL, | |
756 | WXK_MENU, | |
757 | WXK_PAUSE, | |
758 | WXK_CAPITAL, | |
759 | WXK_PRIOR, /* Page up */ | |
760 | WXK_NEXT, /* Page down */ | |
761 | WXK_END, | |
762 | WXK_HOME, | |
763 | WXK_LEFT, | |
764 | WXK_UP, | |
765 | WXK_RIGHT, | |
766 | WXK_DOWN, | |
767 | WXK_SELECT, | |
768 | WXK_PRINT, | |
769 | WXK_EXECUTE, | |
770 | WXK_SNAPSHOT, | |
771 | WXK_INSERT, | |
772 | WXK_HELP, | |
773 | WXK_NUMPAD0, | |
774 | WXK_NUMPAD1, | |
775 | WXK_NUMPAD2, | |
776 | WXK_NUMPAD3, | |
777 | WXK_NUMPAD4, | |
778 | WXK_NUMPAD5, | |
779 | WXK_NUMPAD6, | |
780 | WXK_NUMPAD7, | |
781 | WXK_NUMPAD8, | |
782 | WXK_NUMPAD9, | |
783 | WXK_MULTIPLY, | |
784 | WXK_ADD, | |
785 | WXK_SEPARATOR, | |
786 | WXK_SUBTRACT, | |
787 | WXK_DECIMAL, | |
788 | WXK_DIVIDE, | |
789 | WXK_F1, | |
790 | WXK_F2, | |
791 | WXK_F3, | |
792 | WXK_F4, | |
793 | WXK_F5, | |
794 | WXK_F6, | |
795 | WXK_F7, | |
796 | WXK_F8, | |
797 | WXK_F9, | |
798 | WXK_F10, | |
799 | WXK_F11, | |
800 | WXK_F12, | |
801 | WXK_F13, | |
802 | WXK_F14, | |
803 | WXK_F15, | |
804 | WXK_F16, | |
805 | WXK_F17, | |
806 | WXK_F18, | |
807 | WXK_F19, | |
808 | WXK_F20, | |
809 | WXK_F21, | |
810 | WXK_F22, | |
811 | WXK_F23, | |
812 | WXK_F24, | |
813 | WXK_NUMLOCK, | |
814 | WXK_SCROLL, | |
815 | WXK_PAGEUP, | |
816 | WXK_PAGEDOWN, | |
817 | ||
818 | WXK_NUMPAD_SPACE, | |
819 | WXK_NUMPAD_TAB, | |
820 | WXK_NUMPAD_ENTER, | |
821 | WXK_NUMPAD_F1, | |
822 | WXK_NUMPAD_F2, | |
823 | WXK_NUMPAD_F3, | |
824 | WXK_NUMPAD_F4, | |
825 | WXK_NUMPAD_HOME, | |
826 | WXK_NUMPAD_LEFT, | |
827 | WXK_NUMPAD_UP, | |
828 | WXK_NUMPAD_RIGHT, | |
829 | WXK_NUMPAD_DOWN, | |
830 | WXK_NUMPAD_PRIOR, | |
831 | WXK_NUMPAD_PAGEUP, | |
832 | WXK_NUMPAD_NEXT, | |
833 | WXK_NUMPAD_PAGEDOWN, | |
834 | WXK_NUMPAD_END, | |
835 | WXK_NUMPAD_BEGIN, | |
836 | WXK_NUMPAD_INSERT, | |
837 | WXK_NUMPAD_DELETE, | |
838 | WXK_NUMPAD_EQUAL, | |
839 | WXK_NUMPAD_MULTIPLY, | |
840 | WXK_NUMPAD_ADD, | |
841 | WXK_NUMPAD_SEPARATOR, | |
842 | WXK_NUMPAD_SUBTRACT, | |
843 | WXK_NUMPAD_DECIMAL, | |
9cbf6f6e RD |
844 | WXK_NUMPAD_DIVIDE, |
845 | ||
846 | WXK_WINDOWS_LEFT, | |
847 | WXK_WINDOWS_RIGHT, | |
848 | WXK_WINDOWS_MENU | |
65fe3842 | 849 | |
7bf85405 RD |
850 | }; |
851 | ||
0a651eb8 | 852 | |
cf694132 RD |
853 | |
854 | typedef enum { | |
855 | wxPAPER_NONE, // Use specific dimensions | |
856 | wxPAPER_LETTER, // Letter, 8 1/2 by 11 inches | |
857 | wxPAPER_LEGAL, // Legal, 8 1/2 by 14 inches | |
858 | wxPAPER_A4, // A4 Sheet, 210 by 297 millimeters | |
859 | wxPAPER_CSHEET, // C Sheet, 17 by 22 inches | |
860 | wxPAPER_DSHEET, // D Sheet, 22 by 34 inches | |
861 | wxPAPER_ESHEET, // E Sheet, 34 by 44 inches | |
862 | wxPAPER_LETTERSMALL, // Letter Small, 8 1/2 by 11 inches | |
863 | wxPAPER_TABLOID, // Tabloid, 11 by 17 inches | |
864 | wxPAPER_LEDGER, // Ledger, 17 by 11 inches | |
865 | wxPAPER_STATEMENT, // Statement, 5 1/2 by 8 1/2 inches | |
866 | wxPAPER_EXECUTIVE, // Executive, 7 1/4 by 10 1/2 inches | |
867 | wxPAPER_A3, // A3 sheet, 297 by 420 millimeters | |
868 | wxPAPER_A4SMALL, // A4 small sheet, 210 by 297 millimeters | |
869 | wxPAPER_A5, // A5 sheet, 148 by 210 millimeters | |
870 | wxPAPER_B4, // B4 sheet, 250 by 354 millimeters | |
871 | wxPAPER_B5, // B5 sheet, 182-by-257-millimeter paper | |
872 | wxPAPER_FOLIO, // Folio, 8-1/2-by-13-inch paper | |
873 | wxPAPER_QUARTO, // Quarto, 215-by-275-millimeter paper | |
874 | wxPAPER_10X14, // 10-by-14-inch sheet | |
875 | wxPAPER_11X17, // 11-by-17-inch sheet | |
876 | wxPAPER_NOTE, // Note, 8 1/2 by 11 inches | |
877 | wxPAPER_ENV_9, // #9 Envelope, 3 7/8 by 8 7/8 inches | |
878 | wxPAPER_ENV_10, // #10 Envelope, 4 1/8 by 9 1/2 inches | |
879 | wxPAPER_ENV_11, // #11 Envelope, 4 1/2 by 10 3/8 inches | |
880 | wxPAPER_ENV_12, // #12 Envelope, 4 3/4 by 11 inches | |
881 | wxPAPER_ENV_14, // #14 Envelope, 5 by 11 1/2 inches | |
882 | wxPAPER_ENV_DL, // DL Envelope, 110 by 220 millimeters | |
883 | wxPAPER_ENV_C5, // C5 Envelope, 162 by 229 millimeters | |
884 | wxPAPER_ENV_C3, // C3 Envelope, 324 by 458 millimeters | |
885 | wxPAPER_ENV_C4, // C4 Envelope, 229 by 324 millimeters | |
886 | wxPAPER_ENV_C6, // C6 Envelope, 114 by 162 millimeters | |
887 | wxPAPER_ENV_C65, // C65 Envelope, 114 by 229 millimeters | |
888 | wxPAPER_ENV_B4, // B4 Envelope, 250 by 353 millimeters | |
889 | wxPAPER_ENV_B5, // B5 Envelope, 176 by 250 millimeters | |
890 | wxPAPER_ENV_B6, // B6 Envelope, 176 by 125 millimeters | |
891 | wxPAPER_ENV_ITALY, // Italy Envelope, 110 by 230 millimeters | |
892 | wxPAPER_ENV_MONARCH, // Monarch Envelope, 3 7/8 by 7 1/2 inches | |
893 | wxPAPER_ENV_PERSONAL, // 6 3/4 Envelope, 3 5/8 by 6 1/2 inches | |
894 | wxPAPER_FANFOLD_US, // US Std Fanfold, 14 7/8 by 11 inches | |
895 | wxPAPER_FANFOLD_STD_GERMAN, // German Std Fanfold, 8 1/2 by 12 inches | |
896 | wxPAPER_FANFOLD_LGL_GERMAN, // German Legal Fanfold, 8 1/2 by 13 inches | |
897 | ||
898 | wxPAPER_ISO_B4, // B4 (ISO) 250 x 353 mm | |
899 | wxPAPER_JAPANESE_POSTCARD, // Japanese Postcard 100 x 148 mm | |
900 | wxPAPER_9X11, // 9 x 11 in | |
901 | wxPAPER_10X11, // 10 x 11 in | |
902 | wxPAPER_15X11, // 15 x 11 in | |
903 | wxPAPER_ENV_INVITE, // Envelope Invite 220 x 220 mm | |
904 | wxPAPER_LETTER_EXTRA, // Letter Extra 9 \275 x 12 in | |
905 | wxPAPER_LEGAL_EXTRA, // Legal Extra 9 \275 x 15 in | |
906 | wxPAPER_TABLOID_EXTRA, // Tabloid Extra 11.69 x 18 in | |
907 | wxPAPER_A4_EXTRA, // A4 Extra 9.27 x 12.69 in | |
908 | wxPAPER_LETTER_TRANSVERSE, // Letter Transverse 8 \275 x 11 in | |
909 | wxPAPER_A4_TRANSVERSE, // A4 Transverse 210 x 297 mm | |
910 | wxPAPER_LETTER_EXTRA_TRANSVERSE, // Letter Extra Transverse 9\275 x 12 in | |
911 | wxPAPER_A_PLUS, // SuperA/SuperA/A4 227 x 356 mm | |
912 | wxPAPER_B_PLUS, // SuperB/SuperB/A3 305 x 487 mm | |
913 | wxPAPER_LETTER_PLUS, // Letter Plus 8.5 x 12.69 in | |
914 | wxPAPER_A4_PLUS, // A4 Plus 210 x 330 mm | |
915 | wxPAPER_A5_TRANSVERSE, // A5 Transverse 148 x 210 mm | |
916 | wxPAPER_B5_TRANSVERSE, // B5 (JIS) Transverse 182 x 257 mm | |
917 | wxPAPER_A3_EXTRA, // A3 Extra 322 x 445 mm | |
918 | wxPAPER_A5_EXTRA, // A5 Extra 174 x 235 mm | |
919 | wxPAPER_B5_EXTRA, // B5 (ISO) Extra 201 x 276 mm | |
920 | wxPAPER_A2, // A2 420 x 594 mm | |
921 | wxPAPER_A3_TRANSVERSE, // A3 Transverse 297 x 420 mm | |
922 | wxPAPER_A3_EXTRA_TRANSVERSE // A3 Extra Transverse 322 x 445 mm | |
923 | ||
924 | } wxPaperSize ; | |
925 | ||
bb0054cd RD |
926 | typedef enum { |
927 | wxDUPLEX_SIMPLEX, // Non-duplex | |
928 | wxDUPLEX_HORIZONTAL, | |
929 | wxDUPLEX_VERTICAL | |
930 | } wxDuplexMode; | |
931 | ||
cf694132 RD |
932 | |
933 | ||
e9159fe8 RD |
934 | // menu and toolbar item kinds |
935 | enum wxItemKind | |
936 | { | |
addd64ee | 937 | wxITEM_SEPARATOR, |
546bfbea VS |
938 | wxITEM_NORMAL, |
939 | wxITEM_CHECK, | |
940 | wxITEM_RADIO, | |
941 | wxITEM_MAX | |
e9159fe8 RD |
942 | }; |
943 | ||
64e8a1f0 | 944 | |
23bed520 RD |
945 | enum wxHitTest |
946 | { | |
947 | wxHT_NOWHERE, | |
948 | ||
949 | // scrollbar | |
950 | wxHT_SCROLLBAR_FIRST = wxHT_NOWHERE, | |
951 | wxHT_SCROLLBAR_ARROW_LINE_1, // left or upper arrow to scroll by line | |
952 | wxHT_SCROLLBAR_ARROW_LINE_2, // right or down | |
953 | wxHT_SCROLLBAR_ARROW_PAGE_1, // left or upper arrow to scroll by page | |
954 | wxHT_SCROLLBAR_ARROW_PAGE_2, // right or down | |
955 | wxHT_SCROLLBAR_THUMB, // on the thumb | |
956 | wxHT_SCROLLBAR_BAR_1, // bar to the left/above the thumb | |
957 | wxHT_SCROLLBAR_BAR_2, // bar to the right/below the thumb | |
958 | wxHT_SCROLLBAR_LAST, | |
959 | ||
960 | // window | |
961 | wxHT_WINDOW_OUTSIDE, // not in this window at all | |
962 | wxHT_WINDOW_INSIDE, // in the client area | |
963 | wxHT_WINDOW_VERT_SCROLLBAR, // on the vertical scrollbar | |
964 | wxHT_WINDOW_HORZ_SCROLLBAR, // on the horizontal scrollbar | |
965 | wxHT_WINDOW_CORNER, // on the corner between 2 scrollbars | |
966 | ||
967 | wxHT_MAX | |
968 | }; | |
969 | ||
970 | ||
3ef86e32 RD |
971 | %{ |
972 | #if ! wxUSE_HOTKEY | |
973 | enum wxHotkeyModifier | |
974 | { | |
975 | wxMOD_NONE = 0, | |
976 | wxMOD_ALT = 1, | |
977 | wxMOD_CONTROL = 2, | |
978 | wxMOD_SHIFT = 4, | |
979 | wxMOD_WIN = 8 | |
980 | }; | |
981 | #define wxEVT_HOTKEY 9999 | |
982 | #endif | |
983 | %} | |
984 | ||
985 | enum wxHotkeyModifier | |
986 | { | |
987 | wxMOD_NONE = 0, | |
988 | wxMOD_ALT = 1, | |
989 | wxMOD_CONTROL = 2, | |
990 | wxMOD_SHIFT = 4, | |
991 | wxMOD_WIN = 8 | |
992 | }; | |
993 | ||
994 | ||
995 | enum wxUpdateUI | |
996 | { | |
997 | wxUPDATE_UI_NONE = 0x0000, | |
998 | wxUPDATE_UI_RECURSE = 0x0001, | |
999 | wxUPDATE_UI_FROMIDLE = 0x0002 // Invoked from On(Internal)Idle | |
1000 | }; | |
1001 | ||
1002 | ||
23bed520 | 1003 | |
7bf85405 RD |
1004 | //--------------------------------------------------------------------------- |
1005 |