Files
Upsilon/apps/variable_box_leaf_cell.h
Lionel Debroux 1a8c6b6ae9 [poincare, escher, ion, apps] Split the huge umbrella header poincare.h, to reduce build time.
This should be a NFC, but surprisingly, it also reduces size... so what does it change ?
2018-10-23 11:49:09 +02:00

32 lines
921 B
C++

#ifndef APPS_VARIABLE_BOX_LEAF_CELL_H
#define APPS_VARIABLE_BOX_LEAF_CELL_H
#include <escher.h>
#include <poincare/layout.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 setLayout(Poincare::Layout layout);
void drawRect(KDContext * ctx, KDRect rect) const override;
const char * text() const override {
return m_labelView.text();
}
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