1 \section{\class{wxSize
}}\label{wxsize
}
3 A
{\bf wxSize
} is a useful data structure for graphics operations.
4 It simply contains integer
{\it width
} and
{\it height
} members.
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.
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
15 \wxheading{Derived from
}
19 \wxheading{Include files
}
25 \helpref{wxPoint
}{wxpoint
},
\helpref{wxRealPoint
}{wxrealpoint
}
27 \latexignore{\rtfignore{\wxheading{Members
}}}
30 \membersection{wxSize::wxSize
}\label{wxsizector
}
32 \func{}{wxSize
}{\void}
34 \func{}{wxSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
36 Creates a size object.
40 \membersection{wxSize::DecTo
}\label{wxsizedecto
}
42 \func{void
}{DecTo
}{\param{const wxSize\&
}{size
}}
44 Decrements this object so that both of its dimensions are not greater than the
45 corresponding dimensions of the
\arg{size
}.
49 \helpref{IncTo
}{wxsizeincto
}
52 \membersection{wxSize::IsFullySpecified
}\label{wxsizeisfullyspecified
}
54 \constfunc{bool
}{IsFullySpecified
}{\void}
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$).
60 This method is typically used before calling
61 \helpref{SetDefaults
}{wxsizesetdefaults
}.
64 \membersection{wxSize::GetWidth
}\label{wxsizegetwidth
}
66 \constfunc{int
}{GetWidth
}{\void}
68 Gets the width member.
71 \membersection{wxSize::GetHeight
}\label{wxsizegetheight
}
73 \constfunc{int
}{GetHeight
}{\void}
75 Gets the height member.
79 \membersection{wxSize::IncTo
}\label{wxsizeincto
}
81 \func{void
}{IncTo
}{\param{const wxSize\&
}{size
}}
83 Increments this object so that both of its dimensions are not less than the
84 corresponding dimensions of the
\arg{size
}.
88 \helpref{DecTo
}{wxsizedecto
}
92 \membersection{wxSize::Set
}\label{wxsizeset
}
94 \func{void
}{Set
}{\param{int
}{ width
},
\param{int
}{ height
}}
96 Sets the width and height members.
99 \membersection{wxSize::SetDefaults
}\label{wxsizesetdefaults
}
101 \func{void
}{SetDefaults
}{\param{const wxSize\&
}{sizeDefault
}}
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
107 if ( !size.IsFullySpecified() )
109 size.SetDefaults(GetDefaultSize());
115 \helpref{IsFullySpecified
}{wxsizeisfullyspecified
}
118 \membersection{wxSize::SetHeight
}\label{wxsizesetheight
}
120 \func{void
}{SetHeight
}{\param{int
}{ height
}}
125 \membersection{wxSize::SetWidth
}\label{wxsizesetwidth
}
127 \func{void
}{SetWidth
}{\param{int
}{ width
}}
132 \membersection{wxSize::operator $=$
}\label{wxsizeassign
}
134 \func{void
}{operator $=$
}{\param{const wxSize\&
}{sz
}}