Files
Upsilon/apps/graph/list/function_cell.cpp
Romain Goyet 5de28e01db Migrate Kandinsky to C++
Change-Id: I2752a8db84ad0bb817119cf6c2993c1622621150
2016-07-21 13:42:32 +02:00

29 lines
610 B
C++

#include "function_cell.h"
FunctionCell::FunctionCell() :
ChildlessView(),
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;
}