Numworks Epsilon  1.4.1
Graphing Calculator Operating System
even_odd_cell.cpp
Go to the documentation of this file.
1 #include <escher/even_odd_cell.h>
2 #include <escher/palette.h>
3 
6  m_even(false)
7 {
8 }
9 
10 void EvenOddCell::setEven(bool even) {
11  if (even != m_even) {
12  m_even = even;
13  reloadCell();
14  }
15 }
16 
18  // Select the background color according to the even line and the cursor selection
20  background = isHighlighted() ? Palette::Select : background;
21  return background;
22 }
23 
24 void EvenOddCell::drawRect(KDContext * ctx, KDRect rect) const {
25  KDColor background = backgroundColor();
26  ctx->fillRect(rect, background);
27 }
void drawRect(KDContext *ctx, KDRect rect) const override
virtual void setEven(bool even)
virtual KDColor backgroundColor() const
constexpr KDColor KDColorWhite
Definition: color.h:42
static constexpr KDColor Select
Definition: palette.h:17
#define false
Definition: stdbool.h:9
bool isHighlighted() const
static constexpr KDColor WallScreen
Definition: palette.h:19
Definition: rect.h:26
void fillRect(KDRect rect, KDColor color)
Definition: context_rect.cpp:8
Definition: color.h:6
virtual void reloadCell()