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