mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 15:20:39 +01:00
21 lines
589 B
C++
21 lines
589 B
C++
#include <escher/pointer_text_view.h>
|
|
#include <assert.h>
|
|
|
|
PointerTextView::PointerTextView(KDText::FontSize size, const char * text, float horizontalAlignment, float verticalAlignment,
|
|
KDColor textColor, KDColor backgroundColor) :
|
|
TextView(size, horizontalAlignment, verticalAlignment, textColor, backgroundColor),
|
|
m_text(text)
|
|
{
|
|
}
|
|
|
|
void PointerTextView::setText(const char * text) {
|
|
if (text != m_text) {
|
|
m_text = text;
|
|
markRectAsDirty(bounds());
|
|
}
|
|
}
|
|
|
|
KDSize PointerTextView::minimalSizeForOptimalDisplay() const {
|
|
return KDText::stringSize(text(), m_fontSize);
|
|
}
|