Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::SizeConstraints Class Reference

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
 

Detailed Description

Specifies size constraints used during size calculations.

Constructor & Destructor Documentation

tb::SizeConstraints::SizeConstraints ( int  w,
int  h 
)
inline

Constrain to the given width and height.

tb::SizeConstraints::SizeConstraints ( )
inline

No constraints.

Member Function Documentation

SizeConstraints tb::SizeConstraints::ConstrainByLayoutParams ( const LayoutParams lp) const
inline

Return new constraints that are constrained by LayoutParams.

SizeConstraints tb::SizeConstraints::ConstrainByPadding ( int  horizontal_padding,
int  vertical_padding 
) const
inline

Return new constraints reduced by the given padding.

Member Data Documentation

int tb::SizeConstraints::available_w

The available width and height.

May be NO_RESTRICTION which is a large value.


The documentation for this class was generated from the following file: