libAlgAudio  v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AlgAudio::UISlider Class Reference

#include <UISlider.hpp>

Inheritance diagram for AlgAudio::UISlider:
AlgAudio::UIContainerSingle AlgAudio::UIWidget AlgAudio::UIMouseEventsBase AlgAudio::SubscriptionsManager AlgAudio::UIVisibilityBase

Public Types

enum  Mode { Mode::Slider, Mode::Display }
 
- Public Types inherited from AlgAudio::UIVisibilityBase
enum  DisplayMode { DisplayMode::Visible, DisplayMode::EmptySpace, DisplayMode::Invisible }
 

Public Member Functions

void CustomDraw (DrawContext &c) override
 
virtual void CustomMouseEnter (Point2D pos) override
 
virtual void CustomMouseLeave (Point2D pos) override
 
virtual void CustomMouseMotion (Point2D pos1, Point2D pos2) override
 
virtual bool CustomMousePress (bool down, MouseButton b, Point2D pos) override
 
virtual void CustomResize (Size2D size) override
 
void DragEnd ()
 
void DragStart ()
 
void DragStep (Point2D_< float > offset)
 
Rect GetAbsoluteOutputRect () const
 
Rect GetBodyRect () const
 
virtual Point2D GetChildPos () const override
 
Rect GetInputRect () const
 
Rect GetRelativeOutputRect () const
 
virtual void OnFocusChanged (bool has_focus) override
 
void SetMode (Mode m)
 
void SetName (std::string name)
 
void SetRangeMax (float x)
 
void SetRangeMin (float x)
 
- Public Member Functions inherited from AlgAudio::UIContainerSingle
virtual std::shared_ptr< UIWidgetCustomFindChild (ID id) const override
 
virtual void Insert (std::shared_ptr< UIWidget >)
 
virtual void OnChildFocusRequested (std::shared_ptr< UIWidget >) override
 
virtual bool OnChildFocusTested (std::shared_ptr< const UIWidget >) override
 
virtual void OnKeyboard (KeyData k) override
 
virtual void RemoveChild ()
 
virtual void RequestFocus () override
 
- Public Member Functions inherited from AlgAudio::UIWidget
void Draw (DrawContext &c)
 
std::shared_ptr< UIWidgetFindChild (ID search_id)
 
Size2D GetCurrentSize () const
 
Point2D GetPosInParent (std::shared_ptr< UIWidget > ancestor)
 
Size2D GetRequestedSize () const
 
std::shared_ptr< WindowGetWindow ()
 
bool HasParent ()
 
bool HasZeroArea () const
 
void Resize (Size2D s)
 
void SetBackColor (const Color &c)
 
void SetCustomSize (Size2D size)
 
void SetFrontColor (const Color &c)
 
void TriggerFakeResize ()
 
virtual ~UIWidget ()
 
- Public Member Functions inherited from AlgAudio::UIMouseEventsBase
void OnMouseEnter (Point2D)
 
void OnMouseLeave (Point2D)
 
void OnMouseMotion (Point2D, Point2D)
 
bool OnMousePress (bool, MouseButton, Point2D)
 
void SetFocusable (bool f)
 
- Public Member Functions inherited from AlgAudio::UIVisibilityBase
bool IsDrawn () const
 
bool IsInvisible () const
 
void SetDisplayMode (DisplayMode m)
 

Static Public Member Functions

static std::shared_ptr< UISliderCreate (std::weak_ptr< Window > parent_window, std::shared_ptr< ParamController > controller)
 

Public Attributes

std::string param_id
 
- Public Attributes inherited from AlgAudio::UIWidget
bool debug_this_widget = false
 
std::weak_ptr< UIWidgetparent
 
ID widget_id
 
- Public Attributes inherited from AlgAudio::UIMouseEventsBase
Point2D last_mouse_pos
 
Signal on_clicked
 
Signal< Point2Don_motion
 
Signal< bool > on_pointed
 
Signal< bool > on_pressed
 
- Public Attributes inherited from AlgAudio::UIVisibilityBase
Signal on_display_mode_changed
 
- Public Attributes inherited from AlgAudio::SubscriptionsManager
SubscriptionList subscriptions
 

Protected Member Functions

 UISlider (std::weak_ptr< Window > parent_window, std::shared_ptr< ParamController > controller)
 
