Boost.UI
User Interface Boost library
|
Go to the documentation of this file.
8 #ifndef BOOST_UI_LIST_BOX_HPP
9 #define BOOST_UI_LIST_BOX_HPP
13 #ifdef BOOST_HAS_PRAGMA_ONCE
42 { create(parent, options); }
44 list_box& create(
widget& parent,
const std::vector<uistring>& options);
46 template <
class Iterator>
48 { create(parent, first, last); }
50 template <
class Iterator>
52 {
return create(parent, std::vector<uistring>(first, last)); }
54 template <
class Range>
56 { create(parent, r); }
58 template <
class Range>
60 {
return create(parent, detail::range_to_vector_uistring(r)); }
62 #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
65 { create(parent, list); }
69 {
return create(parent, detail::initializer_list_to_vector_uistring(list)); }
75 {
return selected_index() != npos; }
78 size_type selected_index()
const;
84 BOOST_UI_DETAIL_HANDLER(select,
list_box);
89 BOOST_UI_DETAIL_HANDLER(activate,
list_box);
94 void on_select_raw(
const boost::function<
void()>& handler);
95 void on_select_event_raw(
const boost::function<
void(
index_event&)>& handler);
97 void on_activate_raw(
const boost::function<
void()>& handler);
98 void on_activate_event_raw(
const boost::function<
void(
index_event&)>& handler);
101 detail_impl* get_impl();
102 const detail_impl* get_impl()
const;
108 #endif // BOOST_UI_LIST_BOX_HPP
Helper class to convert string between UI and application logic only.
Definition: string.hpp:49
list_box & create(widget &parent, const Range &r)
Creates list_box widget with options.
Definition: list_box.hpp:59
list_box(widget &parent, const std::vector< uistring > &options)
Creates list_box widget with options.
Definition: list_box.hpp:41
Event class that holds some index in container.
Definition: event.hpp:55
Boost C++ libraries namespace.
Definition: window.hpp:19
list_box(widget &parent, const Range &r)
Creates list_box widget with options.
Definition: list_box.hpp:55
list_box(widget &parent, Iterator first, Iterator last)
Creates list_box widget with options.
Definition: list_box.hpp:47
list_box & create(widget &parent, Iterator first, Iterator last)
Creates list_box widget with options.
Definition: list_box.hpp:51
list_box(widget &parent)
Creates empty list_box widget.
Definition: list_box.hpp:35
bool has_selection() const
Returns true if list_box has selected options, false otherwise.
Definition: list_box.hpp:74
list_box(widget &parent, std::initializer_list< T > list)
Creates list_box widget with options.
Definition: list_box.hpp:64
Abstract widget that holds array of strings.
Definition: strings_box.hpp:71
list_box & create(widget &parent, std::initializer_list< T > list)
Creates list_box widget with options.
Definition: list_box.hpp:68
Widget to select one or more strings.
Definition: list_box.hpp:29
Widget with array of strings.