Numworks Epsilon  1.4.1
Graphing Calculator Operating System
function_title_cell.cpp
Go to the documentation of this file.
1 #include "function_title_cell.h"
2 #include <assert.h>
3 
4 using namespace Shared;
5 
6 namespace Graph {
7 
9  Shared::FunctionTitleCell(orientation),
10  m_bufferTextView(size, 0.5f, 0.5f)
11 {
12 }
13 
14 void FunctionTitleCell::setHighlighted(bool highlight) {
15  EvenOddCell::setHighlighted(highlight);
16  m_bufferTextView.setHighlighted(highlight);
17 }
18 
19 void FunctionTitleCell::setEven(bool even) {
21  m_bufferTextView.setEven(even);
22 }
23 
26  m_bufferTextView.setTextColor(color);
27 }
28 
29 void FunctionTitleCell::setText(const char * title) {
30  m_bufferTextView.setText(title);
31 }
32 
34  return 1;
35 }
36 
38  assert(index == 0);
39  return &m_bufferTextView;
40 }
41 
43  KDRect textFrame(0, k_colorIndicatorThickness, bounds().width(), bounds().height() - k_colorIndicatorThickness);
46  }
47  m_bufferTextView.setFrame(textFrame);
48 }
49 
50 }
int numberOfSubviews() const override
#define assert(e)
Definition: assert.h:9
void setEven(bool even) override
virtual void setEven(bool even)
void setFrame(KDRect frame)
Definition: view.cpp:125
void setColor(KDColor color) override
virtual void setColor(KDColor color)
Definition: app.cpp:9
void setTextColor(KDColor textColor)
static constexpr KDCoordinate k_colorIndicatorThickness
void setText(const char *textContent)
FunctionTitleCell(Orientation orientation)
void setEven(bool even) override
void setText(const char *textContent)
static constexpr KDCoordinate k_separatorThickness
Definition: rect.h:26
Definition: color.h:6
void setHighlighted(bool highlight) override
Definition: view.h:23
virtual void setHighlighted(bool highlight)
FontSize
Definition: text.h:10
void setHighlighted(bool highlight) override
KDRect bounds() const
Definition: view.cpp:157
View * subviewAtIndex(int index) override