Blame view

build2/epsilon-master/apps/variable_box_leaf_cell.h 946 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  #ifndef APPS_VARIABLE_BOX_LEAF_CELL_H
  #define APPS_VARIABLE_BOX_LEAF_CELL_H
  
  #include <escher.h>
  #include <poincare.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 setExpressionLayout(Poincare::ExpressionLayout * expressionLayout);
    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