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 #include <cmath>
4 
5 namespace Shared {
6 
8  ViewController(parentResponder),
9  m_selectableTableView(this, this, this),
10  m_graphRange(graphRange)
11 {
12 }
13 
15  return I18n::translate(I18n::Message::Initialization);
16 }
17 
19  return &m_selectableTableView;
20 }
21 
23  m_selectableTableView.selectCellAtLocation(0, 0);
24  app()->setFirstResponder(&m_selectableTableView);
25 }
26 
28 if (event == Ion::Events::OK || event == Ion::Events::EXE) {
29  RangeMethodPointer rangeMethods[k_totalNumberOfCells] = {&InteractiveCurveViewRange::setTrigonometric,
31  (m_graphRange->*rangeMethods[selectedRow()])();
33  stack->pop();
34  return true;
35  }
36  return false;
37 }
38 
40  return k_totalNumberOfCells;
41 };
42 
43 
45  assert(index >= 0);
46  assert(index < k_totalNumberOfCells);
47  return &m_cells[index];
48 }
49 
51  return k_totalNumberOfCells;
52 }
53 
56 }
57 
59  MessageTableCell * myCell = (MessageTableCell *)cell;
60  I18n::Message titles[4] = {I18n::Message::Trigonometric, I18n::Message::RoundAbscissa, I18n::Message::Orthonormal, I18n::Message::DefaultSetting};
61  myCell->setMessage(titles[index]);
62 }
63 
64 }
#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
bool selectCellAtLocation(int i, int j, bool setFirstResponder=true)
enum Message uint16_t enum Language uint16_t const char * translate(Message m, Language l=(Language) 0)
Definition: i18n.cpp:5
void(InteractiveCurveViewRange::* RangeMethodPointer)()
InitialisationParameterController(Responder *parentResponder, Shared::InteractiveCurveViewRange *graphRange)
void setMessage(I18n::Message message)
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
void willDisplayCellForIndex(HighlightCell *cell, int index) override