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