Blame view

build4/epsilon-master/poincare/src/layout/absolute_value_layout.h 809 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
  #ifndef POINCARE_ABSOLUTE_VALUE_LAYOUT_H
  #define POINCARE_ABSOLUTE_VALUE_LAYOUT_H
  
  #include "bracket_pair_layout.h"
  #include <poincare/layout_engine.h>
  #include <poincare/print_float.h>
  
  namespace Poincare {
  
  class AbsoluteValueLayout : public BracketPairLayout {
  public:
    using BracketPairLayout::BracketPairLayout;
    ExpressionLayout * clone() const override;
    int writeTextInBuffer(char * buffer, int bufferSize) const override {
      return LayoutEngine::writePrefixExpressionLayoutTextInBuffer(this, buffer, bufferSize, "abs");
    }
  protected:
    KDCoordinate widthMargin() const override { return 2; }
    virtual KDCoordinate verticalExternMargin() const override { return 1; }
    bool renderTopBar() const override { return false; }
    bool renderBottomBar() const override { return false; }
  };
  
  }
  
  #endif