Debian Codegraph @

Examples/GUIStyle/ZZ_Theme/scrollbar_zz.h

raw
1
2 #ifndef header_scrollbar_style_zz
3 #define header_scrollbar_style_zz
4
5 #if _MSC_VER > 1000
6 #pragma once
7 #endif
8
9 #include <ClanLib/gui.h>
10 #include <ClanLib/core.h>
11 #include <ClanLib/signals.h>
12
13 class CL_ScrollBar;
14 class CL_ComponentOptions;
15 class CL_StyleManager_ZZ;
16 class CL_ResourceManager;
17
18 class CL_ScrollBar_ZZ : public CL_ComponentStyle
19 {
20 public:
21 enum ScrollBarType {
22 type_normal,
23 type_listbox
24 };
25 public:
26 CL_ScrollBar_ZZ(
27 CL_ScrollBar *scrollbar,
28 CL_StyleManager_ZZ *style,
29 ScrollBarType scrollbar_type = type_normal);
30
31 virtual ~CL_ScrollBar_ZZ();
32 public:
33 void set_type(ScrollBarType scrollbar_type);
34 private:
35 void start_scroll(int delta);
36 void stop_scroll();
37
38 void on_paint();
39 void on_timer_scroll();
40
41 void on_get_preferred_size(CL_Size &size);
42
43 CL_Timer timer_scroll_;
44 int scroll_delta_;
45
46 CL_ScrollBar *scrollbar_;
47
48 CL_Button *button_increase_;
49 CL_Button *button_decrease_;
50
51 CL_StyleManager_ZZ *style_;
52 CL_ResourceManager *resources_;
53 CL_Surface *sur_increase_normal_;
54 CL_Surface *sur_increase_toggled_;
55 CL_Surface *sur_decrease_normal_;
56 CL_Surface *sur_decrease_toggled_;
57
58 CL_SlotContainer slots_;
59 ScrollBarType scrollbar_type_;
60
61 bool initialized_;
62 };
63
64 #endif
65