Files
Upsilon/apps/settings/sub_menu/display_mode_controller.h
Léa Saviot 9200e6062d [aps/solver] Reset the solution selection when leaving the view
Solve an equation that has solutions, select a solution, then go back
and change the equation. WHen you go to the solutions, the previous
solution is still selected, which is a little weird
2020-02-12 15:13:24 +01:00

32 lines
1.3 KiB
C++

#ifndef SETTINGS_DISPLAY_MODE_CONTROLLER_H
#define SETTINGS_DISPLAY_MODE_CONTROLLER_H
#include "preferences_controller.h"
#include "../message_table_cell_with_editable_text_with_separator.h"
#include "../../shared/parameter_text_field_delegate.h"
namespace Settings {
class DisplayModeController : public PreferencesController, public Shared::ParameterTextFieldDelegate {
public:
DisplayModeController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate);
KDCoordinate rowHeight(int j) override;
KDCoordinate cumulatedHeightFromIndex(int j) override;
int indexFromCumulatedHeight(KDCoordinate offsetY) override;
HighlightCell * reusableCell(int index, int type) override;
int reusableCellCount(int type) override;
int typeAtLocation(int i, int j) override;
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
bool textFieldShouldFinishEditing(TextField * textField, Ion::Events::Event event) override;
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
private:
static constexpr int k_resultFormatType = 0;
static constexpr int k_significantDigitsType = 1;
int initialSelectedRow() const override;
MessageTableCellWithEditableTextWithSeparator m_editableCell;
};
}
#endif