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/listbox.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'plugingui/listbox.h') diff --git a/plugingui/listbox.h b/plugingui/listbox.h index d7a5021..842a00f 100644 --- a/plugingui/listbox.h +++ b/plugingui/listbox.h @@ -49,7 +49,9 @@ public: std::string selectedName(); std::string selectedValue(); - void registerDblClickHandler(void (*handler)(void *), void *ptr); + void registerSelectHandler(void (*handler)(void *), void *ptr); + void registerClickHandler(void (*handler)(void *), void *ptr); + void registerValueChangeHandler(void (*handler)(void *), void *ptr); virtual void repaintEvent(RepaintEvent *e); virtual void buttonEvent(ButtonEvent *e); @@ -57,6 +59,8 @@ public: virtual void keyEvent(KeyEvent *e); private: + void setSelection(int index); + struct item { std::string name; std::string value; @@ -64,13 +68,20 @@ private: std::vector items; int selected; + int marked; GUI::Font font; int padding; int btn_size; int scroll_offset; - void (*dblclk_handler)(void *); - void *ptr; + void (*sel_handler)(void *); + void *sel_ptr; + + void (*clk_handler)(void *); + void *clk_ptr; + + void (*valch_handler)(void *); + void *valch_ptr; }; }; -- cgit v1.2.3