X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/886dd7d28e50c003cc88b81b968d487a3c17b0d7..75d3838010e2d8a9592a4a016e2994f4f0d3070b:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 4c4f972f2d..4d49f427e5 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -62,6 +62,8 @@ # pragma warning(disable:4699) // using precompiled header # pragma warning(disable:4134) // conversion between pointers to members of same class # pragma warning(disable:4710) // function not inlined +# pragma warning(disable:4284) // +# pragma warning(disable:4097) // #ifndef WIN32 # pragma warning(disable:4135) // conversion between different integral types # pragma warning(disable:4769) // assignment of near pointer to long integer @@ -371,46 +373,58 @@ typedef int wxWindowID; #ifdef WXMAKINGDLL #if wxUSE_BASE #define WXMAKINGDLL_BASE - #else - #define WXUSINGDLL_BASE #endif #define WXMAKINGDLL_CORE + #define WXMAKINGDLL_HTML #endif // WXMAKINGDLL -#ifdef WXUSINGDLL - #define WXUSINGDLL_BASE - #define WXUSINGDLL_CORE -#endif // WXUSINGDLL - - // WXDLLEXPORT maps to export declaration when building the DLL, to import // declaration if using it or to nothing at all if we don't use wxWin as DLL #ifdef WXMAKINGDLL_BASE - #define WXDLLEXPORT_BASE WXEXPORT - #define WXDLLEXPORT_DATA_BASE(type) WXEXPORT type -#elif defined(WXUSINGDLL_BASE) - #define WXDLLEXPORT_BASE WXIMPORT - #define WXDLLEXPORT_DATA_BASE(type) WXIMPORT type + #define WXDLLIMPEXP_BASE WXEXPORT + #define WXDLLIMPEXP_DATA_BASE(type) WXEXPORT type +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_BASE WXIMPORT + #define WXDLLIMPEXP_DATA_BASE(type) WXIMPORT type #else // not making nor using DLL - #define WXDLLEXPORT_BASE - #define WXDLLEXPORT_DATA_BASE(type) type + #define WXDLLIMPEXP_BASE + #define WXDLLIMPEXP_DATA_BASE(type) type #endif #ifdef WXMAKINGDLL_CORE - #define WXDLLEXPORT_CORE WXEXPORT - #define WXDLLEXPORT_DATA_CORE(type) WXEXPORT type -#elif defined(WXUSINGDLL_CORE) - #define WXDLLEXPORT_CORE WXIMPORT - #define WXDLLEXPORT_DATA_CORE(type) WXIMPORT type + #define WXDLLIMPEXP_CORE WXEXPORT + #define WXDLLIMPEXP_DATA_CORE(type) WXEXPORT type +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_CORE WXIMPORT + #define WXDLLIMPEXP_DATA_CORE(type) WXIMPORT type #else // not making nor using DLL - #define WXDLLEXPORT_CORE - #define WXDLLEXPORT_DATA_CORE(type) type + #define WXDLLIMPEXP_CORE + #define WXDLLIMPEXP_DATA_CORE(type) type +#endif + +#ifdef WXMAKINGDLL_HTML + #define WXDLLIMPEXP_HTML WXEXPORT + #define WXDLLIMPEXP_DATA_HTML(type) WXEXPORT type +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_HTML WXIMPORT + #define WXDLLIMPEXP_DATA_HTML(type) WXIMPORT type +#else // not making nor using DLL + #define WXDLLIMPEXP_HTML + #define WXDLLIMPEXP_DATA_HTML(type) type +#endif + +#ifdef WXMAKINGDLL_GL + #define WXDLLIMPEXP_GL WXEXPORT +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_GL WXIMPORT +#else // not making nor using DLL + #define WXDLLIMPEXP_GL #endif // for backwards compatibility, define suffix-less versions too -#define WXDLLEXPORT WXDLLEXPORT_CORE -#define WXDLLEXPORT_DATA WXDLLEXPORT_DATA_CORE +#define WXDLLEXPORT WXDLLIMPEXP_CORE +#define WXDLLEXPORT_DATA WXDLLIMPEXP_DATA_CORE // ---------------------------------------------------------------------------- // Very common macros @@ -483,6 +497,15 @@ typedef int wxWindowID; // size of statically declared array #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) +// helper macros to be able to define unique/anonymous objects: this works by +// appending the current line number to the given identifier to reduce the +// probability of the conflict (it may still happen if this is used in the +// headers, hence you should avoid doing it or provide unique prefixes then) +#define wxCONCAT(text, line) text ## line +#define wxCONCAT_LINE2(text, line) wxCONCAT(text, line) +#define wxCONCAT_LINE(text) wxCONCAT_LINE2(text, __LINE__) +#define wxMAKE_UNIQUE_NAME(text) wxCONCAT_LINE(text) + // symbolic constant used by all Find()-like functions returning positive // integer on success as failure indicator #define wxNOT_FOUND (-1) @@ -551,6 +574,7 @@ enum wxWIN32S, // Windows 32S API wxWIN95, // Windows 95 wxWIN386, // Watcom 32-bit supervisor modus + wxWINDOWS_CE, // Windows CE wxMGL_UNIX, // MGL with direct hardware access wxMGL_X, // MGL on X wxMGL_WIN32, // MGL on Win32 @@ -954,19 +978,10 @@ enum wxBorder #define wxSTATIC_BORDER wxBORDER_STATIC #define wxNO_BORDER wxBORDER_NONE -// Override CTL3D etc. control colour processing to allow own background -// colour. -// Override CTL3D or native 3D styles for children -#define wxNO_3D 0x00800000 - -// OBSOLETE - use wxNO_3D instead -#define wxUSER_COLOURS wxNO_3D - // wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed, // disable it - but still show (see also wxLB_ALWAYS_SB style) // -// NB: as this style is only supported by wxUniversal so far as it doesn't use -// wxUSER_COLOURS/wxNO_3D, we reuse the same style value +// NB: as this style is only supported by wxUniversal and wxMSW so far #define wxALWAYS_SHOW_SB 0x00800000 // Clip children when painting, which reduces flicker in e.g. frames and @@ -1029,6 +1044,12 @@ enum wxBorder // possibly be made to work in the future, at least on Windows #define wxWS_EX_THEMED_BACKGROUND 0x00000008 +// this window should always process idle events +#define wxWS_EX_PROCESS_IDLE 0x00000010 + +// this window should always process UI update events +#define wxWS_EX_PROCESS_UI_UPDATES 0x00000020 + // Use this style to add a context-sensitive help to the window (currently for // Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) #define wxFRAME_EX_CONTEXTHELP 0x00000004 @@ -1062,7 +1083,10 @@ enum wxBorder // obsolete styles, unused any more #define wxDIALOG_MODAL 0x0020 // free flag value 0x0020 -#define wxDIALOG_MODELESS 0x0000 +#define wxDIALOG_MODELESS 0 +#define wxNO_3D 0 +#define wxUSER_COLOURS 0 + /* * MDI parent frame style flags @@ -1241,17 +1265,6 @@ enum wxBorder #define wxTC_MULTILINE wxNB_MULTILINE #define wxTC_OWNERDRAW 0x0200 -// wxToolBar style flags -#define wxTB_HORIZONTAL wxHORIZONTAL // == 0x0004 -#define wxTB_VERTICAL wxVERTICAL // == 0x0008 -#define wxTB_3DBUTTONS 0x0010 -#define wxTB_FLAT 0x0020 // supported only under Win98+/GTK -#define wxTB_DOCKABLE 0x0040 // use native docking under GTK -#define wxTB_NOICONS 0x0080 // don't show the icons -#define wxTB_TEXT 0x0100 // show the text -#define wxTB_NODIVIDER 0x0200 // don't show the divider (Windows) -#define wxTB_NOALIGN 0x0400 // no automatic alignment (Windows) - /* * wxStatusBar95 flags */ @@ -1375,6 +1388,19 @@ enum wxID_FIND, wxID_DUPLICATE, wxID_SELECTALL, + wxID_DELETE, + wxID_REPLACE, + wxID_REPLACE_ALL, + wxID_PROPERTIES, + + wxID_VIEW_DETAILS, + wxID_VIEW_LARGEICONS, + wxID_VIEW_SMALLICONS, + wxID_VIEW_LIST, + wxID_VIEW_SORTDATE, + wxID_VIEW_SORTNAME, + wxID_VIEW_SORTSIZE, + wxID_VIEW_SORTTYPE, wxID_FILE1 = 5050, wxID_FILE2, @@ -1724,6 +1750,17 @@ enum wxKeyCode WXK_WINDOWS_MENU }; +#if wxUSE_HOTKEY +enum wxHotkeyModifier +{ + wxMOD_NONE = 0, + wxMOD_ALT = 1, + wxMOD_CONTROL = 2, + wxMOD_SHIFT = 4, + wxMOD_WIN = 8 +}; +#endif + // Mapping modes (same values as used by Windows, don't change) enum { @@ -1853,6 +1890,17 @@ enum wxPrintMode wxPRINT_MODE_PRINTER = 3 // Send to printer }; +// ---------------------------------------------------------------------------- +// UpdateWindowUI flags +// ---------------------------------------------------------------------------- + +enum wxUpdateUI +{ + wxUPDATE_UI_NONE = 0x0000, + wxUPDATE_UI_RECURSE = 0x0001, + wxUPDATE_UI_FROMIDLE = 0x0002 // Invoked from On(Internal)Idle +}; + // ---------------------------------------------------------------------------- // miscellaneous // ----------------------------------------------------------------------------