X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c78e7c70271608b076b1dbed201b1204e6898d4..06cfab17389f4bbd38560dd86ee39931e979bb1e:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 93320b4b3f..9ea245de1c 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GDICMNH__ -#define __GDICMNH__ +#ifndef _WX_GDICMNH__ +#define _WX_GDICMNH__ #ifdef __GNUG__ #pragma interface "gdicmn.h" @@ -19,20 +19,13 @@ #include "wx/object.h" #include "wx/list.h" #include "wx/hash.h" +#include "wx/string.h" #include "wx/setup.h" - -#ifdef __WXMSW__ -#include "wx/msw/colour.h" -#elif defined(__WXMOTIF__) -#include "wx/xt/colour.h" -#elif defined(__WXGTK__) -#include "wx/gtk/colour.h" -#elif defined(__WXQT__) -#include "wx/qt/colour.h" -#endif +#include "wx/colour.h" // Standard cursors typedef enum { + wxCURSOR_NONE = 0, wxCURSOR_ARROW = 1, wxCURSOR_BULLSEYE, wxCURSOR_CHAR, @@ -65,7 +58,7 @@ typedef enum { wxCURSOR_BASED_ARROW_UP, wxCURSOR_BASED_ARROW_DOWN #endif -} _standard_cursors_t; +} wxStockCursor; class WXDLLEXPORT wxSize { @@ -163,6 +156,7 @@ class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxFont; class WXDLLEXPORT wxPalette; class WXDLLEXPORT wxPalette; +class WXDLLEXPORT wxRegion; /* * Bitmap flags @@ -192,6 +186,8 @@ class WXDLLEXPORT wxPalette; class WXDLLEXPORT wxBitmap; class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxIcon; +class WXDLLEXPORT wxColour; +class WXDLLEXPORT wxString; // Management of pens, brushes and fonts class WXDLLEXPORT wxPenList: public wxList @@ -204,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 @@ -217,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; @@ -309,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; @@ -332,31 +329,42 @@ 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 - // __GDICMNH__ + // _WX_GDICMNH__