summaryrefslogtreecommitdiff
path: root/plugingui/textedit.h
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-11-05 14:39:44 +0100
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-11-05 14:39:44 +0100
commit2deeb15d4de7d3747f1d65637f429cedf794cd35 (patch)
tree1fef222dc777967c1a9502849c9fe7245213b00a /plugingui/textedit.h
parentf9fe5f987f8ac1a4f1df6cd38c866b6c6cf461bb (diff)
Added scrollbar.
Diffstat (limited to 'plugingui/textedit.h')
-rw-r--r--plugingui/textedit.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/plugingui/textedit.h b/plugingui/textedit.h
index e26a88c..3f27575 100644
--- a/plugingui/textedit.h
+++ b/plugingui/textedit.h
@@ -27,12 +27,14 @@
#ifndef __DRUMGIZMO_TEXTEDIT_H__
#define __DRUMGIZMO_TEXTEDIT_H__
-
#include <string>
+#include <list>
+
#include "widget.h"
#include "font.h"
#include "painter.h"
+#include "scrollbar.h"
namespace GUI {
@@ -48,25 +50,31 @@ public:
void setReadOnly(bool readonly);
bool readOnly();
- void registerEnterPressedHandler(void (*handler)(void *), void *ptr);
+ void resize(int width, int height);
+
+
+ void preprocessText();
//protected:
- virtual void keyEvent(KeyEvent *e);
+// virtual void keyEvent(KeyEvent *e);
virtual void repaintEvent(RepaintEvent *e);
- virtual void buttonEvent(ButtonEvent *e);
+// virtual void buttonEvent(ButtonEvent *e);
protected:
virtual void textChanged() {}
private:
Painter::Box box;
-
+ ScrollBar scroll;
Font font;
std::string _text;
size_t pos;
bool readonly;
+
+ std::list< std::string > preprocessedtext;
+// size_t numoflines;
void (*handler)(void *);
void *ptr;