X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bab537dc3777d39314b28424890ac8048efcf49f..b2b355240765c641b9764728a982c6b90b9cc747:/include/wx/gdicmn.h?ds=sidebyside diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index ed81546eec..9a7231e8ff 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,10 +167,10 @@ enum wxStockCursor #if defined(__WXMSW__) || defined(__WXPM__) #define wxBITMAP(name) wxBitmap(#name, wxBITMAP_TYPE_RESOURCE) -#elif defined(__WXGTK__) +#elif defined(__WXGTK__) || defined(__WXMOTIF__) // Initialize from an included XPM #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm ) -#else // !(Windows || OS2) +#else // other platforms #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM) #endif // platform @@ -285,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; } @@ -297,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; @@ -312,6 +324,8 @@ public: // Management of pens, brushes and fonts // --------------------------------------------------------------------------- +typedef wxInt8 wxDash; + class WXDLLEXPORT wxPenList : public wxList { DECLARE_DYNAMIC_CLASS(wxPenList)