Files
Upsilon/apps/variable_box_leaf_cell.h
Émilie Feral 8b355814ec [apps] Improve variable box leaf cells
Change-Id: Ib7b39731e0408f40ff38d56d78636c85442a2f34
2017-04-12 09:37:49 +02:00

28 lines
844 B
C++

#ifndef APPS_VARIABLE_BOX_LEAF_CELL_H
#define APPS_VARIABLE_BOX_LEAF_CELL_H
#include <escher.h>
class VariableBoxLeafCell : public HighlightCell {
public:
VariableBoxLeafCell();
void displayExpression(bool displayExpression);
void reloadCell() override;
void setLabel(const char * text);
void setSubtitle(const char * text);
void setExpression(Poincare::ExpressionLayout * expressionLayout);
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
constexpr static KDCoordinate k_separatorThickness = 1;
constexpr static KDCoordinate k_widthMargin = 10;
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
BufferTextView m_labelView;
BufferTextView m_subtitleView;
ExpressionView m_expressionView;
bool m_displayExpression;
};
#endif