Numworks Epsilon  1.4.1
Graphing Calculator Operating System
new_function_cell.cpp
Go to the documentation of this file.
1 #include "new_function_cell.h"
2 #include "assert.h"
3 
4 namespace Shared {
5 
6 NewFunctionCell::NewFunctionCell(I18n::Message text) :
7  EvenOddCell(),
8  m_messageTextView(KDText::FontSize::Large, text, 0.5f, 0.5f)
9 {
10 }
11 
12 void NewFunctionCell::setEven(bool even) {
14  m_messageTextView.setBackgroundColor(backgroundColor());
15 }
16 
17 void NewFunctionCell::setHighlighted(bool highlight) {
18  EvenOddCell::setHighlighted(highlight);
19  m_messageTextView.setBackgroundColor(backgroundColor());
20 }
21 
23  return 1;
24 }
25 
27  assert(index == 0);
28  return &m_messageTextView;
29 }
30 
32  m_messageTextView.setFrame(bounds());
33 }
34 
35 }
void layoutSubviews() override
#define assert(e)
Definition: assert.h:9
virtual void setEven(bool even)
void setFrame(KDRect frame)
Definition: view.cpp:125
void setEven(bool even) override
NewFunctionCell(I18n::Message text)
virtual KDColor backgroundColor() const
Definition: text.h:8
View * subviewAtIndex(int index) override
void setHighlighted(bool highlight) override
Definition: view.h:23
int numberOfSubviews() const override
virtual void setHighlighted(bool highlight)
void setBackgroundColor(KDColor backgroundColor)
Definition: text_view.cpp:14
KDRect bounds() const
Definition: view.cpp:157