summaryrefslogtreecommitdiff
path: root/plugingui/label.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/label.cc')
-rw-r--r--plugingui/label.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugingui/label.cc b/plugingui/label.cc
index 8ec6330..a8ff0ae 100644
--- a/plugingui/label.cc
+++ b/plugingui/label.cc
@@ -26,6 +26,27 @@
*/
#include "label.h"
+#include "painter.h"
+
+Label::Label(GlobalContext *gctx, Widget *parent)
+ : Widget(gctx, parent)
+{
+}
+
+void Label::setText(std::string text)
+{
+ _text = text;
+ repaint(NULL);
+}
+
+void Label::repaint(RepaintEvent *e)
+{
+ Painter p(gctx, wctx);
+ p.setColour(Colour(1));
+ p.drawText(10, height() / 2 + 4, _text);
+}
+
+
#ifdef TEST_LABEL
//Additional dependency files
//deps: