3 #include "../constant.h" 4 #include "../apps_container.h" 16 m_numberOfColumnsNeedUpdate(
true),
17 m_abscissaTitleCell(nullptr),
19 m_abscissaParameterController(
this, intervalParameterController, parameterTitle),
20 m_setIntervalButton(
this, I18n::Message::IntervalSet,
Invocation([](
void * context,
void * sender) {
107 if (nextFirstResponder == tabController()) {
122 return (
Button *)&m_setIntervalButton;
127 if (cellAtLocationIsEditable(i, j)) {
131 if (j > 0 && i > 0) {
180 return m_abscissaTitleCell;
182 return functionTitleCells(index);
184 assert(index < k_maxNumberOfAbscissaCells);
185 return m_abscissaCells[index];
187 return floatCells(index);
199 return maxNumberOfFunctions();
201 return k_maxNumberOfAbscissaCells;
203 return maxNumberOfCells();
224 if (functionStore()->numberOfActiveFunctions() == 0) {
231 return tabController();
244 Function * ValuesController::functionAtColumn(
int i) {
249 Responder * ValuesController::tabController()
const {
257 void ValuesController::configureAbscissa() {
259 stack->
push(&m_abscissaParameterController);
262 void ValuesController::configureFunction() {
267 if (functionParameterController() ==
nullptr) {
273 stack->
push(functionParameterController());
276 bool ValuesController::cellAtLocationIsEditable(
int columnIndex,
int rowIndex) {
277 if (rowIndex > 0 && columnIndex == 0) {
288 double ValuesController::dataAtLocation(
int columnIndex,
int rowIndex) {
292 int ValuesController::numberOfElements() {
296 int ValuesController::maxNumberOfElements()
const {
300 double ValuesController::evaluationOfAbscissaAtColumn(
double abscissa,
int columnIndex) {
301 Function *
function = functionAtColumn(columnIndex);
302 TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)
app();
303 return function->evaluateAtAbscissa(abscissa, myApp->localContext());
317 for (
int i = 0; i < k_maxNumberOfAbscissaCells; i++) {
324 delete m_abscissaTitleCell;
325 m_abscissaTitleCell =
nullptr;
326 for (
int i = 0; i < k_maxNumberOfAbscissaCells; i++) {
327 delete m_abscissaCells[i];
328 m_abscissaCells[i] =
nullptr;
void didBecomeFirstResponder() override
bool isEmpty() const override
int typeAtLocation(int i, int j) override
static constexpr KDCoordinate k_bottomMargin
void willDisplayCellAtLocationWithDisplayMode(HighlightCell *cell, int i, int j, Poincare::PrintFloat::Mode mode)
View * loadView() override
KDCoordinate cumulatedWidthFromIndex(int i) override
HighlightCell * selectedCell()
void(* Function)(const char *input)
void didBecomeFirstResponder() override
StackViewController * stackController() const
int numberOfRows() override
int numberOfButtons(ButtonRowController::Position) const override
void push(ViewController *vc, KDColor textColor=Palette::SubTab, KDColor backgroundColor=KDColorWhite, KDColor separatorColor=Palette::GreyBright)
Responder * parentResponder() const
int numberOfColumns() override
void setVerticalCellOverlap(KDCoordinate o)
void setElement(int i, double f)
virtual void willDisplayCellAtLocation(HighlightCell *cell, int i, int j) override
bool selectCellAtLocation(int i, int j, bool setFirstResponder=true)
virtual void scrollToCell(int i, int j)
static constexpr KDCoordinate k_abscissaCellWidth
HighlightCell * reusableCell(int index, int type) override
Responder * defaultController() override
static constexpr int k_maxNumberOfElements
bool setDataAtLocation(double floatBody, int columnIndex, int rowIndex) override
static constexpr KDCoordinate k_topMargin
void setText(const char *textContent)
void store(const char *storedText)
void reloadData(bool setFirstResponder=true)
enum Message uint16_t enum Language uint16_t const char * translate(Message m, Language l=(Language) 0)
virtual bool handleEvent(Ion::Events::Event event) override
Button * buttonAtIndex(int index, ButtonRowController::Position position) const override
int reusableCellCount(int type) override
void willExitResponderChain(Responder *nextFirstResponder) override
virtual IntervalParameterController * intervalParameterController()=0
void unloadView(View *view) override
static constexpr int LargeNumberOfSignificantDigits
virtual void setFunction(Function *function)
KDCoordinate columnWidth(int i) override
static constexpr KDCoordinate k_leftMargin
const char * title() override
virtual void updateNumberOfColumns()
virtual Function * activeFunctionAtIndex(int i)
void viewDidDisappear() override
int numberOfActiveFunctions()
void setFirstResponder(Responder *responder)
bool m_numberOfColumnsNeedUpdate
static constexpr KDCoordinate k_ordinateCellWidth
static Clipboard * sharedClipboard()
void deleteElementAtIndex(int index)
void viewWillAppear() override
SelectableTableView * selectableTableView()
void viewDidDisappear() override
static constexpr KDCoordinate k_rightMargin
void unloadView(View *view) override
int indexFromCumulatedWidth(KDCoordinate offsetX) override
static constexpr KDColor WallScreenDark
constexpr Event Backspace
void viewWillAppear() override