![]() | |
![]() | ![]() |
Entire Class Index | Main Class Index | Cross Index | Global Index |
Listbox component
Contained in: global
Derived from:
CL_Component
Derived by:
none
Group: GUI (Controls)
#include <ClanLib/gui.h>
public function member index: |
||
Construction: |
||
CL_ListBox | (CL_Component* parent, CL_StyleManager* style = NULL); | |
CL_ListBox | (const CL_Rect& pos, CL_Component* parent, CL_StyleManager* style = NULL); | |
CL_ListBox | (const CL_Rect& pos, int max_visible_items, CL_Component* parent, CL_StyleManager* style = NULL); | |
virtual | ~CL_ListBox | (); |
Attributes: |
||
CL_Component* | get_client_area | () const; |
int | get_count | () const; |
std::vector<CL_ListItem>& | get_items | () const; |
std::vector<std::string> | get_selected_items | () const; |
const std::string& | get_current_text | () const; |
const std::string& | get_text | (int index) const; |
int | get_current_item | () const; |
bool | is_selected | (int index) const; |
bool | is_multi_selection | () const; |
int | get_item_height | () const; |
int | get_top_item | () const; |
int | get_max_visible_items | () const; |
bool | has_scrollbar | () const; |
Operations: |
||
int | insert_item | (const std::string& text, int index = -1); |
void | remove_item | (int index); |
void | change_item | (const std::string& text, int index); |
void | set_current_item | (int index); |
void | set_selected | (int index, bool select); |
void | clear_selection | (); |
void | select_all | (bool select = true); |
void | invert_selection | (); |
void | set_multi_selection | (bool enable = true); |
void | set_item_height | (int height); |
void | set_max_visible_items | (int count); |
void | set_top_item | (int index); |
void | sort | (bool ascending = true); |
void | clear | (); |
Signals: |
||
CL_Signal_v1<int>& | sig_highlighted | (); |
CL_Signal_v1<int>& | sig_activated | (); |
CL_Signal_v0& | sig_selection_changed | (); |
private function member index: |
||
Implementation: |
||
CL_ListBox | (const CL_ListBox& copy); | |
If index is negative, text is inserted at the end of the list.
Returns the index of the text