Debian Codegraph @

Examples/GUIStyle/ZZ_Theme/listbox_zz.h

raw
1
2 #ifndef header_listbox_style_zz
3 #define header_listbox_style_zz
4
5 #if _MSC_VER > 1000
6 #pragma once
7 #endif
8
9 #include <ClanLib/gui.h>
10 #include "listboxitem_zz.h"
11
12 class CL_Font;
13 class CL_ListBox;
14 class CL_StyleManager_ZZ;
15 class CL_ResourceManager;
16 class CL_DomElement;
17
18 class CL_ListBox_ZZ : public CL_ComponentStyle
19 {
20 enum ListBoxType {
21 type_normal,
22 type_levels_list
23 };
24 public:
25 CL_ListBox_ZZ(
26 CL_ListBox * listbox,
27 CL_StyleManager_ZZ * style);
28
29 virtual ~CL_ListBox_ZZ();
30 private:
31 CL_StyleManager_ZZ * style_;
32 CL_ResourceManager * resources_;
33 CL_Font * font_;
34
35 bool first_paint_;
36 CL_SlotContainer slots_;
37 ListBoxType listbox_type_;
38
39 void on_mouse_down(const CL_InputEvent &key);
40 void on_set_options(const CL_DomElement &options);
41 void on_scroll_change(int new_offset);
42 void on_resize(int old_width, int old_height);
43 void on_paint_background();
44 void on_paint_listbox();
45 void on_item_added(int index);
46 void on_item_removed(int index);
47 void on_clear();
48
49 void update_scrollbar(bool resize);
50
51 CL_ListBox *listbox_;
52 CL_ScrollBar *scrollbar_;
53
54 bool visible_scrollbar_;
55 };
56
57 #endif