/////////////////////////////////////////////////////////////////////////////
-// Name: gdicmn.h
+// Name: wx/gdicmn.h
// Purpose: Common GDI classes, types and declarations
// Author: Julian Smart
// Modified by:
}
+ // centre this rectangle in the given (usually, but not necessarily,
+ // larger) one
+ wxRect CentreIn(const wxRect& r, int dir = wxBOTH) const
+ {
+ return wxRect(dir & wxHORIZONTAL ? r.x + (r.width - width)/2 : x,
+ dir & wxVERTICAL ? r.y + (r.height - height)/2 : y,
+ width, height);
+ }
+
+ wxRect CenterIn(const wxRect& r, int dir = wxBOTH) const
+ {
+ return CentreIn(r, dir);
+ }
+
public:
int x, y, width, height;
};
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
};
-WX_DECLARE_STRING_HASH_MAP( wxColour *, wxStringToColourHashMap )
+WX_DECLARE_STRING_HASH_MAP( wxColour *, wxStringToColourHashMap );
class WXDLLEXPORT wxColourDatabase
{
// add a new colour to the database
void AddColour(const wxString& name, const wxColour& colour);
+#if WXWIN_COMPATIBILITY_2_6
// deprecated, use Find() instead
wxDEPRECATED( wxColour *FindColour(const wxString& name) );
+#endif // WXWIN_COMPATIBILITY_2_6
#ifdef __WXPM__