summaryrefslogtreecommitdiff
path: root/plugingui/label.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
commitaf9c9091ed69394171485aa4c4814504f86f2004 (patch)
tree070b911dc8faed486c8e8829f0f41aec7d5b4350 /plugingui/label.cc
parent5e4cb10f72ef69d73fbd2c1bc42465c9111a4c41 (diff)
Simple image blit. New slider class. New filenamelineedit. New pixelbuffer used for drawing everything but the root window - with alpha blending...
Diffstat (limited to 'plugingui/label.cc')
-rw-r--r--plugingui/label.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/plugingui/label.cc b/plugingui/label.cc
index a8ff0ae..1bb7a5f 100644
--- a/plugingui/label.cc
+++ b/plugingui/label.cc
@@ -28,22 +28,29 @@
#include "painter.h"
-Label::Label(GlobalContext *gctx, Widget *parent)
- : Widget(gctx, parent)
+#include <stdio.h>
+//#include <arpa/inet.h>
+
+#include "img_test.h"
+
+GUI::Label::Label(GUI::Widget *parent) : GUI::Widget(parent)
{
}
-void Label::setText(std::string text)
+void GUI::Label::setText(std::string text)
{
_text = text;
- repaint(NULL);
+ repaintEvent(NULL);
}
-void Label::repaint(RepaintEvent *e)
+void GUI::Label::repaintEvent(GUI::RepaintEvent *e)
{
- Painter p(gctx, wctx);
+ // printf("Label::repaintEvent\n");
+ Painter p(this);
p.setColour(Colour(1));
- p.drawText(10, height() / 2 + 4, _text);
+
+ Font font;
+ p.drawText(10, height() / 2 + 4, font, _text);
}