[escher] Create a class pointer text view inheriting

from text view

Change-Id: I10dd24ed9404e634e90f2bc7fecb6441f7a93550
This commit is contained in:
Émilie Feral
2016-10-14 14:32:16 +02:00
committed by Romain Goyet
parent d14107b2bc
commit 0a6d822046
11 changed files with 68 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
#include <escher/pointer_text_view.h>
PointerTextView::PointerTextView() :
TextView(),
m_textPointer(nullptr)
{
}
PointerTextView::PointerTextView(const char * text, float horizontalAlignment, float verticalAlignment,
KDColor textColor, KDColor backgroundColor) :
TextView(horizontalAlignment, verticalAlignment, textColor, backgroundColor),
m_textPointer(text)
{
}
const char * PointerTextView::text() const {
return m_textPointer;
}
void PointerTextView::setText(const char * text) {
m_textPointer = text;
markRectAsDirty(bounds());
}