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