diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-04 21:19:58 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-04 21:19:58 +0200 |
commit | 77b3943b751bed43d230de6db322a750bfd1fc8e (patch) | |
tree | cd7d98bc8c06c660558a52f2b6b6ed73982efdf2 /plugingui/listbox.h | |
parent | 0e436ebcd7faacb557ab94952765cb6bcfd7d259 (diff) |
New message system. New common midi input class. Some compiler warning fixes. New ListBoxBasic class used by both LustBox and ComboBox. New embossed font.
Diffstat (limited to 'plugingui/listbox.h')
-rw-r--r-- | plugingui/listbox.h | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/plugingui/listbox.h b/plugingui/listbox.h index e85d3d2..9a702df 100644 --- a/plugingui/listbox.h +++ b/plugingui/listbox.h @@ -31,8 +31,8 @@ #include <vector> #include "widget.h" -#include "font.h" #include "painter.h" +#include "listboxbasic.h" namespace GUI { @@ -41,8 +41,6 @@ public: ListBox(Widget *parent); ~ListBox(); - bool isFocusable() { return true; } - void addItem(std::string name, std::string value); void clear(); @@ -54,37 +52,13 @@ public: void registerClickHandler(void (*handler)(void *), void *ptr); void registerValueChangeHandler(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); + virtual void repaintEvent(GUI::RepaintEvent *e); + virtual void resize(int w, int h); private: - Painter::Box box; - - void setSelection(int index); - - struct item { - std::string name; - std::string value; - }; + ListBoxBasic *basic; - std::vector<struct item> items; - int selected; - int marked; - GUI::Font font; - int padding; - int btn_size; - int scroll_offset; - - void (*sel_handler)(void *); - void *sel_ptr; - - void (*clk_handler)(void *); - void *clk_ptr; - - void (*valch_handler)(void *); - void *valch_ptr; + Painter::Box box; }; }; |