diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-03-13 18:46:17 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-03-13 18:46:17 +0100 |
commit | d55de707c3352a468a227d69920a56ef2550a7cc (patch) | |
tree | 3f7ac91962d7e09328fb24d4eb52707a3f6e7f22 /plugingui/combobox.h | |
parent | c17046353762a0893914e671f1f19eadce6f94f5 (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.h | 41 |
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__*/ |