- Protected Member Functions inherited from AlgAudio::UIContainerSingle
 UIContainerSingle (std::weak_ptr< Window > parent_window)
 
- Protected Member Functions inherited from AlgAudio::UIWidget
bool IsFocused () const
 
bool IsRoot () const
 
virtual void OnChildRequestedSizeChanged ()
 
virtual void OnChildVisibilityChanged ()
 
void SetMinimalSize (Size2D)
 
void SetNeedsRedrawing ()
 
 UIWidget (std::weak_ptr< Window > parent_window)
 
- Protected Member Functions inherited from AlgAudio::UIMouseEventsBase
 UIMouseEventsBase ()
 
- Protected Member Functions inherited from AlgAudio::UIVisibilityBase
 UIVisibilityBase ()
 

Additional Inherited Members

- Protected Attributes inherited from AlgAudio::UIContainerSingle
std::shared_ptr< UIWidgetchild
 
bool child_is_focused = false
 
- Protected Attributes inherited from AlgAudio::UIWidget
Size2D current_size = Size2D(0,0)
 
std::weak_ptr< Windowwindow
 
- Protected Attributes inherited from AlgAudio::UIMouseEventsBase
bool focusable = true
 
bool pointed = false
 
bool pressed = false
 
- Protected Attributes inherited from AlgAudio::UIVisibilityBase
DisplayMode display_mode = DisplayMode::Visible
 

Member Enumeration Documentation

Enumerator
Slider 
Display 

Constructor & Destructor Documentation

AlgAudio::UISlider::UISlider ( std::weak_ptr< Window parent_window,
std::shared_ptr< ParamController controller 
)
protected

Member Function Documentation

static std::shared_ptr<UISlider> AlgAudio::UISlider::Create ( std::weak_ptr< Window parent_window,
std::shared_ptr< ParamController controller 
)
static
void AlgAudio::UISlider::CustomDraw ( DrawContext c)
overridevirtual

Implements AlgAudio::UIWidget.

virtual void AlgAudio::UISlider::CustomMouseEnter ( Point2D  pos)
overridevirtual

Reimplemented from AlgAudio::UIMouseEventsBase.

virtual void AlgAudio::UISlider::CustomMouseLeave ( Point2D  pos)
overridevirtual

Reimplemented from AlgAudio::UIMouseEventsBase.

virtual void AlgAudio::UISlider::CustomMouseMotion ( Point2D  pos1,
Point2D  pos2 
)
overridevirtual

Reimplemented from AlgAudio::UIMouseEventsBase.

virtual bool AlgAudio::UISlider::CustomMousePress ( bool  ,
MouseButton  ,
Point2D   
)
overridevirtual

This call is supposed to return TRUE iff it's the end of the click chain, i.e. the event was NOT passed to another widget. It must return FALSE if the event was passed to any child widget.

Reimplemented from AlgAudio::UIMouseEventsBase.

virtual void AlgAudio::UISlider::CustomResize ( Size2D  size)
overridevirtual

Reimplemented from AlgAudio::UIWidget.

void AlgAudio::UISlider::DragEnd ( )
void AlgAudio::UISlider::DragStart ( )
void AlgAudio::UISlider::DragStep ( Point2D_< float >  offset)
Rect AlgAudio::UISlider::GetAbsoluteOutputRect ( ) const
Rect AlgAudio::UISlider::GetBodyRect ( ) const
virtual Point2D AlgAudio::UISlider::GetChildPos ( ) const
inlineoverridevirtual
Rect AlgAudio::UISlider::GetInputRect ( ) const
Rect AlgAudio::UISlider::GetRelativeOutputRect ( ) const
virtual void AlgAudio::UISlider::OnFocusChanged ( bool  )
overridevirtual

This method is called when the widget focus state has changed. The only param states whether this widget has now the focus

Reimplemented from AlgAudio::UIContainerSingle.

void AlgAudio::UISlider::SetMode ( Mode  m)
inline
void AlgAudio::UISlider::SetName ( std::string  name)
void AlgAudio::UISlider::SetRangeMax ( float  x)
void AlgAudio::UISlider::SetRangeMin ( float  x)

Member Data Documentation

std::string AlgAudio::UISlider::param_id

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