bWidgets
Core widget toolkit designed for Blender
bWidgets::bwWidget Class Referenceabstract

Abstract base class that all widgets derive from. More...

#include <bwWidget.h>

+ Inheritance diagram for bWidgets::bwWidget:
+ Collaboration diagram for bWidgets::bwWidget:

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 ()
 

Detailed Description

Abstract base class that all widgets derive from.

Member Enumeration Documentation

◆ State

enum class bWidgets::bwWidget::State
strong
Enumerator
NORMAL 
HIGHLIGHTED 
SUNKEN 
STATE_TOT 

Constructor & Destructor Documentation

◆ bwWidget() [1/4]

bWidgets::bwWidget::bwWidget ( std::optional< unsigned int >  width_hint,
std::optional< unsigned int >  height_hint 
)

◆ ~bwWidget()

virtual bWidgets::bwWidget::~bwWidget ( )
virtualdefault

◆ bwWidget() [2/4]

bWidgets::bwWidget::bwWidget ( )
delete

◆ bwWidget() [3/4]

bWidgets::bwWidget::bwWidget ( const bwWidget )
delete

◆ bwWidget() [4/4]

bWidgets::bwWidget::bwWidget ( bwWidget &&  )
delete

Member Function Documentation

◆ canAlign()

auto bWidgets::bwWidget::canAlign ( ) const -> bool
virtual

◆ createHandler()

◆ draw()

◆ getLabel()

auto bWidgets::bwWidget::getLabel ( ) const -> const std::string*
virtual

◆ getState()

auto bWidgets::bwWidget::getState ( ) const -> State

◆ getTypeIdentifier()

virtual auto bWidgets::bwWidget::getTypeIdentifier ( ) const -> std::string_view
pure virtual

◆ hide()

auto bWidgets::bwWidget::hide ( bool  _hidden = true) -> bwWidget&

◆ initialize()

void bWidgets::bwWidget::initialize ( )
protected

Additional initialization that can't be done in bwWidget constructor.

◆ isCoordinateInside()

auto bWidgets::bwWidget::isCoordinateInside ( const bwPoint point) const -> bool
virtual

◆ isHidden()

auto bWidgets::bwWidget::isHidden ( ) -> bool

◆ operator=() [1/2]

auto bWidgets::bwWidget::operator= ( bwWidget &&  )
delete

◆ operator=() [2/2]

auto bWidgets::bwWidget::operator= ( const bwWidget )
delete

◆ registerProperties()

void bWidgets::bwWidget::registerProperties ( )
protectedvirtual

◆ setState()

auto bWidgets::bwWidget::setState ( State  value) -> bwWidget&

Member Data Documentation

◆ height_hint

unsigned int bWidgets::bwWidget::height_hint

◆ rectangle

bwRectanglePixel bWidgets::bwWidget::rectangle

Final rectangle defining the widget bounding-box.

Note
This really is assumed to be the final bounding-box, bwStyle.dpi_fac will not get applied to it.

◆ style_properties

bwStyleProperties bWidgets::bwWidget::style_properties

◆ width_hint

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.


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