Blame view

build6/epsilon-master/apps/calculation/app.h 1.22 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
  #ifndef CALCULATION_APP_H
  #define CALCULATION_APP_H
  
  #include "calculation_store.h"
  #include "edit_expression_controller.h"
  #include "history_controller.h"
  #include "../shared/text_field_delegate_app.h"
  #include <escher.h>
  
  namespace Calculation {
  
  class App : public Shared::ExpressionFieldDelegateApp {
  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:
      App * unpack(Container * container) override;
      void reset() override;
      Descriptor * descriptor() override;
      CalculationStore * calculationStore();
    private:
      void tidy() override;
      CalculationStore m_calculationStore;
    };
    bool textFieldDidReceiveEvent(::TextField * textField, Ion::Events::Event event) override;
    bool textInputIsCorrect(const char * text);
    bool expressionLayoutFieldDidReceiveEvent(::ExpressionLayoutField * expressionLayoutField, Ion::Events::Event event) override;
    const char * XNT() override;
  private:
    App(Container * container, Snapshot * snapshot);
    HistoryController m_historyController;
    EditExpressionController m_editExpressionController;
  };
  
  }
  
  #endif