Numworks Epsilon  1.4.1
Graphing Calculator Operating System
script_parameter_controller.h
Go to the documentation of this file.
1 #ifndef CODE_SCRIPT_PARAMETER_CONTROLLER_H
2 #define CODE_SCRIPT_PARAMETER_CONTROLLER_H
3 
4 #include <escher.h>
5 #include "../i18n.h"
6 #include "script_store.h"
7 
8 namespace Code {
9 
10 class MenuController;
11 
13 public:
14  ScriptParameterController(Responder * parentResponder, I18n::Message title, MenuController * menuController);
15  void setScript(Script script);
17 
18  /* ViewController */
19  View * view() override { return &m_selectableTableView; }
20  const char * title() override;
21  bool handleEvent(Ion::Events::Event event) override;
22  void viewWillAppear() override;
23  void didBecomeFirstResponder() override;
24 
25  /* SimpleListViewDataSource */
27  HighlightCell * reusableCell(int index) override;
28  int reusableCellCount() override { return k_totalNumberOfCell; }
29  int numberOfRows() override { return k_totalNumberOfCell; }
30  void willDisplayCellForIndex(HighlightCell * cell, int index) override;
31 
32 private:
33  constexpr static int k_totalNumberOfCell = 4;
34  StackViewController * stackViewController();
35  I18n::Message m_pageTitle;
36  MessageTableCell m_executeScript;
37  MessageTableCell m_renameScript;
38  MessageTableCellWithSwitch m_autoImportScript;
39  MessageTableCell m_deleteScript;
40  SelectableTableView m_selectableTableView;
41  Script m_script;
42  MenuController * m_menuController;
43 };
44 
45 }
46 
47 #endif
ScriptParameterController(Responder *parentResponder, I18n::Message title, MenuController *menuController)
int16_t KDCoordinate
Definition: coordinate.h:6
Responder * parentResponder() const
Definition: responder.cpp:12
Definition: app.cpp:7
HighlightCell * reusableCell(int index) override
void willDisplayCellForIndex(HighlightCell *cell, int index) override
static constexpr KDCoordinate ParameterCellHeight
Definition: metric.h:15
Definition: view.h:23
bool handleEvent(Ion::Events::Event event) override