Files
Upsilon/apps/graph/list/function_cell.cpp
Romain Goyet 8e4b1666bb Kandinsky: KDFillRect takes a pattern, always
Change-Id: I32113345d742f21c0e238c1707bcee0116694d6f
2016-07-05 13:32:47 +02:00

29 lines
611 B
C++

#include "function_cell.h"
FunctionCell::FunctionCell() :
ChildlessView(),
m_focused(false),
m_even(false)
{
m_message = "NULL";
}
void FunctionCell::drawRect(KDRect rect) const {
KDColor background = m_even ? KDColorRGB(0xEE, 0xEE, 0xEE) : KDColorRGB(0x77,0x77,0x77);
KDFillRect(rect, &background, 1);
KDDrawString(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;
}