9 m_functionStore(functionStore),
11 m_addNewMessage(text),
12 m_addNewFunction(nullptr),
13 m_plotButton(this,
I18n::Message::Plot,
Invocation([](void * context, void * sender) {
18 m_valuesButton(
this, I18n::Message::DisplayValues,
Invocation([](
void * context,
void * sender) {
33 return k_functionNameWidth;
47 return k_functionNameWidth;
58 for (
int k = 0; k < j; k++) {
65 if (offsetX <= k_functionNameWidth) {
82 return (result < offsetY || offsetY == 0) ? j : j - 1;
95 assert(index < maxNumberOfRows());
98 return titleCells(index);
100 return expressionCells(index);
104 return m_addNewFunction;
115 return maxNumberOfRows();
121 willDisplayTitleCellAtIndex(cell, j);
123 willDisplayExpressionCellAtIndex(cell, j);
143 const Button * buttons[2] = {&m_plotButton, &m_valuesButton};
144 return (
Button *)buttons[index];
200 editExpression(
function, event);
215 if (removeFunctionRow(
function)) {
230 editExpression(
function, event);
246 if (nextFirstResponder == tabController()) {
265 stack->
push(parameterController());
269 function->setContent(
"");
281 int ListController::functionIndexForRow(
int j) {
285 const char * ListController::textForRow(
int j) {
287 return function->
text();
290 void ListController::addEmptyFunction() {
307 m_emptyCell =
nullptr;
308 delete m_addNewFunction;
309 m_addNewFunction =
nullptr;
int numberOfButtons(ButtonRowController::Position position) const override
void didBecomeFirstResponder() override
StackViewController * stackController() const
void setActiveTab(int8_t index)
virtual void setEven(bool even)
const char * text() const
static constexpr KDColor PurpleBright
void push(ViewController *vc, KDColor textColor=Palette::SubTab, KDColor backgroundColor=KDColorWhite, KDColor separatorColor=Palette::GreyBright)
Responder * parentResponder() const
void tableViewDidChangeSelection(SelectableTableView *t, int previousSelectedCellX, int previousSelectedCellY) override
void setVerticalCellOverlap(KDCoordinate o)
void configureFunction(Function *function)
bool selectCellAtLocation(int i, int j, bool setFirstResponder=true)
KDCoordinate columnWidth(int i) override
int indexFromCumulatedHeight(KDCoordinate offsetY) override
int reusableCellCount(int type) override
FunctionStore * m_functionStore
virtual Function * functionAtIndex(int i)=0
void store(const char *storedText)
void reloadData(bool setFirstResponder=true)
virtual int maxNumberOfFunctions()=0
View * loadView() override
int numberOfColumns() override
void willExitResponderChain(Responder *nextFirstResponder) override
KDCoordinate cumulatedHeightFromIndex(int j) override
HighlightCell * reusableCell(int index, int type) override
Button * buttonAtIndex(int index, ButtonRowController::Position position) const override
void willDisplayCellAtLocation(HighlightCell *cell, int i, int j) override
int indexFromCumulatedWidth(KDCoordinate offsetX) override
ListController(Responder *parentResponder, FunctionStore *functionStore, ButtonRowController *header, ButtonRowController *footer, I18n::Message text)
void unloadView(View *view) override
virtual int numberOfRows()=0
void setFirstResponder(Responder *responder)
SelectableTableView * selectableTableView()
int typeAtLocation(int i, int j) override
KDCoordinate width() const
static Clipboard * sharedClipboard()
virtual void reinitExpression(Function *function)
virtual void setHighlighted(bool highlight)
void selectCellAtLocation(int i, int j)
virtual void reloadCell()
bool handleEvent(Ion::Events::Event event) override
virtual KDCoordinate rowHeight(int j)=0
void didEnterResponderChain(Responder *previousFirstResponder) override
KDCoordinate cumulatedWidthFromIndex(int i) override
virtual Function * addEmptyFunction()=0
virtual void setFunction(Function *function)
constexpr Event Backspace