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
4
EvenOddCell::EvenOddCell
() :
5
HighlightCell
(),
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
17
KDColor
EvenOddCell::backgroundColor
()
const
{
18
// Select the background color according to the even line and the cursor selection
19
KDColor
background =
m_even
?
KDColorWhite
:
Palette::WallScreen
;
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
}
EvenOddCell::drawRect
void drawRect(KDContext *ctx, KDRect rect) const override
Definition:
even_odd_cell.cpp:24
EvenOddCell::setEven
virtual void setEven(bool even)
Definition:
even_odd_cell.cpp:10
EvenOddCell::EvenOddCell
EvenOddCell()
Definition:
even_odd_cell.cpp:4
EvenOddCell::backgroundColor
virtual KDColor backgroundColor() const
Definition:
even_odd_cell.cpp:17
KDColorWhite
constexpr KDColor KDColorWhite
Definition:
color.h:42
Palette::Select
static constexpr KDColor Select
Definition:
palette.h:17
HighlightCell
Definition:
highlight_cell.h:7
KDContext
Definition:
context.h:8
false
#define false
Definition:
stdbool.h:9
HighlightCell::isHighlighted
bool isHighlighted() const
Definition:
highlight_cell.h:11
Palette::WallScreen
static constexpr KDColor WallScreen
Definition:
palette.h:19
KDRect
Definition:
rect.h:26
KDContext::fillRect
void fillRect(KDRect rect, KDColor color)
Definition:
context_rect.cpp:8
KDColor
Definition:
color.h:6
EvenOddCell::m_even
bool m_even
Definition:
even_odd_cell.h:13
palette.h
HighlightCell::reloadCell
virtual void reloadCell()
Definition:
highlight_cell.cpp:16
even_odd_cell.h
epsilon
escher
src
even_odd_cell.cpp
Generated by
1.8.14