bWidgets
Core widget toolkit designed for Blender
|
Abstract base class that all widgets derive from. More...
#include <bwWidget.h>
Public Types | |
enum class | State { NORMAL = 0 , HIGHLIGHTED , SUNKEN , STATE_TOT } |
Public Member Functions | |
bwWidget (std::optional< unsigned int > width_hint, std::optional< unsigned int > height_hint) | |
virtual | ~bwWidget ()=default |
bwWidget ()=delete | |
bwWidget (const bwWidget &)=delete | |
bwWidget (bwWidget &&)=delete | |
auto | operator= (const bwWidget &)=delete |
auto | operator= (bwWidget &&)=delete |
auto | getState () const -> State |
auto | setState (State) -> bwWidget & |
auto | hide (bool _hidden=true) -> bwWidget & |
auto | isHidden () -> bool |
virtual auto | getTypeIdentifier () const -> std::string_view=0 |
virtual void | draw (bwStyle &style)=0 |
virtual auto | isCoordinateInside (const bwPoint &point) const -> bool |
virtual auto | getLabel () const -> const std::string * |
virtual auto | canAlign () const -> bool |
virtual auto | createHandler () -> std::unique_ptr< bwScreenGraph::EventHandler >=0 |
Public Attributes | |
bwRectanglePixel | rectangle |
unsigned int | width_hint |
unsigned int | height_hint |
bwStyleProperties | style_properties |
Protected Member Functions | |
void | initialize () |
Additional initialization that can't be done in bwWidget constructor. More... | |
virtual void | registerProperties () |
Abstract base class that all widgets derive from.
|
strong |
bWidgets::bwWidget::bwWidget | ( | std::optional< unsigned int > | width_hint, |
std::optional< unsigned int > | height_hint | ||
) |
|
virtualdefault |
|
delete |
|
delete |
|
delete |
|
virtual |
Reimplemented in bWidgets::bwPushButton, bWidgets::bwRadioButton, and bWidgets::bwTextBox.
|
pure virtual |
|
pure virtual |
|
virtual |
Reimplemented in bWidgets::bwAbstractButton, bWidgets::bwLabel, bWidgets::bwPanel, and bWidgets::bwTextBox.
auto bWidgets::bwWidget::getState | ( | ) | const -> State |
|
pure virtual |
auto bWidgets::bwWidget::hide | ( | bool | _hidden = true | ) | -> bwWidget& |
|
protected |
Additional initialization that can't be done in bwWidget constructor.
|
virtual |
auto bWidgets::bwWidget::isHidden | ( | ) | -> bool |
|
delete |
|
delete |
|
protectedvirtual |
Reimplemented in bWidgets::bwAbstractButton, bWidgets::bwContainerWidget, bWidgets::bwLabel, bWidgets::bwPanel, and bWidgets::bwTextBox.
unsigned int bWidgets::bwWidget::height_hint |
bwRectanglePixel bWidgets::bwWidget::rectangle |
Final rectangle defining the widget bounding-box.
bwStyleProperties bWidgets::bwWidget::style_properties |
unsigned int bWidgets::bwWidget::width_hint |
Define size hints for the widget. bWidgets itself doesn't do anything with it. The actual application can use it for its layout calculations or simply ignore it. For bWidgets all that matters is the final rectangle. Like the name suggests it's really just a hint.