106 void showSeparator(
bool show);
107 bool growsWithText =
false;
211 void setPadding(
float top,
float right,
float bottom,
float left)
override;
259 return this->defaultCellFocus;
265 this->defaultCellFocus = indexPath;
273 bool deleteDataSource =
false;
274 bool layouted =
false;
276 uint32_t visibleMin, visibleMax;
280 float paddingTop = 0;
281 float paddingRight = 0;
282 float paddingBottom = 0;
283 float paddingLeft = 0;
287 std::vector<Size> cacheFramesData;
288 std::vector<IndexPath> cacheIndexPathData;
289 std::map<std::string, std::vector<RecyclerCell*>*> queueMap;
290 std::map<std::string, std::function<
RecyclerCell*(void)>> allocationMap;
295 void cacheCellFrames();
296 void cellsRecyclingLoop();
299 void addCellAt(
size_t index,
size_t downSide);
300 void removeCell(
View* view);
Generic FlexBox layout.
Definition box.hpp:74
CallbacksList::iterator Subscription
Definition event.hpp:45
Definition frame_context.hpp:30
Definition recycler.hpp:66
void onTextScaleChanged() override
void onFocusGained() override
IndexPath getIndexPath() const
Definition recycler.hpp:75
void onFocusLost() override
std::string reuseIdentifier
Definition recycler.hpp:85
void setIndexPath(IndexPath value)
RecyclerCell()
An empty cell.
static RecyclerCell * create()
Makes an empty cell (registerCell's default).
virtual void prepareForReuse()
Definition recycler.hpp:90
The box a RecyclerFrame lays its cells in, which asks it where the focus goes.
Definition recycler.hpp:185
RecyclerContentBox(RecyclerFrame *recycler)
View * getNextFocus(FocusDirection direction, View *currentView) override
Definition recycler.hpp:136
virtual std::string titleForHeader(RecyclerFrame *recycler, int section)
Definition recycler.hpp:173
virtual int numberOfRows(RecyclerFrame *recycler, int section)
Definition recycler.hpp:146
virtual RecyclerCell * cellForRow(RecyclerFrame *recycler, IndexPath index)
Definition recycler.hpp:151
virtual ~RecyclerDataSource()=default
virtual int numberOfSections(RecyclerFrame *recycler)
Definition recycler.hpp:141
virtual float heightForRow(RecyclerFrame *recycler, IndexPath index)
Definition recycler.hpp:162
virtual void didSelectRowAt(RecyclerFrame *recycler, IndexPath index)
Definition recycler.hpp:178
virtual float heightForHeader(RecyclerFrame *recycler, int section)
virtual RecyclerCell * cellForHeader(RecyclerFrame *recycler, int section)
Definition recycler.hpp:199
void setPaddingTop(float top) override
void onThemeChanged() override
IndexPath getDefaultCellFocus()
The cell that takes the focus first.
Definition recycler.hpp:257
View * getNextCellFocus(FocusDirection direction, View *currentView)
The cell the focus goes to from currentView (cells off screen included).
RecyclerFrame()
An empty list; give it a data source and register its cells.
void setDataSource(RecyclerDataSource *source, bool deleteDataSource=true)
void setPadding(float top, float right, float bottom, float left) override
float estimatedRowHeight
Definition recycler.hpp:254
void setPaddingRight(float right) override
void setPaddingLeft(float left) override
RecyclerDataSource * getDataSource() const
void setDefaultCellFocus(IndexPath indexPath)
See getDefaultCellFocus().
Definition recycler.hpp:263
void draw(NVGcontext *vg, float x, float y, float width, float height, Style style, FrameContext *ctx) override
RecyclerCell * dequeueReusableCell(std::string identifier)
void selectRowAt(IndexPath indexPath, bool animated)
void registerCell(std::string identifier, std::function< RecyclerCell *(void)> allocation)
void setPaddingBottom(float bottom) override
static View * create()
Makes a list for XML (<aurore:RecyclerFrame>).
void setPadding(float padding) override
Simple wrapper around StyleValues for the array operator.
Definition style.hpp:115
virtual void show(std::function< void(void)> cb)
Definition actions.hpp:25
FocusDirection
Focus direction when navigating.
Definition view.hpp:96
Definition recycler.hpp:35
IndexPath()
Definition recycler.hpp:40
IndexPath(size_t section, size_t row, size_t item)
Definition recycler.hpp:45
bool operator==(const IndexPath &other)
Definition recycler.hpp:57
size_t section
Definition recycler.hpp:36
size_t item
Definition recycler.hpp:38
IndexPath(size_t section, size_t row)
Definition recycler.hpp:52
int row
Definition recycler.hpp:37
Definition geometry.hpp:70