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