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 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601
|
<!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: wxVarScrollHelperBase 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="#pro-methods">Protected Member Functions</a> |
<a href="classwx_var_scroll_helper_base-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">wxVarScrollHelperBase Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__group__class__miscwnd.html">Miscellaneous Windows</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <wx/vscroll.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 wxVarScrollHelperBase:</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_var_scroll_helper_base__inherit__graph.png" border="0" usemap="#wx_var_scroll_helper_base_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_var_scroll_helper_base_inherit__map" id="wx_var_scroll_helper_base_inherit__map">
<area shape="rect" id="node3" href="classwx_var_h_scroll_helper.html" title="This class provides functions wrapping the wxVarScrollHelperBase class, targeted for horizontal-speci..." alt="" coords="93,83,227,111"/><area shape="rect" id="node11" href="classwx_var_v_scroll_helper.html" title="This class provides functions wrapping the wxVarScrollHelperBase class, targeted for vertical-specifi..." alt="" coords="251,83,384,111"/><area shape="rect" id="node5" href="classwx_h_scrolled_window.html" title="In the name of this class, "H" stands for "horizontal" because it can be used for scrolling columns o..." alt="" coords="5,161,144,189"/><area shape="rect" id="node7" href="classwx_var_h_v_scroll_helper.html" title="This class provides functions wrapping the wxVarHScrollHelper and wxVarVScrollHelper classes..." alt="" coords="168,161,309,189"/><area shape="rect" id="node9" href="classwx_h_v_scrolled_window.html" title="This window inherits all functionality of both vertical and horizontal, variable scrolled windows..." alt="" coords="165,238,312,266"/><area shape="rect" id="node14" href="classwx_v_scrolled_window.html" title="In the name of this class, "V" may stand for "variable" because it can be used for scrolling rows of ..." alt="" coords="333,161,469,189"/><area shape="rect" id="node16" href="classwx_v_list_box.html" title="wxVListBox is a wxListBox-like control with the following two main differences from a regular wxListB..." alt="" coords="359,238,444,266"/><area shape="rect" id="node18" href="classwx_html_list_box.html" title="wxHtmlListBox is an implementation of wxVListBox which shows HTML content in the listbox rows..." alt="" coords="348,315,455,343"/><area shape="rect" id="node20" href="classwx_rich_text_style_list_box.html" title="This is a listbox that can display the styles in a wxRichTextStyleSheet, and apply the selection to a..." alt="" coords="235,393,392,421"/><area shape="rect" id="node22" href="classwx_simple_html_list_box.html" title="wxSimpleHtmlListBox is an implementation of wxHtmlListBox which shows HTML content in the listbox row..." alt="" coords="416,393,563,421"/></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>This class provides all common base functionality for scroll calculations shared among all variable scrolled window implementations as well as automatic scrollbar functionality, saved scroll positions, controlling target windows to be scrolled, as well as defining all required virtual functions that need to be implemented for any orientation specific work. </p>
<p>Documentation of this class is provided specifically for referencing use of the functions provided by this class for use with the variable scrolled windows that derive from here. You will likely want to derive your window from one of the already implemented variable scrolled windows rather than from <a class="el" href="classwx_var_scroll_helper_base.html" title="This class provides all common base functionality for scroll calculations shared among all variable s...">wxVarScrollHelperBase</a> directly.</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__miscwnd.html">Miscellaneous Windows</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_h_scrolled_window.html" title="In the name of this class, "H" stands for "horizontal" because it can be used for scrolling columns o...">wxHScrolledWindow</a>, <a class="el" href="classwx_h_v_scrolled_window.html" title="This window inherits all functionality of both vertical and horizontal, variable scrolled windows...">wxHVScrolledWindow</a>, <a class="el" href="classwx_v_scrolled_window.html" title="In the name of this class, "V" may stand for "variable" because it can be used for scrolling rows of ...">wxVScrolledWindow</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:a51c4f935ffef35e38d800b5fb1aea20b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a51c4f935ffef35e38d800b5fb1aea20b">wxVarScrollHelperBase</a> (<a class="el" href="classwx_window.html">wxWindow</a> *winToScroll)</td></tr>
<tr class="memdesc:a51c4f935ffef35e38d800b5fb1aea20b"><td class="mdescLeft"> </td><td class="mdescRight">Constructor taking the target window to be scrolled by this helper class. <a href="#a51c4f935ffef35e38d800b5fb1aea20b"></a><br/></td></tr>
<tr class="separator:a51c4f935ffef35e38d800b5fb1aea20b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1d98424cb2af1db02e326c5c7065c12d"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a1d98424cb2af1db02e326c5c7065c12d">~wxVarScrollHelperBase</a> ()</td></tr>
<tr class="memdesc:a1d98424cb2af1db02e326c5c7065c12d"><td class="mdescLeft"> </td><td class="mdescRight">Virtual destructor for detaching scroll event handlers attached with this helper class. <a href="#a1d98424cb2af1db02e326c5c7065c12d"></a><br/></td></tr>
<tr class="separator:a1d98424cb2af1db02e326c5c7065c12d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed909bbbec82269f2c53dad5e7da8ed7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#aed909bbbec82269f2c53dad5e7da8ed7">CalcScrolledPosition</a> (int coord) const </td></tr>
<tr class="memdesc:aed909bbbec82269f2c53dad5e7da8ed7"><td class="mdescLeft"> </td><td class="mdescRight">Translates the logical coordinate given to the current device coordinate. <a href="#aed909bbbec82269f2c53dad5e7da8ed7"></a><br/></td></tr>
<tr class="separator:aed909bbbec82269f2c53dad5e7da8ed7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8b2142bd630ec007036d2d826fa25b4a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a8b2142bd630ec007036d2d826fa25b4a">CalcUnscrolledPosition</a> (int coord) const </td></tr>
<tr class="memdesc:a8b2142bd630ec007036d2d826fa25b4a"><td class="mdescLeft"> </td><td class="mdescRight">Translates the device coordinate given to the corresponding logical coordinate. <a href="#a8b2142bd630ec007036d2d826fa25b4a"></a><br/></td></tr>
<tr class="separator:a8b2142bd630ec007036d2d826fa25b4a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acdcec3046de7670eb2d448463a011b81"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#acdcec3046de7670eb2d448463a011b81">EnablePhysicalScrolling</a> (bool scrolling=true)</td></tr>
<tr class="memdesc:acdcec3046de7670eb2d448463a011b81"><td class="mdescLeft"> </td><td class="mdescRight">With physical scrolling on (when this is <span class="literal">true</span>), the device origin is changed properly when a <a class="el" href="classwx_paint_d_c.html" title="A wxPaintDC must be constructed if an application wishes to paint on the client area of a window from...">wxPaintDC</a> is prepared, children are actually moved and laid out properly, and the contents of the window (pixels) are actually moved. <a href="#acdcec3046de7670eb2d448463a011b81"></a><br/></td></tr>
<tr class="separator:acdcec3046de7670eb2d448463a011b81"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5b9316fbade3450efdc359ac049a7839"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a5b9316fbade3450efdc359ac049a7839">GetNonOrientationTargetSize</a> () const =0</td></tr>
<tr class="memdesc:a5b9316fbade3450efdc359ac049a7839"><td class="mdescLeft"> </td><td class="mdescRight">This function needs to be overridden in the in the derived class to return the window size with respect to the opposing orientation. <a href="#a5b9316fbade3450efdc359ac049a7839"></a><br/></td></tr>
<tr class="separator:a5b9316fbade3450efdc359ac049a7839"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:addff4d4e4e099adac7abfe56fbb50682"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="defs_8h.html#a1e6994f40bd9cb140e292afb165af971">wxOrientation</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#addff4d4e4e099adac7abfe56fbb50682">GetOrientation</a> () const =0</td></tr>
<tr class="memdesc:addff4d4e4e099adac7abfe56fbb50682"><td class="mdescLeft"> </td><td class="mdescRight">This function need to be overridden to return the orientation that this helper is working with, either <code>wxHORIZONTAL</code> or <code>wxVERTICAL</code>. <a href="#addff4d4e4e099adac7abfe56fbb50682"></a><br/></td></tr>
<tr class="separator:addff4d4e4e099adac7abfe56fbb50682"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5d195a4216200894fc3e843c01ec4e54"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a5d195a4216200894fc3e843c01ec4e54">GetOrientationTargetSize</a> () const =0</td></tr>
<tr class="memdesc:a5d195a4216200894fc3e843c01ec4e54"><td class="mdescLeft"> </td><td class="mdescRight">This function needs to be overridden in the in the derived class to return the window size with respect to the orientation this helper is working with. <a href="#a5d195a4216200894fc3e843c01ec4e54"></a><br/></td></tr>
<tr class="separator:a5d195a4216200894fc3e843c01ec4e54"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afcd2d4890fcc4ea1128e67dc2faf4c2c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_window.html">wxWindow</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#afcd2d4890fcc4ea1128e67dc2faf4c2c">GetTargetWindow</a> () const </td></tr>
<tr class="memdesc:afcd2d4890fcc4ea1128e67dc2faf4c2c"><td class="mdescLeft"> </td><td class="mdescRight">This function will return the target window this helper class is currently scrolling. <a href="#afcd2d4890fcc4ea1128e67dc2faf4c2c"></a><br/></td></tr>
<tr class="separator:afcd2d4890fcc4ea1128e67dc2faf4c2c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3a95eda4e88e6444e33a37b8bb0fcd91"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a3a95eda4e88e6444e33a37b8bb0fcd91">GetVisibleBegin</a> () const </td></tr>
<tr class="memdesc:a3a95eda4e88e6444e33a37b8bb0fcd91"><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the first visible unit based on the scroll position. <a href="#a3a95eda4e88e6444e33a37b8bb0fcd91"></a><br/></td></tr>
<tr class="separator:a3a95eda4e88e6444e33a37b8bb0fcd91"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaa6b3959f6dbf90329c1c98a64735334"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#aaa6b3959f6dbf90329c1c98a64735334">GetVisibleEnd</a> () const </td></tr>
<tr class="memdesc:aaa6b3959f6dbf90329c1c98a64735334"><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the last visible unit based on the scroll position. <a href="#aaa6b3959f6dbf90329c1c98a64735334"></a><br/></td></tr>
<tr class="separator:aaa6b3959f6dbf90329c1c98a64735334"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeb032c41e1436c630b9fadf3c198c91d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#aeb032c41e1436c630b9fadf3c198c91d">IsVisible</a> (size_t unit) const </td></tr>
<tr class="memdesc:aeb032c41e1436c630b9fadf3c198c91d"><td class="mdescLeft"> </td><td class="mdescRight">Returns <span class="literal">true</span> if the given scroll unit is currently visible (even if only partially visible) or <span class="literal">false</span> otherwise. <a href="#aeb032c41e1436c630b9fadf3c198c91d"></a><br/></td></tr>
<tr class="separator:aeb032c41e1436c630b9fadf3c198c91d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeae3e1b16c52dc5227b439cb6ffacf59"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#aeae3e1b16c52dc5227b439cb6ffacf59">RefreshAll</a> ()</td></tr>
<tr class="memdesc:aeae3e1b16c52dc5227b439cb6ffacf59"><td class="mdescLeft"> </td><td class="mdescRight">Recalculate all parameters and repaint all units. <a href="#aeae3e1b16c52dc5227b439cb6ffacf59"></a><br/></td></tr>
<tr class="separator:aeae3e1b16c52dc5227b439cb6ffacf59"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af79bfa4aac18be344d5dbcf7932cf1f7"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#af79bfa4aac18be344d5dbcf7932cf1f7">SetTargetWindow</a> (<a class="el" href="classwx_window.html">wxWindow</a> *target)</td></tr>
<tr class="memdesc:af79bfa4aac18be344d5dbcf7932cf1f7"><td class="mdescLeft"> </td><td class="mdescRight">Normally the window will scroll itself, but in some rare occasions you might want it to scroll (part of) another window (e.g. <a href="#af79bfa4aac18be344d5dbcf7932cf1f7"></a><br/></td></tr>
<tr class="separator:af79bfa4aac18be344d5dbcf7932cf1f7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0b05466ede3d27fa28daf2f62ae2ecb9"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a0b05466ede3d27fa28daf2f62ae2ecb9">UpdateScrollbar</a> ()</td></tr>
<tr class="memdesc:a0b05466ede3d27fa28daf2f62ae2ecb9"><td class="mdescLeft"> </td><td class="mdescRight">Update the thumb size shown by the scrollbar. <a href="#a0b05466ede3d27fa28daf2f62ae2ecb9"></a><br/></td></tr>
<tr class="separator:a0b05466ede3d27fa28daf2f62ae2ecb9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab17ffa8dd9790d7ffc789ea080816518"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#ab17ffa8dd9790d7ffc789ea080816518">VirtualHitTest</a> (<a class="el" href="defs_8h.html#a11f6efc0e8d8d680f3ec8e82aa4f1770">wxCoord</a> coord) const </td></tr>
<tr class="memdesc:ab17ffa8dd9790d7ffc789ea080816518"><td class="mdescLeft"> </td><td class="mdescRight">Returns the virtual scroll unit under the device unit given accounting for scroll position or <code>wxNOT_FOUND</code> if none (i.e. <a href="#ab17ffa8dd9790d7ffc789ea080816518"></a><br/></td></tr>
<tr class="separator:ab17ffa8dd9790d7ffc789ea080816518"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a03bf97869b5668218ecc0a1dbe6a77af"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a03bf97869b5668218ecc0a1dbe6a77af">OnGetUnitsSizeHint</a> (size_t unitMin, size_t unitMax) const </td></tr>
<tr class="memdesc:a03bf97869b5668218ecc0a1dbe6a77af"><td class="mdescLeft"> </td><td class="mdescRight">This function doesn't have to be overridden but it may be useful to do so if calculating the units' sizes is a relatively expensive operation as it gives your code a chance to calculate several of them at once and cache the result if necessary. <a href="#a03bf97869b5668218ecc0a1dbe6a77af"></a><br/></td></tr>
<tr class="separator:a03bf97869b5668218ecc0a1dbe6a77af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a050ecc5ed309e58f2e47563546a09d2c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="defs_8h.html#a11f6efc0e8d8d680f3ec8e82aa4f1770">wxCoord</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a050ecc5ed309e58f2e47563546a09d2c">EstimateTotalSize</a> () const </td></tr>
<tr class="memdesc:a050ecc5ed309e58f2e47563546a09d2c"><td class="mdescLeft"> </td><td class="mdescRight">When the number of scroll units change, we try to estimate the total size of all units when the full window size is needed (i.e. <a href="#a050ecc5ed309e58f2e47563546a09d2c"></a><br/></td></tr>
<tr class="separator:a050ecc5ed309e58f2e47563546a09d2c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f31e727d5db972c2227790eb9174034"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="defs_8h.html#a11f6efc0e8d8d680f3ec8e82aa4f1770">wxCoord</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_var_scroll_helper_base.html#a1f31e727d5db972c2227790eb9174034">OnGetUnitSize</a> (size_t unit) const =0</td></tr>
<tr class="memdesc:a1f31e727d5db972c2227790eb9174034"><td class="mdescLeft"> </td><td class="mdescRight">This function must be overridden in the derived class, and should return the size of the given unit in pixels. <a href="#a1f31e727d5db972c2227790eb9174034"></a><br/></td></tr>
<tr class="separator:a1f31e727d5db972c2227790eb9174034"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a51c4f935ffef35e38d800b5fb1aea20b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxVarScrollHelperBase::wxVarScrollHelperBase </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> * </td>
<td class="paramname"><em>winToScroll</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor taking the target window to be scrolled by this helper class. </p>
<p>This will attach scroll event handlers to the target window to catch and handle scroll events appropriately. </p>
</div>
</div>
<a class="anchor" id="a1d98424cb2af1db02e326c5c7065c12d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual wxVarScrollHelperBase::~wxVarScrollHelperBase </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Virtual destructor for detaching scroll event handlers attached with this helper class. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aed909bbbec82269f2c53dad5e7da8ed7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wxVarScrollHelperBase::CalcScrolledPosition </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>coord</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Translates the logical coordinate given to the current device coordinate. </p>
<p>For example, if the window is scrolled 10 units and each scroll unit represents 10 device units (which may not be the case since this class allows for variable scroll unit sizes), a call to this function with a coordinate of 15 will return -85.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_var_scroll_helper_base.html#a8b2142bd630ec007036d2d826fa25b4a" title="Translates the device coordinate given to the corresponding logical coordinate.">CalcUnscrolledPosition()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a8b2142bd630ec007036d2d826fa25b4a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wxVarScrollHelperBase::CalcUnscrolledPosition </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>coord</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Translates the device coordinate given to the corresponding logical coordinate. </p>
<p>For example, if the window is scrolled 10 units and each scroll unit represents 10 device units (which may not be the case since this class allows for variable scroll unit sizes), a call to this function with a coordinate of 15 will return 115.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_var_scroll_helper_base.html#aed909bbbec82269f2c53dad5e7da8ed7" title="Translates the logical coordinate given to the current device coordinate.">CalcScrolledPosition()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="acdcec3046de7670eb2d448463a011b81"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxVarScrollHelperBase::EnablePhysicalScrolling </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>scrolling</em> = <code>true</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>With physical scrolling on (when this is <span class="literal">true</span>), the device origin is changed properly when a <a class="el" href="classwx_paint_d_c.html" title="A wxPaintDC must be constructed if an application wishes to paint on the client area of a window from...">wxPaintDC</a> is prepared, children are actually moved and laid out properly, and the contents of the window (pixels) are actually moved. </p>
<p>When this is <span class="literal">false</span>, you are responsible for repainting any invalidated areas of the window yourself to account for the new scroll position. </p>
</div>
</div>
<a class="anchor" id="a050ecc5ed309e58f2e47563546a09d2c"></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="defs_8h.html#a11f6efc0e8d8d680f3ec8e82aa4f1770">wxCoord</a> wxVarScrollHelperBase::EstimateTotalSize </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">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>When the number of scroll units change, we try to estimate the total size of all units when the full window size is needed (i.e. </p>
<p>to calculate the scrollbar thumb size). This is a rather expensive operation in terms of unit access, so if the user code may estimate the average size better or faster than we do, it should override this function to implement its own logic. This function should return the best guess for the total virtual window size.</p>
<dl class="section note"><dt>Note</dt><dd>Although returning a totally wrong value would still work, it risks resulting in very strange scrollbar behaviour so this function should really try to make the best guess possible. </dd></dl>
</div>
</div>
<a class="anchor" id="a5b9316fbade3450efdc359ac049a7839"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int wxVarScrollHelperBase::GetNonOrientationTargetSize </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>This function needs to be overridden in the in the derived class to return the window size with respect to the opposing orientation. </p>
<p>If this is a vertical scrolled window, it should return the height.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_var_scroll_helper_base.html#a5d195a4216200894fc3e843c01ec4e54" title="This function needs to be overridden in the in the derived class to return the window size with respe...">GetOrientationTargetSize()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="addff4d4e4e099adac7abfe56fbb50682"></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="defs_8h.html#a1e6994f40bd9cb140e292afb165af971">wxOrientation</a> wxVarScrollHelperBase::GetOrientation </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>This function need to be overridden to return the orientation that this helper is working with, either <code>wxHORIZONTAL</code> or <code>wxVERTICAL</code>. </p>
</div>
</div>
<a class="anchor" id="a5d195a4216200894fc3e843c01ec4e54"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int wxVarScrollHelperBase::GetOrientationTargetSize </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>This function needs to be overridden in the in the derived class to return the window size with respect to the orientation this helper is working with. </p>
<p>If this is a vertical scrolled window, it should return the width.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_var_scroll_helper_base.html#a5b9316fbade3450efdc359ac049a7839" title="This function needs to be overridden in the in the derived class to return the window size with respe...">GetNonOrientationTargetSize()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="afcd2d4890fcc4ea1128e67dc2faf4c2c"></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_window.html">wxWindow</a>* wxVarScrollHelperBase::GetTargetWindow </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>This function will return the target window this helper class is currently scrolling. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_var_scroll_helper_base.html#af79bfa4aac18be344d5dbcf7932cf1f7" title="Normally the window will scroll itself, but in some rare occasions you might want it to scroll (part ...">SetTargetWindow()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a3a95eda4e88e6444e33a37b8bb0fcd91"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t wxVarScrollHelperBase::GetVisibleBegin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the index of the first visible unit based on the scroll position. </p>
</div>
</div>
<a class="anchor" id="aaa6b3959f6dbf90329c1c98a64735334"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t wxVarScrollHelperBase::GetVisibleEnd </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the index of the last visible unit based on the scroll position. </p>
<p>This includes the last unit even if it is only partially visible. </p>
</div>
</div>
<a class="anchor" id="aeb032c41e1436c630b9fadf3c198c91d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxVarScrollHelperBase::IsVisible </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>unit</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <span class="literal">true</span> if the given scroll unit is currently visible (even if only partially visible) or <span class="literal">false</span> otherwise. </p>
</div>
</div>
<a class="anchor" id="a1f31e727d5db972c2227790eb9174034"></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="defs_8h.html#a11f6efc0e8d8d680f3ec8e82aa4f1770">wxCoord</a> wxVarScrollHelperBase::OnGetUnitSize </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>unit</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This function must be overridden in the derived class, and should return the size of the given unit in pixels. </p>
</div>
</div>
<a class="anchor" id="a03bf97869b5668218ecc0a1dbe6a77af"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void wxVarScrollHelperBase::OnGetUnitsSizeHint </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>unitMin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>unitMax</em> </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">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This function doesn't have to be overridden but it may be useful to do so if calculating the units' sizes is a relatively expensive operation as it gives your code a chance to calculate several of them at once and cache the result if necessary. </p>
<p><a class="el" href="classwx_var_scroll_helper_base.html#a03bf97869b5668218ecc0a1dbe6a77af" title="This function doesn't have to be overridden but it may be useful to do so if calculating the units' s...">OnGetUnitsSizeHint()</a> is normally called just before <a class="el" href="classwx_var_scroll_helper_base.html#a1f31e727d5db972c2227790eb9174034" title="This function must be overridden in the derived class, and should return the size of the given unit i...">OnGetUnitSize()</a> but you shouldn't rely on the latter being called for all units in the interval specified here. It is also possible that <a class="el" href="classwx_var_scroll_helper_base.html#a1f31e727d5db972c2227790eb9174034" title="This function must be overridden in the derived class, and should return the size of the given unit i...">OnGetUnitSize()</a> will be called for units outside of this interval, so this is really just a hint, not a promise.</p>
<p>Finally, note that <em>unitMin</em> is inclusive, while <em>unitMax</em> is exclusive. </p>
</div>
</div>
<a class="anchor" id="aeae3e1b16c52dc5227b439cb6ffacf59"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void wxVarScrollHelperBase::RefreshAll </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Recalculate all parameters and repaint all units. </p>
</div>
</div>
<a class="anchor" id="af79bfa4aac18be344d5dbcf7932cf1f7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void wxVarScrollHelperBase::SetTargetWindow </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> * </td>
<td class="paramname"><em>target</em></td><td>)</td>
<td></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>Normally the window will scroll itself, but in some rare occasions you might want it to scroll (part of) another window (e.g. </p>
<p>a child of it in order to scroll only a portion the area between the scrollbars like a spreadsheet where only the cell area will move).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_var_scroll_helper_base.html#afcd2d4890fcc4ea1128e67dc2faf4c2c" title="This function will return the target window this helper class is currently scrolling.">GetTargetWindow()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a0b05466ede3d27fa28daf2f62ae2ecb9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void wxVarScrollHelperBase::UpdateScrollbar </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Update the thumb size shown by the scrollbar. </p>
</div>
</div>
<a class="anchor" id="ab17ffa8dd9790d7ffc789ea080816518"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wxVarScrollHelperBase::VirtualHitTest </td>
<td>(</td>
<td class="paramtype"><a class="el" href="defs_8h.html#a11f6efc0e8d8d680f3ec8e82aa4f1770">wxCoord</a> </td>
<td class="paramname"><em>coord</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the virtual scroll unit under the device unit given accounting for scroll position or <code>wxNOT_FOUND</code> if none (i.e. </p>
<p>if it is below the last item). </p>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:47:02 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>
|