// suppress some Visual C++ warnings
#ifdef __VISUALC__
+ // the only "real" warning here is 4244 but there arej ust too many of them
+ // in our code... one day someone should go and fix them but until then...
# pragma warning(disable:4201) // nonstandard extension used: nameless struct/union
# pragma warning(disable:4244) // conversion from double to float
-# pragma warning(disable:4100) // unreferenced formal parameter
-# pragma warning(disable:4511) // copy ctor couldn't be generated
-# pragma warning(disable:4512) // operator=() couldn't be generated
-# 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:4097) // typedef used as class
#ifndef WIN32
# pragma warning(disable:4135) // conversion between different integral types
# pragma warning(disable:4769) // assignment of near pointer to long integer
// check for explicit keyword support
#ifndef HAVE_EXPLICIT
#if defined(__VISUALC__) && (__VISUALC__ >= 1100)
- // VC++ 6.0 and 5.0 have explicit (what about the earlier versions?)
+ // VC++ 6.0 and 5.0 have explicit (what about earlier versions?)
#define HAVE_EXPLICIT
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
&& wxCHECK_GCC_VERSION(2, 95)
// check for static/const/reinterpret_cast<>()
#ifndef HAVE_STATIC_CAST
#if defined(__VISUALC__) && (__VISUALC__ >= 1100)
- // VC++ 6.0 and 5.0 have C++ casts (what about the earlier versions?)
+ // VC++ 6.0 and 5.0 have C++ casts (what about earlier versions?)
#define HAVE_CXX_CASTS
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
&& wxCHECK_GCC_VERSION(2, 95)
#endif
#endif // HAVE_CXX_CASTS
+#ifndef HAVE_STD_WSTRING
+ #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
+ // VC++ 6.0 and 5.0 have std::wstring (what about earlier versions?)
+ #define HAVE_STD_WSTRING
+ #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
+ && wxCHECK_GCC_VERSION(3, 1)
+ // GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it
+ #define HAVE_STD_WSTRING
+ #endif
+#endif
+
+#ifndef HAVE_STD_STRING_COMPARE
+ #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
+ // VC++ 6.0 and 5.0 have std::string::compare
+ // (what about earlier versions?)
+ #define HAVE_STD_STRING_COMPARE
+ #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
+ && wxCHECK_GCC_VERSION(3, 1)
+ // GCC 3.1 has std::string::compare;
+ // 3.0 never was in MinGW, 2.95 hasn't it
+ #define HAVE_STD_STRING_COMPARE
+ #endif
+#endif
+
// ----------------------------------------------------------------------------
// portable calling conventions macros
// ----------------------------------------------------------------------------
#define WXMAKINGDLL_BASE
#endif
+ #define WXMAKINGDLL_NET
#define WXMAKINGDLL_CORE
#define WXMAKINGDLL_HTML
+ #define WXMAKINGDLL_XML
#endif // WXMAKINGDLL
// WXDLLEXPORT maps to export declaration when building the DLL, to import
#define WXDLLIMPEXP_DATA_BASE(type) type
#endif
+#ifdef WXMAKINGDLL_NET
+ #define WXDLLIMPEXP_NET WXEXPORT
+ #define WXDLLIMPEXP_DATA_NET(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+ #define WXDLLIMPEXP_NET WXIMPORT
+ #define WXDLLIMPEXP_DATA_NET(type) WXIMPORT type
+#else // not making nor using DLL
+ #define WXDLLIMPEXP_NET
+ #define WXDLLIMPEXP_DATA_NET(type) type
+#endif
+
#ifdef WXMAKINGDLL_CORE
#define WXDLLIMPEXP_CORE WXEXPORT
#define WXDLLIMPEXP_DATA_CORE(type) WXEXPORT type
#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
+
+#ifdef WXMAKINGDLL_XML
+ #define WXDLLIMPEXP_XML WXEXPORT
+#elif defined(WXUSINGDLL)
+ #define WXDLLIMPEXP_XML WXIMPORT
+#else // not making nor using DLL
+ #define WXDLLIMPEXP_XML
+#endif
+
// for backwards compatibility, define suffix-less versions too
#define WXDLLEXPORT WXDLLIMPEXP_CORE
#define WXDLLEXPORT_DATA WXDLLIMPEXP_DATA_CORE
// 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)
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
#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
// 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
// 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
#define wxSP_ARROW_KEYS 0x1000
#define wxSP_WRAP 0x2000
-/*
- * wxSplitterWindow flags
- */
-#define wxSP_NOBORDER 0x0000
-#define wxSP_NOSASH 0x0010
-#define wxSP_BORDER 0x0020
-#define wxSP_PERMIT_UNSPLIT 0x0040
-#define wxSP_LIVE_UPDATE 0x0080
-#define wxSP_3DSASH 0x0100
-#define wxSP_3DBORDER 0x0200
-#define wxSP_FULLSASH 0x0400
-#define wxSP_3D (wxSP_3DBORDER | wxSP_3DSASH)
-#define wxSP_SASH_AQUA 0x0800
-
/*
* wxNotebook flags
*/
#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
*/
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,
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
{
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
// ----------------------------------------------------------------------------
#endif // defined(__GNUC__) && defined(__APPLE__)
DECLARE_WXCOCOA_OBJC_CLASS(NSApplication);
+DECLARE_WXCOCOA_OBJC_CLASS(NSBitmapImageRep);
DECLARE_WXCOCOA_OBJC_CLASS(NSBox);
DECLARE_WXCOCOA_OBJC_CLASS(NSButton);
DECLARE_WXCOCOA_OBJC_CLASS(NSColor);
DECLARE_WXCOCOA_OBJC_CLASS(NSControl);
DECLARE_WXCOCOA_OBJC_CLASS(NSEvent);
+DECLARE_WXCOCOA_OBJC_CLASS(NSImage);
DECLARE_WXCOCOA_OBJC_CLASS(NSLayoutManager);
DECLARE_WXCOCOA_OBJC_CLASS(NSMenu);
DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
classname(const classname&); \
classname& operator=(const classname&);
+#define DECLARE_NO_ASSIGN_CLASS(classname) \
+ private: \
+ classname& operator=(const classname&);
+
#endif
// _WX_DEFS_H_