Numworks Epsilon
1.4.1
Graphing Calculator Operating System
message_table_cell.cpp
Go to the documentation of this file.
1
#include <
escher/message_table_cell.h
>
2
#include <
escher/palette.h
>
3
#include <
assert.h
>
4
5
MessageTableCell::MessageTableCell
(I18n::Message label,
KDText::FontSize
size,
Layout
layout) :
6
TableCell
(layout),
7
m_messageTextView(size, label, 0, 0.5,
KDColorBlack
,
KDColorWhite
)
8
{
9
}
10
11
View
*
MessageTableCell::labelView
()
const
{
12
return
(
View
*)&m_messageTextView;
13
}
14
15
void
MessageTableCell::setHighlighted
(
bool
highlight) {
16
HighlightCell::setHighlighted
(highlight);
17
KDColor
backgroundColor = highlight?
Palette::Select
:
KDColorWhite
;
18
m_messageTextView.
setBackgroundColor
(backgroundColor);
19
}
20
21
void
MessageTableCell::setMessage
(I18n::Message text) {
22
m_messageTextView.
setMessage
(text);
23
layoutSubviews
();
24
markRectAsDirty
(
bounds
());
25
}
26
27
void
MessageTableCell::setTextColor
(
KDColor
color) {
28
m_messageTextView.
setTextColor
(color);
29
}
30
31
void
MessageTableCell::setMessageFontSize
(
KDText::FontSize
fontSize) {
32
m_messageTextView.
setFontSize
(fontSize);
33
layoutSubviews
();
34
}
View::markRectAsDirty
void markRectAsDirty(KDRect rect)
Definition:
view.cpp:39
MessageTableCell::labelView
View * labelView() const override
Definition:
message_table_cell.cpp:11
assert.h
MessageTableCell::setTextColor
virtual void setTextColor(KDColor color)
Definition:
message_table_cell.cpp:27
KDColorWhite
constexpr KDColor KDColorWhite
Definition:
color.h:42
Palette::Select
static constexpr KDColor Select
Definition:
palette.h:17
MessageTextView::setMessage
void setMessage(I18n::Message message)
Definition:
message_text_view.cpp:19
KDColorBlack
constexpr KDColor KDColorBlack
Definition:
color.h:41
MessageTableCell::setHighlighted
virtual void setHighlighted(bool highlight) override
Definition:
message_table_cell.cpp:15
MessageTableCell::setMessageFontSize
void setMessageFontSize(KDText::FontSize fontSize)
Definition:
message_table_cell.cpp:31
TableCell::layoutSubviews
void layoutSubviews() override
Definition:
table_cell.cpp:37
MessageTableCell::setMessage
void setMessage(I18n::Message message)
Definition:
message_table_cell.cpp:21
KDColor
Definition:
color.h:6
View
Definition:
view.h:23
TableCell
Definition:
table_cell.h:6
TextView::setTextColor
void setTextColor(KDColor textColor)
Definition:
text_view.cpp:19
TableCell::Layout
Layout
Definition:
table_cell.h:8
HighlightCell::setHighlighted
virtual void setHighlighted(bool highlight)
Definition:
highlight_cell.cpp:9
palette.h
message_table_cell.h
TextView::setFontSize
void setFontSize(KDText::FontSize fontSize)
Definition:
text_view.cpp:30
TextView::setBackgroundColor
void setBackgroundColor(KDColor backgroundColor)
Definition:
text_view.cpp:14
KDText::FontSize
FontSize
Definition:
text.h:10
View::bounds
KDRect bounds() const
Definition:
view.cpp:157
MessageTableCell::MessageTableCell
MessageTableCell(I18n::Message label=(I18n::Message) 0, KDText::FontSize size=KDText::FontSize::Small, Layout layout=Layout::Horizontal)
Definition:
message_table_cell.cpp:5
epsilon
escher
src
message_table_cell.cpp
Generated by
1.8.14