Numworks Epsilon  1.4.1
Graphing Calculator Operating System
editor_controller.h
Go to the documentation of this file.
1 #ifndef CODE_EDITOR_CONTROLLER_H
2 #define CODE_EDITOR_CONTROLLER_H
3 
4 #include <escher.h>
5 #include "script.h"
6 
7 namespace Code {
8 
9 class MenuController;
10 class ScriptParameterController;
11 
13 public:
14  EditorController(MenuController * menuController);
16  void setScript(Script script);
17 
18  /* ViewController */
19  View * view() override { return &m_textArea; }
20  bool handleEvent(Ion::Events::Event event) override;
21  void didBecomeFirstResponder() override;
22  void viewWillAppear() override;
23  void viewDidDisappear() override;
25 
26  /* TextAreaDelegate */
27  bool textAreaDidReceiveEvent(TextArea * textArea, Ion::Events::Event event) override;
28  Toolbox * toolboxForTextInput(TextInput * textInput) override;
29 
30 private:
31  static constexpr int k_indentationSpacesNumber = 2;
32  StackViewController * stackController();
33  TextArea m_textArea;
34  char * m_areaBuffer;
35  Script m_script;
36  MenuController * m_menuController;
37 };
38 
39 }
40 
41 #endif
42 
Toolbox * toolboxForTextInput(TextInput *textInput) override
EditorController(MenuController *menuController)
void viewDidDisappear() override
bool handleEvent(Ion::Events::Event event) override
void setScript(Script script)
ViewController::DisplayParameter displayParameter() override
Definition: app.cpp:7
bool textAreaDidReceiveEvent(TextArea *textArea, Ion::Events::Event event) override
void viewWillAppear() override
Definition: view.h:23
View * view() override
void didBecomeFirstResponder() override