1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
<HTML>
<head><title>wxRegionIterator</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxregioniterator"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx195.htm#wxregion"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx197.htm#wxsashevent"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxRegionIterator</H2>
<P>
This class is used to iterate through the rectangles in a region,
typically when examining the damaged regions of a window within an OnPaint call.<P>
To use it, construct an iterator object on the stack and loop through the
regions, testing the object and incrementing the iterator at the end of the loop.<P>
See <A HREF="wx260.htm#wxwindowonpaint">wxWindow::OnPaint</A> for an example of use.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/region.h><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx260.htm#wxwindowonpaint">wxWindow::OnPaint</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic788">wxRegionIterator::wxRegionIterator</A><BR>
<A HREF="#topic789">wxRegionIterator::GetX</A><BR>
<A HREF="#topic790">wxRegionIterator::GetY</A><BR>
<A HREF="#topic791">wxRegionIterator::GetW</A><BR>
<A HREF="#topic792">wxRegionIterator::GetWidth</A><BR>
<A HREF="#topic793">wxRegionIterator::GetH</A><BR>
<A HREF="#topic794">wxRegionIterator::GetHeight</A><BR>
<A HREF="#topic795">wxRegionIterator::GetRect</A><BR>
<A HREF="#topic796">wxRegionIterator::HaveRects</A><BR>
<A HREF="#topic797">wxRegionIterator::Reset</A><BR>
<A HREF="#topic798">wxRegionIterator::operator ++</A><BR>
<A HREF="#topic799">wxRegionIterator::operator bool</A><BR>
<P>
<HR>
<A NAME="topic788"></A>
<H3>wxRegionIterator::wxRegionIterator</H3>
<P>
<B></B> <B>wxRegionIterator</B>()<P>
Default constructor.<P>
<B></B> <B>wxRegionIterator</B>(<B>const wxRegion&</B><I> region</I>)<P>
Creates an iterator object given a region.<P>
<HR>
<A NAME="topic789"></A>
<H3>wxRegionIterator::GetX</H3>
<P>
<B>long</B> <B>GetX</B>() <B>const</B><P>
Returns the x value for the current region.<P>
<HR>
<A NAME="topic790"></A>
<H3>wxRegionIterator::GetY</H3>
<P>
<B>long</B> <B>GetY</B>() <B>const</B><P>
Returns the y value for the current region.<P>
<HR>
<A NAME="topic791"></A>
<H3>wxRegionIterator::GetW</H3>
<P>
<B>long</B> <B>GetW</B>() <B>const</B><P>
An alias for GetWidth.<P>
<HR>
<A NAME="topic792"></A>
<H3>wxRegionIterator::GetWidth</H3>
<P>
<B>long</B> <B>GetWidth</B>() <B>const</B><P>
Returns the width value for the current region.<P>
<HR>
<A NAME="topic793"></A>
<H3>wxRegionIterator::GetH</H3>
<P>
<B>long</B> <B>GetH</B>() <B>const</B><P>
An alias for GetHeight.<P>
<HR>
<A NAME="topic794"></A>
<H3>wxRegionIterator::GetHeight</H3>
<P>
<B>long</B> <B>GetWidth</B>() <B>const</B><P>
Returns the width value for the current region.<P>
<HR>
<A NAME="topic795"></A>
<H3>wxRegionIterator::GetRect</H3>
<P>
<B>wxRect</B> <B>GetRect</B>() <B>const</B><P>
Returns the current rectangle.<P>
<HR>
<A NAME="topic796"></A>
<H3>wxRegionIterator::HaveRects</H3>
<P>
<B>bool</B> <B>HaveRects</B>() <B>const</B><P>
Returns TRUE if there are still some rectangles; otherwise returns FALSE.<P>
<HR>
<A NAME="topic797"></A>
<H3>wxRegionIterator::Reset</H3>
<P>
<B>void</B> <B>Reset</B>()<P>
Resets the iterator to the beginning of the rectangles.<P>
<B>void</B> <B>Reset</B>(<B>const wxRegion&</B><I> region</I>)<P>
Resets the iterator to the given region.<P>
<HR>
<A NAME="topic798"></A>
<H3>wxRegionIterator::operator ++</H3>
<P>
<B>void</B> <B>operator ++</B>()<P>
Increment operator. Increments the iterator to the next region.<P>
<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
A wxPython alias for this operator is called <TT>Next</TT>.<P>
<HR>
<A NAME="topic799"></A>
<H3>wxRegionIterator::operator bool</H3>
<P>
<B></B> <B>operator bool</B>() <B>const</B><P>
Returns TRUE if there are still some rectangles; otherwise returns FALSE.<P>
You can use this to test the iterator object as if it were of type bool.<P>
</BODY></HTML>
|