X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40fcf546f6168f51c070d4ded3c40a75c0780fe8..c099b53353ec8c689681a1bc8f5117a584e4098d:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 59c52cd1bb..9072ef7230 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -85,6 +85,13 @@ enum wxBitmapType wxBITMAP_TYPE_ANY = 50 }; +// Polygon filling mode +enum wxPolygonFillMode +{ + wxODDEVEN_RULE = 1, + wxWINDING_RULE +}; + // Standard cursors enum wxStockCursor { @@ -128,14 +135,23 @@ enum wxStockCursor wxCURSOR_BASED_ARROW_UP, wxCURSOR_BASED_ARROW_DOWN, #endif // X11 - wxCURSOR_ARROWWAIT, +#ifdef __WXMAC__ + wxCURSOR_OPEN_HAND, + wxCURSOR_CLOSED_HAND, +#endif wxCURSOR_MAX }; #ifndef __WXGTK__ - #define wxCURSOR_DEFAULT wxCURSOR_ARROW + #define wxCURSOR_DEFAULT wxCURSOR_ARROW +#endif + +#ifndef __WXMAC__ + // TODO CS supply openhand and closedhand cursors + #define wxCURSOR_OPEN_HAND wxCURSOR_HAND + #define wxCURSOR_CLOSED_HAND wxCURSOR_HAND #endif // --------------------------------------------------------------------------- @@ -224,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; } @@ -267,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; @@ -278,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)); +} @@ -710,6 +782,7 @@ public: FONT_SWISS, PEN_BLACK, PEN_BLACKDASHED, + PEN_BLUE, PEN_CYAN, PEN_GREEN, PEN_GREY, @@ -739,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) @@ -749,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)