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