2 #include "../global_preferences.h" 4 #include "../../poincare/src/layout/baseline_relative_layout.h" 5 #include "../../poincare/src/layout/string_layout.h" 19 #if EPSILON_SOFTWARE_UPDATE_PROMPT 20 const SettingsMessageTree
menu[8] =
26 #if EPSILON_SOFTWARE_UPDATE_PROMPT 30 #if EPSILON_SOFTWARE_UPDATE_PROMPT 31 const SettingsMessageTree
model = SettingsMessageTree(I18n::Message::SettingsApp,
menu, 8);
36 MainController::MainController(
Responder * parentResponder) :
38 #if EPSILON_SOFTWARE_UPDATE_PROMPT
39 m_updateCell(
I18n::Message::Default,
KDText::FontSize::Large),
41 m_complexFormatCell(
I18n::Message::Default,
KDText::FontSize::Large),
42 m_brightnessCell(
I18n::Message::Default,
KDText::FontSize::Large),
43 m_complexFormatLayout(nullptr),
44 m_selectableTableView(this),
46 m_subController(this),
47 m_languageController(this, 13)
49 for (
int i = 0; i < k_numberOfSimpleChevronCells; i++) {
55 if (m_complexFormatLayout) {
56 delete m_complexFormatLayout;
57 m_complexFormatLayout =
nullptr;
62 return &m_selectableTableView;
74 #if EPSILON_SOFTWARE_UPDATE_PROMPT 96 stackController()->
push(&m_languageController);
105 stack->
push(&m_subController);
130 assert(index < k_numberOfSimpleChevronCells);
131 return &m_cells[index];
135 return &m_brightnessCell;
137 #if EPSILON_SOFTWARE_UPDATE_PROMPT 139 return &m_updateCell;
142 return &m_complexFormatCell;
147 return k_numberOfSimpleChevronCells;
159 #if EPSILON_SOFTWARE_UPDATE_PROMPT 172 if (m_complexFormatLayout) {
173 delete m_complexFormatLayout;
174 m_complexFormatLayout =
nullptr;
199 #if EPSILON_SOFTWARE_UPDATE_PROMPT
View * accessoryView() const override
KDCoordinate rowHeight(int j) override
const SettingsMessageTree model
int reusableCellCount(int type) override
void setMessageTreeModel(const MessageTree *messageTreeModel)
void push(ViewController *vc, KDColor textColor=Palette::SubTab, KDColor backgroundColor=KDColorWhite, KDColor separatorColor=Palette::GreyBright)
Responder * parentResponder() const
const SettingsMessageTree angleChildren[2]
void viewWillAppear() override
void willDisplayCellForIndex(HighlightCell *cell, int index) override
constexpr Expression::ComplexFormat Cartesian
int typeAtLocation(int i, int j) override
int numberOfChildren() const
const SettingsMessageTree complexFormatChildren[2]
void reloadData(bool setFirstResponder=true)
const SettingsMessageTree aboutChildren[3]
void setShowUpdatePopUp(bool showUpdatePopUp)
I18n::Message label() const
void reloadCellAtLocation(int i, int j)
int numberOfRows() override
int indexFromCumulatedHeight(KDCoordinate offsetY) override
constexpr Poincare::Expression::AngleUnit Radian
void setBrightnessLevel(int brightnessLevel)
const SettingsMessageTree examChildren[1]
const SettingsMessageTree FloatDisplayModeChildren[3]
void setSubtitle(I18n::Message text)
HighlightCell * reusableCell(int index, int type) override
void setMessageFontSize(KDText::FontSize fontSize)
void didBecomeFirstResponder() override
constexpr uint8_t MaxBrightness
I18n::Language language() const
void setMessage(I18n::Message message)
static constexpr KDCoordinate ParameterCellHeight
KDCoordinate cumulatedHeightFromIndex(int j) override
void setFirstResponder(Responder *responder)
virtual const MessageTree * children(int index) const =0
View * accessoryView() const override
void setExpression(Poincare::ExpressionLayout *expressionLayout)
void setLevel(float level)
void selectCellAtLocation(int i, int j)
bool handleEvent(Ion::Events::Event event) override
static constexpr int NumberOfBrightnessStates
void setState(bool state)
static GlobalPreferences * sharedGlobalPreferences()