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