Class · aurore

aurore::RecyclingGrid

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

class aurore::RecyclingGrid : public aurore::ScrollingFrame, public aurore::RecyclingView

Constructors 1

RecyclingGrid()

Functions 16

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

recycling_grid.hpp:241
virtual void onLayout() override

Called when a layout pass ends on that view.

Overrides aurore::View::onLayout

recycling_grid.hpp:242
virtual void onThemeChanged() override

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

recycling_grid.hpp:243
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

recycling_grid.hpp:244
void setSpanCount(int count)
void setColumnWidth(float width)
void setItemHeight(float height)
void setItemSpace(float space)
void setPreFetchLine(int lines)
virtual void setPadding(float padding) 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

recycling_grid.hpp:252
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

recycling_grid.hpp:253
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

recycling_grid.hpp:254
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

recycling_grid.hpp:255
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

recycling_grid.hpp:256
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

recycling_grid.hpp:257
virtual Box * getFrameBox() override

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

Static functions 1

static View * create()

Protected functions 2

virtual float getScrollOffset() override
virtual void setScrollOffset(float offset, bool animated) override

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