Class
ScrollView
On this page
#include <aurore/cadran/view/scroll_view.hpp>
class ScrollView : public aurore::ScrollingFrameDescription
The scrolling frame of Cadran's screens (<ScrollView>): each press moves to the next line and scrolls just enough to show it with its header and notes.
Constructors 1
Functions 6
virtual void draw( NVGcontext *vg,float x,float y,float width,float height,aurore::Style style,aurore::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::ScrollingFrame::draw
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::ScrollingFrame::willAppear
virtual void onChildFocusGained( aurore::View *directChild,aurore::View *focusedView) overrideFired 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::ScrollingFrame::onChildFocusGained
virtual aurore::View * getNextFocus( aurore::FocusDirection direction,aurore::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::ScrollingFrame::getNextFocus
virtual aurore::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::ScrollingFrame::getDefaultFocus
Also the functions of aurore::ScrollingFrame (24), aurore::Box (53), aurore::View (221).
Static functions 2
The focused line shown again at the next frame, once laid out anew: a layout moved it (the rail's width changed, cadran::apply_rail).
scroll_view.hpp:37Read from Aurore's headers by Doxygen at each build · library/include