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
|
<!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"/>
<title>Crazy Eddies GUI System: CEGUIListbox.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript">
function hasClass(ele,cls) {
return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}
function addClass(ele,cls) {
if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}
function removeClass(ele,cls) {
if (hasClass(ele,cls)) {
var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
ele.className=ele.className.replace(reg,' ');
}
}
function toggleVisibility(linkObj) {
var base = linkObj.getAttribute('id');
var summary = document.getElementById(base + '-summary');
var content = document.getElementById(base + '-content');
var trigger = document.getElementById(base + '-trigger');
if ( hasClass(linkObj,'closed') ) {
summary.style.display = 'none';
content.style.display = 'block';
trigger.src = 'open.png';
removeClass(linkObj,'closed');
addClass(linkObj,'opened');
} else if ( hasClass(linkObj,'opened') ) {
summary.style.display = 'block';
content.style.display = 'none';
trigger.src = 'closed.png';
removeClass(linkObj,'opened');
addClass(linkObj,'closed');
}
return false;
}
</script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Crazy Eddies GUI System <span id="projectnumber">0.7.6</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">CEGUIListbox.h</div> </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/***********************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> filename: CEGUIListbox.h</span>
<a name="l00003"></a>00003 <span class="comment"> created: 13/4/2004</span>
<a name="l00004"></a>00004 <span class="comment"> author: Paul D Turner</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment"> purpose: Interface to base class for Listbox widget</span>
<a name="l00007"></a>00007 <span class="comment">*************************************************************************/</span>
<a name="l00008"></a>00008 <span class="comment">/***************************************************************************</span>
<a name="l00009"></a>00009 <span class="comment"> * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining</span>
<a name="l00012"></a>00012 <span class="comment"> * a copy of this software and associated documentation files (the</span>
<a name="l00013"></a>00013 <span class="comment"> * "Software"), to deal in the Software without restriction, including</span>
<a name="l00014"></a>00014 <span class="comment"> * without limitation the rights to use, copy, modify, merge, publish,</span>
<a name="l00015"></a>00015 <span class="comment"> * distribute, sublicense, and/or sell copies of the Software, and to</span>
<a name="l00016"></a>00016 <span class="comment"> * permit persons to whom the Software is furnished to do so, subject to</span>
<a name="l00017"></a>00017 <span class="comment"> * the following conditions:</span>
<a name="l00018"></a>00018 <span class="comment"> *</span>
<a name="l00019"></a>00019 <span class="comment"> * The above copyright notice and this permission notice shall be</span>
<a name="l00020"></a>00020 <span class="comment"> * included in all copies or substantial portions of the Software.</span>
<a name="l00021"></a>00021 <span class="comment"> *</span>
<a name="l00022"></a>00022 <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span>
<a name="l00023"></a>00023 <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
<a name="l00024"></a>00024 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</span>
<a name="l00025"></a>00025 <span class="comment"> * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR</span>
<a name="l00026"></a>00026 <span class="comment"> * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,</span>
<a name="l00027"></a>00027 <span class="comment"> * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR</span>
<a name="l00028"></a>00028 <span class="comment"> * OTHER DEALINGS IN THE SOFTWARE.</span>
<a name="l00029"></a>00029 <span class="comment"> ***************************************************************************/</span>
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef _CEGUIListbox_h_</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define _CEGUIListbox_h_</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#include "../CEGUIBase.h"</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include "../CEGUIWindow.h"</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include "CEGUIListboxProperties.h"</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include <vector></span>
<a name="l00037"></a>00037
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="preprocessor">#if defined(_MSC_VER)</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(push)</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(disable : 4251)</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="comment">// Start of CEGUI namespace section</span>
<a name="l00046"></a>00046 <span class="keyword">namespace </span>CEGUI
<a name="l00047"></a>00047 {
<a name="l00048"></a>00048
<a name="l00053"></a><a class="code" href="classCEGUI_1_1ListboxWindowRenderer.html">00053</a> <span class="keyword">class </span>CEGUIEXPORT <a class="code" href="classCEGUI_1_1ListboxWindowRenderer.html" title="Base class for Listbox window renderer.">ListboxWindowRenderer</a> : <span class="keyword">public</span> <a class="code" href="classCEGUI_1_1WindowRenderer.html" title="Base-class for the assignable WindowRenderer object.">WindowRenderer</a>
<a name="l00054"></a>00054 {
<a name="l00055"></a>00055 <span class="keyword">public</span>:
<a name="l00060"></a>00060 <a class="code" href="classCEGUI_1_1ListboxWindowRenderer.html" title="Base class for Listbox window renderer.">ListboxWindowRenderer</a>(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a>& name);
<a name="l00061"></a>00061
<a name="l00071"></a>00071 <span class="keyword">virtual</span> <a class="code" href="classCEGUI_1_1Rect.html" title="Class encapsulating operations on a Rectangle.">Rect</a> getListRenderArea(<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0;
<a name="l00072"></a>00072 };
<a name="l00073"></a>00073
<a name="l00078"></a><a class="code" href="classCEGUI_1_1Listbox.html">00078</a> <span class="keyword">class </span>CEGUIEXPORT <a class="code" href="classCEGUI_1_1Listbox.html" title="Base class for standard Listbox widget.">Listbox</a> : <span class="keyword">public</span> <a class="code" href="classCEGUI_1_1Window.html" title="An abstract base class providing common functionality and specifying the required interface for deriv...">Window</a>
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080 <span class="keyword">public</span>:
<a name="l00081"></a><a class="code" href="classCEGUI_1_1Listbox.html#acc300c28ae8ce655c452afa4b09da0db">00081</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#acc300c28ae8ce655c452afa4b09da0db" title="Namespace for global events.">EventNamespace</a>;
<a name="l00082"></a><a class="code" href="classCEGUI_1_1Listbox.html#a7f2becb073ff225fba6845f36eb7a5be">00082</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#a7f2becb073ff225fba6845f36eb7a5be" title="Window factory name.">WidgetTypeName</a>;
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="comment">/*************************************************************************</span>
<a name="l00085"></a>00085 <span class="comment"> Constants</span>
<a name="l00086"></a>00086 <span class="comment"> *************************************************************************/</span>
<a name="l00087"></a>00087 <span class="comment">// event names</span>
<a name="l00092"></a><a class="code" href="classCEGUI_1_1Listbox.html#a5637852660132d350794ff4b6732adab">00092</a> <span class="comment"></span> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#a5637852660132d350794ff4b6732adab">EventListContentsChanged</a>;
<a name="l00099"></a><a class="code" href="classCEGUI_1_1Listbox.html#afa8eb049e685967f9639ecd81c44bccb">00099</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#afa8eb049e685967f9639ecd81c44bccb">EventSelectionChanged</a>;
<a name="l00105"></a><a class="code" href="classCEGUI_1_1Listbox.html#af33bcee37ec79863bb3f818466bbcb33">00105</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#af33bcee37ec79863bb3f818466bbcb33">EventSortModeChanged</a>;
<a name="l00111"></a><a class="code" href="classCEGUI_1_1Listbox.html#aa5ca97065346dc98f56a35c0e390180a">00111</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#aa5ca97065346dc98f56a35c0e390180a">EventMultiselectModeChanged</a>;
<a name="l00118"></a><a class="code" href="classCEGUI_1_1Listbox.html#ab6439b5d836b09c44ff941a15ee188b9">00118</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#ab6439b5d836b09c44ff941a15ee188b9">EventVertScrollbarModeChanged</a>;
<a name="l00125"></a><a class="code" href="classCEGUI_1_1Listbox.html#abc2bd4a37317867eb6c2509e2695d116">00125</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#abc2bd4a37317867eb6c2509e2695d116">EventHorzScrollbarModeChanged</a>;
<a name="l00126"></a>00126
<a name="l00127"></a>00127 <span class="comment">/*************************************************************************</span>
<a name="l00128"></a>00128 <span class="comment"> Child Widget name suffix constants</span>
<a name="l00129"></a>00129 <span class="comment"> *************************************************************************/</span>
<a name="l00130"></a><a class="code" href="classCEGUI_1_1Listbox.html#a3ba9b33426cabc35f79cbcebbd835673">00130</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#a3ba9b33426cabc35f79cbcebbd835673" title="Widget name suffix for the vertical scrollbar component.">VertScrollbarNameSuffix</a>;
<a name="l00131"></a><a class="code" href="classCEGUI_1_1Listbox.html#adb7ad46671788f16e61dc576f74755f6">00131</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <a class="code" href="classCEGUI_1_1Listbox.html#adb7ad46671788f16e61dc576f74755f6" title="Widget name suffix for the horizontal scrollbar component.">HorzScrollbarNameSuffix</a>;
<a name="l00132"></a>00132
<a name="l00133"></a>00133 <span class="comment">/*************************************************************************</span>
<a name="l00134"></a>00134 <span class="comment"> Accessor Methods</span>
<a name="l00135"></a>00135 <span class="comment"> *************************************************************************/</span>
<a name="l00143"></a><a class="code" href="classCEGUI_1_1Listbox.html#ac27fb510288515009d43ec7cfb42bfcf">00143</a> <span class="keywordtype">size_t</span> <a class="code" href="classCEGUI_1_1Listbox.html#ac27fb510288515009d43ec7cfb42bfcf" title="Return number of items attached to the list box.">getItemCount</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> d_listItems.size();}
<a name="l00144"></a>00144
<a name="l00145"></a>00145
<a name="l00153"></a>00153 <span class="keywordtype">size_t</span> getSelectedCount(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00154"></a>00154
<a name="l00155"></a>00155
<a name="l00164"></a>00164 <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* getFirstSelectedItem(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00165"></a>00165
<a name="l00166"></a>00166
<a name="l00181"></a>00181 <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* getNextSelected(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* start_item) <span class="keyword">const</span>;
<a name="l00182"></a>00182
<a name="l00183"></a>00183
<a name="l00196"></a>00196 <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* getListboxItemFromIndex(<span class="keywordtype">size_t</span> index) <span class="keyword">const</span>;
<a name="l00197"></a>00197
<a name="l00198"></a>00198
<a name="l00211"></a>00211 <span class="keywordtype">size_t</span> getItemIndex(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* item) <span class="keyword">const</span>;
<a name="l00212"></a>00212
<a name="l00213"></a>00213
<a name="l00221"></a><a class="code" href="classCEGUI_1_1Listbox.html#ac482b699cf93aed09b7dd6fe130aabeb">00221</a> <span class="keywordtype">bool</span> <a class="code" href="classCEGUI_1_1Listbox.html#ac482b699cf93aed09b7dd6fe130aabeb" title="return whether list sorting is enabled">isSortEnabled</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> d_sorted;}
<a name="l00222"></a>00222
<a name="l00230"></a><a class="code" href="classCEGUI_1_1Listbox.html#a0bd0e1f4dbf1b445b9fb8d0290ef5b1e">00230</a> <span class="keywordtype">bool</span> <a class="code" href="classCEGUI_1_1Listbox.html#a0bd0e1f4dbf1b445b9fb8d0290ef5b1e" title="return whether multi-select is enabled">isMultiselectEnabled</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> d_multiselect;}
<a name="l00231"></a>00231
<a name="l00232"></a>00232 <span class="keywordtype">bool</span> isItemTooltipsEnabled(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> d_itemTooltips;}
<a name="l00233"></a>00233
<a name="l00246"></a>00246 <span class="keywordtype">bool</span> isItemSelected(<span class="keywordtype">size_t</span> index) <span class="keyword">const</span>;
<a name="l00247"></a>00247
<a name="l00248"></a>00248
<a name="l00266"></a>00266 ListboxItem* findItemWithText(<span class="keyword">const</span> String& text, <span class="keyword">const</span> ListboxItem* start_item);
<a name="l00267"></a>00267
<a name="l00268"></a>00268
<a name="l00276"></a>00276 <span class="keywordtype">bool</span> isListboxItemInList(<span class="keyword">const</span> ListboxItem* item) <span class="keyword">const</span>;
<a name="l00277"></a>00277
<a name="l00278"></a>00278
<a name="l00287"></a>00287 <span class="keywordtype">bool</span> isVertScrollbarAlwaysShown(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00288"></a>00288
<a name="l00289"></a>00289
<a name="l00298"></a>00298 <span class="keywordtype">bool</span> isHorzScrollbarAlwaysShown(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00299"></a>00299
<a name="l00300"></a>00300
<a name="l00301"></a>00301 <span class="comment">/*************************************************************************</span>
<a name="l00302"></a>00302 <span class="comment"> Manipulator Methods</span>
<a name="l00303"></a>00303 <span class="comment"> *************************************************************************/</span>
<a name="l00314"></a>00314 <span class="keyword">virtual</span> <span class="keywordtype">void</span> initialiseComponents(<span class="keywordtype">void</span>);
<a name="l00315"></a>00315
<a name="l00316"></a>00316
<a name="l00323"></a>00323 <span class="keywordtype">void</span> resetList(<span class="keywordtype">void</span>);
<a name="l00324"></a>00324
<a name="l00325"></a>00325
<a name="l00337"></a>00337 <span class="keywordtype">void</span> addItem(ListboxItem* item);
<a name="l00338"></a>00338
<a name="l00339"></a>00339
<a name="l00363"></a>00363 <span class="keywordtype">void</span> insertItem(ListboxItem* item, <span class="keyword">const</span> ListboxItem* position);
<a name="l00364"></a>00364
<a name="l00365"></a>00365
<a name="l00377"></a>00377 <span class="keywordtype">void</span> removeItem(<span class="keyword">const</span> ListboxItem* item);
<a name="l00378"></a>00378
<a name="l00379"></a>00379
<a name="l00387"></a>00387 <span class="keywordtype">void</span> clearAllSelections(<span class="keywordtype">void</span>);
<a name="l00388"></a>00388
<a name="l00389"></a>00389
<a name="l00400"></a>00400 <span class="keywordtype">void</span> setSortingEnabled(<span class="keywordtype">bool</span> setting);
<a name="l00401"></a>00401
<a name="l00402"></a>00402
<a name="l00414"></a>00414 <span class="keywordtype">void</span> setMultiselectEnabled(<span class="keywordtype">bool</span> setting);
<a name="l00415"></a>00415
<a name="l00416"></a>00416
<a name="l00428"></a>00428 <span class="keywordtype">void</span> setShowVertScrollbar(<span class="keywordtype">bool</span> setting);
<a name="l00429"></a>00429
<a name="l00430"></a>00430
<a name="l00442"></a>00442 <span class="keywordtype">void</span> setShowHorzScrollbar(<span class="keywordtype">bool</span> setting);
<a name="l00443"></a>00443
<a name="l00444"></a>00444 <span class="keywordtype">void</span> setItemTooltipsEnabled(<span class="keywordtype">bool</span> setting);
<a name="l00464"></a>00464 <span class="keywordtype">void</span> setItemSelectState(ListboxItem* item, <span class="keywordtype">bool</span> state);
<a name="l00465"></a>00465
<a name="l00466"></a>00466
<a name="l00486"></a>00486 <span class="keywordtype">void</span> setItemSelectState(<span class="keywordtype">size_t</span> item_index, <span class="keywordtype">bool</span> state);
<a name="l00487"></a>00487
<a name="l00488"></a>00488
<a name="l00501"></a>00501 <span class="keywordtype">void</span> handleUpdatedItemData(<span class="keywordtype">void</span>);
<a name="l00502"></a>00502
<a name="l00503"></a>00503
<a name="l00515"></a>00515 <span class="keywordtype">void</span> ensureItemIsVisible(<span class="keywordtype">size_t</span> item_index);
<a name="l00516"></a>00516
<a name="l00517"></a>00517
<a name="l00530"></a>00530 <span class="keywordtype">void</span> ensureItemIsVisible(<span class="keyword">const</span> ListboxItem* item);
<a name="l00531"></a>00531
<a name="l00532"></a>00532
<a name="l00542"></a>00542 <span class="keyword">virtual</span> Rect getListRenderArea(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00543"></a>00543
<a name="l00544"></a>00544
<a name="l00556"></a>00556 Scrollbar* getVertScrollbar() <span class="keyword">const</span>;
<a name="l00557"></a>00557
<a name="l00569"></a>00569 Scrollbar* getHorzScrollbar() <span class="keyword">const</span>;
<a name="l00570"></a>00570
<a name="l00571"></a>00571
<a name="l00576"></a>00576 <span class="keywordtype">float</span> getTotalItemsHeight(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00577"></a>00577
<a name="l00578"></a>00578
<a name="l00583"></a>00583 <span class="keywordtype">float</span> getWidestItemWidth(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00584"></a>00584
<a name="l00585"></a>00585
<a name="l00596"></a>00596 ListboxItem* getItemAtPoint(<span class="keyword">const</span> <a class="code" href="namespaceCEGUI.html#a3db0ff15d079794a57964b7b16ca5aa2" title="Point class.">Point</a>& pt) <span class="keyword">const</span>;
<a name="l00597"></a>00597
<a name="l00598"></a>00598
<a name="l00599"></a>00599 <span class="comment">/*************************************************************************</span>
<a name="l00600"></a>00600 <span class="comment"> Construction and Destruction</span>
<a name="l00601"></a>00601 <span class="comment"> *************************************************************************/</span>
<a name="l00606"></a>00606 Listbox(<span class="keyword">const</span> String& type, <span class="keyword">const</span> String& name);
<a name="l00607"></a>00607
<a name="l00608"></a>00608
<a name="l00613"></a>00613 <span class="keyword">virtual</span> ~Listbox(<span class="keywordtype">void</span>);
<a name="l00614"></a>00614
<a name="l00615"></a>00615
<a name="l00616"></a>00616 <span class="keyword">protected</span>:
<a name="l00617"></a>00617 <span class="comment">/*************************************************************************</span>
<a name="l00618"></a>00618 <span class="comment"> Abstract Implementation Functions (must be provided by derived class)</span>
<a name="l00619"></a>00619 <span class="comment"> *************************************************************************/</span>
<a name="l00629"></a>00629 <span class="comment">//virtual Rect getListRenderArea_impl(void) const = 0;</span>
<a name="l00630"></a>00630
<a name="l00631"></a>00631
<a name="l00632"></a>00632 <span class="comment">/*************************************************************************</span>
<a name="l00633"></a>00633 <span class="comment"> Implementation Functions</span>
<a name="l00634"></a>00634 <span class="comment"> *************************************************************************/</span>
<a name="l00639"></a>00639 <span class="keywordtype">void</span> configureScrollbars(<span class="keywordtype">void</span>);
<a name="l00640"></a>00640
<a name="l00646"></a>00646 <span class="keywordtype">void</span> selectRange(<span class="keywordtype">size_t</span> start, <span class="keywordtype">size_t</span> end);
<a name="l00647"></a>00647
<a name="l00648"></a>00648
<a name="l00656"></a>00656 <span class="keywordtype">bool</span> clearAllSelections_impl(<span class="keywordtype">void</span>);
<a name="l00657"></a>00657
<a name="l00658"></a>00658
<a name="l00670"></a>00670 <span class="keywordtype">bool</span> resetList_impl(<span class="keywordtype">void</span>);
<a name="l00671"></a>00671
<a name="l00672"></a>00672
<a name="l00683"></a><a class="code" href="classCEGUI_1_1Listbox.html#a0038b304b9174e6f39aae7189707d40d">00683</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> testClassName_impl(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a>& class_name)<span class="keyword"> const</span>
<a name="l00684"></a>00684 <span class="keyword"> </span>{
<a name="l00685"></a>00685 <span class="keywordflow">if</span> (class_name==<span class="stringliteral">"Listbox"</span>) <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00686"></a>00686 <span class="keywordflow">return</span> <a class="code" href="classCEGUI_1_1Window.html#a2b58cf00b4790c9cb08acfc18d5d3b0b" title="Return whether this window was inherited from the given class name at some point in the inheritance h...">Window::testClassName_impl</a>(class_name);
<a name="l00687"></a>00687 }
<a name="l00688"></a>00688
<a name="l00693"></a>00693 <span class="keywordtype">bool</span> handle_scrollChange(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1EventArgs.html" title="Base class used as the argument to all subscribers Event object.">EventArgs</a>& args);
<a name="l00694"></a>00694
<a name="l00695"></a>00695
<a name="l00696"></a>00696 <span class="comment">// validate window renderer</span>
<a name="l00697"></a><a class="code" href="classCEGUI_1_1Listbox.html#aa7c00b73d01592fc01b8a7fca9df4c56">00697</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> validateWindowRenderer(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a>& name)<span class="keyword"> const</span>
<a name="l00698"></a>00698 <span class="keyword"> </span>{
<a name="l00699"></a>00699 <span class="keywordflow">return</span> (name == <span class="stringliteral">"Listbox"</span>);
<a name="l00700"></a>00700 }
<a name="l00701"></a>00701
<a name="l00706"></a>00706 <span class="keywordtype">void</span> resortList();
<a name="l00707"></a>00707
<a name="l00708"></a>00708 <span class="comment">/*************************************************************************</span>
<a name="l00709"></a>00709 <span class="comment"> New event handlers</span>
<a name="l00710"></a>00710 <span class="comment"> *************************************************************************/</span>
<a name="l00715"></a>00715 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onListContentsChanged(<a class="code" href="classCEGUI_1_1WindowEventArgs.html" title="EventArgs based class that is used for objects passed to handlers triggered for events concerning som...">WindowEventArgs</a>& e);
<a name="l00716"></a>00716
<a name="l00717"></a>00717
<a name="l00722"></a>00722 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onSelectionChanged(<a class="code" href="classCEGUI_1_1WindowEventArgs.html" title="EventArgs based class that is used for objects passed to handlers triggered for events concerning som...">WindowEventArgs</a>& e);
<a name="l00723"></a>00723
<a name="l00724"></a>00724
<a name="l00729"></a>00729 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onSortModeChanged(<a class="code" href="classCEGUI_1_1WindowEventArgs.html" title="EventArgs based class that is used for objects passed to handlers triggered for events concerning som...">WindowEventArgs</a>& e);
<a name="l00730"></a>00730
<a name="l00731"></a>00731
<a name="l00736"></a>00736 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onMultiselectModeChanged(<a class="code" href="classCEGUI_1_1WindowEventArgs.html" title="EventArgs based class that is used for objects passed to handlers triggered for events concerning som...">WindowEventArgs</a>& e);
<a name="l00737"></a>00737
<a name="l00738"></a>00738
<a name="l00743"></a>00743 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onVertScrollbarModeChanged(<a class="code" href="classCEGUI_1_1WindowEventArgs.html" title="EventArgs based class that is used for objects passed to handlers triggered for events concerning som...">WindowEventArgs</a>& e);
<a name="l00744"></a>00744
<a name="l00745"></a>00745
<a name="l00750"></a>00750 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onHorzScrollbarModeChanged(<a class="code" href="classCEGUI_1_1WindowEventArgs.html" title="EventArgs based class that is used for objects passed to handlers triggered for events concerning som...">WindowEventArgs</a>& e);
<a name="l00751"></a>00751
<a name="l00752"></a>00752
<a name="l00753"></a>00753 <span class="comment">/*************************************************************************</span>
<a name="l00754"></a>00754 <span class="comment"> Overridden Event handlers</span>
<a name="l00755"></a>00755 <span class="comment"> *************************************************************************/</span>
<a name="l00756"></a>00756 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onSized(<a class="code" href="classCEGUI_1_1WindowEventArgs.html" title="EventArgs based class that is used for objects passed to handlers triggered for events concerning som...">WindowEventArgs</a>& e);
<a name="l00757"></a>00757 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onMouseButtonDown(<a class="code" href="classCEGUI_1_1MouseEventArgs.html" title="EventArgs based class that is used for objects passed to input event handlers concerning mouse input...">MouseEventArgs</a>& e);
<a name="l00758"></a>00758 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onMouseWheel(<a class="code" href="classCEGUI_1_1MouseEventArgs.html" title="EventArgs based class that is used for objects passed to input event handlers concerning mouse input...">MouseEventArgs</a>& e);
<a name="l00759"></a>00759 <span class="keyword">virtual</span> <span class="keywordtype">void</span> onMouseMove(<a class="code" href="classCEGUI_1_1MouseEventArgs.html" title="EventArgs based class that is used for objects passed to input event handlers concerning mouse input...">MouseEventArgs</a>& e);
<a name="l00760"></a>00760
<a name="l00761"></a>00761
<a name="l00762"></a>00762 <span class="comment">/*************************************************************************</span>
<a name="l00763"></a>00763 <span class="comment"> Implementation Data</span>
<a name="l00764"></a>00764 <span class="comment"> *************************************************************************/</span>
<a name="l00765"></a>00765 <span class="keyword">typedef</span> std::vector<ListboxItem*> LBItemList;
<a name="l00766"></a><a class="code" href="classCEGUI_1_1Listbox.html#ab1d30d4731096d131cb6de25e38df5b3">00766</a> <span class="keywordtype">bool</span> <a class="code" href="classCEGUI_1_1Listbox.html#ab1d30d4731096d131cb6de25e38df5b3" title="true if list is sorted">d_sorted</a>;
<a name="l00767"></a><a class="code" href="classCEGUI_1_1Listbox.html#ab3944cda62effe3149df982067650613">00767</a> <span class="keywordtype">bool</span> <a class="code" href="classCEGUI_1_1Listbox.html#ab3944cda62effe3149df982067650613" title="true if multi-select is enabled">d_multiselect</a>;
<a name="l00768"></a><a class="code" href="classCEGUI_1_1Listbox.html#af09c1a4cbcc69ad8fa87da93509d3630">00768</a> <span class="keywordtype">bool</span> <a class="code" href="classCEGUI_1_1Listbox.html#af09c1a4cbcc69ad8fa87da93509d3630" title="true if vertical scrollbar should always be displayed">d_forceVertScroll</a>;
<a name="l00769"></a><a class="code" href="classCEGUI_1_1Listbox.html#aadb6b273b2f99d26d1639dded99ede1a">00769</a> <span class="keywordtype">bool</span> <a class="code" href="classCEGUI_1_1Listbox.html#aadb6b273b2f99d26d1639dded99ede1a" title="true if horizontal scrollbar should always be displayed">d_forceHorzScroll</a>;
<a name="l00770"></a><a class="code" href="classCEGUI_1_1Listbox.html#a5f1a29ca109ffc4d72a38d74182fd087">00770</a> <span class="keywordtype">bool</span> <a class="code" href="classCEGUI_1_1Listbox.html#a5f1a29ca109ffc4d72a38d74182fd087" title="true if each item should have an individual tooltip">d_itemTooltips</a>;
<a name="l00771"></a><a class="code" href="classCEGUI_1_1Listbox.html#a32c2142ea7b23c22f765b0bd48569981">00771</a> LBItemList <a class="code" href="classCEGUI_1_1Listbox.html#a32c2142ea7b23c22f765b0bd48569981" title="list of items in the list box.">d_listItems</a>;
<a name="l00772"></a><a class="code" href="classCEGUI_1_1Listbox.html#abb45ab75c5f301f61d0d45128c2d6e98">00772</a> <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* <a class="code" href="classCEGUI_1_1Listbox.html#abb45ab75c5f301f61d0d45128c2d6e98" title="holds pointer to the last selected item (used in range selections)">d_lastSelected</a>;
<a name="l00773"></a>00773
<a name="l00774"></a>00774 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classCEGUI_1_1ListboxWindowRenderer.html" title="Base class for Listbox window renderer.">ListboxWindowRenderer</a>;
<a name="l00775"></a>00775
<a name="l00776"></a>00776 <span class="keyword">private</span>:
<a name="l00777"></a>00777 <span class="comment">/*************************************************************************</span>
<a name="l00778"></a>00778 <span class="comment"> Static Properties for this class</span>
<a name="l00779"></a>00779 <span class="comment"> *************************************************************************/</span>
<a name="l00780"></a>00780 <span class="keyword">static</span> <a class="code" href="classCEGUI_1_1ListboxProperties_1_1Sort.html" title="Property to access the sort setting of the list box.">ListboxProperties::Sort</a> d_sortProperty;
<a name="l00781"></a>00781 <span class="keyword">static</span> <a class="code" href="classCEGUI_1_1ListboxProperties_1_1MultiSelect.html" title="Property to access the multi-select setting of the list box.">ListboxProperties::MultiSelect</a> d_multiSelectProperty;
<a name="l00782"></a>00782 <span class="keyword">static</span> <a class="code" href="classCEGUI_1_1ListboxProperties_1_1ForceVertScrollbar.html" title="Property to access the 'always show' setting for the vertical scroll bar of the list box...">ListboxProperties::ForceVertScrollbar</a> d_forceVertProperty;
<a name="l00783"></a>00783 <span class="keyword">static</span> <a class="code" href="classCEGUI_1_1ListboxProperties_1_1ForceHorzScrollbar.html" title="Property to access the 'always show' setting for the horizontal scroll bar of the list box...">ListboxProperties::ForceHorzScrollbar</a> d_forceHorzProperty;
<a name="l00784"></a>00784 <span class="keyword">static</span> <a class="code" href="classCEGUI_1_1ListboxProperties_1_1ItemTooltips.html" title="Property to access the show item tooltips setting of the list box.">ListboxProperties::ItemTooltips</a> d_itemTooltipsProperty;
<a name="l00785"></a>00785
<a name="l00786"></a>00786 <span class="comment">/*************************************************************************</span>
<a name="l00787"></a>00787 <span class="comment"> Private methods</span>
<a name="l00788"></a>00788 <span class="comment"> *************************************************************************/</span>
<a name="l00789"></a>00789 <span class="keywordtype">void</span> addListboxProperties(<span class="keywordtype">void</span>);
<a name="l00790"></a>00790 };
<a name="l00791"></a>00791
<a name="l00792"></a>00792
<a name="l00798"></a>00798 <span class="keywordtype">bool</span> <a class="code" href="namespaceCEGUI.html#a3e4cb7396cb57fe20d144c71904eabdf" title="Helper function used in sorting to compare two list box item text strings via the ListboxItem pointer...">lbi_less</a>(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* a, <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* b);
<a name="l00799"></a>00799
<a name="l00800"></a>00800
<a name="l00806"></a>00806 <span class="keywordtype">bool</span> <a class="code" href="namespaceCEGUI.html#abde78fdeb4c15d8a136cc2f72d1d8f11" title="Helper function used in sorting to compare two list box item text strings via the ListboxItem pointer...">lbi_greater</a>(<span class="keyword">const</span> <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* a, <span class="keyword">const</span> <a class="code" href="classCEGUI_1_1ListboxItem.html" title="Base class for list box items.">ListboxItem</a>* b);
<a name="l00807"></a>00807
<a name="l00808"></a>00808 } <span class="comment">// End of CEGUI namespace section</span>
<a name="l00809"></a>00809
<a name="l00810"></a>00810
<a name="l00811"></a>00811 <span class="preprocessor">#if defined(_MSC_VER)</span>
<a name="l00812"></a>00812 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(pop)</span>
<a name="l00813"></a>00813 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00814"></a>00814 <span class="preprocessor"></span>
<a name="l00815"></a>00815 <span class="preprocessor">#endif // end of guard _CEGUIListbox_h_</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Jan 22 2012 16:07:39 for Crazy Eddies GUI System by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
|