]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/size.tex
removed (non existing) default argument for DrawRoundedRectangle
[wxWidgets.git] / docs / latex / wx / size.tex
1 \section{\class{wxSize}}\label{wxsize}
2
3 A {\bf wxSize} is a useful data structure for graphics operations.
4 It simply contains integer {\it width} and {\it height} members.
5
6 wxSize is used throughout wxWidgets as well as wxPoint which, although almost
7 equivalent to wxSize, has a different meaning: wxPoint represents a position
8 while wxSize - the size.
9
10 \pythonnote{wxPython defines aliases for the {\tt x} and {\tt y} members
11 named {\tt width} and {\tt height} since it makes much more sense for
12 sizes.
13 }
14
15 \wxheading{Derived from}
16
17 None
18
19 \wxheading{Include files}
20
21 <wx/gdicmn.h>
22
23 \wxheading{See also}
24
25 \helpref{wxPoint}{wxpoint}, \helpref{wxRealPoint}{wxrealpoint}
26
27 \latexignore{\rtfignore{\wxheading{Members}}}
28
29
30 \membersection{wxSize::wxSize}\label{wxsizector}
31
32 \func{}{wxSize}{\void}
33
34 \func{}{wxSize}{\param{int}{ width}, \param{int}{ height}}
35
36 Creates a size object.
37
38
39
40 \membersection{wxSize::DecTo}\label{wxsizedecto}
41
42 \func{void}{DecTo}{\param{const wxSize\& }{size}}
43
44 Decrements this object so that both of its dimensions are not greater than the
45 corresponding dimensions of the \arg{size}.
46
47 \wxheading{See also}
48
49 \helpref{IncTo}{wxsizeincto}
50
51
52 \membersection{wxSize::IsFullySpecified}\label{wxsizeisfullyspecified}
53
54 \constfunc{bool}{IsFullySpecified}{\void}
55
56 Returns \true if neither of the size object components is equal to $-1$, which
57 is used as default for the size values in wxWidgets (hence the predefined
58 \texttt{wxDefaultSize} has both of its components equal to $-1$).
59
60 This method is typically used before calling
61 \helpref{SetDefaults}{wxsizesetdefaults}.
62
63
64 \membersection{wxSize::GetWidth}\label{wxsizegetwidth}
65
66 \constfunc{int}{GetWidth}{\void}
67
68 Gets the width member.
69
70
71 \membersection{wxSize::GetHeight}\label{wxsizegetheight}
72
73 \constfunc{int}{GetHeight}{\void}
74
75 Gets the height member.
76
77
78
79 \membersection{wxSize::IncTo}\label{wxsizeincto}
80
81 \func{void}{IncTo}{\param{const wxSize\& }{size}}
82
83 Increments this object so that both of its dimensions are not less than the
84 corresponding dimensions of the \arg{size}.
85
86 \wxheading{See also}
87
88 \helpref{DecTo}{wxsizedecto}
89
90
91
92 \membersection{wxSize::Set}\label{wxsizeset}
93
94 \func{void}{Set}{\param{int}{ width}, \param{int}{ height}}
95
96 Sets the width and height members.
97
98
99 \membersection{wxSize::SetDefaults}\label{wxsizesetdefaults}
100
101 \func{void}{SetDefaults}{\param{const wxSize\& }{sizeDefault}}
102
103 Combine this size object with another one replacing the default (i.e. equal
104 to $-1$) components of this object with those of the other. It is typically
105 used like this:
106 \begin{verbatim}
107 if ( !size.IsFullySpecified() )
108 {
109 size.SetDefaults(GetDefaultSize());
110 }
111 \end{verbatim}
112
113 \wxheading{See also}
114
115 \helpref{IsFullySpecified}{wxsizeisfullyspecified}
116
117
118 \membersection{wxSize::SetHeight}\label{wxsizesetheight}
119
120 \func{void}{SetHeight}{\param{int}{ height}}
121
122 Sets the height.
123
124
125 \membersection{wxSize::SetWidth}\label{wxsizesetwidth}
126
127 \func{void}{SetWidth}{\param{int}{ width}}
128
129 Sets the width.
130
131
132 \membersection{wxSize::operator $=$}\label{wxsizeassign}
133
134 \func{void}{operator $=$}{\param{const wxSize\& }{sz}}
135
136 Assignment operator.
137
138