1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Declarations/definitions common to all wx source files
4 // Author: Julian Smart and others
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "defs.h"
22 #include "wx/version.h"
24 // ----------------------------------------------------------------------------
25 // compiler and OS identification
26 // ----------------------------------------------------------------------------
29 #if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || \
30 defined(__unix__) || defined(sun) || defined(__SUN__)
35 // Helps SGI compilation, apparently
38 #define __need_wchar_t
40 // Note I use the term __SGI_CC__ for both cc and CC, its not a good
41 // idea to mix gcc and cc/CC, the name mangling is different
46 #if defined(sun) || defined(__SUN__)
53 #elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) )
60 // define another standard symbol for Microsoft Visual C++: the standard one
61 // (_MSC_VER) is also defined by Metrowerks compiler
62 #if defined(_MSC_VER) && !defined(__MWERKS__)
63 #define __VISUALC__ _MSC_VER
64 #elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
66 #elif defined(__WATCOMC__)
73 // suppress some Visual C++ warnings
75 # pragma warning(disable:4244) // conversion from double to float
76 # pragma warning(disable:4100) // unreferenced formal parameter
79 // suppress some Salford C++ warnings
81 # pragma suppress 353 // Possible nested comments
82 # pragma suppress 593 // Define not used
83 # pragma suppress 61 // enum has no name (doesn't suppress!)
84 # pragma suppress 106 // unnamed, unused parameter
85 # pragma suppress 571 // Virtual function hiding
86 #endif // __SALFORDC__
88 // Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files,
89 // so definte it ourselves
94 //////////////////////////////////////////////////////////////////////////////////
95 // Currently Only MS-Windows/NT, XView and Motif are supported
97 #if defined(__HPUX__) && !defined(__WXMOTIF__)
100 #if defined(__WXMOTIF__)
105 // wxWindows checks for WIN32, not __WIN32__
106 #if ((defined(WIN32) || defined(__NT__)) && !defined(__WIN32__) && !defined(__WXSTUBS__))
114 #if !defined(__WIN95__) && (WINVER >= 0x0400)
118 #if defined(TWIN32) && !defined(__TWIN32__)
124 // Make sure the environment is set correctly
125 #if defined(__WXMSW__) && defined(__X__)
126 # error "Target can't be both X and Windows"
127 #elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \
128 !defined(__WXMAC__) && !defined(__X__) && !defined(__WXQT__) && !defined(__WXSTUBS__)
129 #error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXSTUBS__]"
132 #if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXQT__) || defined(__WXSTUBS__)
134 // Bool is now obsolete, use bool instead
140 # define Bool_DEFINED
143 #elif defined(__WXMSW__)
154 // Add more tests here for compilers that don't already define bool.
155 #if defined( __MWERKS__ )
156 #if (__MWERKS__ < 0x1000) || !__option(bool)
157 typedef unsigned int bool;
159 #elif defined(__SC__)
160 typedef unsigned int bool;
161 #elif defined(__SALFORDC__)
162 typedef unsigned int bool;
163 #elif defined(__VISUALC__) && (__VISUALC__ <= 1000)
164 typedef unsigned int bool;
165 #elif defined(__VISUALC__) && (__VISUALC__ == 1020)
166 #define bool unsigned int
167 #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
168 typedef unsigned int bool;
169 #elif defined(__WATCOMC__)
170 // typedef unsigned int bool;
172 #if (__WATCOMC__ < 1100)
173 typedef unsigned int bool;
176 #elif defined(__SUNCC__) || defined(__SUNPRO_CC)
178 // starting from version 5.0 Sun CC understands 'bool'
179 #if __SUNPRO_CC <= 0x0420
180 // If we use int, we get identically overloaded functions in config.cpp
181 typedef unsigned char bool;
182 #endif // Sun CC version
184 #error "Unknown compiler: only Sun's CC and gcc are currently recognised."
188 #if ( defined(__VISUALC__) && (__VISUALC__ <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__)
189 // Not a good idea, because later system files (e.g. windows.h)
190 // may try to define it. Use wxByte instead.
191 // #define byte unsigned char
194 typedef unsigned char wxByte
;
195 typedef short int WXTYPE
;
196 typedef int wxWindowID
;
198 // Macro to cut down on compiler warnings.
199 #if REMOVE_UNUSED_ARG
200 #define WXUNUSED(identifier) /* identifier */
201 #else // stupid, broken compiler
202 #define WXUNUSED(identifier) identifier
206 * Making or using wxWindows as a Windows DLL
215 # define WXDLLEXPORT __export
216 # define WXDLLEXPORT_DATA(type) type __export
217 # define WXDLLEXPORT_CTORFN __export
218 # elif defined(WXUSINGDLL)
219 # define WXDLLEXPORT __import
220 # define WXDLLEXPORT_DATA(type) type __import
221 # define WXDLLEXPORT_CTORFN
224 # define WXDLLEXPORT_DATA(type) type
225 # define WXDLLEXPORT_CTORFN
231 // _declspec works in BC++ 5 and later, as well as VC++
232 #if defined(__VISUALC__) || defined(__BORLANDC__)
235 # define WXDLLEXPORT _declspec( dllexport )
236 # define WXDLLEXPORT_DATA(type) _declspec( dllexport ) type
237 # define WXDLLEXPORT_CTORFN
238 # elif defined(WXUSINGDLL)
239 # define WXDLLEXPORT _declspec( dllimport )
240 # define WXDLLEXPORT_DATA(type) _declspec( dllimport ) type
241 # define WXDLLEXPORT_CTORFN
244 # define WXDLLEXPORT_DATA(type) type
245 # define WXDLLEXPORT_CTORFN
250 # define WXDLLEXPORT_DATA(type) type
251 # define WXDLLEXPORT_CTORFN
257 # define WXDLLEXPORT_DATA(type) type
258 # define WXDLLEXPORT_CTORFN
261 // For ostream, istream ofstream
262 #if defined(__BORLANDC__) && defined( _RTLDLL )
263 # define WXDLLIMPORT __import
268 class WXDLLEXPORT wxObject
;
269 class WXDLLEXPORT wxEvent
;
271 /** symbolic constant used by all Find()-like functions returning positive
272 integer on success as failure indicator */
273 #define wxNOT_FOUND (-1)
275 // ----------------------------------------------------------------------------
277 // ----------------------------------------------------------------------------
283 /// Standard error codes
286 /// invalid parameter (in broad sense)
288 /// no more data (iteration functions usually return this)
290 /// user cancelled the operation
292 /// no error (the only non negative error code)
296 // ----------------------------------------------------------------------------
297 /** @name Very common macros */
298 // ----------------------------------------------------------------------------
300 /// delete pointer if it is not NULL and NULL it afterwards
301 // (checking that it's !NULL before passing it to delete is just a
302 // a question of style, because delete will do it itself anyhow, but it might
303 // be considered as an error by some overzealous debugging implementations of
304 // the library, so we do it ourselves)
305 #if defined(__SGI_CC__)
306 // Okay this is bad styling, but the native SGI compiler is very picky, it
307 // wont let you compare/assign between a NULL (void *) and another pointer
308 // type. To be really clean we'd need to pass in another argument, the type
310 // Also note the use of 0L, this would allow future possible 64bit support
311 // (as yet untested) by ensuring that we zero all the bits in a pointer
312 // (which is always the same length as a long (at least with the LP64 standard)
314 #define wxDELETE(p) if ( (p) ) { delete (p); p = 0L; }
316 #define wxDELETE(p) if ( (p) != NULL ) { delete p; p = NULL; }
317 #endif /* __SGI__CC__ */
319 // delete an array and NULL it (see comments above)
320 #if defined(__SGI_CC__)
321 // see above comment.
322 #define wxDELETEA(p) if ( (p) ) { delete [] (p); p = 0L; }
324 #define wxDELETEA(p) if ( ((void *) (p)) != NULL ) { delete [] p; p = NULL; }
325 #endif /* __SGI__CC__ */
327 /// size of statically declared array
328 #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0]))
330 // Use of these suppresses some compiler warnings
331 WXDLLEXPORT_DATA(extern const bool) wxTrue
;
332 WXDLLEXPORT_DATA(extern const bool) wxFalse
;
334 // ----------------------------------------------------------------------------
335 // compiler specific settings
336 // ----------------------------------------------------------------------------
338 // to allow compiling with warning level 4 under Microsoft Visual C++ some
339 // warnings just must be disabled
341 #pragma warning(disable: 4514) // unreferenced inline func has been removed
343 you might be tempted to disable this one also: triggered by CHECK and FAIL
344 macros in debug.h, but it's, overall, a rather useful one, so I leave it and
345 will try to find some way to disable this warning just for CHECK/FAIL. Anyone?
347 #pragma warning(disable: 4127) // conditional expression is constant
350 #if defined(__MWERKS__)
354 #define except(x) catch(...)
357 // where should i put this? we need to make sure of this as it breaks
358 // the <iostream> code.
359 #if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
365 // Callback function type definition
366 typedef void (*wxFunction
) (wxObject
&, wxEvent
&);
369 * Window style flags.
370 * Values are chosen so they can be |'ed in a bit list.
371 * Some styles are used across more than one group,
372 * so the values mustn't clash with others in the group.
373 * Otherwise, numbers can be reused across groups.
376 * Window (cross-group) styles now take up the first half
377 * of the flag, and control-specific styles the
383 * Window (Frame/dialog/subwindow/panel item) style flags
385 #define wxVSCROLL 0x80000000
386 #define wxHSCROLL 0x40000000
387 #define wxCAPTION 0x20000000
390 #define wxDOUBLE_BORDER 0x10000000
391 #define wxSUNKEN_BORDER 0x08000000
392 #define wxRAISED_BORDER 0x04000000
393 #define wxBORDER 0x02000000
394 #define wxSIMPLE_BORDER 0x02000000
395 #define wxSTATIC_BORDER 0x01000000
396 #define wxTRANSPARENT_WINDOW 0x00100000
397 #define wxNO_BORDER 0x00200000
399 #define wxUSER_COLOURS 0x00800000
400 // Override CTL3D etc. control colour processing to
401 // allow own background colour
402 // OBSOLETE - use wxNO_3D instead
403 #define wxNO_3D 0x00800000
404 // Override CTL3D or native 3D styles for children
405 #define wxCLIP_CHILDREN 0x00400000
406 // Clip children when painting, which reduces flicker in
407 // e.g. frames and splitter windows, but can't be used in
408 // a panel where a static box must be 'transparent' (panel
409 // paints the background for it)
411 // Add this style to a panel to get tab traversal working
412 // outside of dialogs.
413 #define wxTAB_TRAVERSAL 0x00080000
416 #define wxHORIZONTAL 0x01
417 #define wxVERTICAL 0x02
418 #define wxBOTH (wxVERTICAL|wxHORIZONTAL)
419 #define wxCENTER_FRAME 0x04 /* centering into frame rather than screen */
422 * Frame/dialog style flags
424 #define wxSTAY_ON_TOP 0x8000
425 #define wxICONIZE 0x4000
426 #define wxMINIMIZE wxICONIZE
427 #define wxMAXIMIZE 0x2000
428 #define wxTHICK_FRAME 0x1000
429 #define wxSYSTEM_MENU 0x0800
430 #define wxMINIMIZE_BOX 0x0400
431 #define wxMAXIMIZE_BOX 0x0200
432 #define wxTINY_CAPTION_HORIZ 0x0100
433 #define wxTINY_CAPTION_VERT 0x0080
434 #define wxRESIZE_BOX wxMAXIMIZE_BOX
435 #define wxRESIZE_BORDER 0x0040
436 #define wxDIALOG_MODAL 0x0020
437 #define wxDIALOG_MODELESS 0x0000
439 #define wxDEFAULT_FRAME_STYLE (wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN)
441 #if WXWIN_COMPATIBILITY
442 #define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE
445 #define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU|wxCAPTION|wxTHICK_FRAME)
448 * Subwindow style flags
450 #define wxRETAINED 0x0001
451 #define wxBACKINGSTORE wxRETAINED
452 // wxCanvas or wxPanel can optionally have a thick frame under MS Windows.
453 // #define wxTHICK_FRAME 0x1000
456 * wxToolBar style flags
458 #define wxTB_3DBUTTONS 0x8000
459 #define wxTB_HORIZONTAL 0x0002
460 #define wxTB_VERTICAL 0x0004
461 // Flatbar/Coolbar under Win98
462 #define wxTB_FLAT 0x0008
463 // use native docking
464 #define wxTB_DOCKABLE 0x0010
467 * wxMenuBar style flags
469 // use native docking
470 #define wxMB_DOCKABLE 0x0001
474 * Apply to all panel items
476 #define wxCOLOURED 0x0800
477 // Alignment for panel item labels: replaces characters with zeros
478 // when creating label, so spaces can be included in string for alignment.
479 #define wxFIXED_LENGTH 0x0400
480 #define wxALIGN_LEFT 0x0000
481 #define wxALIGN_CENTER 0x0100
482 #define wxALIGN_CENTRE 0x0100
483 #define wxALIGN_RIGHT 0x0200
486 * Styles for wxListBox
488 #define wxLB_SORT 0x0010
489 #define wxLB_SINGLE 0x0020
490 #define wxLB_MULTIPLE 0x0040
491 #define wxLB_EXTENDED 0x0080
492 // wxLB_OWNERDRAW is Windows-only
493 #define wxLB_OWNERDRAW 0x0100
494 #define wxLB_NEEDED_SB 0x0200
495 #define wxLB_ALWAYS_SB 0x0400
496 #define wxLB_HSCROLL wxHSCROLL
499 * wxTextCtrl style flags
501 #define wxPROCESS_ENTER 0x0004
502 #define wxPASSWORD 0x0008
503 #define wxTE_PROCESS_ENTER wxPROCESS_ENTER
504 #define wxTE_PASSWORD wxPASSWORD
505 #define wxTE_READONLY 0x0010
506 #define wxTE_MULTILINE 0x0020
507 #define wxTE_PROCESS_TAB 0x0040
510 * wxComboBox style flags
512 #define wxCB_SIMPLE 0x0004
513 #define wxCB_SORT 0x0008
514 #define wxCB_READONLY 0x0010
515 #define wxCB_DROPDOWN 0x0020
518 * wxRadioBox/wxRadioButton style flags
521 // New, more intuitive names to specify majorDim argument
523 // Same as wxRA_HORIZONTAL
524 #define wxRA_SPECIFY_COLS 0x0001
525 // Same as wxRA_VERTICAL
526 #define wxRA_SPECIFY_ROWS 0x0002
528 // Old names for compatibility
529 #define wxRA_HORIZONTAL wxHORIZONTAL
530 #define wxRA_VERTICAL wxVERTICAL
531 #define wxRB_GROUP 0x0004
536 #define wxGA_PROGRESSBAR 0x0004
537 #define wxGA_HORIZONTAL wxHORIZONTAL
538 #define wxGA_VERTICAL wxVERTICAL
543 #define wxSL_HORIZONTAL wxHORIZONTAL
544 #define wxSL_VERTICAL wxVERTICAL
545 // The next one is obsolete - use scroll events instead
546 #define wxSL_NOTIFY_DRAG 0x0000
547 #define wxSL_AUTOTICKS 0x0008
548 // #define wxSL_MANUALTICKS 0x0010
549 #define wxSL_LABELS 0x0020
550 #define wxSL_LEFT 0x0040
551 #define wxSL_TOP 0x0080
552 #define wxSL_RIGHT 0x0100
553 #define wxSL_BOTTOM 0x0200
554 #define wxSL_BOTH 0x0400
555 #define wxSL_SELRANGE 0x0800
560 #define wxSB_HORIZONTAL wxHORIZONTAL
561 #define wxSB_VERTICAL wxVERTICAL
566 #define wxBU_AUTODRAW 0x0004
567 #define wxBU_NOAUTODRAW 0x0000
572 #define wxTR_HAS_BUTTONS 0x0004
573 #define wxTR_EDIT_LABELS 0x0008
574 #define wxTR_LINES_AT_ROOT 0x0010
579 #define wxLC_ICON 0x0004
580 #define wxLC_SMALL_ICON 0x0008
581 #define wxLC_LIST 0x0010
582 #define wxLC_REPORT 0x0020
583 #define wxLC_ALIGN_TOP 0x0040
584 #define wxLC_ALIGN_LEFT 0x0080
585 #define wxLC_AUTOARRANGE 0x0100
586 #define wxLC_USER_TEXT 0x0200
587 #define wxLC_EDIT_LABELS 0x0400
588 #define wxLC_NO_HEADER 0x0800
589 #define wxLC_NO_SORT_HEADER 0x1000
590 #define wxLC_SINGLE_SEL 0x2000
591 #define wxLC_SORT_ASCENDING 0x4000
592 #define wxLC_SORT_DESCENDING 0x8000
594 #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
595 #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
596 #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)
598 // Omitted because (a) too much detail (b) not enough style flags
599 // #define wxLC_NO_SCROLL
600 // #define wxLC_NO_LABEL_WRAP
601 // #define wxLC_OWNERDRAW_FIXED
602 // #define wxLC_SHOW_SEL_ALWAYS
608 #define wxSP_VERTICAL 0x0004
609 #define wxSP_HORIZONTAL 0x0008
610 #define wxSP_ARROW_KEYS 0x0010
611 #define wxSP_WRAP 0x0020
614 * wxSplitterWindow flags
617 #define wxSP_NOBORDER 0x0000
618 #define wxSP_3D 0x0004
619 #define wxSP_BORDER 0x0008
622 * wxFrame extra flags
625 // No title on taskbar
626 #define wxFRAME_TOOL_WINDOW 0x0004
632 #define wxTAB_MULTILINE 0x0000
633 #define wxTAB_RIGHTJUSTIFY 0x0004
634 #define wxTAB_FIXEDWIDTH 0x0008
635 #define wxTAB_OWNERDRAW 0x0010
637 // Sorry, I changed my mind about these names...
638 #define wxTC_MULTILINE 0x0000
639 #define wxTC_RIGHTJUSTIFY 0x0004
640 #define wxTC_FIXEDWIDTH 0x0008
641 #define wxTC_OWNERDRAW 0x0010
644 * wxStatusBar95 flags
647 #define wxST_SIZEGRIP 0x0002
654 // Text font families
661 wxTELETYPE
, /* @@@@ */
663 // Proportional or Fixed width fonts (not yet used)
670 // Also wxNORMAL for normal (non-italic text)
684 // Brush & Pen Stippling. Note that a stippled pen cannot be dashed!!
685 // Note also that stippling a Pen IS meaningfull, because a Line is
686 // drawn with a Pen, and without any Brush -- and it can be stippled.
694 #define IS_HATCH(s) ((s)>=wxBDIAGONAL_HATCH && (s)<=wxVERTICAL_HATCH)
710 wxXOR
, // src XOR dst
712 wxOR_REVERSE
, // src OR (NOT dst)
713 wxAND_REVERSE
,// src AND (NOT dst)
715 wxAND
, // src AND dst
716 wxAND_INVERT
, // (NOT src) AND dst
718 wxNOR
, // (NOT src) AND (NOT dst)
719 wxEQUIV
, // (NOT src) XOR dst
720 wxSRC_INVERT
, // (NOT src)
721 wxOR_INVERT
, // (NOT src) OR dst
722 wxNAND
, // (NOT src) OR (NOT dst)
725 wxSRC_OR
, // source _bitmap_ OR destination
726 wxSRC_AND
// source _bitmap_ AND destination
730 #define wxFLOOD_SURFACE 1
731 #define wxFLOOD_BORDER 2
733 // Polygon filling mode
734 #define wxODDEVEN_RULE 1
735 #define wxWINDING_RULE 2
737 // ToolPanel in wxFrame
739 #define wxTOOL_BOTTOM 2
740 #define wxTOOL_LEFT 3
741 #define wxTOOL_RIGHT 4
743 // Dialog specifiers/return values
746 #define wxYES_NO 0x0002
747 #define wxCANCEL 0x0004
751 #define wxICON_EXCLAMATION 0x0020
752 #define wxICON_HAND 0x0040
753 #define wxICON_QUESTION 0x0080
754 #define wxICON_INFORMATION 0x0100
756 #define wxICON_STOP wxICON_HAND
757 #define wxICON_ASTERISK wxICON_INFORMATION
758 #define wxICON_MASK (0x0020|0x0040|0x0080|0x0100)
760 #define wxCENTRE 0x0200
761 #define wxCENTER wxCENTRE
763 // Possible SetSize flags
765 // Use internally-calculated width if -1
766 #define wxSIZE_AUTO_WIDTH 0x0001
767 // Use internally-calculated height if -1
768 #define wxSIZE_AUTO_HEIGHT 0x0002
769 // Use internally-calculated width and height if each is -1
770 #define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT)
771 // Ignore missing (-1) dimensions (use existing).
772 // For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code.
773 #define wxSIZE_USE_EXISTING 0x0000
774 // Allow -1 as a valid position
775 #define wxSIZE_ALLOW_MINUS_ONE 0x0004
776 // Don't do parent client adjustments (for implementation only)
777 #define wxSIZE_NO_ADJUSTMENTS 0x0008
784 wxDF_TEXT
= 1, /* CF_TEXT */
785 wxDF_BITMAP
= 2, /* CF_BITMAP */
786 wxDF_METAFILE
= 3, /* CF_METAFILEPICT */
790 wxDF_OEMTEXT
= 7, /* CF_OEMTEXT */
791 wxDF_DIB
= 8, /* CF_DIB */
796 wxDF_UNICODETEXT
= 13,
797 wxDF_ENHMETAFILE
= 14,
798 wxDF_FILENAME
= 15, /* CF_HDROP */
805 /* Virtual keycodes */
827 WXK_PRIOR
, /* Page up */
828 WXK_NEXT
, /* Page down */
887 /* OS mnemonics -- Identify the running OS (useful for Windows)
888 * [Not all platforms are currently available or supported] */
892 wxCURSES
, // Text-only CURSES
893 wxXVIEW_X
, // Sun's XView OpenLOOK toolkit
894 wxMOTIF_X
, // OSF Motif 1.x.x
895 wxCOSE_X
, // OSF Common Desktop Environment
896 wxNEXTSTEP
, // NeXTStep
897 wxMACINTOSH
, // Apple System 7
901 wxOS2_PM
, // OS/2 Workplace
902 wxWINDOWS
, // Windows or WfW
903 wxPENWINDOWS
, // Windows for Pen Computing
904 wxWINDOWS_NT
, // Windows NT
905 wxWIN32S
, // Windows 32S API
906 wxWIN95
, // Windows 95
907 wxWIN386
// Watcom 32-bit supervisor modus
913 #define wxLANDSCAPE 2
916 /* Standard menu identifiers */
917 #define wxID_LOWEST 4999
919 #define wxID_OPEN 5000
920 #define wxID_CLOSE 5001
921 #define wxID_NEW 5002
922 #define wxID_SAVE 5003
923 #define wxID_SAVEAS 5004
924 #define wxID_REVERT 5005
925 #define wxID_EXIT 5006
926 #define wxID_UNDO 5007
927 #define wxID_REDO 5008
928 #define wxID_HELP 5009
929 #define wxID_PRINT 5010
930 #define wxID_PRINT_SETUP 5011
931 #define wxID_PREVIEW 5012
932 #define wxID_ABOUT 5013
933 #define wxID_HELP_CONTENTS 5014
934 #define wxID_HELP_COMMANDS 5015
935 #define wxID_HELP_PROCEDURES 5016
936 #define wxID_HELP_CONTEXT 5017
938 #define wxID_CUT 5030
939 #define wxID_COPY 5031
940 #define wxID_PASTE 5032
941 #define wxID_CLEAR 5033
942 #define wxID_FIND 5034
943 #define wxID_DUPLICATE 5035
944 #define wxID_SELECTALL 5036
946 #define wxID_FILE1 5050
947 #define wxID_FILE2 5051
948 #define wxID_FILE3 5052
949 #define wxID_FILE4 5053
950 #define wxID_FILE5 5054
951 #define wxID_FILE6 5055
952 #define wxID_FILE7 5056
953 #define wxID_FILE8 5057
954 #define wxID_FILE9 5058
957 #define wxID_CANCEL 5101
958 #define wxID_APPLY 5102
959 #define wxID_YES 5103
961 #define wxID_STATIC 5105
963 #define wxID_HIGHEST 5999
965 // Mapping modes (as per Windows)
967 #define wxMM_LOMETRIC 2
968 #define wxMM_HIMETRIC 3
969 #define wxMM_LOENGLISH 4
970 #define wxMM_HIENGLISH 5
972 #define wxMM_ISOTROPIC 7
973 #define wxMM_ANISOTROPIC 8
975 #define wxMM_POINTS 9
976 #define wxMM_METRIC 10
978 /* Shortcut for easier dialog-unit-to-pixel conversion */
979 #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
982 /* Stand-ins for Windows types, to avoid
983 * #including all of windows.h */
984 typedef unsigned long WXHWND
;
985 typedef unsigned long WXHANDLE
;
986 typedef unsigned long WXHICON
;
987 typedef unsigned long WXHFONT
;
988 typedef unsigned long WXHMENU
;
989 typedef unsigned long WXHPEN
;
990 typedef unsigned long WXHBRUSH
;
991 typedef unsigned long WXHPALETTE
;
992 typedef unsigned long WXHCURSOR
;
993 typedef unsigned long WXHRGN
;
994 typedef unsigned long WXHACCEL
;
995 typedef unsigned long WXHINSTANCE
;
996 typedef unsigned long WXHBITMAP
;
997 typedef unsigned long WXHIMAGELIST
;
998 typedef unsigned long WXHGLOBAL
;
999 typedef unsigned long WXHDC
;
1000 typedef unsigned int WXUINT
;
1001 typedef unsigned long WXDWORD
;
1002 typedef unsigned short WXWORD
;
1003 typedef unsigned int WXWPARAM
;
1004 typedef long WXLPARAM
;
1005 typedef unsigned long WXCOLORREF
;
1006 typedef void * WXRGNDATA
;
1007 typedef void * WXMSG
;
1008 typedef unsigned long WXHCONV
;
1009 typedef unsigned long WXHKEY
;
1010 typedef unsigned long WXHTREEITEM
;
1011 typedef void * WXDRAWITEMSTRUCT
;
1012 typedef void * WXMEASUREITEMSTRUCT
;
1013 typedef void * WXLPCREATESTRUCT
;
1015 typedef int (*WXFARPROC
)();
1016 #elif defined(__WIN32__)
1017 typedef int (__stdcall
*WXFARPROC
)();
1019 typedef int (*WXFARPROC
)();
1025 /* Stand-ins for X/Xt/Motif types */
1026 typedef void* WXWindow
;
1027 typedef void* WXWidget
;
1028 typedef void* WXAppContext
;
1029 typedef void* WXColormap
;
1030 typedef void WXDisplay
;
1031 typedef void WXEvent
;
1032 typedef void* WXCursor
;
1033 typedef void* WXPixmap
;
1034 typedef void* WXFontStructPtr
;
1036 typedef void* WXRegion
;
1037 typedef void* WXFont
;
1038 typedef void* WXImage
;
1039 typedef void* WXCursor
;
1040 typedef void* WXFontList
;
1044 /* Stand-ins for GLIB types */
1046 typedef unsigned guint
;
1047 typedef unsigned long gulong
;
1048 typedef void* gpointer
;
1050 /* Stand-ins for GDK types */
1051 typedef gulong GdkAtom
;
1052 typedef struct _GdkColor GdkColor
;
1053 typedef struct _GdkColormap GdkColormap
;
1054 typedef struct _GdkFont GdkFont
;
1055 typedef struct _GdkGC GdkGC
;
1056 typedef struct _GdkWindow GdkWindow
;
1057 typedef struct _GdkWindow GdkBitmap
;
1058 typedef struct _GdkWindow GdkPixmap
;
1059 typedef struct _GdkCursor GdkCursor
;
1060 typedef struct _GdkRegion GdkRegion
;
1062 /* Stand-ins for GTK types */
1063 typedef struct _GtkWidget GtkWidget
;
1064 typedef struct _GtkStyle GtkStyle
;
1065 typedef struct _GtkAdjustment GtkAdjustment
;
1066 typedef struct _GtkList GtkList
;
1067 typedef struct _GtkToolbar GtkToolbar
;
1068 typedef struct _GtkTooltips GtkTooltips
;
1069 typedef struct _GtkNotebook GtkNotebook
;
1070 typedef struct _GtkNotebookPage GtkNotebookPage
;
1074 // This is required because of clashing macros in windows.h, which may be
1075 // included before or after wxWindows classes, and therefore must be
1076 // disabled here before any significant wxWindows headers are included.