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
|
#ifndef PROBABILITY_LAW_CONTROLLER_H
#define PROBABILITY_LAW_CONTROLLER_H
#include <escher.h>
#include "cell.h"
#include "law/law.h"
#include "parameters_controller.h"
#include <new>
namespace Probability {
class LawController : public ViewController, public SimpleListViewDataSource, public SelectableTableViewDataSource {
public:
LawController(Responder * parentResponder, Law * m_law, ParametersController * parametersController);
View * view() override;
bool handleEvent(Ion::Events::Event event) override;
void didBecomeFirstResponder() override;
void viewWillAppear() override;
int numberOfRows() override;
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
KDCoordinate cellHeight() override;
HighlightCell * reusableCell(int index) override;
int reusableCellCount() override;
private:
class ContentView : public View {
public:
ContentView(SelectableTableView * selectableTableView);
constexpr static KDCoordinate k_titleMargin = 8;
private:
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
MessageTextView m_titleView;;
SelectableTableView * m_selectableTableView;
};
void setLawAccordingToIndex(int index);
constexpr static int k_totalNumberOfModels = 5;
Cell m_cells[k_totalNumberOfModels];
SelectableTableView m_selectableTableView;
ContentView m_contentView;
I18n::Message * m_messages;
Law * m_law;
ParametersController * m_parametersController;
};
}
#endif
|