/////////////////////////////////////////////////////////////////////////////
// Name: region.h
-// Purpose: documentation for wxRegionIterator class
+// Purpose: interface of wxRegionIterator
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
@library{wxcore}
@category{FIXME}
- @seealso
- wxPaintEvent
+ @see wxPaintEvent
*/
class wxRegionIterator : public wxObject
{
/**
An alias for GetHeight.
*/
- wxCoord GetH();
+ 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.
*/
- wxCoord GetW();
+ wxCoord GetW() const;
/**
Returns the width value for the current region.
*/
- wxCoord GetWidth();
+ wxCoord GetWidth() const;
/**
Returns the x value for the current region.
*/
- wxCoord GetX();
+ wxCoord GetX() const;
/**
Returns the y value for the current region.
*/
- wxCoord GetY();
+ 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.
*/
- 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.
/**
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 @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).
*/
//@{
/**
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.
bitmap. Colour to be treated as transparent is specified in the
@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.
//@{
/**
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.
*/
void operator =(const wxRegion& region);
};
+