mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[escher] create a class chevron menu cell
Change-Id: Iab33c039527a4dac40cda1d657507d6656b40311
This commit is contained in:
@@ -4,6 +4,7 @@ objs += $(addprefix escher/src/,\
|
||||
app.o\
|
||||
buffer_text_view.o\
|
||||
button.o\
|
||||
chevron_menu_list_cell.o\
|
||||
chevron_view.o\
|
||||
container.o\
|
||||
even_odd_cell.o\
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <escher/app.h>
|
||||
#include <escher/buffer_text_view.h>
|
||||
#include <escher/button.h>
|
||||
#include <escher/chevron_menu_list_cell.h>
|
||||
#include <escher/chevron_view.h>
|
||||
#include <escher/container.h>
|
||||
#include <escher/even_odd_cell.h>
|
||||
|
||||
16
escher/include/escher/chevron_menu_list_cell.h
Normal file
16
escher/include/escher/chevron_menu_list_cell.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef ESCHER_CHEVRON_MENU_LIST_CELL_H
|
||||
#define ESCHER_CHEVRON_MENU_LIST_CELL_H
|
||||
|
||||
#include <escher/menu_list_cell.h>
|
||||
#include <escher/chevron_view.h>
|
||||
|
||||
class ChevronMenuListCell : public MenuListCell {
|
||||
public:
|
||||
ChevronMenuListCell(char * label = nullptr);
|
||||
View * contentView() const override;
|
||||
void reloadCell() override;
|
||||
private:
|
||||
ChevronView m_contentView;
|
||||
};
|
||||
|
||||
#endif
|
||||
16
escher/src/chevron_menu_list_cell.cpp
Normal file
16
escher/src/chevron_menu_list_cell.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <escher/chevron_menu_list_cell.h>
|
||||
|
||||
ChevronMenuListCell::ChevronMenuListCell(char * label) :
|
||||
MenuListCell(label),
|
||||
m_contentView(ChevronView())
|
||||
{
|
||||
}
|
||||
|
||||
View * ChevronMenuListCell::contentView() const {
|
||||
return (View *)&m_contentView;
|
||||
}
|
||||
|
||||
void ChevronMenuListCell::reloadCell() {
|
||||
MenuListCell::reloadCell();
|
||||
m_contentView.setHighlighted(isHighlighted());
|
||||
}
|
||||
Reference in New Issue
Block a user