From d55de707c3352a468a227d69920a56ef2550a7cc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 13 Mar 2013 18:46:17 +0100 Subject: Added path lineedit and drive selection (win32) to filebrowser. Made a lot of small layout tweaks. --- plugingui/combobox.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'plugingui/combobox.h') 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 +#include + +#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__*/ -- cgit v1.2.3