1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxSize}}\label{wxsize}
|
|
|
|
|
|
|
|
A {\bf wxSize} is a useful data structure for graphics operations.
|
1999-06-12 16:56:46 -04:00
|
|
|
It simply contains integer {\it width} and {\it height} members.
|
|
|
|
|
2004-05-04 04:27:20 -04:00
|
|
|
wxSize is used throughout wxWidgets as well as wxPoint which, although almost
|
1999-06-12 16:56:46 -04:00
|
|
|
equivalent to wxSize, has a different meaning: wxPoint represents a position
|
|
|
|
while wxSize - the size.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-12-25 15:34:56 -05:00
|
|
|
\pythonnote{wxPython defines aliases for the {\tt x} and {\tt y} members
|
|
|
|
named {\tt width} and {\tt height} since it makes much more sense for
|
1999-06-12 16:56:46 -04:00
|
|
|
sizes.
|
1999-02-19 02:58:02 -05:00
|
|
|
}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Derived from}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-01-24 09:57:09 -05:00
|
|
|
None
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/gdicmn.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxPoint}{wxpoint}, \helpref{wxRealPoint}{wxrealpoint}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxSize::wxSize}\label{wxsizector}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{}{wxSize}{\void}
|
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\func{}{wxSize}{\param{int}{ width}, \param{int}{ height}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Creates a size object.
|
|
|
|
|
2003-07-20 16:04:22 -04:00
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
2003-07-20 16:04:22 -04:00
|
|
|
\membersection{wxSize::DecTo}\label{wxsizedecto}
|
|
|
|
|
|
|
|
\func{wxSize\&}{DecTo}{\param{const wxSize\& }{size}}
|
|
|
|
|
|
|
|
Decrements this object so that both of its dimensions are not greater than the
|
2003-07-28 03:57:03 -04:00
|
|
|
corresponding dimensions of the \arg{size}.
|
2003-07-20 16:04:22 -04:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{IncTo}{wxsizeincto}
|
|
|
|
|
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
\membersection{wxSize::IsFullySpecified}\label{wxsizeisfullyspecified}
|
|
|
|
|
2004-04-07 01:20:10 -04:00
|
|
|
\constfunc{bool}{IsFullySpecified}{\void}
|
2004-04-04 13:24:56 -04:00
|
|
|
|
|
|
|
Returns \true if neither of the size object components is equal to $-1$, which
|
2004-05-04 04:27:20 -04:00
|
|
|
is used as default for the size values in wxWidgets (hence the predefined
|
2004-04-04 13:24:56 -04:00
|
|
|
\texttt{wxDefaultSize} has both of its components equal to $-1$).
|
|
|
|
|
|
|
|
This method is typically used before calling
|
|
|
|
\helpref{SetDefaults}{wxsizesetdefaults}.
|
|
|
|
|
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\membersection{wxSize::GetWidth}\label{wxsizegetwidth}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\constfunc{int}{GetWidth}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
Gets the width member.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\membersection{wxSize::GetHeight}\label{wxsizegetheight}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\constfunc{int}{GetHeight}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
Gets the height member.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2003-07-20 16:04:22 -04:00
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
2003-07-20 16:04:22 -04:00
|
|
|
\membersection{wxSize::IncTo}\label{wxsizeincto}
|
|
|
|
|
|
|
|
\func{wxSize\&}{IncTo}{\param{const wxSize\& }{size}}
|
|
|
|
|
|
|
|
Increments this object so that both of its dimensions are not less than the
|
2003-07-28 03:57:03 -04:00
|
|
|
corresponding dimensions of the \arg{size}.
|
2003-07-20 16:04:22 -04:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{DecTo}{wxsizedecto}
|
|
|
|
|
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\membersection{wxSize::Set}\label{wxsizeset}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\func{void}{Set}{\param{int}{ width}, \param{int}{ height}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
Sets the width and height members.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
|
|
|
\membersection{wxSize::SetDefaults}\label{wxsizesetdefaults}
|
|
|
|
|
|
|
|
\func{void}{SetDefaults}{\param{const wxSize\& }{sizeDefault}}
|
|
|
|
|
|
|
|
Combine this size object with another one replacing the default (i.e. equal
|
|
|
|
to $-1$) components of this object with those of the other. It is typically
|
|
|
|
used like this:
|
|
|
|
\begin{verbatim}
|
|
|
|
if ( !size.IsFullySpecified() )
|
|
|
|
{
|
|
|
|
size.SetDefaults(GetDefaultSize());
|
|
|
|
}
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{IsFullySpecified}{wxsizeisfullyspecified}
|
|
|
|
|
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\membersection{wxSize::SetHeight}\label{wxsizesetheight}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\func{void}{SetHeight}{\param{int}{ height}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
Sets the height.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\membersection{wxSize::SetWidth}\label{wxsizesetwidth}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
\func{void}{SetWidth}{\param{int}{ width}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-06-12 16:56:46 -04:00
|
|
|
Sets the width.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2004-04-04 13:24:56 -04:00
|
|
|
|
2004-09-23 11:41:43 -04:00
|
|
|
\membersection{wxSize::operator $=$}\label{wxsizeassign}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{operator $=$}{\param{const wxSize\& }{sz}}
|
|
|
|
|
|
|
|
Assignment operator.
|
|
|
|
|
|
|
|
|