Class · aurore

aurore::HScrollingFrame

On this page
aurore/views/h_scrolling_frame.hpp
#include <aurore/views/h_scrolling_frame.hpp>

class aurore::HScrollingFrame : public aurore::Box

Constructors 2

HScrollingFrame()
~HScrollingFrame()

Functions 23

virtual void draw(NVGcontext *vg,float x,float y,float width,float height,Style style,FrameContext *ctx) override

Called 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

h_scrolling_frame.hpp:35
virtual void onFocusGained() override

Fired when focus is gained.

Overrides aurore::Box::onFocusGained

h_scrolling_frame.hpp:36
virtual void onChildFocusGained(View *directChild, View *focusedView) override

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

h_scrolling_frame.hpp:37
virtual void onChildFocusLost(View *directChild, View *focusedView) override

Fired when focus is lost on one of this view's children. Works similarly to onChildFocusGained().

Overrides aurore::Box::onChildFocusLost

h_scrolling_frame.hpp:38
virtual void willAppear(bool resetState) override

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

h_scrolling_frame.hpp:39
virtual void addView(View *view) override

Adds a view to this Box. Returns the position the view was added at.

Overrides aurore::Box::addView

h_scrolling_frame.hpp:40
virtual void removeView(View *view, bool free = true) override

Removes the given view from the Box. It will be freed.

Overrides aurore::Box::removeView

h_scrolling_frame.hpp:41
virtual void onLayout() override

Called when a layout pass ends on that view.

Overrides aurore::View::onLayout

h_scrolling_frame.hpp:42
virtual void setPadding(float top,float right,float bottom,float left) override

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

h_scrolling_frame.hpp:43
virtual void setPaddingTop(float top) override

Sets the padding of the view, aka the internal space to give between this view boundaries and its children.

Overrides aurore::Box::setPaddingTop

h_scrolling_frame.hpp:44
virtual void setPaddingRight(float right) override

Sets the padding of the view, aka the internal space to give between this view boundaries and its children.

Overrides aurore::Box::setPaddingRight

h_scrolling_frame.hpp:45
virtual void setPaddingBottom(float bottom) override

Sets the padding of the view, aka the internal space to give between this view boundaries and its children.

Overrides aurore::Box::setPaddingBottom

h_scrolling_frame.hpp:46
virtual void setPaddingLeft(float left) override

Sets the padding of the view, aka the internal space to give between this view boundaries and its children.

Overrides aurore::Box::setPaddingLeft

h_scrolling_frame.hpp:47
virtual View * getParentNavigationDecision(View *from,View *newFocus,FocusDirection direction) override

The focus about to move from from to newFocus: a box may give another view instead. Asked of every parent up the tree; returns newFocus by default.

Overrides aurore::Box::getParentNavigationDecision

h_scrolling_frame.hpp:48
virtual View * getNextFocus(FocusDirection direction,View *currentView) override

Returns 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

h_scrolling_frame.hpp:49
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 :

  1. 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
  2. if a view is found, getNextFocus() will internally call getDefaultFocus() for the selected child
  3. give focus to the result, if it exists

Overrides aurore::Box::getDefaultFocus

h_scrolling_frame.hpp:50
virtual enum Sound getFocusSound() override
Rect getVisibleFrame()
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:58
void setScrollingBehavior(ScrollingBehavior behavior)

Sets the scrolling behavior of this scrolling frame. Default is NATURAL.

h_scrolling_frame.hpp:64
float getContentOffsetX() const

The point at which the origin of the content view is offset from the origin of the scroll view.

h_scrolling_frame.hpp:69
void setContentOffsetX(float value, bool animated)

Sets the offset from the content view’s origin that corresponds to the receiver’s origin.

h_scrolling_frame.hpp:77
void setScrollingIndicatorVisible(bool visible)

Also the functions of aurore::Box (53), aurore::View (221).

Static functions 1

static View * create()

Read from Aurore's headers by Doxygen at each build · library/include