Fix number of compile errors and warnings with GCC 14
[lsnes.git] / include / platform / wxwidgets / scrollbar.hpp
bloba726c3c787ee1a2f04e2911a9373a4b755741e0b
1 #ifndef _scrollbar__hpp__defined__
2 #define _scrollbar__hpp__defined__
4 #include <wx/scrolbar.h>
5 #include <functional>
7 class scroll_bar : public wxScrollBar
9 public:
10 scroll_bar(wxWindow* parent, wxWindowID id, bool vertical);
11 ~scroll_bar();
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);
19 private:
20 void on_scroll(wxScrollEvent& e);
21 std::function<void(scroll_bar&)> callback;
22 unsigned pagesize;
23 unsigned range;
24 unsigned position;
25 int scroll_acc;
28 #endif