Numworks Epsilon  1.4.1
Graphing Calculator Operating System
message_table_cell_with_buffer.cpp
Go to the documentation of this file.
2 #include <escher/palette.h>
3 
4 MessageTableCellWithBuffer::MessageTableCellWithBuffer(I18n::Message message, KDText::FontSize fontSize, KDText::FontSize accessoryFontSize, KDColor accessoryTextColor) :
5  MessageTableCell(message, fontSize),
6  m_accessoryView(accessoryFontSize, 1.0f, 0.5f, accessoryTextColor)
7 {
8 }
9 
10 void MessageTableCellWithBuffer::setAccessoryText(const char * textBody) {
11  m_accessoryView.setText(textBody);
13 }
14 
16  return m_accessoryView.text();
17 }
18 
20  return (View *)&m_accessoryView;
21 }
22 
25  KDColor backgroundColor = isHighlighted()? Palette::Select : KDColorWhite;
26  m_accessoryView.setBackgroundColor(backgroundColor);
27 }
28 
32 }
33 
36 }
37 
39  m_accessoryView.setFontSize(fontSize);
40 }
void setAccessoryText(const char *textBody)
void setText(const char *text) override
void setAccessoryFontSize(KDText::FontSize fontSize)
virtual void setTextColor(KDColor color)
constexpr KDColor KDColorWhite
Definition: color.h:42
static constexpr KDColor Select
Definition: palette.h:17
const char * text() const override
bool isHighlighted() const
virtual void setHighlighted(bool highlight) override
void setHighlighted(bool highlight) override
void layoutSubviews() override
Definition: table_cell.cpp:37
Definition: color.h:6
Definition: view.h:23
void setTextColor(KDColor textColor)
Definition: text_view.cpp:19
void setTextColor(KDColor color) override
void setFontSize(KDText::FontSize fontSize)
Definition: text_view.cpp:30
void setBackgroundColor(KDColor backgroundColor)
Definition: text_view.cpp:14
FontSize
Definition: text.h:10
MessageTableCellWithBuffer(I18n::Message message=(I18n::Message) 0, KDText::FontSize fontSize=KDText::FontSize::Small, KDText::FontSize accessoryFontSize=KDText::FontSize::Large, KDColor accessoryTextColor=KDColorBlack)