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