X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3572173c014d7a886bdb188e9238bae099d30755..617ec45690c340d059726a09ccfe4bab9a42d82e:/include/wx/motif/region.h diff --git a/include/wx/motif/region.h b/include/wx/motif/region.h index d4a78f1a43..e5bcccbd4d 100644 --- a/include/wx/motif/region.h +++ b/include/wx/motif/region.h @@ -18,9 +18,14 @@ #include "wx/list.h" #include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +// ---------------------------------------------------------------------------- +// A list of rectangles type used by wxRegion and wxWindow +// ---------------------------------------------------------------------------- + +WX_DECLARE_LIST(wxRect, wxRectList); -class WXDLLEXPORT wxRect; -class WXDLLEXPORT wxPoint; enum wxRegionContain { wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2 @@ -83,7 +88,8 @@ public: // Is region empty? bool Empty() const; - inline bool IsEmpty() const { return Empty(); } + inline bool IsEmpty() const { return Empty(); } + bool Ok() const { return (m_refData != NULL) ; } //# Tests // Does the region contain the point (x,y)? @@ -99,6 +105,19 @@ public: bool Combine(long x, long y, long width, long height, wxRegionOp op); bool Combine(const wxRegion& region, wxRegionOp op); bool Combine(const wxRect& rect, wxRegionOp op); + + // Get the internal Region handle + WXRegion GetXRegion() const; + +// 'Naughty' functions that allow wxWindows to use a list of rects +// instead of the region, in certain circumstances (e.g. when +// making a region out of the update rectangles). +// These are used by wxPaintDC::wxPaintDC and wxRegionIterator::Reset. + bool UsingRects() const; + wxRect* GetRects(); + int GetRectCount() const; + void SetRects(const wxRectList& rectList); + void SetRects(int count, const wxRect* rects); }; class WXDLLEXPORT wxRegionIterator : public wxObject { @@ -123,13 +142,13 @@ public: long GetWidth() const { return GetW(); } long GetH() const; long GetHeight() const { return GetH(); } - wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); } + wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); } private: long m_current; long m_numRects; wxRegion m_region; - wxRect* m_rects; + wxRect* m_rects; }; #endif