Blame view

Giac_maj/epsilon-giac/apps/settings/sub_controller.h 1.72 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
  #ifndef SETTINGS_SUB_CONTROLLER_H
  #define SETTINGS_SUB_CONTROLLER_H
  
  #include <escher.h>
  #include "settings_node.h"
  #include "../hardware_test/pop_up_controller.h"
  
  namespace Settings {
  
  class SubController : public ViewController, public SimpleListViewDataSource, public SelectableTableViewDataSource {
  public:
    SubController(Responder * parentResponder);
    ~SubController();
    SubController(const SubController& other) = delete;
    SubController(SubController&& other) = delete;
    SubController& operator=(const SubController& other) = delete;
    SubController& operator=(SubController&& other) = delete;
    View * view() override;
    const char * title() override;
    bool handleEvent(Ion::Events::Event event) override;
    void didEnterResponderChain(Responder * previousFirstResponder) override;
    int numberOfRows() override;
    KDCoordinate cellHeight() override;
    HighlightCell * reusableCell(int index) override;
    int reusableCellCount() override;
    void willDisplayCellForIndex(HighlightCell * cell, int index) override;
    void setNodeModel(const Node * nodeModel);
    void viewWillAppear() override;
    void viewDidDisappear() override;
  private:
    StackViewController * stackController() const;
    void setPreferenceWithValueIndex(I18n::Message message, int valueIndex);
    int valueIndexForPreference(I18n::Message message);
    constexpr static int k_totalNumberOfCell = I18n::NumberOfLanguages;
    constexpr static KDCoordinate k_topBottomMargin = 13;
    MessageTableCellWithBuffer m_cells[k_totalNumberOfCell];
    ExpressionTableCell m_complexFormatCells[2];
    Poincare::ExpressionLayout * m_complexFormatLayout[2];
    SelectableTableView m_selectableTableView;
    Node * m_nodeModel;
    HardwareTest::PopUpController m_hardwareTestPopUpController;
  };
  
  }
  
  #endif