1 #ifndef _scrollbar__hpp__defined__
2 #define _scrollbar__hpp__defined__
4 #include <wx/scrolbar.h>
7 class scroll_bar
: public wxScrollBar
10 scroll_bar(wxWindow
* parent
, wxWindowID id
, bool vertical
);
12 void set_page_size(unsigned pagesize
);
13 void set_range(unsigned range
);
14 void set_position(unsigned position
);
15 void apply_delta(int delta
);
16 void apply_wheel(int wheel
, int wheelunit
, unsigned speed
);
17 unsigned get_position();
18 void set_handler(std::function
<void(scroll_bar
&)> cb
);
20 void on_scroll(wxScrollEvent
& e
);
21 std::function
<void(scroll_bar
&)> callback
;