diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-18 14:49:43 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-18 14:49:43 +0200 |
commit | 3e85cc8bfccf63236e815eba64acd99fbe154daf (patch) | |
tree | c3988ded4857263cebff1515999fa5f44aa39b85 /plugingui/label.cc | |
parent | ef47c71a29292ff9114a67d782e526ac662a1f32 (diff) |
New Label and LED widgets.
Diffstat (limited to 'plugingui/label.cc')
-rw-r--r-- | plugingui/label.cc | 21 |
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: |