#include <wx/gdicmn.h>
wxSize is used throughout wxWidgets as well as wxPoint which, although almost equivalent to wxSize, has a different meaning: wxPoint represents a position while wxSize represents the size.
wxPython Note: wxPython defines aliases for the x and y members named width and height since it makes much more sense for sizes.
Predefined objects/pointers: wxDefaultSize
Public Member Functions | |
| void | DecTo (const wxSize &size) |
| int | GetHeight () const |
| int | GetWidth () const |
| void | IncTo (const wxSize &size) |
| bool | IsFullySpecified () const |
| wxSize & | Scale (float xscale, float yscale) |
| void | Set (int width, int height) |
| void | SetDefaults (const wxSize &sizeDefault) |
| void | SetHeight (int height) |
| void | SetWidth (int width) |
| wxSize & | operator= (const wxSize &sz) |
| bool | operator== (const wxSize &s1, const wxSize &s2) |
| bool | operator!= (const wxSize &s1, const wxSize &s2) |
| wxSize | operator+ (const wxSize &s1, const wxSize &s2) |
| wxSize | operator- (const wxSize &s1, const wxSize &s2) |
| wxSize & | operator+= (const wxSize &sz) |
| wxSize & | operator-= (const wxSize &sz) |
| wxSize | operator/ (const wxSize &sz, int factor) |
| wxSize | operator* (const wxSize &sz, int factor) |
| wxSize | operator* (int factor, const wxSize &sz) |
| wxSize & | operator/= (int factor) |
| wxSize & | operator*= (int factor) |
| wxSize () | |
| wxSize (int width, int height) | |
| void | DecBy (const wxSize &size) |
| void | DecBy (int dx, int dy) |
| void | DecBy (int d) |
| void | IncBy (const wxSize &size) |
| void | IncBy (int dx, int dy) |
| void | IncBy (int d) |
| wxSize::wxSize | ( | ) |
Creates a size object.
| wxSize::wxSize | ( | int | width, | |
| int | height | |||
| ) |
Creates a size object.
| void wxSize::DecBy | ( | const wxSize & | size | ) |
| void wxSize::DecBy | ( | int | dx, | |
| int | dy | |||
| ) |
| void wxSize::DecBy | ( | int | d | ) |
| void wxSize::DecTo | ( | const wxSize & | size | ) |
Decrements this object so that both of its dimensions are not greater than the corresponding dimensions of the size.
| int wxSize::GetHeight | ( | ) | const |
Gets the height member.
| int wxSize::GetWidth | ( | ) | const |
Gets the width member.
| void wxSize::IncBy | ( | const wxSize & | size | ) |
| void wxSize::IncBy | ( | int | dx, | |
| int | dy | |||
| ) |
| void wxSize::IncBy | ( | int | d | ) |
| void wxSize::IncTo | ( | const wxSize & | size | ) |
Increments this object so that both of its dimensions are not less than the corresponding dimensions of the size.
| bool wxSize::IsFullySpecified | ( | ) | const |
Returns true if neither of the size object components is equal to -1, which is used as default for the size values in wxWidgets (hence the predefined wxDefaultSize has both of its components equal to -1).
This method is typically used before calling SetDefaults().
| wxSize& wxSize::Scale | ( | float | xscale, | |
| float | yscale | |||
| ) |
Scales the dimensions of this object by the given factors. If you want to scale both dimensions by the same factor you can also use operator*=().
| void wxSize::Set | ( | int | width, | |
| int | height | |||
| ) |
Sets the width and height members.
| void wxSize::SetDefaults | ( | 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:
if ( !size.IsFullySpecified() )
{
size.SetDefaults(GetDefaultSize());
}
| void wxSize::SetHeight | ( | int | height | ) |
Sets the height.
| void wxSize::SetWidth | ( | int | width | ) |
Sets the width.
| wxSize& wxSize::operator/= | ( | int | factor | ) |
| wxSize& wxSize::operator*= | ( | int | factor | ) |
|
[ top ] |