2 #include "../apps_container.h" 10 m_selectableTableView(controller, controller, selectionDataSource, controller)
12 m_selectableTableView.setVerticalCellOverlap(0);
13 m_selectableTableView.setMargins(0, k_sideMargin, 0, k_sideMargin);
14 m_selectableTableView.setColorsBackground(
false);
15 m_selectableTableView.setIndicatorThickness(k_indicatorThickness);
16 m_selectableTableView.horizontalScrollIndicator()->setMargin(k_indicatorMargin);
17 m_selectableTableView.verticalScrollIndicator()->setMargin(k_indicatorMargin);
21 return &m_selectableTableView;
24 void Controller::ContentView::drawRect(
KDContext * ctx,
KDRect rect)
const {
33 int Controller::ContentView::numberOfSubviews()
const {
37 View * Controller::ContentView::subviewAtIndex(
int index) {
39 return &m_selectableTableView;
42 void Controller::ContentView::layoutSubviews() {
43 m_selectableTableView.setFrame(bounds());
48 m_container(container),
49 m_view(this, selectionDataSource),
50 m_selectionDataSource(selectionDataSource)
61 return m_view.selectableTableView()->selectCellAtLocation(0,0);
84 return ((numberOfIcons()-1)/k_numberOfColumns)+1;
88 return k_numberOfColumns;
100 return &m_cells[index];
104 return k_maxNumberOfCells;
109 int appIndex = (j*k_numberOfColumns+i)+1;
119 int Controller::numberOfIcons() {
134 m_view.reloadBottomRightCorner(
this);
virtual HighlightCell * reusableCell(int index) override
virtual int numberOfColumns() override
virtual App::Snapshot * appSnapshotAtIndex(int index)=0
void switchTo(App::Snapshot *snapshot) override
virtual KDCoordinate cellHeight()=0
void didBecomeFirstResponder() override
bool selectCellAtLocation(int i, int j, bool setFirstResponder=true)
virtual int numberOfRows() override
void viewWillAppear() override
virtual KDCoordinate cellWidth()=0
bool handleEvent(Ion::Events::Event event) override
constexpr KDColor KDColorWhite
virtual KDCoordinate cellHeight() override
void willDisplayCellAtLocation(HighlightCell *cell, int i, int j) override
virtual int numberOfApps()=0
void fillRect(KDRect rect, KDColor color)
void setVisible(bool visible)
virtual Descriptor * descriptor()=0
virtual int reusableCellCount() override
void setFirstResponder(Responder *responder)
Controller(Responder *parentResponder, ::AppsContainer *container, SelectableTableViewDataSource *selectionDataSource)
virtual KDCoordinate cellWidth() override
void setAppDescriptor(::App::Descriptor *appDescriptor)
void selectCellAtLocation(int i, int j)
void tableViewDidChangeSelection(SelectableTableView *t, int previousSelectedCellX, int previousSelectedCellY) override