mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 01:08:15 +01:00
A boolean in ViewController states if the ViewController wants MaximumSpace (do not show any stack view headers), or if it does not want to add its own title to the stack view headers. If the ViewController's title is null, it is not added to the stack view headers. By default, ButtonRowControllers do not want to add their title (because they are only used for now in TabViews, where the title is already displayed in the tab). Change-Id: I9e4c64b845262e4d44eb03cf769950f9c9e67a3a
53 lines
1.9 KiB
C++
53 lines
1.9 KiB
C++
#ifndef SETTINGS_MAIN_CONTROLLER_H
|
|
#define SETTINGS_MAIN_CONTROLLER_H
|
|
|
|
#include <escher.h>
|
|
#include "sub_controller.h"
|
|
#include "settings_message_tree.h"
|
|
#include "language_controller.h"
|
|
|
|
namespace Settings {
|
|
|
|
class MainController : public ViewController, public ListViewDataSource, public SelectableTableViewDataSource {
|
|
public:
|
|
MainController(Responder * parentResponder);
|
|
~MainController();
|
|
MainController(const MainController& other) = delete;
|
|
MainController(MainController&& other) = delete;
|
|
MainController& operator=(const MainController& other) = delete;
|
|
MainController& operator=(MainController&& other) = delete;
|
|
View * view() override;
|
|
bool handleEvent(Ion::Events::Event event) override;
|
|
void didBecomeFirstResponder() override;
|
|
int numberOfRows() override;
|
|
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;
|
|
void viewWillAppear() override;
|
|
private:
|
|
StackViewController * stackController() const;
|
|
#if OS_WITH_SOFTWARE_UPDATE_PROMPT
|
|
constexpr static int k_totalNumberOfCell = 8;
|
|
MessageTableCellWithSwitch m_updateCell;
|
|
#else
|
|
constexpr static int k_totalNumberOfCell = 7;
|
|
#endif
|
|
constexpr static int k_numberOfSimpleChevronCells = 5;
|
|
MessageTableCellWithChevronAndMessage m_cells[k_numberOfSimpleChevronCells];
|
|
MessageTableCellWithChevronAndExpression m_complexFormatCell;
|
|
MessageTableCellWithGauge m_brightnessCell;
|
|
Poincare::ExpressionLayout * m_complexFormatLayout;
|
|
SelectableTableView m_selectableTableView;
|
|
MessageTree * m_messageTreeModel;
|
|
SubController m_subController;
|
|
LanguageController m_languageController;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|