diff options
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; }; }; |