1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: wxItemContainerImmutable Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
<tbody>
<tr>
<td id="projectlogo">
<a href="http://www.wxwidgets.org/" target="_new">
<img alt="wxWidgets" src="logo.png"/>
</a>
</td>
<td style="padding-left: 0.5em; text-align: right;">
<span id="projectnumber">Version: 3.0.2</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Categories</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="classwx_item_container_immutable-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">wxItemContainerImmutable Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__group__class__ctrl.html">Controls</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <wx/ctrlsub.h></code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for wxItemContainerImmutable:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classwx_item_container_immutable__inherit__graph.png" border="0" usemap="#wx_item_container_immutable_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_item_container_immutable_inherit__map" id="wx_item_container_immutable_inherit__map">
<area shape="rect" id="node3" href="classwx_item_container.html" title="This class is an abstract base class for some wxWidgets controls which contain several items such as ..." alt="" coords="233,131,351,159"/><area shape="rect" id="node25" href="classwx_radio_box.html" title="A radio box item is used to select one of number of mutually exclusive choices." alt="" coords="247,182,337,210"/><area shape="rect" id="node5" href="classwx_choice.html" title="A choice item is used to select one of a list of strings." alt="" coords="448,5,525,33"/><area shape="rect" id="node9" href="classwx_combo_box.html" title="A combobox is like a combination of an edit control and a listbox." alt="" coords="437,55,536,83"/><area shape="rect" id="node13" href="classwx_control_with_items.html" title="This is convenience class that derives from both wxControl and wxItemContainer." alt="" coords="419,106,555,134"/><area shape="rect" id="node15" href="classwx_list_box.html" title="A listbox is used to select one or more of a list of strings." alt="" coords="448,157,525,185"/><area shape="rect" id="node21" href="classwx_owner_drawn_combo_box.html" title="wxOwnerDrawnComboBox is a combobox with owner-drawn list items." alt="" coords="400,207,573,235"/><area shape="rect" id="node23" href="classwx_simple_html_list_box.html" title="wxSimpleHtmlListBox is an implementation of wxHtmlListBox which shows HTML content in the listbox row..." alt="" coords="413,258,560,286"/><area shape="rect" id="node7" href="classwx_dir_filter_list_ctrl.html" title="wxDirFilterListCtrl" alt="" coords="631,5,753,33"/><area shape="rect" id="node11" href="classwx_bitmap_combo_box.html" title="A combobox that displays bitmap in front of the list items." alt="" coords="621,55,763,83"/><area shape="rect" id="node17" href="classwx_check_list_box.html" title="A wxCheckListBox is like a wxListBox, but allows items to be checked or unchecked." alt="" coords="635,157,749,185"/><area shape="rect" id="node19" href="classwx_rearrange_list.html" title="A listbox-like control allowing the user to rearrange the items and to enable or disable them..." alt="" coords="812,157,927,185"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classwx_item_container.html" title="This class is an abstract base class for some wxWidgets controls which contain several items such as ...">wxItemContainer</a> defines an interface which is implemented by all controls which have string subitems each of which may be selected. </p>
<p>It is decomposed in <a class="el" href="classwx_item_container_immutable.html" title="wxItemContainer defines an interface which is implemented by all controls which have string subitems ...">wxItemContainerImmutable</a> which omits all methods adding/removing items and is used by <a class="el" href="classwx_radio_box.html" title="A radio box item is used to select one of number of mutually exclusive choices.">wxRadioBox</a> and <a class="el" href="classwx_item_container.html" title="This class is an abstract base class for some wxWidgets controls which contain several items such as ...">wxItemContainer</a> itself.</p>
<p>Note that this is not a control, it's a mixin interface that classes have to derive from in addition to <a class="el" href="classwx_control.html" title="This is the base class for a control or "widget".">wxControl</a> or <a class="el" href="classwx_window.html" title="wxWindow is the base class for all windows and represents any visible object on screen.">wxWindow</a>.</p>
<p>Examples: <a class="el" href="classwx_list_box.html" title="A listbox is used to select one or more of a list of strings.">wxListBox</a>, <a class="el" href="classwx_check_list_box.html" title="A wxCheckListBox is like a wxListBox, but allows items to be checked or unchecked.">wxCheckListBox</a>, <a class="el" href="classwx_choice.html" title="A choice item is used to select one of a list of strings.">wxChoice</a> and <a class="el" href="classwx_combo_box.html" title="A combobox is like a combination of an edit control and a listbox.">wxComboBox</a> (which implements an extended interface deriving from this one)</p>
<h2></h2>
<div><span class="lib">Library:</span>  <span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxcore">wxCore</a></span></div><div><span class="category">Category:</span>  <span class="category_text"><a class="el" href="group__group__class__ctrl.html">Controls</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_control_with_items.html" title="This is convenience class that derives from both wxControl and wxItemContainer.">wxControlWithItems</a>, <a class="el" href="classwx_item_container.html" title="This class is an abstract base class for some wxWidgets controls which contain several items such as ...">wxItemContainer</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae70470db41f14f56b610bc30098ebce4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#ae70470db41f14f56b610bc30098ebce4">wxItemContainerImmutable</a> ()</td></tr>
<tr class="memdesc:ae70470db41f14f56b610bc30098ebce4"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#ae70470db41f14f56b610bc30098ebce4"></a><br/></td></tr>
<tr class="separator:ae70470db41f14f56b610bc30098ebce4"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a173bdb9c72977d524f524fcd02521f61"><td class="memItemLeft" align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#a173bdb9c72977d524f524fcd02521f61">GetCount</a> () const =0</td></tr>
<tr class="memdesc:a173bdb9c72977d524f524fcd02521f61"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of items in the control. <a href="#a173bdb9c72977d524f524fcd02521f61"></a><br/></td></tr>
<tr class="separator:a173bdb9c72977d524f524fcd02521f61"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a32c254e4cd1a6090377e0504e230bb88"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#a32c254e4cd1a6090377e0504e230bb88">IsEmpty</a> () const </td></tr>
<tr class="memdesc:a32c254e4cd1a6090377e0504e230bb88"><td class="mdescLeft"> </td><td class="mdescRight">Returns <span class="literal">true</span> if the control is empty or <span class="literal">false</span> if it has some items. <a href="#a32c254e4cd1a6090377e0504e230bb88"></a><br/></td></tr>
<tr class="separator:a32c254e4cd1a6090377e0504e230bb88"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a30e9fe62bd51415d9af2a9c6f19ec8f7"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_string.html">wxString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#a30e9fe62bd51415d9af2a9c6f19ec8f7">GetString</a> (unsigned int n) const =0</td></tr>
<tr class="memdesc:a30e9fe62bd51415d9af2a9c6f19ec8f7"><td class="mdescLeft"> </td><td class="mdescRight">Returns the label of the item with the given index. <a href="#a30e9fe62bd51415d9af2a9c6f19ec8f7"></a><br/></td></tr>
<tr class="separator:a30e9fe62bd51415d9af2a9c6f19ec8f7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1468727e7ce4194b3c4edd05cc1336ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_array_string.html">wxArrayString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#a1468727e7ce4194b3c4edd05cc1336ec">GetStrings</a> () const </td></tr>
<tr class="memdesc:a1468727e7ce4194b3c4edd05cc1336ec"><td class="mdescLeft"> </td><td class="mdescRight">Returns the array of the labels of all items in the control. <a href="#a1468727e7ce4194b3c4edd05cc1336ec"></a><br/></td></tr>
<tr class="separator:a1468727e7ce4194b3c4edd05cc1336ec"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1daf356c330bac2d7a93c5b3de8fbabf"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#a1daf356c330bac2d7a93c5b3de8fbabf">SetString</a> (unsigned int n, const <a class="el" href="classwx_string.html">wxString</a> &string)=0</td></tr>
<tr class="memdesc:a1daf356c330bac2d7a93c5b3de8fbabf"><td class="mdescLeft"> </td><td class="mdescRight">Sets the label for the given item. <a href="#a1daf356c330bac2d7a93c5b3de8fbabf"></a><br/></td></tr>
<tr class="separator:a1daf356c330bac2d7a93c5b3de8fbabf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af4a1bcdae92a7fe0367dc25a73e669bb"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#af4a1bcdae92a7fe0367dc25a73e669bb">FindString</a> (const <a class="el" href="classwx_string.html">wxString</a> &string, bool caseSensitive=false) const </td></tr>
<tr class="memdesc:af4a1bcdae92a7fe0367dc25a73e669bb"><td class="mdescLeft"> </td><td class="mdescRight">Finds an item whose label matches the given string. <a href="#af4a1bcdae92a7fe0367dc25a73e669bb"></a><br/></td></tr>
<tr class="separator:af4a1bcdae92a7fe0367dc25a73e669bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Selection</div></td></tr>
<tr class="memitem:aea97d8ee51e7af5e06befd5f8c9d793b"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#aea97d8ee51e7af5e06befd5f8c9d793b">SetSelection</a> (int n)=0</td></tr>
<tr class="memdesc:aea97d8ee51e7af5e06befd5f8c9d793b"><td class="mdescLeft"> </td><td class="mdescRight">Sets the selection to the given item <em>n</em> or removes the selection entirely if <em>n</em> == <code>wxNOT_FOUND</code>. <a href="#aea97d8ee51e7af5e06befd5f8c9d793b"></a><br/></td></tr>
<tr class="separator:aea97d8ee51e7af5e06befd5f8c9d793b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a18a7cb1a652772d5cb8adc52be1efea0"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#a18a7cb1a652772d5cb8adc52be1efea0">GetSelection</a> () const =0</td></tr>
<tr class="memdesc:a18a7cb1a652772d5cb8adc52be1efea0"><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the selected item or <code>wxNOT_FOUND</code> if no item is selected. <a href="#a18a7cb1a652772d5cb8adc52be1efea0"></a><br/></td></tr>
<tr class="separator:a18a7cb1a652772d5cb8adc52be1efea0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afa3800ff87f00a47211c3ce206e7bc39"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#afa3800ff87f00a47211c3ce206e7bc39">SetStringSelection</a> (const <a class="el" href="classwx_string.html">wxString</a> &string)</td></tr>
<tr class="memdesc:afa3800ff87f00a47211c3ce206e7bc39"><td class="mdescLeft"> </td><td class="mdescRight">Selects the item with the specified string in the control. <a href="#afa3800ff87f00a47211c3ce206e7bc39"></a><br/></td></tr>
<tr class="separator:afa3800ff87f00a47211c3ce206e7bc39"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad4e81fb20f75c3cd6b277ed639087e28"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_string.html">wxString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#ad4e81fb20f75c3cd6b277ed639087e28">GetStringSelection</a> () const </td></tr>
<tr class="memdesc:ad4e81fb20f75c3cd6b277ed639087e28"><td class="mdescLeft"> </td><td class="mdescRight">Returns the label of the selected item or an empty string if no item is selected. <a href="#ad4e81fb20f75c3cd6b277ed639087e28"></a><br/></td></tr>
<tr class="separator:ad4e81fb20f75c3cd6b277ed639087e28"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abcc0d37a2a7f29d5c54cfa5252571d61"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_item_container_immutable.html#abcc0d37a2a7f29d5c54cfa5252571d61">Select</a> (int n)</td></tr>
<tr class="memdesc:abcc0d37a2a7f29d5c54cfa5252571d61"><td class="mdescLeft"> </td><td class="mdescRight">This is the same as <a class="el" href="classwx_item_container_immutable.html#aea97d8ee51e7af5e06befd5f8c9d793b" title="Sets the selection to the given item n or removes the selection entirely if n == wxNOT_FOUND.">SetSelection()</a> and exists only because it is slightly more natural for controls which support multiple selection. <a href="#abcc0d37a2a7f29d5c54cfa5252571d61"></a><br/></td></tr>
<tr class="separator:abcc0d37a2a7f29d5c54cfa5252571d61"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="ae70470db41f14f56b610bc30098ebce4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxItemContainerImmutable::wxItemContainerImmutable </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="af4a1bcdae92a7fe0367dc25a73e669bb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int wxItemContainerImmutable::FindString </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>caseSensitive</em> = <code>false</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds an item whose label matches the given string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>String to find. </td></tr>
<tr><td class="paramname">caseSensitive</td><td>Whether search is case sensitive (default is not).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The zero-based position of the item, or wxNOT_FOUND if the string was not found. </dd></dl>
<p>Reimplemented in <a class="el" href="classwx_list_box.html#aeb5cbabed700c5215bd8543fae2d039c">wxListBox</a>, <a class="el" href="classwx_combo_box.html#a089acdaa86fa91c0899259ecbed9dd46">wxComboBox</a>, <a class="el" href="classwx_radio_box.html#a0235f9ff37a3c8da18f08024881ad88a">wxRadioBox</a>, and <a class="el" href="classwx_choice.html#a72e49836b9ed3ace5a512700d3680401">wxChoice</a>.</p>
</div>
</div>
<a class="anchor" id="a173bdb9c72977d524f524fcd02521f61"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual unsigned int wxItemContainerImmutable::GetCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of items in the control. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_item_container_immutable.html#a32c254e4cd1a6090377e0504e230bb88" title="Returns true if the control is empty or false if it has some items.">IsEmpty()</a> </dd></dl>
<p>Implemented in <a class="el" href="classwx_radio_box.html#a9604c1693a26da3076d013ddd11f386c">wxRadioBox</a>, <a class="el" href="classwx_combo_box.html#ad43c531eb94f1283a781dcb478de50dd">wxComboBox</a>, <a class="el" href="classwx_list_box.html#a82ab64b37477c9cf0a354e435f078092">wxListBox</a>, and <a class="el" href="classwx_choice.html#ab85196b1b0f530cf3497014de51889b6">wxChoice</a>.</p>
</div>
</div>
<a class="anchor" id="a18a7cb1a652772d5cb8adc52be1efea0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int wxItemContainerImmutable::GetSelection </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the index of the selected item or <code>wxNOT_FOUND</code> if no item is selected. </p>
<dl class="section return"><dt>Returns</dt><dd>The position of the current selection.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>This method can be used with single selection list boxes only, you should use <a class="el" href="classwx_list_box.html#abe7c5010843f2b3522036588b5298427" title="Fill an array of ints with the positions of the currently selected items.">wxListBox::GetSelections()</a> for the list boxes with wxLB_MULTIPLE style.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_item_container_immutable.html#aea97d8ee51e7af5e06befd5f8c9d793b" title="Sets the selection to the given item n or removes the selection entirely if n == wxNOT_FOUND.">SetSelection()</a>, <a class="el" href="classwx_item_container_immutable.html#ad4e81fb20f75c3cd6b277ed639087e28" title="Returns the label of the selected item or an empty string if no item is selected.">GetStringSelection()</a> </dd></dl>
<p>Implemented in <a class="el" href="classwx_radio_box.html#afe941a37abea6422c8dab24102dfefc3">wxRadioBox</a>, <a class="el" href="classwx_combo_box.html#ab669c3175df737ed1d6fb8d95c621f70">wxComboBox</a>, <a class="el" href="classwx_list_box.html#a704e48e294f4116dd5e073baaf79d770">wxListBox</a>, and <a class="el" href="classwx_choice.html#af13b41f102b0a819aead40919c5f4944">wxChoice</a>.</p>
</div>
</div>
<a class="anchor" id="a30e9fe62bd51415d9af2a9c6f19ec8f7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classwx_string.html">wxString</a> wxItemContainerImmutable::GetString </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>n</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the label of the item with the given index. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n</td><td>The zero-based index.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The label of the item or an empty string if the position was invalid. </dd></dl>
<p>Implemented in <a class="el" href="classwx_radio_box.html#aa3976438a4928725f7fdc5c5561020d5">wxRadioBox</a>, <a class="el" href="classwx_list_box.html#a39f0013a5386c1fa882dfab359284957">wxListBox</a>, <a class="el" href="classwx_combo_box.html#ae6bfbfa36e53edc58df54525db1b6e44">wxComboBox</a>, and <a class="el" href="classwx_choice.html#a3a89e3eef072e7914f8408154b4a1daa">wxChoice</a>.</p>
</div>
</div>
<a class="anchor" id="a1468727e7ce4194b3c4edd05cc1336ec"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_array_string.html">wxArrayString</a> wxItemContainerImmutable::GetStrings </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the array of the labels of all items in the control. </p>
</div>
</div>
<a class="anchor" id="ad4e81fb20f75c3cd6b277ed639087e28"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classwx_string.html">wxString</a> wxItemContainerImmutable::GetStringSelection </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the label of the selected item or an empty string if no item is selected. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_item_container_immutable.html#a18a7cb1a652772d5cb8adc52be1efea0" title="Returns the index of the selected item or wxNOT_FOUND if no item is selected.">GetSelection()</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classwx_combo_box.html#aae0a8a3adfb51a5dd44cf03c0fd20d1c">wxComboBox</a>.</p>
</div>
</div>
<a class="anchor" id="a32c254e4cd1a6090377e0504e230bb88"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxItemContainerImmutable::IsEmpty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <span class="literal">true</span> if the control is empty or <span class="literal">false</span> if it has some items. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_item_container_immutable.html#a173bdb9c72977d524f524fcd02521f61" title="Returns the number of items in the control.">GetCount()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="abcc0d37a2a7f29d5c54cfa5252571d61"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxItemContainerImmutable::Select </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>n</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This is the same as <a class="el" href="classwx_item_container_immutable.html#aea97d8ee51e7af5e06befd5f8c9d793b" title="Sets the selection to the given item n or removes the selection entirely if n == wxNOT_FOUND.">SetSelection()</a> and exists only because it is slightly more natural for controls which support multiple selection. </p>
</div>
</div>
<a class="anchor" id="aea97d8ee51e7af5e06befd5f8c9d793b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void wxItemContainerImmutable::SetSelection </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>n</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the selection to the given item <em>n</em> or removes the selection entirely if <em>n</em> == <code>wxNOT_FOUND</code>. </p>
<p>Note that this does not cause any command events to be emitted nor does it deselect any other items in the controls which support multiple selections.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n</td><td>The string position to select, starting from zero.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_item_container_immutable.html#a1daf356c330bac2d7a93c5b3de8fbabf" title="Sets the label for the given item.">SetString()</a>, <a class="el" href="classwx_item_container_immutable.html#afa3800ff87f00a47211c3ce206e7bc39" title="Selects the item with the specified string in the control.">SetStringSelection()</a> </dd></dl>
<p>Implemented in <a class="el" href="classwx_combo_box.html#a28ec184571590745a26a1be7fa2dfc72">wxComboBox</a>, <a class="el" href="classwx_radio_box.html#acdfb1a4331a5fc9b62d57f94b90f70c9">wxRadioBox</a>, <a class="el" href="classwx_choice.html#a10096ed787d493c701e9348f8e34440f">wxChoice</a>, and <a class="el" href="classwx_list_box.html#a65fd7fd5e3b8e7451b225b581ead70b1">wxListBox</a>.</p>
</div>
</div>
<a class="anchor" id="a1daf356c330bac2d7a93c5b3de8fbabf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void wxItemContainerImmutable::SetString </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>string</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the label for the given item. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n</td><td>The zero-based item index. </td></tr>
<tr><td class="paramname">string</td><td>The label to set. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classwx_radio_box.html#a95951516ebbf6d4ef78a110c0905777c">wxRadioBox</a>, <a class="el" href="classwx_list_box.html#aa7167deecacd31c66134500d96681405">wxListBox</a>, <a class="el" href="classwx_combo_box.html#a4c8d4b39403b6c0ee14f30b0c1dd96b7">wxComboBox</a>, and <a class="el" href="classwx_choice.html#a0b5ca1f30a82f57849e8142d22e703eb">wxChoice</a>.</p>
</div>
</div>
<a class="anchor" id="afa3800ff87f00a47211c3ce206e7bc39"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxItemContainerImmutable::SetStringSelection </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Selects the item with the specified string in the control. </p>
<p>This method doesn't cause any command events to be emitted.</p>
<p>Notice that this method is case-insensitive, i.e. the string is compared with all the elements of the control case-insensitively and the first matching entry is selected, even if it doesn't have exactly the same case as this string and there is an exact match afterwards.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>The string to select. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><span class="literal">true</span> if the specified string has been selected, <span class="literal">false</span> if it wasn't found in the control. </dd></dl>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:46:50 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>
|