X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b087ae2588d2988491d8e0621af82d4c44eb7a8..878d055d0b7e6e733e4545b7c83404685e543866:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 392cd820c4..9002d14e11 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -16,7 +16,7 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "gdicmn.h" #endif @@ -275,11 +275,6 @@ public: wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; } }; -#if WXWIN_COMPATIBILITY - #define wxIntPoint wxPoint - #define wxRectangle wxRect -#endif // WXWIN_COMPATIBILITY - // --------------------------------------------------------------------------- // wxRect // --------------------------------------------------------------------------- @@ -422,23 +417,32 @@ class WXDLLEXPORT wxColourDatabase { public: wxColourDatabase(); - ~wxColourDatabase() ; + ~wxColourDatabase(); - // Not const because it may add a name to the database - wxColour *FindColour(const wxString& colour) ; - wxColour *FindColourNoAdd(const wxString& colour) const; + // find colour by name or name for the given colour + wxColour Find(const wxString& name) const; wxString FindName(const wxColour& colour) const; - void AddColour(const wxString& name, wxColour* colour); - void Initialize(); + + // add a new colour to the database + void AddColour(const wxString& name, const wxColour& colour); + + // deprecated, use Find()/Add() instead + wxColour *FindColour(const wxString& name); + void AddColour(const wxString& name, wxColour *colour); + + #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); + // load the database with the built in colour values when called for the + // first time, do nothing after this + void Initialize(); - wxStringToColourHashMap* m_map; + wxStringToColourHashMap *m_map; }; class WXDLLEXPORT wxBitmapList : public wxList