14 #ifndef T3_WIDGET_LISTPANE_H
15 #define T3_WIDGET_LISTPANE_H
17 #include <t3widget/widgets/widget.h>
18 #include <t3widget/widgets/scrollbar.h>
24 class T3_WIDGET_LOCAL indicator_widget_t :
public widget_t {
28 indicator_widget_t(
void);
29 virtual bool process_key(
key_t key);
30 virtual void update_contents(
void);
31 virtual void set_focus(focus_t focus);
33 virtual bool accepts_focus(
void);
36 struct T3_WIDGET_LOCAL implementation_t {
37 size_t top_idx, current;
38 cleanup_t3_window_ptr widgets_window;
43 bool single_click_activate;
44 cleanup_ptr<indicator_widget_t>::t indicator_widget;
46 implementation_t(
bool _indicator) : top_idx(0), current(0),
47 has_focus(
false), scrollbar(
true), indicator(_indicator),
48 single_click_activate(
false)
51 pimpl_ptr<implementation_t>::t impl;
54 void ensure_cursor_on_screen(
void);
55 void scroll(
int change);
57 void scrollbar_dragged(
int start);
65 virtual bool process_key(
key_t key);
68 virtual void update_contents(
void);
69 virtual void set_focus(focus_t focus);
71 virtual void force_redraw(
void);
76 void update_positions(
void);
87 typedef size_t iterator;
89 iterator erase(iterator position);
93 size_t get_current(
void)
const;
94 void set_current(
size_t idx);
96 void set_single_click_activate(
bool sca);
98 T3_WIDGET_SIGNAL(activate,
void);
99 T3_WIDGET_SIGNAL(selection_changed,
void);