PNTK
|
#include <gui_size.h>
Public Member Functions | |
gui_size () | |
gui_size (const gui_vector &v) | |
gui_size (int width, int height) | |
int | get_width () const |
int | get_height () const |
gui_size | just_width () const |
gui_size | just_height () const |
bool | is_valid () const |
void | set_width (int width) |
void | set_height (int height) |
void | set (int width, int height) |
void | set_min (const gui_size &size) |
void | set_max (const gui_size &size) |
void | change_width (int value) |
void | change_height (int value) |
![]() | |
gui_vector (int x, int y) | |
int | get_x () const |
int | get_y () const |
void | set_x (int x) |
void | set_y (int y) |
void | set (int x, int y) |
void | change_x (int value) |
void | change_y (int value) |
bool | operator== (const gui_vector &rhs) const |
bool | operator!= (const gui_vector &rhs) const |
bool | operator< (const gui_vector &rhs) const |
bool | operator> (const gui_vector &rhs) const |
bool | operator<= (const gui_vector &rhs) const |
bool | operator>= (const gui_vector &rhs) const |
void | operator+= (const gui_vector &rhs) |
void | operator-= (const gui_vector &rhs) |
void | operator*= (const gui_vector &rhs) |
void | operator*= (int rhs) |
void | operator/= (const gui_vector &rhs) |
void | operator/= (int rhs) |
gui_vector | operator+ (const gui_vector &rhs) const |
gui_vector | operator- (const gui_vector &rhs) const |
gui_vector | operator* (const gui_vector &rhs) const |
gui_vector | operator* (int rhs) const |
gui_vector | operator/ (const gui_vector &rhs) const |
gui_vector | operator/ (int rhs) const |
A portable width and height class to deal with size of widgets.
pntk::gui_size::gui_size | ( | ) |
Creates a size object with a width and height of -1.
pntk::gui_size::gui_size | ( | const gui_vector & | v | ) |
Creates a size object from a vector object.
pntk::gui_size::gui_size | ( | int | width, |
int | height | ||
) |
Creates a size object with the given width and height.
void pntk::gui_size::change_height | ( | int | value | ) |
Changes the height by the given value.
void pntk::gui_size::change_width | ( | int | value | ) |
Changes the width by the given value.
int pntk::gui_size::get_height | ( | ) | const |
Returns the height value.
int pntk::gui_size::get_width | ( | ) | const |
Returns the width value.
bool pntk::gui_size::is_valid | ( | ) | const |
Returns true if width and height are both greater than 0.
gui_size pntk::gui_size::just_height | ( | ) | const |
Returns a size object with (0, height).
gui_size pntk::gui_size::just_width | ( | ) | const |
Returns a size object with (width, 0).
void pntk::gui_size::set | ( | int | width, |
int | height | ||
) |
Sets both the width and the height value.
void pntk::gui_size::set_height | ( | int | height | ) |
Sets the height value.
void pntk::gui_size::set_max | ( | const gui_size & | size | ) |
Sets the size to the give size or the current values, which ever are largest.
void pntk::gui_size::set_min | ( | const gui_size & | size | ) |
Sets the size to the give size or the current values, which ever are smallest.
void pntk::gui_size::set_width | ( | int | width | ) |
Sets the width value.