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