mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 07:40:42 +01:00
[apps/graph/list] Create a class for the button new function
Change-Id: Id9a03b9c7047ca709ee29298f10f7dde216e259a
This commit is contained in:
30
apps/graph/list/new_function_cell.cpp
Normal file
30
apps/graph/list/new_function_cell.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "new_function_cell.h"
|
||||
#include "assert.h"
|
||||
|
||||
namespace Graph {
|
||||
|
||||
NewFunctionCell::NewFunctionCell() :
|
||||
EvenOddCell(),
|
||||
m_pointerTextView(PointerTextView("Ajouter une fonction", 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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user