X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..bf95a04f16759468ee7af83a7a78019399c648bb:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 3cd8a18402..f9d4497c95 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -20,13 +20,10 @@ #pragma interface "gdicmn.h" #endif -#include "wx/object.h" +#include "wx/setup.h" #include "wx/list.h" -#include "wx/hash.h" #include "wx/string.h" -#include "wx/setup.h" -#include "wx/colour.h" -#include "wx/font.h" +#include "wx/fontenc.h" // --------------------------------------------------------------------------- // forward declarations @@ -118,6 +115,9 @@ enum wxStockCursor #ifdef __WXGTK__ wxCURSOR_DEFAULT, // standard X11 cursor #endif +#ifdef __WXMAC__ + wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow +#endif #ifdef __X__ // Not yet implemented for Windows wxCURSOR_CROSS_REVERSE, @@ -181,7 +181,7 @@ enum wxStockCursor #if defined(__WXMSW__) || defined(__WXPM__) #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_RESOURCE) -#elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) || defined(__WXMAC__) || defined(__WXMGL__) +#elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXCOCOA__) // Initialize from an included XPM #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm ) #else // other platforms @@ -199,9 +199,7 @@ enum wxStockCursor class WXDLLEXPORT wxSize { public: - // members are public for compatibility (don't use them directly, - // especially that there names were chosen very unfortunately - they should - // have been called width and height) + // members are public for compatibility, don't use them directly. int x, y; // constructors @@ -379,11 +377,11 @@ typedef wxInt8 wxDash; class WXDLLEXPORT wxPenList : public wxList { - DECLARE_DYNAMIC_CLASS(wxPenList) + // DECLARE_DYNAMIC_CLASS(wxPenList) public: wxPenList() { } - ~wxPenList(); + virtual ~wxPenList(); void AddPen(wxPen *pen); void RemovePen(wxPen *pen); @@ -392,26 +390,24 @@ public: class WXDLLEXPORT wxBrushList : public wxList { - DECLARE_DYNAMIC_CLASS(wxBrushList) + // DECLARE_DYNAMIC_CLASS(wxBrushList) public: wxBrushList() { } - ~wxBrushList(); + virtual ~wxBrushList(); void AddBrush(wxBrush *brush); void RemoveBrush(wxBrush *brush); wxBrush *FindOrCreateBrush(const wxColour& colour, int style); }; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; - class WXDLLEXPORT wxFontList : public wxList { - DECLARE_DYNAMIC_CLASS(wxFontList) + // DECLARE_DYNAMIC_CLASS(wxFontList) public: wxFontList() { } - ~wxFontList(); + virtual ~wxFontList(); void AddFont(wxFont *font); void RemoveFont(wxFont *font); @@ -421,32 +417,40 @@ public: wxFontEncoding encoding = wxFONTENCODING_DEFAULT); }; -class WXDLLEXPORT wxColourDatabase : public wxList +class WXDLLEXPORT wxStringToColourHashMap; + +class WXDLLEXPORT wxColourDatabase { - DECLARE_CLASS(wxColourDatabase) + // DECLARE_CLASS(wxColourDatabase) public: - wxColourDatabase(int type); - ~wxColourDatabase() ; + wxColourDatabase(); + virtual ~wxColourDatabase() ; // Not const because it may add a name to the database wxColour *FindColour(const wxString& colour) ; + wxColour *FindColourNoAdd(const wxString& colour) const; wxString FindName(const wxColour& colour) const; + void AddColour(const wxString& name, wxColour* colour); void Initialize(); #ifdef __WXPM__ // PM keeps its own type of colour table long* m_palTable; size_t m_nSize; #endif +private: + wxColour* FindColour(const wxString& colour, bool add); + + wxStringToColourHashMap* m_map; }; class WXDLLEXPORT wxBitmapList : public wxList { - DECLARE_DYNAMIC_CLASS(wxBitmapList) + // DECLARE_DYNAMIC_CLASS(wxBitmapList) public: wxBitmapList(); - ~wxBitmapList(); + virtual ~wxBitmapList(); void AddBitmap(wxBitmap *bitmap); void RemoveBitmap(wxBitmap *bitmap); @@ -456,11 +460,13 @@ class WXDLLEXPORT wxResourceCache: public wxList { public: wxResourceCache() { } +#if !wxUSE_STL wxResourceCache(const unsigned int keyType) : wxList(keyType) { } - ~wxResourceCache(); +#endif + virtual ~wxResourceCache(); private: - DECLARE_DYNAMIC_CLASS(wxResourceCache) + // DECLARE_DYNAMIC_CLASS(wxResourceCache) }; // ---------------------------------------------------------------------------