54#ifndef OUTPUTNAVIGATION_H
55#define OUTPUTNAVIGATION_H
57#include "cells/MatrixBlock.h"
64namespace OutputNavigation {
74 Cell *first =
nullptr;
79 bool IsMatrixEntry()
const {
return matrix !=
nullptr; }
80 bool operator==(
const Item &other)
const;
108 std::vector<Item> path;
109 std::vector<Item> siblings;
110 std::size_t index = 0;
126 std::vector<Item> siblings;
127 std::size_t firstIndex = 0;
128 std::size_t lastIndex = 0;
std::vector< Item > Results(const GroupCell *group)
The top level: the results of this cell's output, as items.
Definition: OutputNavigation.cpp:246
Item Entry(MatrCell *matrix, MatrixEntry entry)
The item one entry of a matrix forms.
Definition: OutputNavigation.cpp:237
std::vector< Item > Children(const Item &item)
The parts of an item, in reading order; empty if it has none.
Definition: OutputNavigation.cpp:255
Item Run(Cell *first, Cell *last)
The item a run of cells forms.
Definition: OutputNavigation.cpp:230
The base class all cell types the worksheet can consist of are derived from.
Definition: Cell.h:148
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:88
A Cell that displays a matrix.
Definition: MatrCell.h:95
One entry of a matrix, by its zero-based row and column.
Definition: MatrixBlock.h:30
One node of the tree: a run of sibling cells, or one entry of a matrix.
Definition: OutputNavigation.h:73
Where an item sits in the tree.
Definition: OutputNavigation.h:106
Where a run of several siblings sits: the level holding both of its ends.
Definition: OutputNavigation.h:123
std::vector< Item > path
The path to the parent; empty at the top level.
Definition: OutputNavigation.h:125