Files
Upsilon/apps/math_toolbox.h
Léa Saviot 13ae1d2545 [apps/escher/toolbox] handleEventWithText for all responders.
This makes the code in the various toolbox more generic. The arguments
of the text to insert are each replaced by a Ion::Charset::Empty.
These Empty chars are used to create layouts in ExpressionLayoutFields,
and to compute the position of the cursor in other fields, before being
removed.

Change-Id: Ie81c1e394b06fef2ab801ccff919d6550f70ec30
2018-04-23 17:18:48 +02:00

24 lines
735 B
C++

#ifndef APPS_MATH_TOOLBOX_H
#define APPS_MATH_TOOLBOX_H
#define MATRICES_ARE_DEFINED 1
#include <escher.h>
#include <apps/i18n.h>
class MathToolbox : public Toolbox {
public:
MathToolbox();
protected:
bool selectLeaf(ToolboxMessageTree * selectedMessageTree) override;
const ToolboxMessageTree * rootModel() override;
MessageTableCellWithMessage * leafCellAtIndex(int index) override;
MessageTableCellWithChevron* nodeCellAtIndex(int index) override;
int maxNumberOfDisplayedRows() override;
constexpr static int k_maxNumberOfDisplayedRows = 6; // = 240/40
private:
MessageTableCellWithMessage m_leafCells[k_maxNumberOfDisplayedRows];
MessageTableCellWithChevron m_nodeCells[k_maxNumberOfDisplayedRows];
};
#endif