X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3622daa901777a33969d8bc04e2d62dee14d164..16ee7f42e1b6964e5b7dd8d2152ea31a3748b370:/include/wx/gdicmn.h?ds=sidebyside diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 9ce9b66abf..f0719dbe00 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,18 +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" -#endif +#include "wx/colour.h" // Standard cursors typedef enum { + wxCURSOR_NONE = 0, wxCURSOR_ARROW = 1, wxCURSOR_BULLSEYE, wxCURSOR_CHAR, @@ -63,7 +58,7 @@ typedef enum { wxCURSOR_BASED_ARROW_UP, wxCURSOR_BASED_ARROW_DOWN #endif -} _standard_cursors_t; +} wxStockCursor; class WXDLLEXPORT wxSize { @@ -190,6 +185,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 @@ -202,7 +199,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 @@ -215,7 +211,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; @@ -330,21 +325,27 @@ 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(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 @@ -357,4 +358,4 @@ class WXDLLEXPORT wxResourceCache: public wxList }; #endif - // __GDICMNH__ + // _WX_GDICMNH__