| 1 | \section{\class{wxRect}}\label{wxrect} |
| 2 | |
| 3 | A class for manipulating rectangles. |
| 4 | |
| 5 | \wxheading{Derived from} |
| 6 | |
| 7 | None |
| 8 | |
| 9 | \wxheading{Include files} |
| 10 | |
| 11 | <wx/gdicmn.h> |
| 12 | |
| 13 | \wxheading{See also} |
| 14 | |
| 15 | \helpref{wxPoint}{wxpoint}, \helpref{wxSize}{wxsize} |
| 16 | |
| 17 | \latexignore{\rtfignore{\wxheading{Members}}} |
| 18 | |
| 19 | \membersection{wxRect::wxRect} |
| 20 | |
| 21 | \func{}{wxRect}{\void} |
| 22 | |
| 23 | Default constructor. |
| 24 | |
| 25 | \func{}{wxRect}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}} |
| 26 | |
| 27 | Creates a wxRect object from x, y, width and height values. |
| 28 | |
| 29 | \func{}{wxRect}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}} |
| 30 | |
| 31 | Creates a wxRect object from top-left and bottom-right points. |
| 32 | |
| 33 | \func{}{wxRect}{\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}} |
| 34 | |
| 35 | Creates a wxRect object from position and size values. |
| 36 | |
| 37 | \membersection{wxRect::x} |
| 38 | |
| 39 | \member{int}{x} |
| 40 | |
| 41 | x coordinate of the top-level corner of the rectangle. |
| 42 | |
| 43 | \membersection{wxRect::y} |
| 44 | |
| 45 | \member{int}{y} |
| 46 | |
| 47 | y coordinate of the top-level corner of the rectangle. |
| 48 | |
| 49 | \membersection{wxRect::width} |
| 50 | |
| 51 | \member{int}{width} |
| 52 | |
| 53 | Width member. |
| 54 | |
| 55 | \membersection{wxRect::height} |
| 56 | |
| 57 | \member{int}{height} |
| 58 | |
| 59 | Height member. |
| 60 | |
| 61 | \membersection{wxRect::Deflate}\label{wxrectdeflate} |
| 62 | |
| 63 | \func{void}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} |
| 64 | |
| 65 | \func{void}{Deflate}{\param{wxCoord }{diff}} |
| 66 | |
| 67 | \constfunc{wxRect}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} |
| 68 | |
| 69 | Decrease the rectangle size by {\it dx} in x direction and {\it dy} in y |
| 70 | direction. Both (or one of) parameters may be negative to increase the |
| 71 | rectngle size. This method is the opposite of \helpref{Inflate}{wxrectinflate}. |
| 72 | |
| 73 | The second form uses the same {\it diff} for both {\it dx} and {\it dy}. |
| 74 | |
| 75 | The first two versions modify the rectangle in place, the last one returns a |
| 76 | new rectangle leaving this one unchanged. |
| 77 | |
| 78 | \wxheading{See also} |
| 79 | |
| 80 | \helpref{Inflate}{wxrectinflate} |
| 81 | |
| 82 | \membersection{wxRect::GetBottom}\label{wxrectgetbottom} |
| 83 | |
| 84 | \constfunc{int}{GetBottom}{\void} |
| 85 | |
| 86 | Gets the bottom point of the rectangle. |
| 87 | |
| 88 | \membersection{wxRect::GetHeight}\label{wxrectgetheight} |
| 89 | |
| 90 | \constfunc{int}{GetHeight}{\void} |
| 91 | |
| 92 | Gets the height member. |
| 93 | |
| 94 | \membersection{wxRect::GetLeft}\label{wxrectgetleft} |
| 95 | |
| 96 | \constfunc{int}{GetLeft}{\void} |
| 97 | |
| 98 | Gets the left point of the rectangle (the same as \helpref{wxRect::GetX}{wxrectgetx}). |
| 99 | |
| 100 | \membersection{wxRect::GetPosition}\label{wxrectgetposition} |
| 101 | |
| 102 | \constfunc{wxPoint}{GetPosition}{\void} |
| 103 | |
| 104 | Gets the position. |
| 105 | |
| 106 | \membersection{wxRect::GetRight}\label{wxrectgetright} |
| 107 | |
| 108 | \constfunc{int}{GetRight}{\void} |
| 109 | |
| 110 | Gets the right point of the rectangle. |
| 111 | |
| 112 | \membersection{wxRect::GetSize}\label{wxrectgetsize} |
| 113 | |
| 114 | \constfunc{wxSize}{GetSize}{\void} |
| 115 | |
| 116 | Gets the size. |
| 117 | |
| 118 | \membersection{wxRect::GetTop}\label{wxrectgettop} |
| 119 | |
| 120 | \constfunc{int}{GetTop}{\void} |
| 121 | |
| 122 | Gets the top point of the rectangle (the same as \helpref{wxRect::GetY}{wxrectgety}). |
| 123 | |
| 124 | \membersection{wxRect::GetWidth}\label{wxrectgetwidth} |
| 125 | |
| 126 | \constfunc{int}{GetWidth}{\void} |
| 127 | |
| 128 | Gets the width member. |
| 129 | |
| 130 | \membersection{wxRect::GetX}\label{wxrectgetx} |
| 131 | |
| 132 | \constfunc{int}{GetX}{\void} |
| 133 | |
| 134 | Gets the x member. |
| 135 | |
| 136 | \membersection{wxRect::GetY}\label{wxrectgety} |
| 137 | |
| 138 | \constfunc{int}{GetY}{\void} |
| 139 | |
| 140 | Gets the y member. |
| 141 | |
| 142 | \membersection{wxRect::Inflate}\label{wxrectinflate} |
| 143 | |
| 144 | \func{void}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} |
| 145 | |
| 146 | \func{void}{Inflate}{\param{wxCoord }{diff}} |
| 147 | |
| 148 | \constfunc{wxRect}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} |
| 149 | |
| 150 | Increase the rectangle size by {\it dx} in x direction and {\it dy} in y |
| 151 | direction. Both (or one of) parameters may be negative to decrease the |
| 152 | rectangle size. |
| 153 | |
| 154 | The second form uses the same {\it diff} for both {\it dx} and {\it dy}. |
| 155 | |
| 156 | The first two versions modify the rectangle in place, the last one returns a |
| 157 | new rectangle leaving this one unchanged. |
| 158 | |
| 159 | \wxheading{See also} |
| 160 | |
| 161 | \helpref{Deflate}{wxrectdeflate} |
| 162 | |
| 163 | \membersection{wxRect:Inside}\label{wxrectinside} |
| 164 | |
| 165 | \constfunc{bool}{Inside}{\param{int }{x}, \param{int }{y}} |
| 166 | |
| 167 | \constfunc{bool}{Inside}{\param{const wxPoint\& }{pt}} |
| 168 | |
| 169 | Returns {\tt TRUE} if the given point is inside the rectangle (or on its |
| 170 | boundary) and {\tt FALSE} otherwise. |
| 171 | |
| 172 | \membersection{wxRect:Intersects}\label{wxrectintersects} |
| 173 | |
| 174 | \constfunc{bool}{Intersects}{\param{const wxRect\& }{rect}} |
| 175 | |
| 176 | Returns {\tt TRUE} if this rectangle has a non empty intersection with the |
| 177 | rectangle {\it rect} and {\tt FALSE} otherwise. |
| 178 | |
| 179 | \membersection{wxRect::Offset}\label{wxrectoffset} |
| 180 | |
| 181 | \func{void}{Offset}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} |
| 182 | |
| 183 | \func{void}{Offset}{\param{const wxPoint\& }{pt}} |
| 184 | |
| 185 | Moves the rectangle by the specified offset. If {\it dx} is positive, the |
| 186 | rectangle is moved to the right, if {\it dy} is positive, it is moved to the |
| 187 | bottom, otherwise it is moved to the left or top respectively. |
| 188 | |
| 189 | \membersection{wxRect::SetHeight}\label{wxrectsetheight} |
| 190 | |
| 191 | \func{void}{SetHeight}{\param{int}{ height}} |
| 192 | |
| 193 | Sets the height. |
| 194 | |
| 195 | \membersection{wxRect::SetWidth}\label{wxrectsetwidth} |
| 196 | |
| 197 | \func{void}{SetWidth}{\param{int}{ width}} |
| 198 | |
| 199 | Sets the width. |
| 200 | |
| 201 | \membersection{wxRect::SetX}\label{wxrectsetx} |
| 202 | |
| 203 | \func{void}{SetX}{\param{int}{ x}} |
| 204 | |
| 205 | Sets the x position. |
| 206 | |
| 207 | \membersection{wxRect::SetY}\label{wxrectsety} |
| 208 | |
| 209 | \func{void}{SetY}{\param{int}{ y}} |
| 210 | |
| 211 | Sets the y position. |
| 212 | |
| 213 | \membersection{wxRect::operator $=$} |
| 214 | |
| 215 | \func{void}{operator $=$}{\param{const wxRect\& }{rect}} |
| 216 | |
| 217 | Assignment operator. |
| 218 | |
| 219 | \membersection{wxRect::operator $==$} |
| 220 | |
| 221 | \func{bool}{operator $==$}{\param{const wxRect\& }{rect}} |
| 222 | |
| 223 | Equality operator. |
| 224 | |
| 225 | \membersection{wxRect::operator $!=$} |
| 226 | |
| 227 | \func{bool}{operator $!=$}{\param{const wxRect\& }{rect}} |
| 228 | |
| 229 | Inequality operator. |
| 230 | |