/////////////////////////////////////////////////////////////////////////////
// Name: region.h
-// Purpose: documentation for wxRegionIterator class
+// Purpose: interface of wxRegionIterator
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
See wxPaintEvent for an example of use.
@library{wxcore}
- @category{FIXME}
+ @category{gdi}
- @seealso
- wxPaintEvent
+ @stdobjects
+ ::wxNullRegion
+
+ @see wxPaintEvent
*/
class wxRegionIterator : public wxObject
{
/**
An alias for GetHeight.
*/
-#define wxCoord GetH() /* implementation is private */
+ wxCoord GetH() const;
/**
Returns the height value for the current region.
*/
- wxCoord GetHeight();
+ wxCoord GetHeight() const;
/**
Returns the current rectangle.
*/
- wxRect GetRect();
+ wxRect GetRect() const;
/**
An alias for GetWidth.
*/
-#define wxCoord GetW() /* implementation is private */
+ wxCoord GetW() const;
/**
Returns the width value for the current region.
*/
- wxCoord GetWidth();
+ wxCoord GetWidth() const;
/**
Returns the x value for the current region.
*/
-#define wxCoord GetX() /* implementation is private */
+ wxCoord GetX() const;
/**
Returns the y value for the current region.
*/
-#define wxCoord GetY() /* implementation is private */
+ wxCoord GetY() const;
/**
Returns @true if there are still some rectangles; otherwise returns @false.
*/
- bool HaveRects();
+ bool HaveRects() const;
//@{
/**
/**
Returns @true if there are still some rectangles; otherwise returns @false.
-
You can use this to test the iterator object as if it were of type bool.
*/
- operator bool();
+ operator bool() const;
};
+
/**
@class wxRegion
@wxheader{region.h}
data using the reference counting, are not affected.
@library{wxcore}
- @category{data}
+ @category{data,gdi}
- @seealso
- wxRegionIterator
+ @see wxRegionIterator
*/
class wxRegion : public wxGDIObject
{
/**
Returns a value indicating whether the given rectangle is contained within the
region.
-
+
@returns The return value is one of wxOutRegion, wxPartRegion and
- wxInRegion.
+ wxInRegion.
*/
- wxRegionContain Contains(long& x, long& y);
- wxRegionContain Contains(const wxPoint& pt);
- wxRegionContain Contains(long& x, long& y,
- long& width,
- long& height);
- wxRegionContain Contains(const wxRect& rect);
+ wxRegionContain Contains(long& x, long& y) const;
+ const wxRegionContain Contains(const wxPoint& pt) const;
+ const wxRegionContain Contains(long& x, long& y,
+ long& width,
+ long& height) const;
+ const wxRegionContain Contains(const wxRect& rect) const;
//@}
/**
Convert the region to a black and white bitmap with the white pixels
being inside the region.
*/
- wxBitmap ConvertToBitmap();
+ wxBitmap ConvertToBitmap() const;
//@{
/**
Returns the outer bounds of the region.
*/
void GetBox(wxCoord& x, wxCoord& y, wxCoord& width,
- wxCoord& height);
- wxRect GetBox();
+ wxCoord& height) const;
+ const wxRect GetBox() const;
//@}
//@{
/**
Finds the intersection of this region and another region.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks Creates the intersection of the two regions, that is, the parts
- which are in both regions. The result is stored in
- this region.
+ which are in both regions. The result is stored in this
+ region.
*/
bool Intersect(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
/**
Returns @true if the region is empty, @false otherwise.
*/
- bool IsEmpty();
+ bool IsEmpty() const;
/**
Returns @true if the region is equal to, i.e. covers the same area as,
- another one. Note that if both this region and @e region are invalid, they
+ another one. Note that if both this region and @a region are invalid, they
are considered to be equal.
*/
- bool IsEqual(const wxRegion& region);
+ bool IsEqual(const wxRegion& region) const;
//@{
/**
Moves the region by the specified offsets in horizontal and vertical
directions.
-
+
@returns @true if successful, @false otherwise (the region is unchanged
- then).
+ then).
*/
bool Offset(wxCoord x, wxCoord y);
bool Offset(const wxPoint& pt);
//@{
/**
Subtracts a region from this region.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks This operation combines the parts of 'this' region that are not
- part of the second region. The result is stored in
- this region.
+ part of the second region. The result is stored in this
+ region.
*/
bool Subtract(const wxRect& rect);
bool Subtract(const wxRegion& region);
/**
Finds the union of this region and the non-transparent pixels of a
bitmap. Colour to be treated as transparent is specified in the
- @e transColour argument, along with an
+ @a transColour argument, along with an
optional colour tolerance value.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks This operation creates a region that combines all of this region
- and the second region. The result is stored in this
- region.
+ and the second region. The result is stored in this
+ region.
*/
bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
bool Union(const wxRect& rect);
//@{
/**
Finds the Xor of this region and another region.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks This operation creates a region that combines all of this region
- and the second region, except for any overlapping
- areas. The result is stored in this region.
+ and the second region, except for any overlapping
+ areas. The result is stored in this region.
*/
bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
bool Xor(const wxRect& rect);
*/
void operator =(const wxRegion& region);
};
+