3 #include "../apps_container.h" 12 m_interactiveRange(interactiveRange),
24 return k_numberOfTextCell+2;
31 if (j >= 0 && j < 2) {
50 I18n::Message labels[k_numberOfTextCell+1] = {I18n::Message::XMin, I18n::Message::XMax, I18n::Message::Default, I18n::Message::YMin, I18n::Message::YMax};
75 double RangeParameterController::parameterAtIndex(
int parameterIndex) {
78 int index = parameterIndex > 2 ? parameterIndex - 1 : parameterIndex;
79 return (m_interactiveRange->*getters[index])();
82 bool RangeParameterController::setParameterAtIndex(
int parameterIndex,
double f) {
85 int index = parameterIndex > 2 ? parameterIndex - 1 : parameterIndex;
86 (m_interactiveRange->*setters[index])(f);
90 HighlightCell * RangeParameterController::reusableParameterCell(
int index,
int type) {
97 assert(index < k_numberOfEditableTextCell);
98 return m_xRangeCells[index];
101 assert(index < k_numberOfConvertibleTextCell);
102 return m_yRangeCells[index];
105 int RangeParameterController::reusableParameterCellCount(
int type) {
110 return k_numberOfEditableTextCell;
112 return k_numberOfConvertibleTextCell;
115 View * RangeParameterController::loadView() {
118 for (
int i = 0; i < k_numberOfEditableTextCell; i++) {
121 for (
int i = 0; i < k_numberOfConvertibleTextCell; i++) {
122 m_yRangeCells[i] =
new MessageTableCellWithConvertibleEditableText(tableView,
this, m_draftTextBuffer, I18n::Message::Default, m_interactiveRange);
127 void RangeParameterController::unloadView(
View * view) {
129 m_yAutoCell =
nullptr;
130 for (
int i = 0; i < k_numberOfEditableTextCell; i++) {
131 delete m_xRangeCells[i];
132 m_xRangeCells[i] =
nullptr;
134 for (
int i = 0; i < k_numberOfConvertibleTextCell; i++) {
135 delete m_yRangeCells[i];
136 m_yRangeCells[i] =
nullptr;
bool textFieldDidFinishEditing(TextField *textField, const char *text, Ion::Events::Event event) override
View * accessoryView() const override
void willDisplayCellForIndex(HighlightCell *cell, int index) override
void setYMax(float f) override
static constexpr KDColor GreyDark
void setYAuto(bool yAuto)
virtual SelectableTableView * selectableTableView()
void reloadData(bool setFirstResponder=true)
enum Message uint16_t enum Language uint16_t const char * translate(Message m, Language l=(Language) 0)
void setYMin(float f) override
View * loadView() override
void unloadView(View *view) override
void setTextColor(KDColor color) override
constexpr KDColor KDColorBlack
bool handleEvent(Ion::Events::Event event) override
int typeAtLocation(int i, int j) override
float(InteractiveCurveViewRange::* ParameterGetterPointer)()
const char * title() override
void setMessage(I18n::Message message)
void setXMin(float f) override
void willDisplayCellForIndex(HighlightCell *cell, int index) override
void setXMax(float f) override
bool handleEvent(Ion::Events::Event event) override
void(InteractiveCurveViewRange::* ParameterSetterPointer)(float)
int numberOfRows() override
bool textFieldDidFinishEditing(TextField *textField, const char *text, Ion::Events::Event event) override
void setState(bool state)