mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
31 lines
611 B
C++
31 lines
611 B
C++
#include "new_function_cell.h"
|
|
#include "assert.h"
|
|
|
|
namespace Shared {
|
|
|
|
NewFunctionCell::NewFunctionCell(const char * text) :
|
|
EvenOddCell(),
|
|
m_pointerTextView(PointerTextView(KDText::FontSize::Large, text, 0.5f, 0.5f))
|
|
{
|
|
}
|
|
|
|
void NewFunctionCell::reloadCell() {
|
|
EvenOddCell::reloadCell();
|
|
m_pointerTextView.setBackgroundColor(backgroundColor());
|
|
}
|
|
|
|
int NewFunctionCell::numberOfSubviews() const {
|
|
return 1;
|
|
}
|
|
|
|
View * NewFunctionCell::subviewAtIndex(int index) {
|
|
assert(index == 0);
|
|
return &m_pointerTextView;
|
|
}
|
|
|
|
void NewFunctionCell::layoutSubviews() {
|
|
m_pointerTextView.setFrame(bounds());
|
|
}
|
|
|
|
}
|