Numworks Epsilon
1.4.1
Graphing Calculator Operating System
expression_table_cell_with_pointer.cpp
Go to the documentation of this file.
1
#include <
escher/expression_table_cell_with_pointer.h
>
2
#include <
escher/palette.h
>
3
#include <
assert.h
>
4
5
ExpressionTableCellWithPointer::ExpressionTableCellWithPointer
(I18n::Message accessoryMessage,
Layout
layout) :
6
ExpressionTableCell
(layout),
7
m_accessoryView(
KDText
::FontSize::Small, accessoryMessage, 0.0f, 0.5f,
Palette
::GreyDark,
KDColorWhite
)
8
{
9
if
(layout ==
Layout::Horizontal
) {
10
m_accessoryView.
setAlignment
(1.0f, 0.5f);
11
}
12
}
13
14
View
*
ExpressionTableCellWithPointer::accessoryView
()
const
{
15
return
(
View
*)&m_accessoryView;
16
}
17
18
void
ExpressionTableCellWithPointer::setHighlighted
(
bool
highlight) {
19
ExpressionTableCell::setHighlighted
(highlight);
20
KDColor
backgroundColor = highlight?
Palette::Select
:
KDColorWhite
;
21
m_accessoryView.
setBackgroundColor
(backgroundColor);
22
}
23
24
void
ExpressionTableCellWithPointer::setAccessoryMessage
(I18n::Message text) {
25
m_accessoryView.
setMessage
(text);
26
}
TableCell::Layout::Horizontal
ExpressionTableCellWithPointer::accessoryView
View * accessoryView() const override
Definition:
expression_table_cell_with_pointer.cpp:14
KDText
Definition:
text.h:8
ExpressionTableCellWithPointer::setHighlighted
void setHighlighted(bool highlight) override
Definition:
expression_table_cell_with_pointer.cpp:18
assert.h
KDColorWhite
constexpr KDColor KDColorWhite
Definition:
color.h:42
ExpressionTableCellWithPointer::setAccessoryMessage
void setAccessoryMessage(I18n::Message messageBody)
Definition:
expression_table_cell_with_pointer.cpp:24
Palette::Select
static constexpr KDColor Select
Definition:
palette.h:17
ExpressionTableCellWithPointer::ExpressionTableCellWithPointer
ExpressionTableCellWithPointer(I18n::Message accessoryMessage=(I18n::Message) 0, Layout layout=Layout::Horizontal)
Definition:
expression_table_cell_with_pointer.cpp:5
MessageTextView::setMessage
void setMessage(I18n::Message message)
Definition:
message_text_view.cpp:19
ExpressionTableCell
Definition:
expression_table_cell.h:7
KDColor
Definition:
color.h:6
ExpressionTableCell::setHighlighted
void setHighlighted(bool highlight) override
Definition:
expression_table_cell.cpp:15
View
Definition:
view.h:23
TextView::setAlignment
void setAlignment(float horizontalAlignment, float verticalAlignment)
Definition:
text_view.cpp:24
TableCell::Layout
Layout
Definition:
table_cell.h:8
palette.h
TextView::setBackgroundColor
void setBackgroundColor(KDColor backgroundColor)
Definition:
text_view.cpp:14
expression_table_cell_with_pointer.h
Palette
Definition:
palette.h:6
epsilon
escher
src
expression_table_cell_with_pointer.cpp
Generated by
1.8.14