Numworks Epsilon  1.4.1
Graphing Calculator Operating System
initialisation_parameter_controller.cpp
Go to the documentation of this file.
2 #include <assert.h>
3 
4 using namespace Shared;
5 
6 namespace Regression {
7 
9  ViewController(parentResponder),
10  m_selectableTableView(this),
11  m_store(store)
12 {
13 }
14 
16  return I18n::translate(I18n::Message::Initialization);
17 }
18 
20  return &m_selectableTableView;
21 }
22 
25  app()->setFirstResponder(&m_selectableTableView);
26 }
27 
29  if (event == Ion::Events::OK || event == Ion::Events::EXE) {
30  RangeMethodPointer rangeMethods[k_totalNumberOfCells] = {&InteractiveCurveViewRange::roundAbscissa,
31  &InteractiveCurveViewRange::normalize, &InteractiveCurveViewRange::setDefault};
32  (m_store->*rangeMethods[selectedRow()])();
34  stack->pop();
35  return true;
36  }
37  return false;
38 }
39 
41  return k_totalNumberOfCells;
42 };
43 
44 
46  assert(index >= 0);
47  assert(index < k_totalNumberOfCells);
48  return &m_cells[index];
49 }
50 
52  return k_totalNumberOfCells;
53 }
54 
57 }
58 
60  MessageTableCell * myCell = (MessageTableCell *)cell;
61  I18n::Message titles[3] = {I18n::Message::RoundAbscissa, I18n::Message::Orthonormal, I18n::Message::DefaultSetting};
62  myCell->setMessage(titles[index]);
63 }
64 
65 }
#define assert(e)
Definition: assert.h:9
constexpr Event EXE
Definition: events.h:114
int16_t KDCoordinate
Definition: coordinate.h:6
Responder * parentResponder() const
Definition: responder.cpp:12
void(Store::* RangeMethodPointer)()
Definition: store.h:50
enum Message uint16_t enum Language uint16_t const char * translate(Message m, Language l=(Language) 0)
Definition: i18n.cpp:5
InitialisationParameterController(Responder *parentResponder, Shared::InteractiveCurveViewRange *graphRange)
void setMessage(I18n::Message message)
void willDisplayCellForIndex(HighlightCell *cell, int index) override
static constexpr KDCoordinate ParameterCellHeight
Definition: metric.h:15
void setFirstResponder(Responder *responder)
Definition: app.cpp:62
Definition: view.h:23
App * app()
Definition: responder.cpp:77
constexpr Event OK
Definition: events.h:65