mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[escher] Create a class pointer text view inheriting
from text view Change-Id: I10dd24ed9404e634e90f2bc7fecb6441f7a93550
This commit is contained in:
committed by
Romain Goyet
parent
d14107b2bc
commit
0a6d822046
23
escher/src/pointer_text_view.cpp
Normal file
23
escher/src/pointer_text_view.cpp
Normal 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());
|
||||
}
|
||||
Reference in New Issue
Block a user