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