19 #ifndef _MFORMS_LISTBOX_H_
20 #define _MFORMS_LISTBOX_H_
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 struct ListBoxImplPtrs
33 bool (*create)(ListBox *
self,
bool multi_select);
34 void (*clear)(ListBox *
self);
35 void (*set_heading)(ListBox *
self,
const std::string &text);
36 void (*add_items)(ListBox *
self,
const std::list<std::string> &items);
37 int (*add_item)(ListBox *
self,
const std::string &item);
38 void (*remove_indexes)(ListBox *
self,
const std::vector<int> &indexes);
39 void (*remove_index)(ListBox *
self,
int index);
40 std::string (*get_text)(ListBox *
self);
41 void (*set_index)(ListBox *
self,
int index);
42 int (*get_index)(ListBox *
self);
43 std::vector<int> (*get_selected_indices)(ListBox*
self);
61 void set_heading(
const std::string &text);
64 int add_item(
const std::string &item);
67 void add_items(
const std::list<std::string> &items);
70 void remove_index(
int index);
74 void remove_indexes(
const std::vector<int> &indexes);
77 void set_selected(
int index);
80 virtual std::string get_string_value();
83 int get_selected_index();
86 std::vector<int> get_selected_indices();
93 boost::signals2::signal<void ()>*
signal_changed() {
return &_signal_changed; }
95 #ifndef DOXYGEN_SHOULD_SKIP_THIS
97 void selection_changed();