Files
Upsilon/apps/graph/list/function_cell.cpp
Romain Goyet 53cf3e2ead [Escher] Responder can get a pointer to the parent App
We assume the root parent is the App. This works well because each view
controller is a Responder.

Change-Id: I5d90053949a4ffbdb78746cc85430a15138e48e7
2016-08-12 10:12:22 +02:00

30 lines
632 B
C++

#include "function_cell.h"
FunctionCell::FunctionCell() :
ChildlessView(),
Responder(nullptr),
m_focused(false),
m_even(false)
{
m_message = "NULL";
}
void FunctionCell::drawRect(KDContext * ctx, KDRect rect) const {
KDColor background = m_even ? KDColor(0xEEEEEE) : KDColor(0x777777);
ctx->fillRect(rect, background);
ctx->drawString(m_message, KDPointZero, m_focused);
}
void FunctionCell::setMessage(const char * message) {
m_message = message;
}
void FunctionCell::setFocused(bool focused) {
m_focused = focused;
markRectAsDirty(bounds());
}
void FunctionCell::setEven(bool even) {
m_even = even;
}