Class · aurore
aurore::RecyclerFrame
#include <aurore/views/recycler.hpp>
class aurore::RecyclerFrame : public aurore::ScrollingFrameDescription
A list that makes only the cells on screen, and reuses them as it scrolls: a long list at the cost of a short one. Its rows come from a RecyclerDataSource; its cells are registered by a reuse identifier (registerCell) and taken back with dequeueReusableCell().
Constructors 2
An empty list; give it a data source and register its cells.
recycler.hpp:202Functions 18
View * getNextCellFocus(FocusDirection direction, View *currentView) The cell the focus goes to from currentView (cells off screen included).
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
Called on every view of the screens when the theme changes (Application::getThemeChangedEvent): the colours given by key (setThemeColor) take their new values, the state styles read their "@theme/" values again. A view that keeps other colours of its own looks them up again here, then calls the base. A Box goes on to its children.
Overrides aurore::Box::onThemeChanged
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.
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
void setDataSource( RecyclerDataSource *source,bool deleteDataSource = true)Set an object that acts as the data source of the recycler frame.
deleteDataSource: set to false if source object deletion should NOT be handled by the RecyclerFrame.
recycler.hpp:223RecyclerDataSource * getDataSource() const Get an object that acts as the data source of the recycler frame.
recycler.hpp:228Reloads the rows of the recycler frame.
recycler.hpp:233void registerCell( std::string identifier,std::function< RecyclerCell *(void)> allocation)Registers a class for use in creating new recycler cells.
recycler.hpp:238RecyclerCell * dequeueReusableCell(std::string identifier) Returns a reusable recycler-frame cell object for the specified reuse identifier
recycler.hpp:243void selectRowAt(IndexPath indexPath, bool animated) Selects a row in the recycler frame identified by index path.
recycler.hpp:248IndexPath getDefaultCellFocus() The cell that takes the focus first.
recycler.hpp:257void setDefaultCellFocus(IndexPath indexPath) Also the functions of aurore::ScrollingFrame (24), aurore::Box (53), aurore::View (221).
Static functions 1
static View * create() Makes a list for XML (<aurore:RecyclerFrame>).
Attributes 1
Used for initial recycler's frame calculation if rows autoscaling selected. To provide more accurate height implement RecyclerDataSource::heightForRow().
recycler.hpp:254Read from Aurore's headers by Doxygen at each build · library/include