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
|
#ifndef SHARED_EDITABLE_CELL_TABLE_VIEW_CONTROLLER_H
#define SHARED_EDITABLE_CELL_TABLE_VIEW_CONTROLLER_H
#include <escher.h>
#include <poincare.h>
#include "text_field_delegate.h"
#include "tab_table_controller.h"
#include "regular_table_view_data_source.h"
namespace Shared {
class EditableCellTableViewController : public TabTableController , public RegularTableViewDataSource , public TextFieldDelegate {
public:
EditableCellTableViewController(Responder * parentResponder);
bool textFieldShouldFinishEditing(TextField * textField, Ion::Events::Event event) override;
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
int numberOfRows() override;
void willDisplayCellAtLocationWithDisplayMode(HighlightCell * cell, int i, int j, Poincare::Expression::FloatDisplayMode FloatDisplayMode);
KDCoordinate rowHeight(int j) override;
void viewWillAppear() override;
void didBecomeFirstResponder() override;
private:
TextFieldDelegateApp * textFieldDelegateApp() override;
static constexpr KDCoordinate k_cellHeight = 20;
virtual bool cellAtLocationIsEditable(int columnIndex, int rowIndex) = 0;
virtual bool setDataAtLocation(double floatBody, int columnIndex, int rowIndex) = 0;
virtual double dataAtLocation(int columnIndex, int rowIndex) = 0;
virtual int numberOfElements() = 0;
virtual int maxNumberOfElements() const = 0;
};
}
#endif
|