X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87315ea262d0f3b7b2be67643f8a7383ffbc8973..c099b53353ec8c689681a1bc8f5117a584e4098d:/include/wx/gdicmn.h?ds=sidebyside diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 20e613dbd3..9072ef7230 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -240,6 +240,14 @@ public: wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; } wxSize& operator/=(int i) { x /= i; y /= i; return *this; } wxSize& operator*=(int i) { x *= i; y *= i; return *this; } + wxSize& operator/=(unsigned int i) { x /= i; y /= i; return *this; } + wxSize& operator*=(unsigned int i) { x *= i; y *= i; return *this; } + wxSize& operator/=(long i) { x /= i; y /= i; return *this; } + wxSize& operator*=(long i) { x *= i; y *= i; return *this; } + wxSize& operator/=(unsigned long i) { x /= i; y /= i; return *this; } + wxSize& operator*=(unsigned long i) { x *= i; y *= i; return *this; } + wxSize& operator/=(double i) { x = int(x/i); y = int(y/i); return *this; } + wxSize& operator*=(double i) { x = int(x*i); y = int(y*i); return *this; } void IncTo(const wxSize& sz) { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; } @@ -283,7 +291,6 @@ public: int GetY() const { return y; } }; - inline bool operator==(const wxSize& s1, const wxSize& s2) { return s1.x == s2.x && s1.y == s2.y; @@ -294,36 +301,85 @@ inline bool operator!=(const wxSize& s1, const wxSize& s2) return s1.x != s2.x || s1.y != s2.y; } - inline wxSize operator+(const wxSize& s1, const wxSize& s2) { return wxSize(s1.x + s2.x, s1.y + s2.y); } - inline wxSize operator-(const wxSize& s1, const wxSize& s2) { return wxSize(s1.x - s2.x, s1.y - s2.y); } - inline wxSize operator/(const wxSize& s, int i) { return wxSize(s.x / i, s.y / i); } - inline wxSize operator*(const wxSize& s, int i) { return wxSize(s.x * i, s.y * i); } - inline wxSize operator*(int i, const wxSize& s) { return wxSize(s.x * i, s.y * i); } +inline wxSize operator/(const wxSize& s, unsigned int i) +{ + return wxSize(s.x / i, s.y / i); +} + +inline wxSize operator*(const wxSize& s, unsigned int i) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator*(unsigned int i, const wxSize& s) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator/(const wxSize& s, long i) +{ + return wxSize(s.x / i, s.y / i); +} + +inline wxSize operator*(const wxSize& s, long i) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator*(long i, const wxSize& s) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator/(const wxSize& s, unsigned long i) +{ + return wxSize(s.x / i, s.y / i); +} + +inline wxSize operator*(const wxSize& s, unsigned long i) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator*(unsigned long i, const wxSize& s) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator*(const wxSize& s, double i) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} + +inline wxSize operator*(double i, const wxSize& s) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} @@ -726,6 +782,7 @@ public: FONT_SWISS, PEN_BLACK, PEN_BLACKDASHED, + PEN_BLUE, PEN_CYAN, PEN_GREEN, PEN_GREY, @@ -755,7 +812,7 @@ protected: static wxObject* ms_stockObject[ITEMCOUNT]; - DECLARE_NO_COPY_CLASS(wxStockGDI) + wxDECLARE_NO_COPY_CLASS(wxStockGDI); }; #define wxITALIC_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_ITALIC) @@ -765,6 +822,7 @@ protected: #define wxBLACK_DASHED_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACKDASHED) #define wxBLACK_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACK) +#define wxBLUE_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLUE) #define wxCYAN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_CYAN) #define wxGREEN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREEN) #define wxGREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREY)