Class · aurore
aurore::HScrollingFrame
On this page
#include <aurore/views/h_scrolling_frame.hpp>
class aurore::HScrollingFrame : public aurore::BoxDerived by
Constructors 2
Functions 23
virtual void draw( NVGcontext *vg,float x,float y,float width,float height,Style style,FrameContext *ctx) overrideCalled by frame() to draw the view onscreen. Views should not draw outside of their bounds (they may be clipped if they do so).
Overrides aurore::Box::draw
Fired when focus is gained on one of this view's children, or one of the children of the children...
directChild is guaranteed to be one of your children. It may not be the view that has been focused.
If focusedView == directChild, then the child of yours has been focused. Otherwise, focusedView is a child of directChild.
Overrides aurore::Box::onChildFocusGained
Fired when focus is lost on one of this view's children. Works similarly to onChildFocusGained().
Overrides aurore::Box::onChildFocusLost
Called when the view will appear on screen, before or after layout().
Can be called if the view has already appeared, so be careful.
Overrides aurore::Box::willAppear
virtual void addView(View *view) override Adds a view to this Box. Returns the position the view was added at.
Overrides aurore::Box::addView
virtual void removeView(View *view, bool free = true) override Removes the given view from the Box. It will be freed.
Overrides aurore::Box::removeView
Called when a layout pass ends on that view.
Overrides aurore::View::onLayout
Sets the padding of the view, aka the internal space to give between this view boundaries and its children.
Only does one layout pass instead of four when using the four methods separately.
Overrides aurore::Box::setPadding
Sets the padding of the view, aka the internal space to give between this view boundaries and its children.
Overrides aurore::Box::setPaddingTop
Sets the padding of the view, aka the internal space to give between this view boundaries and its children.
Overrides aurore::Box::setPaddingRight
Sets the padding of the view, aka the internal space to give between this view boundaries and its children.
Overrides aurore::Box::setPaddingBottom
Sets the padding of the view, aka the internal space to give between this view boundaries and its children.
Overrides aurore::Box::setPaddingLeft
virtual View * getNextFocus( FocusDirection direction,View *currentView) overrideReturns the next view to focus given the requested direction and the currently focused view (as parent user data)
Returning nullptr means that there is no next view to focus in that direction - getNextFocus will then be called on our parent if any
Overrides aurore::Box::getNextFocus
virtual View * getDefaultFocus() override Returns the default view to focus when focusing this view Typically the view itself or one of its children.
Returning nullptr means that the view is not focusable (and neither are its children)
By default, a view is focusable if the flag is set to true with setFocusable() and if the view is visible.
When pressing a key, the flow is :
- starting from the currently focused view's parent, traverse the tree upwards and repeatedly call getNextFocus() on every view until we find a next view to focus or meet the end of the tree
- if a view is found, getNextFocus() will internally call getDefaultFocus() for the selected child
- give focus to the result, if it exists
Overrides aurore::Box::getDefaultFocus
virtual enum Sound getFocusSound() override void setContentView(View *view) Sets the content view of this scrolling box. There can only be one content view per scrolling box at a time.
h_scrolling_frame.hpp:58void setScrollingBehavior(ScrollingBehavior behavior) Sets the scrolling behavior of this scrolling frame. Default is NATURAL.
h_scrolling_frame.hpp:64The point at which the origin of the content view is offset from the origin of the scroll view.
h_scrolling_frame.hpp:69Sets the offset from the content view’s origin that corresponds to the receiver’s origin.
h_scrolling_frame.hpp:77Also the functions of aurore::Box (53), aurore::View (221).
Static functions 1
Read from Aurore's headers by Doxygen at each build · library/include