Numworks Epsilon  1.4.1
Graphing Calculator Operating System
message_text_view.cpp
Go to the documentation of this file.
2 #include <assert.h>
3 
4 MessageTextView::MessageTextView(KDText::FontSize size, I18n::Message message, float horizontalAlignment, float verticalAlignment,
5  KDColor textColor, KDColor backgroundColor) :
6  TextView(size, horizontalAlignment, verticalAlignment, textColor, backgroundColor),
7  m_message(message)
8 {
9 }
10 
11 const char * MessageTextView::text() const {
12  return I18n::translate(m_message);
13 }
14 
15 void MessageTextView::setText(const char * text) {
16  assert(false);
17 }
18 
19 void MessageTextView::setMessage(I18n::Message message) {
20  if (message != m_message) {
21  m_message = message;
23  }
24 }
25 
28 }
KDText::FontSize m_fontSize
Definition: text_view.h:26
#define assert(e)
Definition: assert.h:9
MessageTextView(KDText::FontSize size=KDText::FontSize::Large, I18n::Message message=(I18n::Message) 0, float horizontalAlignment=0.0f, float verticalAlignment=0.0f, KDColor textColor=KDColorBlack, KDColor backgroundColor=KDColorWhite)
static KDSize stringSize(const char *text, FontSize size=FontSize::Large)
Definition: text.cpp:6
void markRectAsDirty(KDRect rect)
Definition: view.cpp:39
Definition: size.h:6
enum Message uint16_t enum Language uint16_t const char * translate(Message m, Language l=(Language) 0)
Definition: i18n.cpp:5
void setMessage(I18n::Message message)
void setText(const char *text) override
KDSize minimalSizeForOptimalDisplay() const override
Definition: color.h:6
const char * text() const override
FontSize
Definition: text.h:10
KDRect bounds() const
Definition: view.cpp:157