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