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::UIContainerMultiple Class Referenceabstract

#include <UIContainer.hpp>

Inheritance diagram for AlgAudio::UIContainerMultiple:
AlgAudio::UIWidget AlgAudio::UIMouseEventsBase AlgAudio::SubscriptionsManager AlgAudio::UIVisibilityBase AlgAudio::CanvasView AlgAudio::UIBox AlgAudio::UILayered AlgAudio::UIHBox AlgAudio::UIVBox AlgAudio::ModuleSelector AlgAudio::UIPathSelector AlgAudio::UISpinEntry AlgAudio::UIList

Public Member Functions

virtual void Clear ()=0
 
virtual Point2D GetChildPos (std::shared_ptr< UIWidget >) const =0
 
virtual void OnChildFocusRequested (std::shared_ptr< UIWidget > w) override
 
virtual bool OnChildFocusTested (std::shared_ptr< const UIWidget > w) override
 
virtual void OnFocusChanged (bool has_focus) override
 
virtual void OnKeyboard (KeyData k) override
 
virtual void RequestFocus () override
 
- Public Member Functions inherited from AlgAudio::UIWidget
virtual void CustomDraw (DrawContext &c)=0
 
virtual std::shared_ptr< UIWidgetCustomFindChild (ID) const
 
virtual void CustomResize (Size2D)
 
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
virtual void CustomMouseEnter (Point2D)
 
virtual void CustomMouseLeave (Point2D)
 
virtual void CustomMouseMotion (Point2D, Point2D)
 
virtual bool CustomMousePress (bool, MouseButton, Point2D)
 
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)
 

Protected Member Functions

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

Protected Attributes

std::shared_ptr< UIWidgetfocused_child = nullptr
 
- 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
 

Additional Inherited Members

- Public Types inherited from AlgAudio::UIVisibilityBase
enum  DisplayMode { DisplayMode::Visible, DisplayMode::EmptySpace, DisplayMode::Invisible }
 
- 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
 

Detailed Description

This is an interface for widgets which act as a container for multiple children, like UIBox or UILayered.

Constructor & Destructor Documentation

AlgAudio::UIContainerMultiple::UIContainerMultiple ( std::weak_ptr< Window parent_window)
inlineprotected

Member Function Documentation

virtual void AlgAudio::UIContainerMultiple::Clear ( )
pure virtual
virtual Point2D AlgAudio::UIContainerMultiple::GetChildPos ( std::shared_ptr< UIWidget ) const
pure virtual
virtual void AlgAudio::UIContainerMultiple::OnChildFocusRequested ( std::shared_ptr< UIWidget )
inlineoverridevirtual

This method gets called when a child widget tries to catch focus. Multiple container widgets should react on it by remembering which widget is the focused one, and passing keyboard events to it. Single container widgets can ignore this signal, as they have no choice as to whom they shall pass such events to.

Argument: the child that is requesting focus.

Reimplemented from AlgAudio::UIWidget.

virtual bool AlgAudio::UIContainerMultiple::OnChildFocusTested ( std::shared_ptr< const UIWidget )
inlineoverridevirtual

This method is called by a child when it has to ask the parent whether it is the focused child. This is necessary for performing IsFocused() test. Containers should override this method.

Reimplemented from AlgAudio::UIWidget.

virtual void AlgAudio::UIContainerMultiple::OnFocusChanged ( bool  )
inlineoverridevirtual

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::UIWidget.

virtual void AlgAudio::UIContainerMultiple::OnKeyboard ( KeyData  k)
inlineoverridevirtual

Reimplemented from AlgAudio::UIWidget.

Reimplemented in AlgAudio::CanvasView.

virtual void AlgAudio::UIContainerMultiple::RequestFocus ( )
inlineoverridevirtual

This method is called by the widget when it wishes to grab focus, for example a text entry field should call this method when it's clicked.

Reimplemented from AlgAudio::UIWidget.

Member Data Documentation

std::shared_ptr<UIWidget> AlgAudio::UIContainerMultiple::focused_child = nullptr
protected

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