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