Numworks Epsilon  1.4.1
Graphing Calculator Operating System
bracket_layout.h
Go to the documentation of this file.
1 #ifndef POINCARE_BRACKET_LAYOUT_H
2 #define POINCARE_BRACKET_LAYOUT_H
3 
4 #include <poincare/expression.h>
6 
7 namespace Poincare {
8 
10 public:
11  BracketLayout(ExpressionLayout * operandLayout);
13  BracketLayout(const BracketLayout& other) = delete;
14  BracketLayout(BracketLayout&& other) = delete;
15  BracketLayout& operator=(const BracketLayout& other) = delete;
16  BracketLayout& operator=(BracketLayout&& other) = delete;
17 protected:
18  virtual KDCoordinate widthMargin() const { return 5; }
19  virtual bool renderTopBar() const { return true; }
20  virtual bool renderBottomBar() const { return true; }
21  void render(KDContext * ctx, KDPoint p, KDColor expressionColor, KDColor backgroundColor) override;
22  KDSize computeSize() override;
23  ExpressionLayout * child(uint16_t index) override;
25 private:
26  constexpr static KDCoordinate k_bracketWidth = 5;
27  constexpr static KDCoordinate k_lineThickness = 1;
28  ExpressionLayout * m_operandLayout;
29 };
30 
31 }
32 
33 #endif
34 
int16_t KDCoordinate
Definition: coordinate.h:6
unsigned short uint16_t
Definition: stdint.h:5
virtual KDCoordinate widthMargin() const
BracketLayout & operator=(const BracketLayout &other)=delete
Definition: point.h:6
Definition: size.h:6
KDPoint positionOfChild(ExpressionLayout *child) override
virtual bool renderBottomBar() const
void render(KDContext *ctx, KDPoint p, KDColor expressionColor, KDColor backgroundColor) override
Definition: color.h:6
KDSize computeSize() override
virtual bool renderTopBar() const
ExpressionLayout * child(uint16_t index) override
BracketLayout(ExpressionLayout *operandLayout)