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