Numworks Epsilon  1.4.1
Graphing Calculator Operating System
sequence_title_cell.cpp
Go to the documentation of this file.
1 #include "sequence_title_cell.h"
2 #include <assert.h>
3 
4 using namespace Shared;
5 using namespace Poincare;
6 
7 namespace Sequence {
8 
9 SequenceTitleCell::SequenceTitleCell(Orientation orientation) :
10  Shared::FunctionTitleCell(orientation),
11  m_titleTextView(0.5f, 0.5f)
12 {
13 }
14 
16  m_titleTextView.setExpression(expressionLayout);
17 }
18 
19 void SequenceTitleCell::setHighlighted(bool highlight) {
20  EvenOddCell::setHighlighted(highlight);
21  m_titleTextView.setHighlighted(highlight);
22 }
23 
24 void SequenceTitleCell::setEven(bool even) {
26  m_titleTextView.setEven(even);
27 }
28 
31  m_titleTextView.setTextColor(color);
32 }
33 
35  return 1;
36 }
37 
39  assert(index == 0);
40  return &m_titleTextView;
41 }
42 
44  KDRect textFrame(0, k_colorIndicatorThickness, bounds().width(), bounds().height() - k_colorIndicatorThickness);
47  }
48  m_titleTextView.setFrame(textFrame);
49 }
50 
51 }
void setExpression(Poincare::ExpressionLayout *expressionLayout)
#define assert(e)
Definition: assert.h:9
virtual void setEven(bool even)
void setFrame(KDRect frame)
Definition: view.cpp:125
View * subviewAtIndex(int index) override
void setHighlighted(bool highlight) override
void setEven(bool even) override
virtual void setColor(KDColor color)
static constexpr KDCoordinate k_colorIndicatorThickness
void setTextColor(KDColor textColor)
void setEven(bool even) override
void setHighlighted(bool highlight) override
static constexpr KDCoordinate k_separatorThickness
Definition: rect.h:26
Definition: color.h:6
Definition: app.cpp:7
Definition: view.h:23
virtual void setHighlighted(bool highlight)
void setExpression(Poincare::ExpressionLayout *expressionLayout)
KDRect bounds() const
Definition: view.cpp:157
int numberOfSubviews() const override
void setColor(KDColor color) override