Hasty Badger
Small UI library (a branch of Turbo Badger)
|
Specifies size constraints used during size calculations. More...
#include <tb_widgets.h>
Public Member Functions | |
SizeConstraints (int w, int h) | |
Constrain to the given width and height. More... | |
SizeConstraints () | |
No constraints. More... | |
SizeConstraints | ConstrainByPadding (int horizontal_padding, int vertical_padding) const |
Return new constraints reduced by the given padding. More... | |
SizeConstraints | ConstrainByLayoutParams (const LayoutParams &lp) const |
Return new constraints that are constrained by LayoutParams. More... | |
bool | operator== (const SizeConstraints &sc) const |
Public Attributes | |
int | available_w |
The available width and height. More... | |
int | available_h |
Static Public Attributes | |
static const int | NO_RESTRICTION = 10000 |
Specifies size constraints used during size calculations.
|
inline |
Constrain to the given width and height.
|
inline |
No constraints.
|
inline |
Return new constraints that are constrained by LayoutParams.
|
inline |
Return new constraints reduced by the given padding.
int tb::SizeConstraints::available_w |
The available width and height.
May be NO_RESTRICTION which is a large value.