X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d167489bdf17d55d9bd11be834bc17277661063..24528b0c1421ca7bde29027cecc005643dfae8cb:/include/wx/gdicmn.h?ds=sidebyside diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index b89c81760a..f78f14eb95 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -126,6 +126,10 @@ enum wxStockCursor wxCURSOR_MAX }; +#ifndef __WXGTK__ + #define wxCURSOR_DEFAULT wxCURSOR_ARROW +#endif + // --------------------------------------------------------------------------- // macros // --------------------------------------------------------------------------- @@ -163,7 +167,10 @@ enum wxStockCursor #if defined(__WXMSW__) || defined(__WXPM__) #define wxBITMAP(name) wxBitmap(#name, wxBITMAP_TYPE_RESOURCE) -#else // !(Windows || OS2) +#elif defined(__WXGTK__) || defined(__WXMOTIF__) + // Initialize from an included XPM + #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm ) +#else // other platforms #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM) #endif // platform @@ -282,8 +289,6 @@ public: wxPoint GetPosition() const { return wxPoint(x, y); } wxSize GetSize() const { return wxSize(width, height); } - // MFC-like functions - int GetLeft() const { return x; } int GetTop() const { return y; } int GetBottom() const { return y + height - 1; } @@ -294,12 +299,22 @@ public: void SetTop(int top) { y = top; } void SetBottom(int bottom) { height = bottom - y + 1; } + void Inflate(wxCoord dx, wxCoord dy) + { + x -= dx; + y -= dy; + width += 2*dx; + height += 2*dy; + } + + void Inflate(wxCoord d) { Inflate(d, d); } + bool operator==(const wxRect& rect) const; bool operator!=(const wxRect& rect) const { return !(*this == rect); } bool Inside(int cx, int cy) const; - wxRect operator + (const wxRect& rect) const; - const wxRect& operator += (const wxRect& rect); + wxRect operator+(const wxRect& rect) const; + wxRect& operator+=(const wxRect& rect); public: int x, y, width, height;