<html> <head><title>ClanLib Reference: CL_ListBox</title></head> <body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0> <table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-purple-a.gif" alt="ClanSoft logo" width=525 height=96></td></tr> <tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-purple-b.gif" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.gif" width=42 height=14></td></tr></table> <table align=center border=0 cellspacing=10> <tr> <td><a href="entire_class_index.html">Entire Class Index</a></td> <td><a href="class_index.html">Main Class Index</a></td> <td><a href="cross_index.html">Cross Index</a></td> <td><a href="global_index.html">Global Index</a></td> </table><h1 align=center>Class CL_ListBox</h1><p> <b> Listbox component</b><br> Contained in: <a href="global_index.html">global</a><br> Derived from: <a href="CL_Component.html">CL_Component</a> <br> Derived by: <i>none</i> <br>Group: GUI (Controls) <p> #include <ClanLib/gui.h> <p> <hr noshade> <table border=0> <tr><td colspan=3><h3>public function member index:</h3></td> <tr valign=top><td align=left><h3>Construction:</h3></td> <tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_ListBox.html#417"><tt><font color=blue><b>CL_ListBox</b></font></tt></a></td><td><tt>(<a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>parent</font></tt>, <a href="CL_StyleManager.html"><tt><font color=navy><b>CL_StyleManager</b></font></tt></a>* <tt><font color=blue>style</font></tt> = NULL)</tt>;</td> <tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_ListBox.html#418"><tt><font color=blue><b>CL_ListBox</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_Rect.html"><tt><font color=navy><b>CL_Rect</b></font></tt></a>& <tt><font color=blue>pos</font></tt>, <a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>parent</font></tt>, <a href="CL_StyleManager.html"><tt><font color=navy><b>CL_StyleManager</b></font></tt></a>* <tt><font color=blue>style</font></tt> = NULL)</tt>;</td> <tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_ListBox.html#419"><tt><font color=blue><b>CL_ListBox</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_Rect.html"><tt><font color=navy><b>CL_Rect</b></font></tt></a>& <tt><font color=blue>pos</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>max_visible_items</font></tt>, <a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>parent</font></tt>, <a href="CL_StyleManager.html"><tt><font color=navy><b>CL_StyleManager</b></font></tt></a>* <tt><font color=blue>style</font></tt> = NULL)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="CL_ListBox.html#420"><tt><font color=blue><b>~CL_ListBox</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=left><h3>Attributes:</h3></td> <tr valign=top><td align=right><tt><a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>*</tt> </td><td align=right><a href="CL_ListBox.html#421"><tt><font color=blue><b>get_client_area</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#422"><tt><font color=blue><b>get_count</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>std::vector</font></tt><<a href="CL_ListItem.html"><tt><font color=navy><b>CL_ListItem</b></font></tt></a>>&</tt> </td><td align=right><a href="CL_ListBox.html#423"><tt><font color=blue><b>get_items</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>std::vector</font></tt><<tt><font color=navy>std::string</font></tt>></tt> </td><td align=right><a href="CL_ListBox.html#424"><tt><font color=blue><b>get_selected_items</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>const</tt> <tt><font color=navy>std::string</font></tt>&</tt> </td><td align=right><a href="CL_ListBox.html#425"><tt><font color=blue><b>get_current_text</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>const</tt> <tt><font color=navy>std::string</font></tt>&</tt> </td><td align=right><a href="CL_ListBox.html#426"><tt><font color=blue><b>get_text</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>) <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#427"><tt><font color=blue><b>get_current_item</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#428"><tt><font color=blue><b>is_selected</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>) <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#429"><tt><font color=blue><b>is_multi_selection</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#430"><tt><font color=blue><b>get_item_height</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#431"><tt><font color=blue><b>get_top_item</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#432"><tt><font color=blue><b>get_max_visible_items</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#433"><tt><font color=blue><b>has_scrollbar</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=left><h3>Operations:</h3></td> <tr valign=top><td align=right><tt><tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#434"><tt><font color=blue><b>insert_item</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>text</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt> = -1)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#435"><tt><font color=blue><b>remove_item</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#436"><tt><font color=blue><b>change_item</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>text</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#437"><tt><font color=blue><b>set_current_item</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#438"><tt><font color=blue><b>set_selected</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#439"><tt><font color=blue><b>clear_selection</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#440"><tt><font color=blue><b>select_all</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt> = true)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#441"><tt><font color=blue><b>invert_selection</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#442"><tt><font color=blue><b>set_multi_selection</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>enable</font></tt> = true)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#443"><tt><font color=blue><b>set_item_height</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>height</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#444"><tt><font color=blue><b>set_max_visible_items</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>count</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#445"><tt><font color=blue><b>set_top_item</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#446"><tt><font color=blue><b>sort</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>ascending</font></tt> = true)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_ListBox.html#447"><tt><font color=blue><b>clear</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=left><h3>Signals:</h3></td> <tr valign=top><td align=right><tt><tt><font color=navy>CL_Signal_v1</font></tt><<tt><font color=purple>int</font></tt>>&</tt> </td><td align=right><a href="CL_ListBox.html#448"><tt><font color=blue><b>sig_highlighted</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>CL_Signal_v1</font></tt><<tt><font color=purple>int</font></tt>>&</tt> </td><td align=right><a href="CL_ListBox.html#449"><tt><font color=blue><b>sig_activated</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><a href="CL_Signal_v0.html"><tt><font color=navy><b>CL_Signal_v0</b></font></tt></a>&</tt> </td><td align=right><a href="CL_ListBox.html#450"><tt><font color=blue><b>sig_selection_changed</b></font></tt></a></td><td><tt>()</tt>;</td> <tr><td> </td><tr><td colspan=3><h3>private function member index:</h3></td> <tr valign=top><td align=left><h3>Implementation:</h3></td> <tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_ListBox.html#451"><tt><font color=blue><b>CL_ListBox</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_ListBox.html#451"><tt><font color=blue><b>CL_ListBox</b></font></tt></a>& <tt><font color=blue>copy</font></tt>)</tt>;</td> <tr><td> </td></table> <hr noshade> <h2>Description:</h2> <p> <hr noshade> <h2>Function Member Descriptions:</h2> <a name="417"><font size=+1><b>CL_ListBox::CL_ListBox</b></font></a> - Listbox constructor<br><tt></tt> <a href="CL_ListBox.html#417"><tt><font color=blue><b>CL_ListBox</b></font></tt></a><tt>(<a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>parent</font></tt>, <a href="CL_StyleManager.html"><tt><font color=navy><b>CL_StyleManager</b></font></tt></a>* <tt><font color=blue>style</font></tt> = NULL)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="418"><font size=+1><b>CL_ListBox::CL_ListBox</b></font></a> - Listbox constructor<br><tt></tt> <a href="CL_ListBox.html#418"><tt><font color=blue><b>CL_ListBox</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_Rect.html"><tt><font color=navy><b>CL_Rect</b></font></tt></a>& <tt><font color=blue>pos</font></tt>, <a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>parent</font></tt>, <a href="CL_StyleManager.html"><tt><font color=navy><b>CL_StyleManager</b></font></tt></a>* <tt><font color=blue>style</font></tt> = NULL)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="419"><font size=+1><b>CL_ListBox::CL_ListBox</b></font></a> - Creates a listbox with max_visible_items visible. It auto-calculates the height of the listbox.<br><tt></tt> <a href="CL_ListBox.html#419"><tt><font color=blue><b>CL_ListBox</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_Rect.html"><tt><font color=navy><b>CL_Rect</b></font></tt></a>& <tt><font color=blue>pos</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>max_visible_items</font></tt>, <a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>* <tt><font color=blue>parent</font></tt>, <a href="CL_StyleManager.html"><tt><font color=navy><b>CL_StyleManager</b></font></tt></a>* <tt><font color=blue>style</font></tt> = NULL)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="436"><font size=+1><b>CL_ListBox::change_item</b></font></a> - Replaces the item at position index with text. <br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#436"><tt><font color=blue><b>change_item</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>text</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="447"><font size=+1><b>CL_ListBox::clear</b></font></a> - Deletes all items in the list. <br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#447"><tt><font color=blue><b>clear</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="439"><font size=+1><b>CL_ListBox::clear_selection</b></font></a> - Deselects current selected item.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#439"><tt><font color=blue><b>clear_selection</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="421"><font size=+1><b>CL_ListBox::get_client_area</b></font></a> - Returns the client area of the component.<br><tt><a href="CL_Component.html"><tt><font color=navy><b>CL_Component</b></font></tt></a>*</tt> <a href="CL_ListBox.html#421"><tt><font color=blue><b>get_client_area</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="422"><font size=+1><b>CL_ListBox::get_count</b></font></a> - Returns the number of items in the list box. <br><tt><tt><font color=purple>int</font></tt></tt> <a href="CL_ListBox.html#422"><tt><font color=blue><b>get_count</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="427"><font size=+1><b>CL_ListBox::get_current_item</b></font></a> - Returns the index of the current item of the listbox, or -1 if no item has been selected. <br><tt><tt><font color=purple>int</font></tt></tt> <a href="CL_ListBox.html#427"><tt><font color=blue><b>get_current_item</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="425"><font size=+1><b>CL_ListBox::get_current_text</b></font></a> - Returns the text of the current item.<br><tt><tt>const</tt> <tt><font color=navy>std::string</font></tt>&</tt> <a href="CL_ListBox.html#425"><tt><font color=blue><b>get_current_text</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="430"><font size=+1><b>CL_ListBox::get_item_height</b></font></a> - Returns the height of one item.<br><tt><tt><font color=purple>int</font></tt></tt> <a href="CL_ListBox.html#430"><tt><font color=blue><b>get_item_height</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="423"><font size=+1><b>CL_ListBox::get_items</b></font></a> - Returns all items in the list.<br><tt><tt><font color=navy>std::vector</font></tt><<a href="CL_ListItem.html"><tt><font color=navy><b>CL_ListItem</b></font></tt></a>>&</tt> <a href="CL_ListBox.html#423"><tt><font color=blue><b>get_items</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="432"><font size=+1><b>CL_ListBox::get_max_visible_items</b></font></a> - Returns number of items maximum visible in listbox (without scrolling)<br><tt><tt><font color=purple>int</font></tt></tt> <a href="CL_ListBox.html#432"><tt><font color=blue><b>get_max_visible_items</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="424"><font size=+1><b>CL_ListBox::get_selected_items</b></font></a> - Returns all selected items.<br><tt><tt><font color=navy>std::vector</font></tt><<tt><font color=navy>std::string</font></tt>></tt> <a href="CL_ListBox.html#424"><tt><font color=blue><b>get_selected_items</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="426"><font size=+1><b>CL_ListBox::get_text</b></font></a> - Returns the text at position index.<br><tt><tt>const</tt> <tt><font color=navy>std::string</font></tt>&</tt> <a href="CL_ListBox.html#426"><tt><font color=blue><b>get_text</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>) <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="431"><font size=+1><b>CL_ListBox::get_top_item</b></font></a> - Returns the index of the item at the top of the screen.<br><tt><tt><font color=purple>int</font></tt></tt> <a href="CL_ListBox.html#431"><tt><font color=blue><b>get_top_item</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="433"><font size=+1><b>CL_ListBox::has_scrollbar</b></font></a> - Returns true if a scrollbar is visible in the listbox.<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_ListBox.html#433"><tt><font color=blue><b>has_scrollbar</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="434"><font size=+1><b>CL_ListBox::insert_item</b></font></a> - Inserts text into the list at index. <br><tt><tt><font color=purple>int</font></tt></tt> <a href="CL_ListBox.html#434"><tt><font color=blue><b>insert_item</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>text</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt> = -1)</tt>;<br><blockquote> If index is negative, text is inserted at the end of the list.<br> Returns the index of the text</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="441"><font size=+1><b>CL_ListBox::invert_selection</b></font></a> - Inverts the selection.<br> Works only in Multi selection mode.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#441"><tt><font color=blue><b>invert_selection</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="429"><font size=+1><b>CL_ListBox::is_multi_selection</b></font></a> - Returns true if the listbox is in multiselection mode.<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_ListBox.html#429"><tt><font color=blue><b>is_multi_selection</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="428"><font size=+1><b>CL_ListBox::is_selected</b></font></a> - Returns true if item index is selected. Returns false if it is not selected or if there is an error.<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_ListBox.html#428"><tt><font color=blue><b>is_selected</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>) <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="435"><font size=+1><b>CL_ListBox::remove_item</b></font></a> - Removes and deletes the item at position index.<br> If index is equal to get_current_item(), a new item gets highlighted and the sig_highlighted() signal is emitted. <br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#435"><tt><font color=blue><b>remove_item</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="440"><font size=+1><b>CL_ListBox::select_all</b></font></a> - If select is true, all items get selected, else all get unselected.<br> This works only in Multi selection mode.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#440"><tt><font color=blue><b>select_all</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt> = true)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="437"><font size=+1><b>CL_ListBox::set_current_item</b></font></a> - Sets the highlighted item to the item index.<br> The highlighting is moved and the listbox scrolled as necessary. <br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#437"><tt><font color=blue><b>set_current_item</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="443"><font size=+1><b>CL_ListBox::set_item_height</b></font></a> - Sets the height of each item.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#443"><tt><font color=blue><b>set_item_height</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>height</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="444"><font size=+1><b>CL_ListBox::set_max_visible_items</b></font></a> - Sets the number of items maximum visible in listbox (without scrolling)<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#444"><tt><font color=blue><b>set_max_visible_items</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>count</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="442"><font size=+1><b>CL_ListBox::set_multi_selection</b></font></a> - Sets the listbox to multiselection if enable is true,<br> single selection otherwise.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#442"><tt><font color=blue><b>set_multi_selection</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>enable</font></tt> = true)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="438"><font size=+1><b>CL_ListBox::set_selected</b></font></a> - Selects item at index if select is true, or unselects it if select is false.<br> If the listbox is a single-selection listbox and and select is true, set_current_item() is called. <br> If the listbox is a single-selection listbox and and select is false, clear_selection()<br> is called if index is the currently selected item. <br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#438"><tt><font color=blue><b>set_selected</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>select</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="445"><font size=+1><b>CL_ListBox::set_top_item</b></font></a> - Scrolls the list box so the item at position index in the list is displayed in the top row of the listbox. <br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#445"><tt><font color=blue><b>set_top_item</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>index</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="449"><font size=+1><b>CL_ListBox::sig_activated</b></font></a> - This signal is emitted when the user clicks on an item or presses return when an item is highlighted.<br> The argument is the index of the selected item. <br><tt><tt><font color=navy>CL_Signal_v1</font></tt><<tt><font color=purple>int</font></tt>>&</tt> <a href="CL_ListBox.html#449"><tt><font color=blue><b>sig_activated</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="448"><font size=+1><b>CL_ListBox::sig_highlighted</b></font></a> - This signal is emitted when the user highlights a new current item.<br> The argument is the index of the new item, which is already current. <br><tt><tt><font color=navy>CL_Signal_v1</font></tt><<tt><font color=purple>int</font></tt>>&</tt> <a href="CL_ListBox.html#448"><tt><font color=blue><b>sig_highlighted</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="450"><font size=+1><b>CL_ListBox::sig_selection_changed</b></font></a> - This signal is emitted when the selection set of a listbox changes.<br><tt><a href="CL_Signal_v0.html"><tt><font color=navy><b>CL_Signal_v0</b></font></tt></a>&</tt> <a href="CL_ListBox.html#450"><tt><font color=blue><b>sig_selection_changed</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="446"><font size=+1><b>CL_ListBox::sort</b></font></a> - Sorts the items in ascending order, if ascending is true, or descending otherwise. <br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_ListBox.html#446"><tt><font color=blue><b>sort</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>ascending</font></tt> = true)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="420"><font size=+1><b>CL_ListBox::~CL_ListBox</b></font></a> - Listbox destructor<br><tt><tt>virtual</tt> </tt> <a href="CL_ListBox.html#420"><tt><font color=blue><b>~CL_ListBox</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <hr noshade> <h2>Variable Member Descriptions:</h2> <hr noshade> </body> </html>