]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/size.tex
Add *wxTopLevelWindowGTK*RequestUserAttention*int*;
[wxWidgets.git] / docs / latex / wx / size.tex
... / ...
CommitLineData
1\section{\class{wxSize}}\label{wxsize}
2
3A {\bf wxSize} is a useful data structure for graphics operations.
4It simply contains integer {\it width} and {\it height} members.
5
6wxSize is used throughout wxWidgets as well as wxPoint which, although almost
7equivalent to wxSize, has a different meaning: wxPoint represents a position
8while wxSize - the size.
9
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
12sizes.
13}
14
15\wxheading{Derived from}
16
17None
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
36Creates a size object.
37
38
39
40\membersection{wxSize::DecTo}\label{wxsizedecto}
41
42\func{void}{DecTo}{\param{const wxSize\& }{size}}
43
44Decrements this object so that both of its dimensions are not greater than the
45corresponding 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
56Returns \true if neither of the size object components is equal to $-1$, which
57is used as default for the size values in wxWidgets (hence the predefined
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
64\membersection{wxSize::GetWidth}\label{wxsizegetwidth}
65
66\constfunc{int}{GetWidth}{\void}
67
68Gets the width member.
69
70
71\membersection{wxSize::GetHeight}\label{wxsizegetheight}
72
73\constfunc{int}{GetHeight}{\void}
74
75Gets the height member.
76
77
78
79\membersection{wxSize::IncTo}\label{wxsizeincto}
80
81\func{void}{IncTo}{\param{const wxSize\& }{size}}
82
83Increments this object so that both of its dimensions are not less than the
84corresponding 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
96Sets the width and height members.
97
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
118\membersection{wxSize::SetHeight}\label{wxsizesetheight}
119
120\func{void}{SetHeight}{\param{int}{ height}}
121
122Sets the height.
123
124
125\membersection{wxSize::SetWidth}\label{wxsizesetwidth}
126
127\func{void}{SetWidth}{\param{int}{ width}}
128
129Sets the width.
130
131
132\membersection{wxSize::operator $=$}\label{wxsizeassign}
133
134\func{void}{operator $=$}{\param{const wxSize\& }{sz}}
135
136Assignment operator.
137
138