wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
+
+ wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
+ wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
+
+ wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); }
+ wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); }
};
// ---------------------------------------------------------------------------
wxSize GetSize() const { return wxSize(width, height); }
void SetSize( const wxSize &s ) { width = s.GetWidth(); height = s.GetHeight(); }
+ wxPoint GetTopLeft() const { return GetPosition(); }
+ wxPoint GetLeftTop() const { return GetTopLeft(); }
+ void SetTopLeft(const wxPoint &p) { SetPosition(p); }
+ void SetLeftTop(const wxPoint &p) { SetTopLeft(p); }
+
+ wxPoint GetBottomRight() const { return wxPoint(GetRight(), GetBottom()); }
+ wxPoint GetRightBottom() const { return GetBottomRight(); }
+ void SetBottomRight(const wxPoint &p) { SetRight(p.x); SetBottom(p.y); }
+ void SetRightBottom(const wxPoint &p) { SetBottomRight(p); }
+
int GetLeft() const { return x; }
int GetTop() const { return y; }
int GetBottom() const { return y + height - 1; }
// 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);
+ // deprecated, use Find() instead
+ wxDEPRECATED( wxColour *FindColour(const wxString& name) );
#ifdef __WXPM__