Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
Widgets

Classes

class  tb::TBWidget
 The base TBWidget class. More...
 
class  tb::TBWidgetString
 TBWidgetString holds a string that can be painted as one line with the set alignment. More...
 
class  tb::TBTextField
 TBTextField is a one line text field that is not editable. More...
 
class  tb::TBButton
 TBButton is a regular button widget with auto repeat, toggle and group capabilities. More...
 
class  tb::TBClickLabel
 TBClickLabel has a text field in its internal layout by default. More...
 
class  tb::TBSkinImage
 TBSkinImage is a widget showing a skin element, constrained in size to its skin. More...
 
class  tb::TBSeparator
 TBSeparator is a widget only showing a skin. More...
 
class  tb::TBProgressSpinner
 TBProgressSpinner is a animation that is running while its value is 1. More...
 
class  tb::TBRadioCheckBox
 TBRadioCheckBox has shared functionality for TBCheckBox and TBRadioButton. More...
 
class  tb::TBCheckBox
 TBCheckBox is a box toggling a check mark on click. More...
 
class  tb::TBRadioButton
 TBRadioButton is a button which unselects other radiobuttons of the same group number when clicked. More...
 
class  tb::TBScrollBar
 TBScrollBar is a scroll bar in the given axis. More...
 
class  tb::TBSliderX< VAL_T >
 TBSlider is a horizontal or vertical slider for a number within a range. More...
 
class  tb::TBContainer
 TBContainer is just a TBWidget with border and padding (using skin "TBContainer") More...
 
class  tb::TBMover
 TBMover is moving its parent widget when dragged. More...
 
class  tb::TBResizer
 TBResizer is a lower right corner resize grip. More...
 
class  tb::TBDimmer
 TBDimmer dim widgets in the background and block input. More...
 

Typedefs

typedef TBSliderX< double > tb::TBSlider
 
typedef TBSliderX< int > tb::TBSliderInt
 
typedef TBSliderX< long > tb::TBSliderLong
 

Detailed Description

List of common widgets

Defined in tb_widgets_common.h, TB provides a number of pre-defined widgets out of the box:

Creating custom widgets

Widgets are cheap to create and layout and using many widgets to get what you want is encouraged. A custom widget should typically not implement any layouting and drawing of sub-elements if it can be solved by wrapping a TBLayout and other existing widgets.

Any widget may contain other widgets and may control into which sub-widget other widgets are inflated from resources (using TBWidget::GetContentRoot).

Custom widgets can be inflated from UI resources too. See the use of the TB_WIDGET_FACTORY macro in tb_widgets_reader.cpp for examples on how to do this.