X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34138703c3997ce676a1e713d9ff9eb020640da7..a43a4f9d4d4a7f107e81bc7de0c1eea729593ee2:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 17517cce8a..9ea245de1c 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -25,6 +25,7 @@ // Standard cursors typedef enum { + wxCURSOR_NONE = 0, wxCURSOR_ARROW = 1, wxCURSOR_BULLSEYE, wxCURSOR_CHAR, @@ -57,7 +58,7 @@ typedef enum { wxCURSOR_BASED_ARROW_UP, wxCURSOR_BASED_ARROW_DOWN #endif -} _standard_cursors_t; +} wxStockCursor; class WXDLLEXPORT wxSize { @@ -155,6 +156,7 @@ class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxFont; class WXDLLEXPORT wxPalette; class WXDLLEXPORT wxPalette; +class WXDLLEXPORT wxRegion; /* * Bitmap flags @@ -198,7 +200,6 @@ class WXDLLEXPORT wxPenList: public wxList void AddPen(wxPen *pen); void RemovePen(wxPen *pen); wxPen *FindOrCreatePen(const wxColour& colour, int width, int style); - wxPen *FindOrCreatePen(const wxString& colour, int width, int style); }; class WXDLLEXPORT wxBrushList: public wxList @@ -211,7 +212,6 @@ class WXDLLEXPORT wxBrushList: public wxList void AddBrush(wxBrush *brush); void RemoveBrush(wxBrush *brush); wxBrush *FindOrCreateBrush(const wxColour& colour, int style); - wxBrush *FindOrCreateBrush(const wxString& colour, int style); }; WXDLLEXPORT_DATA(extern const char*) wxEmptyString; @@ -303,6 +303,9 @@ WXDLLEXPORT_DATA(extern wxBrush) wxNullBrush; WXDLLEXPORT_DATA(extern wxPalette) wxNullPalette; WXDLLEXPORT_DATA(extern wxFont) wxNullFont; WXDLLEXPORT_DATA(extern wxColour) wxNullColour; +#ifdef __WXGTK__ +WXDLLEXPORT_DATA(extern wxRegion) wxNullRegion; +#endif // Stock cursors types WXDLLEXPORT_DATA(extern wxCursor*) wxSTANDARD_CURSOR; @@ -326,30 +329,41 @@ extern wxSize WXDLLEXPORT wxGetDisplaySize(); extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor); -// Useful macro for create icons portably +// Useful macro for creating icons portably #ifdef __WXMSW__ -# define wxICON(X) wxIcon(X##_icon); -#elif defined(__X__) -# define wxICON(X) wxIcon(X##_bits, X##_width, X##_height); +// Load from a resource +# define wxICON(X) wxIcon("" #X "") + +#elif defined(__WXGTK__) +// Initialize from an included XPM +# define wxICON(X) wxIcon( (const char**) X##_xpm ) +#elif defined(__WXMOTIF__) +// Initialize from an included XPM +# define wxICON(X) wxIcon( X##_xpm ) #else -# define wxICON wxIcon + +// This will usually mean something on any platform +# define wxICON(X) wxIcon("" #X "") #endif /* Example: - #define wxbuild_icon "wxbuild" - - wxIcon *icon = new wxICON(wxbuild); + wxIcon *icon = new wxICON(mondrian); + expands into: + wxIcon *icon = new wxIcon("mondrian"); // On wxMSW + wxIcon *icon = new wxIcon(mondrian_xpm); // On wxGTK */ class WXDLLEXPORT wxResourceCache: public wxList { - DECLARE_DYNAMIC_CLASS(wxResourceCache) - public: - wxResourceCache(); - wxResourceCache(const unsigned int the_key_type); - ~wxResourceCache(); +public: + wxResourceCache() { } + wxResourceCache(const unsigned int keyType) : wxList(keyType) { } + ~wxResourceCache(); + +private: + DECLARE_DYNAMIC_CLASS(wxResourceCache) }; #endif