X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6c96a7ca418179cee6b1418bd9c59be641d5456..0be9ace27e0a278272cbb1e9daa988b65898eca1:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 2df4124c47..f9d4497c95 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -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 @@ -377,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); @@ -390,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); @@ -419,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); @@ -454,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) }; // ---------------------------------------------------------------------------