summaryrefslogtreecommitdiff
path: root/plugingui/combobox.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-03-13 18:46:17 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-03-13 18:46:17 +0100
commitd55de707c3352a468a227d69920a56ef2550a7cc (patch)
tree3f7ac91962d7e09328fb24d4eb52707a3f6e7f22 /plugingui/combobox.h
parentc17046353762a0893914e671f1f19eadce6f94f5 (diff)
Added path lineedit and drive selection (win32) to filebrowser. Made a lot of small layout tweaks.
Diffstat (limited to 'plugingui/combobox.h')
-rw-r--r--plugingui/combobox.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugingui/combobox.h b/plugingui/combobox.h
index df45ca7..1c80496 100644
--- a/plugingui/combobox.h
+++ b/plugingui/combobox.h
@@ -26,4 +26,45 @@
*/
#ifndef __DRUMGIZMO_COMBOBOX_H__
#define __DRUMGIZMO_COMBOBOX_H__
+
+#include <string.h>
+#include <vector>
+
+#include "widget.h"
+#include "font.h"
+#include "listbox.h"
+
+namespace GUI {
+
+class ComboBox : public Widget {
+public:
+ ComboBox(Widget *parent);
+ ~ComboBox();
+
+ bool isFocusable() { return true; }
+
+ void addItem(std::string name, std::string value);
+
+ void clear();
+ bool selectItem(int index);
+ std::string selectedName();
+ std::string selectedValue();
+
+ void registerValueChangedHandler(void (*handler)(void *), void *ptr);
+
+ virtual void repaintEvent(RepaintEvent *e);
+ virtual void buttonEvent(ButtonEvent *e);
+ virtual void scrollEvent(ScrollEvent *e);
+ virtual void keyEvent(KeyEvent *e);
+
+private:
+ GUI::Font font;
+ GUI::ListBox *listbox;
+
+ void (*handler)(void *);
+ void *ptr;
+};
+
+};
+
#endif/*__DRUMGIZMO_COMBOBOX_H__*/