forked from Omega-Numworks/Omega-RPN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpn_toolbox.h
32 lines (26 loc) · 960 Bytes
/
rpn_toolbox.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef RPN_TOOLBOX_H
#define RPN_TOOLBOX_H
#include <escher.h>
#include <apps/i18n.h>
namespace Rpn {
class InputController;
class StackController;
class Toolbox : public ::Toolbox {
public:
Toolbox(const ToolboxMessageTree * rootModel, InputController * inputController, StackController * stackController);
protected:
bool selectLeaf(int selectedRow) override;
const ToolboxMessageTree * rootModel() const 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];
InputController * m_inputController;
StackController * m_stackController;
const ToolboxMessageTree * m_rootModel;
};
}
#endif