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