bWidgets
Core widget toolkit designed for Blender
bWidgets::bwNumberSlider Class Reference

#include <bwNumberSlider.h>

+ Inheritance diagram for bWidgets::bwNumberSlider:
+ Collaboration diagram for bWidgets::bwNumberSlider:

Public Member Functions

 bwNumberSlider (std::optional< unsigned int > width_hint=std::nullopt, std::optional< unsigned int > height_hint=std::nullopt)
 
auto getTypeIdentifier () const -> std::string_view override
 
void draw (bwStyle &style) override
 
auto createHandler () -> std::unique_ptr< bwScreenGraph::EventHandler > override
 
auto setValue (float value) -> bwNumberSlider &
 
auto getValue () const -> float
 
auto setMinMax (float min, float max) -> bwNumberSlider &
 
- Public Member Functions inherited from bWidgets::bwTextBox
 bwTextBox (std::optional< unsigned int > width_hint=std::nullopt, std::optional< unsigned int > height_hint=std::nullopt)
 
auto getTypeIdentifier () const -> std::string_view override
 
void draw (class bwStyle &style) override
 
void registerProperties () override
 
auto setText (const std::string &value) -> bwTextBox &
 
auto getLabel () const -> const std::string *override
 
bool canAlign () const override
 
auto createHandler () -> std::unique_ptr< bwScreenGraph::EventHandler > override
 
- Public Member Functions inherited from bWidgets::bwWidget
 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

std::unique_ptr< bwFunctorInterfaceapply_functor {nullptr}
 
float value
 
float min
 
float max
 
unsigned int precision
 
- Public Attributes inherited from bWidgets::bwTextBox
bwRectanglePixel selection_rectangle
 
bwWidgetBaseStyle base_style
 
- Public Attributes inherited from bWidgets::bwWidget
bwRectanglePixel rectangle
 
unsigned int width_hint
 
unsigned int height_hint
 
bwStyleProperties style_properties
 

Friends

class bwNumberSliderHandler
 

Additional Inherited Members

- Public Types inherited from bWidgets::bwWidget
enum class  State { NORMAL = 0 , HIGHLIGHTED , SUNKEN , STATE_TOT }
 
- Protected Member Functions inherited from bWidgets::bwWidget
void initialize ()
 Additional initialization that can't be done in bwWidget constructor. More...
 
virtual void registerProperties ()
 
- Protected Attributes inherited from bWidgets::bwTextBox
std::string text
 
bool is_text_editing = false
 

Constructor & Destructor Documentation

◆ bwNumberSlider()

bWidgets::bwNumberSlider::bwNumberSlider ( std::optional< unsigned int >  width_hint = std::nullopt,
std::optional< unsigned int >  height_hint = std::nullopt 
)

Member Function Documentation

◆ createHandler()

auto bWidgets::bwNumberSlider::createHandler ( ) -> std::unique_ptr<bwScreenGraph::EventHandler>
overridevirtual

Implements bWidgets::bwWidget.

◆ draw()

void bWidgets::bwNumberSlider::draw ( bwStyle style)
overridevirtual

Implements bWidgets::bwWidget.

◆ getTypeIdentifier()

auto bWidgets::bwNumberSlider::getTypeIdentifier ( ) const -> std::string_view
overridevirtual

Implements bWidgets::bwWidget.

◆ getValue()

auto bWidgets::bwNumberSlider::getValue ( ) const -> float

◆ setMinMax()

auto bWidgets::bwNumberSlider::setMinMax ( float  min,
float  max 
) -> bwNumberSlider&

◆ setValue()

auto bWidgets::bwNumberSlider::setValue ( float  value) -> bwNumberSlider&

Friends And Related Function Documentation

◆ bwNumberSliderHandler

friend class bwNumberSliderHandler
friend

Member Data Documentation

◆ apply_functor

std::unique_ptr<bwFunctorInterface> bWidgets::bwNumberSlider::apply_functor {nullptr}

◆ max

float bWidgets::bwNumberSlider::max

◆ min

float bWidgets::bwNumberSlider::min

◆ precision

unsigned int bWidgets::bwNumberSlider::precision

◆ value

float bWidgets::bwNumberSlider::value

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