Blame view

build6/epsilon-master/apps/code/app.h 1.53 KB
6663b6c9   adorian   projet complet av...
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  #ifndef CODE_APP_H
  #define CODE_APP_H
  
  #include <escher.h>
  #include <ion/events.h>
  #include "console_controller.h"
  #include "menu_controller.h"
  #include "script_store.h"
  #include "python_toolbox.h"
  #include "variable_box_controller.h"
  
  namespace Code {
  
  class App : public ::App {
  public:
    class Descriptor : public ::App::Descriptor {
    public:
      I18n::Message name() override;
      I18n::Message upperName() override;
      const Image * icon() override;
    };
    class Snapshot : public ::App::Snapshot {
    public:
      Snapshot();
      App * unpack(Container * container) override;
      void reset() override;
      Descriptor * descriptor() override;
      ScriptStore * scriptStore();
  #if EPSILON_GETOPT
      bool lockOnConsole() const;
      void setOpt(const char * name, char * value) override;
  #endif
    private:
  #if EPSILON_GETOPT
      bool m_lockOnConsole;
  #endif
      ScriptStore m_scriptStore;
    };
    StackViewController * stackViewController() { return &m_codeStackViewController; }
    ConsoleController * consoleController() { return &m_consoleController; }
    PythonToolbox * pythonToolbox() { return &m_toolbox; }
    bool handleEvent(Ion::Events::Event event) override;
    bool textInputDidReceiveEvent(TextInput * textInput, Ion::Events::Event event);
  private:
    App(Container * container, Snapshot * snapshot);
    ConsoleController m_consoleController;
    ButtonRowController m_listFooter;
    MenuController m_menuController;
    StackViewController m_codeStackViewController;
    PythonToolbox m_toolbox;
    VariableBoxController m_variableBoxController;
  };
  
  }
  
  #endif