#include <udimension.hpp>
Inheritance diagram for ufo::UDimension:
Public Member Functions | |
UDimension () | |
UDimension (int w, int h) | |
int | getWidth () const |
int | getHeight () const |
bool | isInvalid () const |
bool | isValid () const |
bool | isEmpty () const |
void | clamp (const UDimension &maxDim) |
void | expand (const UDimension &minDim) |
void | update (const UDimension &dim) |
void | transcribe (const UDimension &dim) |
void | setSize (int w, int h) |
UDimension | getSize () const |
bool | operator() () const |
bool | operator! () const |
UDimension & | operator+= (const UDimension &dim) |
UDimension & | operator-= (const UDimension &dim) |
UDimension & | operator+= (const UInsets &insets) |
UDimension & | operator-= (const UInsets &insets) |
UDimension & | operator *= (int c) |
UDimension & | operator *= (double c) |
UDimension & | operator/= (int c) |
UDimension & | operator/= (double c) |
Public Attributes | |
int | w |
int | h |
Static Public Attributes | |
UDimension | maxDimension |
UDimension | invalid |
Friends | |
std::ostream & | operator<< (std::ostream &os, const UDimension &o) |
This class is not part of the UObject inheritance structure. Use instead UDimensionObject if you need a dimension derived from UObject.
|
Creates an empty dimension (width == 0 and height == 0). |
|
Creates a dimension with the given width and height.
|
|
Clamps this UDimension to have at most the dimension of the given |
|
Expands this UDimension to have at least the dimension of the given |
|
|
|
This method is for convenience and mimics the API of widget types.
|
|
|
|
|
|
|
|
|
|
Multiplies
|
|
Multiplies
|
|
|
|
|
|
Increases this dimension using the given insets
|
|
Adds dimension
|
|
Shrinks this dimension using the given insets
|
|
Subtracts dimension
|
|
Divides both width and height by
|
|
Divides both width and height by
|
|
Sets the size of this dimension to the given values.
|
|
If width resp. height of the given dimension is not euqal to
|
|
If width resp. height of this dimension is equal to
|
|
The height of this dimension object. |
|
The width of this dimension object. |