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