mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
29 lines
610 B
C++
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;
|
|
}
|