File: classwx_scrolled.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (1345 lines) | stat: -rw-r--r-- 97,346 bytes parent folder | download | duplicates (2)
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
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
<!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: wxScrolled&lt; T &gt; Class Template 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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classwx_scrolled-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxScrolled&lt; T &gt; Class Template Reference<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 &lt;wx/scrolwin.h&gt;</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 wxScrolled&lt; T &gt;:</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_scrolled__inherit__graph.png" border="0" usemap="#wx_scrolled_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_scrolled_3_01_t_01_4_inherit__map" id="wx_scrolled_3_01_t_01_4_inherit__map">
<area shape="rect" id="node5" href="classwx_grid.html" title="wxGrid and its related classes are used for displaying and editing tabular data." alt="" coords="5,161,136,189"/><area shape="rect" id="node7" href="classwx_html_window.html" title="wxHtmlWindow is probably the only class you will directly use unless you want to do something special..." alt="" coords="160,161,339,189"/><area shape="rect" id="node9" href="classwx_preview_canvas.html" title="A preview canvas is the default canvas used by the print preview system to display the preview..." alt="" coords="363,161,557,189"/></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"><h3>template&lt;class T&gt;<br/>
class wxScrolled&lt; T &gt;</h3>

<p>The <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> class manages scrolling for its client area, transforming the coordinates according to the scrollbar positions, and setting the scroll positions, thumb sizes and ranges according to the area in view. </p>
<p>There are two commonly used (but not the only possible!) specializations of this class:</p>
<ul>
<li><a class="el" href="group__group__class__miscwnd.html#ga695bec5996cd4d5512d1a01cfdcf96a5" title="Scrolled window derived from wxPanel.">wxScrolledWindow</a>, aka wxScrolled&lt;wxPanel&gt;, is equivalent to <a class="el" href="group__group__class__miscwnd.html#ga695bec5996cd4d5512d1a01cfdcf96a5" title="Scrolled window derived from wxPanel.">wxScrolledWindow</a> from earlier versions. Derived from <a class="el" href="classwx_panel.html" title="A panel is a window on which controls are placed.">wxPanel</a>, it shares <a class="el" href="classwx_panel.html" title="A panel is a window on which controls are placed.">wxPanel</a>'s behaviour with regard to TAB traversal and focus handling. Use this if the scrolled window will have child controls.</li>
</ul>
<ul>
<li><a class="el" href="group__group__class__miscwnd.html#ga6b205af0f8759231eab11f15f7d4a098" title="Alias for wxScrolled&lt;wxWindow&gt;.">wxScrolledCanvas</a>, aka wxScrolled&lt;wxWindow&gt;, derives from <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> and so doesn't handle children specially. This is suitable e.g. for implementing scrollable controls such as tree or list controls.</li>
</ul>
<p>Starting from version 2.4 of wxWidgets, there are several ways to use a <a class="el" href="group__group__class__miscwnd.html#ga695bec5996cd4d5512d1a01cfdcf96a5" title="Scrolled window derived from wxPanel.">wxScrolledWindow</a> (and now <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a>). In particular, there are three ways to set the size of the scrolling area:</p>
<p>One way is to set the scrollbars directly using a call to <a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>. This is the way it used to be in any previous version of wxWidgets and it will be kept for backwards compatibility.</p>
<p>An additional method of manual control, which requires a little less computation of your own, is to set the total size of the scrolling area by calling either <a class="el" href="classwx_window.html#a37f293b7904bc6668b86cccb0aea5669" title="Sets the virtual size of the window in pixels.">wxWindow::SetVirtualSize()</a>, or <a class="el" href="classwx_window.html#a55aca401aab29d59f7cc53f89ba2e38d" title="Similar to Fit(), but sizes the interior (virtual) size of a window.">wxWindow::FitInside()</a>, and setting the scrolling increments for it by calling <a class="el" href="classwx_scrolled.html#a76286e2efa55d0ba85d37106a44a9401" title="Set the horizontal and vertical scrolling increment only.">SetScrollRate()</a>. Scrolling in some orientation is enabled by setting a non-zero increment for it.</p>
<p>The most automatic and newest way is to simply let sizers determine the scrolling area. This is now the default when you set an interior sizer into a <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> with <a class="el" href="classwx_window.html#abc95691b45e29a52c24aa9d33d46dec1" title="Sets the window to have the given layout sizer.">wxWindow::SetSizer()</a>. The scrolling area will be set to the size requested by the sizer and the scrollbars will be assigned for each orientation according to the need for them and the scrolling increment set by <a class="el" href="classwx_scrolled.html#a76286e2efa55d0ba85d37106a44a9401" title="Set the horizontal and vertical scrolling increment only.">SetScrollRate()</a>. As above, scrolling is only enabled in orientations with a non-zero increment. You can influence the minimum size of the scrolled area controlled by a sizer by calling wxWindow::SetVirtualSizeHints(). (Calling <a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a> has analogous effects in wxWidgets 2.4 &ndash; in later versions it may not continue to override the sizer.)</p>
<p>Note that if maximum size hints are still supported by wxWindow::SetVirtualSizeHints(), use them at your own dire risk. They may or may not have been removed for 2.4, but it really only makes sense to set minimum size hints here. We should probably replace wxWindow::SetVirtualSizeHints() with wxWindow::SetMinVirtualSize() or similar and remove it entirely in future.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000044">Todo:</a></b></dt><dd>review docs for this class replacing SetVirtualSizeHints() with SetMinClientSize().</dd></dl>
<p>As with all windows, an application can draw onto a <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> using a <a class="el" href="overview_dc.html">device context</a>.</p>
<p>You have the option of handling the OnPaint handler or overriding the <a class="el" href="classwx_scrolled.html#a52284d06a6160fb42b0899aedce2c880" title="Called by the default paint event handler to allow the application to define painting behaviour witho...">wxScrolled::OnDraw()</a> function, which is passed a pre-scrolled device context (prepared by <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">wxScrolled::DoPrepareDC()</a>).</p>
<p>If you don't wish to calculate your own scrolling, you must call <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> when not drawing from within <a class="el" href="classwx_scrolled.html#a52284d06a6160fb42b0899aedce2c880" title="Called by the default paint event handler to allow the application to define painting behaviour witho...">OnDraw()</a>, to set the device origin for the device context according to the current scroll position.</p>
<p>A <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> will normally scroll itself and therefore its child windows as well. It might however be desired to scroll a different window than itself: e.g. when designing a spreadsheet, you will normally only have to scroll the (usually white) cell area, whereas the (usually grey) label area will scroll very differently. For this special purpose, you can call <a class="el" href="classwx_scrolled.html#a117dc8edabb3e1250199eab089e4fa5b" title="Call this function to tell wxScrolled to perform the actual scrolling on a different window (and not ...">SetTargetWindow()</a> which means that pressing the scrollbars will scroll a different window.</p>
<p>Note that the underlying system knows nothing about scrolling coordinates, so that all system functions (mouse events, expose events, refresh calls etc) as well as the position of subwindows are relative to the "physical" origin of the scrolled window. If the user insert a child window at position (10,10) and scrolls the window down 100 pixels (moving the child window out of the visible area), the child window will report a position of (10,-90).</p>
<h2>Styles</h2>
<p>This class supports the following styles:</p>
<div> </div><ul>
<li><span class="style">wxHSCROLL</span>:<div class="styleDesc"> If this style is specified and <a class="el" href="defs_8h.html#a78a1371cbc8c3b8bb36f27b9d3c47ba9">wxVSCROLL</a> isn't, the window will be scrollable only in horizontal direction (by default, i.e. if neither this style nor <a class="el" href="defs_8h.html#a78a1371cbc8c3b8bb36f27b9d3c47ba9">wxVSCROLL</a> is specified, it scrolls in both directions). </div></li>
<li><span class="style">wxVSCROLL</span>:<div class="styleDesc"> If this style is specified and <a class="el" href="defs_8h.html#a138eed616dd15fd021e8cc838e26d589">wxHSCROLL</a> isn't, the window will be scrollable only in vertical direction (by default, i.e. if neither this style nor <a class="el" href="defs_8h.html#a138eed616dd15fd021e8cc838e26d589">wxHSCROLL</a> is specified, it scrolls in both directions). </div></li>
<li><span class="style">wxALWAYS_SHOW_SB</span>:<div class="styleDesc"> Since wxWidgets 2.9.5, specifying this style makes the window always show its scrollbars, even if they are not used. See <a class="el" href="classwx_scrolled.html#a8590337dc643a64437c56031cf5f2e71" title="Set the scrollbar visibility.">ShowScrollbars()</a>. </div></li>
<li><span class="style">wxRETAINED</span>:<div class="styleDesc"> Uses a backing pixmap to speed refreshes. Motif only. </div></li>
</ul>
<h2>Events emitted by this class</h2>
<p>The following event handler macros redirect the events to member function handlers '<b>func</b>' with prototypes like: </p>
<div class="eventHandler"><span>void&#160;handlerFuncName(<a class="el" href="classwx_scroll_win_event.html" title="A scroll event holds information about events sent from scrolling windows.">wxScrollWinEvent</a>&amp;&#160;event)</span></div><p>Event macros for events emitted by this class:</p>
<div> </div><ul>
<li><span class="event">EVT_SCROLLWIN(func)</span>:<div class="eventDesc"> Process all scroll events. </div></li>
<li><span class="event">EVT_SCROLLWIN_TOP(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_TOP</code> scroll-to-top events. </div></li>
<li><span class="event">EVT_SCROLLWIN_BOTTOM(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_BOTTOM</code> scroll-to-bottom events. </div></li>
<li><span class="event">EVT_SCROLLWIN_LINEUP(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_LINEUP</code> line up events. </div></li>
<li><span class="event">EVT_SCROLLWIN_LINEDOWN(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_LINEDOWN</code> line down events. </div></li>
<li><span class="event">EVT_SCROLLWIN_PAGEUP(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_PAGEUP</code> page up events. </div></li>
<li><span class="event">EVT_SCROLLWIN_PAGEDOWN(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_PAGEDOWN</code> page down events. </div></li>
<li><span class="event">EVT_SCROLLWIN_THUMBTRACK(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_THUMBTRACK</code> thumbtrack events (frequent events sent as the user drags the thumbtrack). </div></li>
<li><span class="event">EVT_SCROLLWIN_THUMBRELEASE(func)</span>:<div class="eventDesc"> Process <code>wxEVT_SCROLLWIN_THUMBRELEASE</code> thumb release events. </div></li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Don't confuse wxScrollWinEvents generated by this class with <a class="el" href="classwx_scroll_event.html" title="A scroll event holds information about events sent from stand-alone scrollbars (see wxScrollBar) and ...">wxScrollEvent</a> objects generated by <a class="el" href="classwx_scroll_bar.html" title="A wxScrollBar is a control that represents a horizontal or vertical scrollbar.">wxScrollBar</a> and <a class="el" href="classwx_slider.html" title="A slider is a control with a handle which can be pulled back and forth to change the value...">wxSlider</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>Use <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> for applications where the user scrolls by a fixed amount, and where a 'page' can be interpreted to be the current visible portion of the window. For more sophisticated applications, use the <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> implementation as a guide to build your own scroll behaviour or use <a class="el" href="classwx_v_scrolled_window.html" title="In the name of this class, &quot;V&quot; may stand for &quot;variable&quot; because it can be used for scrolling rows of ...">wxVScrolledWindow</a> or its variants.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>The <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> template exists since version 2.9.0. In older versions, only <a class="el" href="group__group__class__miscwnd.html#ga695bec5996cd4d5512d1a01cfdcf96a5" title="Scrolled window derived from wxPanel.">wxScrolledWindow</a> (equivalent of wxScrolled&lt;wxPanel&gt;) was available.</dd></dl>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxcore">wxCore</a></span></div><div><span class="category">Category:</span>&#160;&#160;<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_scroll_bar.html" title="A wxScrollBar is a control that represents a horizontal or vertical scrollbar.">wxScrollBar</a>, <a class="el" href="classwx_client_d_c.html" title="A wxClientDC must be constructed if an application wishes to paint on the client area of a window fro...">wxClientDC</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>, <a class="el" href="classwx_v_scrolled_window.html" title="In the name of this class, &quot;V&quot; may stand for &quot;variable&quot; because it can be used for scrolling rows of ...">wxVScrolledWindow</a>, <a class="el" href="classwx_h_scrolled_window.html" title="In the name of this class, &quot;H&quot; stands for &quot;horizontal&quot; 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>, </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:a01d0ecb5daa59ebb7a0806f16b7ac267"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a01d0ecb5daa59ebb7a0806f16b7ac267">wxScrolled</a> ()</td></tr>
<tr class="memdesc:a01d0ecb5daa59ebb7a0806f16b7ac267"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a01d0ecb5daa59ebb7a0806f16b7ac267"></a><br/></td></tr>
<tr class="separator:a01d0ecb5daa59ebb7a0806f16b7ac267"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae68b98d2386b81f413e08cd5410401fc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#ae68b98d2386b81f413e08cd5410401fc">wxScrolled</a> (<a class="el" href="classwx_window.html">wxWindow</a> *parent, <a class="el" href="windowid_8h.html#ae8091432cc2cb2485d45f2302fb51133">wxWindowID</a> id=-1, const <a class="el" href="classwx_point.html">wxPoint</a> &amp;pos=<a class="el" href="gdicmn_8h.html#af5a90c753eaf3d3e3e5068a19ec3c1d0">wxDefaultPosition</a>, const <a class="el" href="classwx_size.html">wxSize</a> &amp;size=<a class="el" href="gdicmn_8h.html#a33a012cdb075e9f78c93f63bec2dc27b">wxDefaultSize</a>, long style=<a class="el" href="defs_8h.html#a138eed616dd15fd021e8cc838e26d589">wxHSCROLL</a>|<a class="el" href="defs_8h.html#a78a1371cbc8c3b8bb36f27b9d3c47ba9">wxVSCROLL</a>, const <a class="el" href="classwx_string.html">wxString</a> &amp;name=&quot;scrolledWindow&quot;)</td></tr>
<tr class="memdesc:ae68b98d2386b81f413e08cd5410401fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#ae68b98d2386b81f413e08cd5410401fc"></a><br/></td></tr>
<tr class="separator:ae68b98d2386b81f413e08cd5410401fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad57ab2754edf096046d87ecd67ad2a68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#ad57ab2754edf096046d87ecd67ad2a68">CalcScrolledPosition</a> (int x, int y, int *xx, int *yy) const </td></tr>
<tr class="memdesc:ad57ab2754edf096046d87ecd67ad2a68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translates the logical coordinates to the device ones.  <a href="#ad57ab2754edf096046d87ecd67ad2a68"></a><br/></td></tr>
<tr class="separator:ad57ab2754edf096046d87ecd67ad2a68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d7ff2c82db0509bf17163316c277645"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_point.html">wxPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a9d7ff2c82db0509bf17163316c277645">CalcScrolledPosition</a> (const <a class="el" href="classwx_point.html">wxPoint</a> &amp;pt) const </td></tr>
<tr class="separator:a9d7ff2c82db0509bf17163316c277645"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac296b6676926ba2fe356c9a12d50579e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#ac296b6676926ba2fe356c9a12d50579e">CalcUnscrolledPosition</a> (int x, int y, int *xx, int *yy) const </td></tr>
<tr class="memdesc:ac296b6676926ba2fe356c9a12d50579e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translates the device coordinates to the logical ones.  <a href="#ac296b6676926ba2fe356c9a12d50579e"></a><br/></td></tr>
<tr class="separator:ac296b6676926ba2fe356c9a12d50579e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acde2e660fdae1a334f3cc1ef5c466ef2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_point.html">wxPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#acde2e660fdae1a334f3cc1ef5c466ef2">CalcUnscrolledPosition</a> (const <a class="el" href="classwx_point.html">wxPoint</a> &amp;pt) const </td></tr>
<tr class="separator:acde2e660fdae1a334f3cc1ef5c466ef2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f03bd3bcbb96c84f90c2482f58f075a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a9f03bd3bcbb96c84f90c2482f58f075a">Create</a> (<a class="el" href="classwx_window.html">wxWindow</a> *parent, <a class="el" href="windowid_8h.html#ae8091432cc2cb2485d45f2302fb51133">wxWindowID</a> id=-1, const <a class="el" href="classwx_point.html">wxPoint</a> &amp;pos=<a class="el" href="gdicmn_8h.html#af5a90c753eaf3d3e3e5068a19ec3c1d0">wxDefaultPosition</a>, const <a class="el" href="classwx_size.html">wxSize</a> &amp;size=<a class="el" href="gdicmn_8h.html#a33a012cdb075e9f78c93f63bec2dc27b">wxDefaultSize</a>, long style=<a class="el" href="defs_8h.html#a138eed616dd15fd021e8cc838e26d589">wxHSCROLL</a>|<a class="el" href="defs_8h.html#a78a1371cbc8c3b8bb36f27b9d3c47ba9">wxVSCROLL</a>, const <a class="el" href="classwx_string.html">wxString</a> &amp;name=&quot;scrolledWindow&quot;)</td></tr>
<tr class="memdesc:a9f03bd3bcbb96c84f90c2482f58f075a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the window for two-step construction.  <a href="#a9f03bd3bcbb96c84f90c2482f58f075a"></a><br/></td></tr>
<tr class="separator:a9f03bd3bcbb96c84f90c2482f58f075a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a294b1585caef1c22f5ea1ac6a6787164"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a294b1585caef1c22f5ea1ac6a6787164">DisableKeyboardScrolling</a> ()</td></tr>
<tr class="memdesc:a294b1585caef1c22f5ea1ac6a6787164"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable use of keyboard keys for scrolling.  <a href="#a294b1585caef1c22f5ea1ac6a6787164"></a><br/></td></tr>
<tr class="separator:a294b1585caef1c22f5ea1ac6a6787164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96a2b41d3bcd07e28491de5f39f9c5cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb">DoPrepareDC</a> (<a class="el" href="classwx_d_c.html">wxDC</a> &amp;dc)</td></tr>
<tr class="memdesc:a96a2b41d3bcd07e28491de5f39f9c5cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call this function to prepare the device context for drawing a scrolled image.  <a href="#a96a2b41d3bcd07e28491de5f39f9c5cb"></a><br/></td></tr>
<tr class="separator:a96a2b41d3bcd07e28491de5f39f9c5cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5a023517721a5ad5b891527b437dd61"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#ac5a023517721a5ad5b891527b437dd61">EnableScrolling</a> (bool xScrolling, bool yScrolling)</td></tr>
<tr class="memdesc:ac5a023517721a5ad5b891527b437dd61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable use of <a class="el" href="classwx_window.html#ab7be4956ff22da37fff2b8aaa581045c" title="Physically scrolls the pixels in the window and move child windows accordingly.">wxWindow::ScrollWindow()</a> for scrolling.  <a href="#ac5a023517721a5ad5b891527b437dd61"></a><br/></td></tr>
<tr class="separator:ac5a023517721a5ad5b891527b437dd61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8590337dc643a64437c56031cf5f2e71"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a8590337dc643a64437c56031cf5f2e71">ShowScrollbars</a> (<a class="el" href="scrolwin_8h.html#a4351a92a4d06bc722e0c604d6482a5a4">wxScrollbarVisibility</a> horz, <a class="el" href="scrolwin_8h.html#a4351a92a4d06bc722e0c604d6482a5a4">wxScrollbarVisibility</a> vert)</td></tr>
<tr class="memdesc:a8590337dc643a64437c56031cf5f2e71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the scrollbar visibility.  <a href="#a8590337dc643a64437c56031cf5f2e71"></a><br/></td></tr>
<tr class="separator:a8590337dc643a64437c56031cf5f2e71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a573b3bb11a2a90eae9c6b12bcca51dbf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a573b3bb11a2a90eae9c6b12bcca51dbf">GetScrollPixelsPerUnit</a> (int *xUnit, int *yUnit) const </td></tr>
<tr class="memdesc:a573b3bb11a2a90eae9c6b12bcca51dbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of pixels per scroll unit (line), in each direction, as set by <a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>.  <a href="#a573b3bb11a2a90eae9c6b12bcca51dbf"></a><br/></td></tr>
<tr class="separator:a573b3bb11a2a90eae9c6b12bcca51dbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae693691d39e53291067f559ac7600604"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#ae693691d39e53291067f559ac7600604">GetViewStart</a> (int *x, int *y) const </td></tr>
<tr class="memdesc:ae693691d39e53291067f559ac7600604"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the position at which the visible portion of the window starts.  <a href="#ae693691d39e53291067f559ac7600604"></a><br/></td></tr>
<tr class="separator:ae693691d39e53291067f559ac7600604"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99e97c6179262456462765127c55d775"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_point.html">wxPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a99e97c6179262456462765127c55d775">GetViewStart</a> () const </td></tr>
<tr class="memdesc:a99e97c6179262456462765127c55d775"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a simple overload of GetViewStart(int*,int*); see that function for more info.  <a href="#a99e97c6179262456462765127c55d775"></a><br/></td></tr>
<tr class="separator:a99e97c6179262456462765127c55d775"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec388dc5ab515d1312b58963ef5647b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#aec388dc5ab515d1312b58963ef5647b1">GetVirtualSize</a> (int *x, int *y) const </td></tr>
<tr class="memdesc:aec388dc5ab515d1312b58963ef5647b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the size in device units of the scrollable window area (as opposed to the client size, which is the area of the window currently visible).  <a href="#aec388dc5ab515d1312b58963ef5647b1"></a><br/></td></tr>
<tr class="separator:aec388dc5ab515d1312b58963ef5647b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0758df4420ce6992f07287242c66fc4c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a0758df4420ce6992f07287242c66fc4c">IsRetained</a> () const </td></tr>
<tr class="memdesc:a0758df4420ce6992f07287242c66fc4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Motif only: <span class="literal">true</span> if the window has a backing bitmap.  <a href="#a0758df4420ce6992f07287242c66fc4c"></a><br/></td></tr>
<tr class="separator:a0758df4420ce6992f07287242c66fc4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52284d06a6160fb42b0899aedce2c880"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a52284d06a6160fb42b0899aedce2c880">OnDraw</a> (<a class="el" href="classwx_d_c.html">wxDC</a> &amp;dc)</td></tr>
<tr class="memdesc:a52284d06a6160fb42b0899aedce2c880"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by the default paint event handler to allow the application to define painting behaviour without having to worry about calling <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a>.  <a href="#a52284d06a6160fb42b0899aedce2c880"></a><br/></td></tr>
<tr class="separator:a52284d06a6160fb42b0899aedce2c880"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab33dbfe88be5ede4b04de4dcec4830f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#ab33dbfe88be5ede4b04de4dcec4830f0">PrepareDC</a> (<a class="el" href="classwx_d_c.html">wxDC</a> &amp;dc)</td></tr>
<tr class="memdesc:ab33dbfe88be5ede4b04de4dcec4830f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is for backwards compatibility only and simply calls <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> now.  <a href="#ab33dbfe88be5ede4b04de4dcec4830f0"></a><br/></td></tr>
<tr class="separator:ab33dbfe88be5ede4b04de4dcec4830f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a601bcac37185a2d4a24164d065907f69"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a601bcac37185a2d4a24164d065907f69">Scroll</a> (int x, int y)</td></tr>
<tr class="memdesc:a601bcac37185a2d4a24164d065907f69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scrolls a window so the view start is at the given point.  <a href="#a601bcac37185a2d4a24164d065907f69"></a><br/></td></tr>
<tr class="separator:a601bcac37185a2d4a24164d065907f69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affb3c1be4945c27b589439a1d47fbbb8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#affb3c1be4945c27b589439a1d47fbbb8">Scroll</a> (const <a class="el" href="classwx_point.html">wxPoint</a> &amp;pt)</td></tr>
<tr class="memdesc:affb3c1be4945c27b589439a1d47fbbb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is an overload of <a class="el" href="classwx_scrolled.html#a601bcac37185a2d4a24164d065907f69" title="Scrolls a window so the view start is at the given point.">Scroll(int,int)</a>; see that function for more info.  <a href="#affb3c1be4945c27b589439a1d47fbbb8"></a><br/></td></tr>
<tr class="separator:affb3c1be4945c27b589439a1d47fbbb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76286e2efa55d0ba85d37106a44a9401"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a76286e2efa55d0ba85d37106a44a9401">SetScrollRate</a> (int xstep, int ystep)</td></tr>
<tr class="memdesc:a76286e2efa55d0ba85d37106a44a9401"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the horizontal and vertical scrolling increment only.  <a href="#a76286e2efa55d0ba85d37106a44a9401"></a><br/></td></tr>
<tr class="separator:a76286e2efa55d0ba85d37106a44a9401"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5d940f364bb5097f20fee4a8e1210bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb">SetScrollbars</a> (int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, int xPos=0, int yPos=0, bool noRefresh=false)</td></tr>
<tr class="memdesc:af5d940f364bb5097f20fee4a8e1210bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up vertical and/or horizontal scrollbars.  <a href="#af5d940f364bb5097f20fee4a8e1210bb"></a><br/></td></tr>
<tr class="separator:af5d940f364bb5097f20fee4a8e1210bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a117dc8edabb3e1250199eab089e4fa5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a117dc8edabb3e1250199eab089e4fa5b">SetTargetWindow</a> (<a class="el" href="classwx_window.html">wxWindow</a> *window)</td></tr>
<tr class="memdesc:a117dc8edabb3e1250199eab089e4fa5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call this function to tell <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> to perform the actual scrolling on a different window (and not on itself).  <a href="#a117dc8edabb3e1250199eab089e4fa5b"></a><br/></td></tr>
<tr class="separator:a117dc8edabb3e1250199eab089e4fa5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9a4680f58855a58235134c32ed742ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_window.html">wxWindow</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#ae9a4680f58855a58235134c32ed742ad">GetTargetWindow</a> () const </td></tr>
<tr class="separator:ae9a4680f58855a58235134c32ed742ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee90a87e1b3f7f0f70a89e085c0d9928"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#aee90a87e1b3f7f0f70a89e085c0d9928">SetTargetRect</a> (const <a class="el" href="classwx_rect.html">wxRect</a> &amp;rect)</td></tr>
<tr class="separator:aee90a87e1b3f7f0f70a89e085c0d9928"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a753b645a99d21a25ba7db29e78015741"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_rect.html">wxRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a753b645a99d21a25ba7db29e78015741">GetTargetRect</a> () const </td></tr>
<tr class="separator:a753b645a99d21a25ba7db29e78015741"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a194f815525111860f7345a5d6af687d7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a194f815525111860f7345a5d6af687d7">GetScrollPageSize</a> (int orient) const </td></tr>
<tr class="separator:a194f815525111860f7345a5d6af687d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa160351f31a0080784a00023947a06f6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#aa160351f31a0080784a00023947a06f6">SetScrollPageSize</a> (int orient, int pageSize)</td></tr>
<tr class="separator:aa160351f31a0080784a00023947a06f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9619063556af240c66202e0526d49cb3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a9619063556af240c66202e0526d49cb3">GetScrollLines</a> (int orient) const </td></tr>
<tr class="separator:a9619063556af240c66202e0526d49cb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c8829d39d00ce53901a8b1a67d5d780"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a5c8829d39d00ce53901a8b1a67d5d780">SetScale</a> (double xs, double ys)</td></tr>
<tr class="separator:a5c8829d39d00ce53901a8b1a67d5d780"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a787b355ef546a900ba9eff9aab7d4036"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a787b355ef546a900ba9eff9aab7d4036">GetScaleX</a> () const </td></tr>
<tr class="separator:a787b355ef546a900ba9eff9aab7d4036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa25601fb1795a6a38fe425b049366ae3"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#aa25601fb1795a6a38fe425b049366ae3">GetScaleY</a> () const </td></tr>
<tr class="separator:aa25601fb1795a6a38fe425b049366ae3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b5e335677055e4107903f7d5dad042f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a5b5e335677055e4107903f7d5dad042f">AdjustScrollbars</a> ()</td></tr>
<tr class="separator:a5b5e335677055e4107903f7d5dad042f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a813ba4e0e51842fd08f0758b2690ef00"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a813ba4e0e51842fd08f0758b2690ef00">IsAutoScrolling</a> () const </td></tr>
<tr class="memdesc:a813ba4e0e51842fd08f0758b2690ef00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Are we generating the autoscroll events?  <a href="#a813ba4e0e51842fd08f0758b2690ef00"></a><br/></td></tr>
<tr class="separator:a813ba4e0e51842fd08f0758b2690ef00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33c3daf5feb84c357357012e1b0e7a0a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a33c3daf5feb84c357357012e1b0e7a0a">StopAutoScrolling</a> ()</td></tr>
<tr class="memdesc:a33c3daf5feb84c357357012e1b0e7a0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop generating the scroll events when mouse is held outside the window.  <a href="#a33c3daf5feb84c357357012e1b0e7a0a"></a><br/></td></tr>
<tr class="separator:a33c3daf5feb84c357357012e1b0e7a0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a335f6800aeca04c9e32856ab4ab5ce99"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a335f6800aeca04c9e32856ab4ab5ce99">SendAutoScrollEvents</a> (<a class="el" href="classwx_scroll_win_event.html">wxScrollWinEvent</a> &amp;event) const </td></tr>
<tr class="memdesc:a335f6800aeca04c9e32856ab4ab5ce99"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method can be overridden in a derived class to forbid sending the auto scroll events - note that unlike <a class="el" href="classwx_scrolled.html#a33c3daf5feb84c357357012e1b0e7a0a" title="Stop generating the scroll events when mouse is held outside the window.">StopAutoScrolling()</a> it doesn't stop the timer, so it will be called repeatedly and will typically return different values depending on the current mouse position.  <a href="#a335f6800aeca04c9e32856ab4ab5ce99"></a><br/></td></tr>
<tr class="separator:a335f6800aeca04c9e32856ab4ab5ce99"><td class="memSeparator" colspan="2">&#160;</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:a81800886d1d5f094caeee683e707de12"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_size.html">wxSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scrolled.html#a81800886d1d5f094caeee683e707de12">GetSizeAvailableForScrollTarget</a> (const <a class="el" href="classwx_size.html">wxSize</a> &amp;size)</td></tr>
<tr class="memdesc:a81800886d1d5f094caeee683e707de12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function which must be overridden to implement the size available for the scroll target for the given size of the main window.  <a href="#a81800886d1d5f094caeee683e707de12"></a><br/></td></tr>
<tr class="separator:a81800886d1d5f094caeee683e707de12"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a01d0ecb5daa59ebb7a0806f16b7ac267"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::<a class="el" href="classwx_scrolled.html">wxScrolled</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a class="anchor" id="ae68b98d2386b81f413e08cd5410401fc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::<a class="el" href="classwx_scrolled.html">wxScrolled</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="windowid_8h.html#ae8091432cc2cb2485d45f2302fb51133">wxWindowID</a>&#160;</td>
          <td class="paramname"><em>id</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_point.html">wxPoint</a> &amp;&#160;</td>
          <td class="paramname"><em>pos</em> = <code><a class="el" href="gdicmn_8h.html#af5a90c753eaf3d3e3e5068a19ec3c1d0">wxDefaultPosition</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_size.html">wxSize</a> &amp;&#160;</td>
          <td class="paramname"><em>size</em> = <code><a class="el" href="gdicmn_8h.html#a33a012cdb075e9f78c93f63bec2dc27b">wxDefaultSize</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>style</em> = <code><a class="el" href="defs_8h.html#a138eed616dd15fd021e8cc838e26d589">wxHSCROLL</a>|<a class="el" href="defs_8h.html#a78a1371cbc8c3b8bb36f27b9d3c47ba9">wxVSCROLL</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>&quot;scrolledWindow&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>Parent window. </td></tr>
    <tr><td class="paramname">id</td><td>Window identifier. The value <code>wxID_ANY</code> indicates a default value. </td></tr>
    <tr><td class="paramname">pos</td><td>Window position. If a position of <a class="el" href="gdicmn_8h.html#af5a90c753eaf3d3e3e5068a19ec3c1d0" title="Global instance of a wxPoint initialized with values (-1,-1).">wxDefaultPosition</a> is specified then a default position is chosen. </td></tr>
    <tr><td class="paramname">size</td><td>Window size. If a size of <a class="el" href="gdicmn_8h.html#a33a012cdb075e9f78c93f63bec2dc27b" title="Global instance of a wxSize object initialized to (-1,-1).">wxDefaultSize</a> is specified then the window is sized appropriately. </td></tr>
    <tr><td class="paramname">style</td><td>Window style. See <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a>. </td></tr>
    <tr><td class="paramname">name</td><td>Window name.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>The window is initially created without visible scrollbars. Call <a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a> to specify how big the virtual window size should be. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5b5e335677055e4107903f7d5dad042f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::AdjustScrollbars </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">

</div>
</div>
<a class="anchor" id="ad57ab2754edf096046d87ecd67ad2a68"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::CalcScrolledPosition </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>xx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>yy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Translates the logical coordinates to the device ones. </p>
<p>For example, if a window is scrolled 10 pixels to the bottom, the device coordinates of the origin are (0, 0) (as always), but the logical coordinates are (0, 10) and so the call to CalcScrolledPosition(0, 10, xx, yy) will return 0 in yy.</p>
<p><b>wxPerl Note:</b> In wxPerl this method takes two parameters and returns a 2-element list (xx, yy).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_scrolled.html#ac296b6676926ba2fe356c9a12d50579e" title="Translates the device coordinates to the logical ones.">CalcUnscrolledPosition()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9d7ff2c82db0509bf17163316c277645"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_point.html">wxPoint</a> <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::CalcScrolledPosition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_point.html">wxPoint</a> &amp;&#160;</td>
          <td class="paramname"><em>pt</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ac296b6676926ba2fe356c9a12d50579e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::CalcUnscrolledPosition </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>xx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>yy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Translates the device coordinates to the logical ones. </p>
<p>For example, if a window is scrolled 10 pixels to the bottom, the device coordinates of the origin are (0, 0) (as always), but the logical coordinates are (0, 10) and so the call to CalcUnscrolledPosition(0, 0, xx, yy) will return 10 in yy.</p>
<p><b>wxPerl Note:</b> In wxPerl this method takes two parameters and returns a 2-element list (xx, yy).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_scrolled.html#ad57ab2754edf096046d87ecd67ad2a68" title="Translates the logical coordinates to the device ones.">CalcScrolledPosition()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="acde2e660fdae1a334f3cc1ef5c466ef2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_point.html">wxPoint</a> <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::CalcUnscrolledPosition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_point.html">wxPoint</a> &amp;&#160;</td>
          <td class="paramname"><em>pt</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a9f03bd3bcbb96c84f90c2482f58f075a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::Create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="windowid_8h.html#ae8091432cc2cb2485d45f2302fb51133">wxWindowID</a>&#160;</td>
          <td class="paramname"><em>id</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_point.html">wxPoint</a> &amp;&#160;</td>
          <td class="paramname"><em>pos</em> = <code><a class="el" href="gdicmn_8h.html#af5a90c753eaf3d3e3e5068a19ec3c1d0">wxDefaultPosition</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_size.html">wxSize</a> &amp;&#160;</td>
          <td class="paramname"><em>size</em> = <code><a class="el" href="gdicmn_8h.html#a33a012cdb075e9f78c93f63bec2dc27b">wxDefaultSize</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>style</em> = <code><a class="el" href="defs_8h.html#a138eed616dd15fd021e8cc838e26d589">wxHSCROLL</a>|<a class="el" href="defs_8h.html#a78a1371cbc8c3b8bb36f27b9d3c47ba9">wxVSCROLL</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>&quot;scrolledWindow&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates the window for two-step construction. </p>
<p>Derived classes should call or replace this function. See <a class="el" href="classwx_scrolled.html#a01d0ecb5daa59ebb7a0806f16b7ac267" title="Default constructor.">wxScrolled::wxScrolled()</a> for details. </p>

</div>
</div>
<a class="anchor" id="a294b1585caef1c22f5ea1ac6a6787164"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::DisableKeyboardScrolling </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable use of keyboard keys for scrolling. </p>
<p>By default cursor movement keys (including Home, End, Page Up and Down) are used to scroll the window appropriately. If the derived class uses these keys for something else, e.g. changing the currently selected item, this function can be used to disable this behaviour as it's not only not necessary then but can actually be actively harmful if another object forwards a keyboard event corresponding to one of the above keys to us using ProcessWindowEvent() because the event will always be processed which can be undesirable.</p>
<dl class="section since"><dt>Since</dt><dd>2.9.1 </dd></dl>

</div>
</div>
<a class="anchor" id="a96a2b41d3bcd07e28491de5f39f9c5cb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::DoPrepareDC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_d_c.html">wxDC</a> &amp;&#160;</td>
          <td class="paramname"><em>dc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Call this function to prepare the device context for drawing a scrolled image. </p>
<p>It sets the device origin according to the current scroll position. <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> is called automatically within the default <code>wxEVT_PAINT</code> event handler, so your <a class="el" href="classwx_scrolled.html#a52284d06a6160fb42b0899aedce2c880" title="Called by the default paint event handler to allow the application to define painting behaviour witho...">OnDraw()</a> override will be passed an already 'pre-scrolled' device context. However, if you wish to draw from outside of <a class="el" href="classwx_scrolled.html#a52284d06a6160fb42b0899aedce2c880" title="Called by the default paint event handler to allow the application to define painting behaviour witho...">OnDraw()</a> (e.g. from your own <code>wxEVT_PAINT</code> handler), you must call this function yourself.</p>
<p>For example: </p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> MyWindow::OnEvent(<a class="code" href="classwx_mouse_event.html" title="This event class contains information about the events generated by the mouse: they include mouse but...">wxMouseEvent</a>&amp; event)</div>
<div class="line">{</div>
<div class="line">  <a class="code" href="classwx_client_d_c.html" title="A wxClientDC must be constructed if an application wishes to paint on the client area of a window fro...">wxClientDC</a> dc(<span class="keyword">this</span>);</div>
<div class="line">  <a class="code" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC</a>(dc);</div>
<div class="line"></div>
<div class="line">  dc.<a class="code" href="classwx_d_c.html#a0d229733fbc83c7e4c483c0714d090b2" title="Sets the current pen for the DC.">SetPen</a>(*<a class="code" href="pen_8h.html#a845a77278b675303c61858c18c2bb91b" title="Black pen.">wxBLACK_PEN</a>);</div>
<div class="line">  <span class="keywordtype">float</span> x, y;</div>
<div class="line">  <span class="keyword">event</span>.Position(&amp;x, &amp;y);</div>
<div class="line">  <span class="keywordflow">if</span> (xpos &gt; -1 &amp;&amp; ypos &gt; -1 &amp;&amp; event.<a class="code" href="classwx_mouse_event.html#aaf32bfc85d51a565b1a9b89189292325" title="Returns true if this was a dragging event (motion while a button is depressed).">Dragging</a>())</div>
<div class="line">  {</div>
<div class="line">    dc.<a class="code" href="classwx_d_c.html#a12f2c236d4d320acec0bc6fe20e8399d" title="Draws a line from the first point to the second.">DrawLine</a>(xpos, ypos, x, y);</div>
<div class="line">  }</div>
<div class="line">  xpos = x;</div>
<div class="line">  ypos = y;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Notice that the function sets the origin by moving it relatively to the current origin position, so you shouldn't change the origin before calling <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> or, if you do, reset it to (0, 0) later. If you call <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> immediately after device context creation, as in the example above, this problem doesn't arise, of course, so it is customary to do it like this. </p>

</div>
</div>
<a class="anchor" id="ac5a023517721a5ad5b891527b437dd61"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::EnableScrolling </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>xScrolling</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>yScrolling</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable or disable use of <a class="el" href="classwx_window.html#ab7be4956ff22da37fff2b8aaa581045c" title="Physically scrolls the pixels in the window and move child windows accordingly.">wxWindow::ScrollWindow()</a> for scrolling. </p>
<p>By default, when a scrolled window is logically scrolled, <a class="el" href="classwx_window.html#ab7be4956ff22da37fff2b8aaa581045c" title="Physically scrolls the pixels in the window and move child windows accordingly.">wxWindow::ScrollWindow()</a> is called on the underlying window which scrolls the window contents and only invalidates the part of the window newly brought into view. If <span class="literal">false</span> is passed as an argument, then this "physical scrolling" is disabled and the window is entirely invalidated whenever it is scrolled by calling <a class="el" href="classwx_window.html#a29dc7251746154c821b17841b9877830" title="Causes this window, and all of its children recursively (except under wxGTK1 where this is not implem...">wxWindow::Refresh()</a>.</p>
<p>It should be rarely necessary to disable physical scrolling, so this method shouldn't be called in normal circumstances.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">xScrolling</td><td>If <span class="literal">true</span>, enables physical scrolling in the x direction. </td></tr>
    <tr><td class="paramname">yScrolling</td><td>If <span class="literal">true</span>, enables physical scrolling in the y direction. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a787b355ef546a900ba9eff9aab7d4036"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetScaleX </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aa25601fb1795a6a38fe425b049366ae3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetScaleY </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a9619063556af240c66202e0526d49cb3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetScrollLines </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>orient</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a194f815525111860f7345a5d6af687d7"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetScrollPageSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>orient</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a573b3bb11a2a90eae9c6b12bcca51dbf"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetScrollPixelsPerUnit </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>xUnit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>yUnit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of pixels per scroll unit (line), in each direction, as set by <a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>. </p>
<p>A value of zero indicates no scrolling in that direction.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">xUnit</td><td>Receives the number of pixels per horizontal unit. </td></tr>
    <tr><td class="paramname">yUnit</td><td>Receives the number of pixels per vertical unit.</td></tr>
  </table>
  </dd>
</dl>
<p><b>wxPerl Note:</b> In wxPerl this method takes no parameters and returns a 2-element list (xUnit, yUnit).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>, <a class="el" href="classwx_scrolled.html#aec388dc5ab515d1312b58963ef5647b1" title="Gets the size in device units of the scrollable window area (as opposed to the client size...">GetVirtualSize()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a81800886d1d5f094caeee683e707de12"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classwx_size.html">wxSize</a> <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetSizeAvailableForScrollTarget </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_size.html">wxSize</a> &amp;&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></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>Function which must be overridden to implement the size available for the scroll target for the given size of the main window. </p>
<p>This method must be overridden if <a class="el" href="classwx_scrolled.html#a117dc8edabb3e1250199eab089e4fa5b" title="Call this function to tell wxScrolled to perform the actual scrolling on a different window (and not ...">SetTargetWindow()</a> is used (it is never called otherwise). The implementation should decrease the <em>size</em> to account for the size of the non-scrollable parts of the main window and return only the size available for the scrollable window itself. E.g. in the example given in <a class="el" href="classwx_scrolled.html#a117dc8edabb3e1250199eab089e4fa5b" title="Call this function to tell wxScrolled to perform the actual scrolling on a different window (and not ...">SetTargetWindow()</a> documentation the function would subtract the height of the header window from the vertical component of <em>size</em>. </p>

</div>
</div>
<a class="anchor" id="a753b645a99d21a25ba7db29e78015741"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_rect.html">wxRect</a> <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetTargetRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ae9a4680f58855a58235134c32ed742ad"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_window.html">wxWindow</a>* <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetTargetWindow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ae693691d39e53291067f559ac7600604"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetViewStart </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the position at which the visible portion of the window starts. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Receives the first visible x position in scroll units. </td></tr>
    <tr><td class="paramname">y</td><td>Receives the first visible y position in scroll units.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>If either of the scrollbars is not at the home position, <em>x</em> and/or <em>y</em> will be greater than zero. Combined with <a class="el" href="classwx_window.html#ae56fc53268b815b58570f66bfc33838f" title="Returns the size of the window &#39;client area&#39; in pixels.">wxWindow::GetClientSize()</a>, the application can use this function to efficiently redraw only the visible portion of the window. The positions are in logical scroll units, not pixels, so to convert to pixels you will have to multiply by the number of pixels per scroll increment.</dd></dl>
<p><b>wxPerl Note:</b> In wxPerl this method takes no parameters and returns a 2-element list (x, y).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>, <a class="el" href="classwx_scrolled.html#a601bcac37185a2d4a24164d065907f69" title="Scrolls a window so the view start is at the given point.">Scroll()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a99e97c6179262456462765127c55d775"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_point.html">wxPoint</a> <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetViewStart </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is a simple overload of GetViewStart(int*,int*); see that function for more info. </p>

</div>
</div>
<a class="anchor" id="aec388dc5ab515d1312b58963ef5647b1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::GetVirtualSize </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the size in device units of the scrollable window area (as opposed to the client size, which is the area of the window currently visible). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Receives the length of the scrollable window, in pixels. </td></tr>
    <tr><td class="paramname">y</td><td>Receives the height of the scrollable window, in pixels.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>Use <a class="el" href="classwx_d_c.html#af0c7b7b0f2736fbce53675f1420ed11c" title="Convert device X coordinate to logical coordinate, using the current mapping mode, user scale factor, device origin and axis orientation.">wxDC::DeviceToLogicalX()</a> and <a class="el" href="classwx_d_c.html#aac47fb25f72317712e74a7e2903ba704" title="Converts device Y coordinate to logical coordinate, using the current mapping mode, user scale factor, device origin and axis orientation.">wxDC::DeviceToLogicalY()</a> to translate these units to logical units.</dd></dl>
<p><b>wxPerl Note:</b> In wxPerl this method takes no parameters and returns a 2-element list (xUnit, yUnit).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>, <a class="el" href="classwx_scrolled.html#a573b3bb11a2a90eae9c6b12bcca51dbf" title="Get the number of pixels per scroll unit (line), in each direction, as set by SetScrollbars().">GetScrollPixelsPerUnit()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a813ba4e0e51842fd08f0758b2690ef00"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::IsAutoScrolling </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Are we generating the autoscroll events? </p>

</div>
</div>
<a class="anchor" id="a0758df4420ce6992f07287242c66fc4c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::IsRetained </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Motif only: <span class="literal">true</span> if the window has a backing bitmap. </p>

</div>
</div>
<a class="anchor" id="a52284d06a6160fb42b0899aedce2c880"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::OnDraw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_d_c.html">wxDC</a> &amp;&#160;</td>
          <td class="paramname"><em>dc</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>Called by the default paint event handler to allow the application to define painting behaviour without having to worry about calling <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a>. </p>
<p>Instead of overriding this function you may also just process the paint event in the derived class as usual, but then you will have to call <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> yourself. </p>

</div>
</div>
<a class="anchor" id="ab33dbfe88be5ede4b04de4dcec4830f0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::PrepareDC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_d_c.html">wxDC</a> &amp;&#160;</td>
          <td class="paramname"><em>dc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is for backwards compatibility only and simply calls <a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> now. </p>
<p>Notice that it is not called by the default paint event handle (<a class="el" href="classwx_scrolled.html#a96a2b41d3bcd07e28491de5f39f9c5cb" title="Call this function to prepare the device context for drawing a scrolled image.">DoPrepareDC()</a> is), so overriding this method in your derived class is useless. </p>

</div>
</div>
<a class="anchor" id="a601bcac37185a2d4a24164d065907f69"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::Scroll </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Scrolls a window so the view start is at the given point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>The x position to scroll to, in scroll units. </td></tr>
    <tr><td class="paramname">y</td><td>The y position to scroll to, in scroll units.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>The positions are in scroll units, not pixels, so to convert to pixels you will have to multiply by the number of pixels per scroll increment. If either parameter is <a class="el" href="defs_8h.html#ae297119c813ec5d3328ce3f43f9ac6c1" title="A special value meaning &quot;use default coordinate&quot;.">wxDefaultCoord</a> (-1), that position will be ignored (no change in that direction).</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>, <a class="el" href="classwx_scrolled.html#a573b3bb11a2a90eae9c6b12bcca51dbf" title="Get the number of pixels per scroll unit (line), in each direction, as set by SetScrollbars().">GetScrollPixelsPerUnit()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="affb3c1be4945c27b589439a1d47fbbb8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::Scroll </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_point.html">wxPoint</a> &amp;&#160;</td>
          <td class="paramname"><em>pt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is an overload of <a class="el" href="classwx_scrolled.html#a601bcac37185a2d4a24164d065907f69" title="Scrolls a window so the view start is at the given point.">Scroll(int,int)</a>; see that function for more info. </p>

</div>
</div>
<a class="anchor" id="a335f6800aeca04c9e32856ab4ab5ce99"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::SendAutoScrollEvents </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_scroll_win_event.html">wxScrollWinEvent</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em></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 method can be overridden in a derived class to forbid sending the auto scroll events - note that unlike <a class="el" href="classwx_scrolled.html#a33c3daf5feb84c357357012e1b0e7a0a" title="Stop generating the scroll events when mouse is held outside the window.">StopAutoScrolling()</a> it doesn't stop the timer, so it will be called repeatedly and will typically return different values depending on the current mouse position. </p>
<p>The base class version just returns true. </p>

</div>
</div>
<a class="anchor" id="a5c8829d39d00ce53901a8b1a67d5d780"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::SetScale </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>xs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ys</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="af5d940f364bb5097f20fee4a8e1210bb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::SetScrollbars </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pixelsPerUnitX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pixelsPerUnitY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>noUnitsX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>noUnitsY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>xPos</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>yPos</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noRefresh</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up vertical and/or horizontal scrollbars. </p>
<p>The first pair of parameters give the number of pixels per 'scroll step', i.e. amount moved when the up or down scroll arrows are pressed. The second pair gives the length of scrollbar in scroll steps, which sets the size of the virtual window.</p>
<p><em>xPos</em> and <em>yPos</em> optionally specify a position to scroll to immediately.</p>
<p>For example, the following gives a window horizontal and vertical scrollbars with 20 pixels per scroll step, and a size of 50 steps (1000 pixels) in each direction: </p>
<div class="fragment"><div class="line">window-&gt;SetScrollbars(20, 20, 50, 50);</div>
</div><!-- fragment --><p><a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> manages the page size itself, using the current client window size as the page size.</p>
<p>Note that for more sophisticated scrolling applications, for example where scroll steps may be variable according to the position in the document, it will be necessary to derive a new class from <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>, overriding OnSize() and adjusting the scrollbars appropriately.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pixelsPerUnitX</td><td>Pixels per scroll unit in the horizontal direction. </td></tr>
    <tr><td class="paramname">pixelsPerUnitY</td><td>Pixels per scroll unit in the vertical direction. </td></tr>
    <tr><td class="paramname">noUnitsX</td><td>Number of units in the horizontal direction. </td></tr>
    <tr><td class="paramname">noUnitsY</td><td>Number of units in the vertical direction. </td></tr>
    <tr><td class="paramname">xPos</td><td>Position to initialize the scrollbars in the horizontal direction, in scroll units. </td></tr>
    <tr><td class="paramname">yPos</td><td>Position to initialize the scrollbars in the vertical direction, in scroll units. </td></tr>
    <tr><td class="paramname">noRefresh</td><td>Will not refresh window if <span class="literal">true</span>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_window.html#a37f293b7904bc6668b86cccb0aea5669" title="Sets the virtual size of the window in pixels.">wxWindow::SetVirtualSize()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa160351f31a0080784a00023947a06f6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::SetScrollPageSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>orient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pageSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a76286e2efa55d0ba85d37106a44a9401"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::SetScrollRate </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>xstep</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ystep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the horizontal and vertical scrolling increment only. </p>
<p>See the pixelsPerUnit parameter in <a class="el" href="classwx_scrolled.html#af5d940f364bb5097f20fee4a8e1210bb" title="Sets up vertical and/or horizontal scrollbars.">SetScrollbars()</a>. </p>

</div>
</div>
<a class="anchor" id="aee90a87e1b3f7f0f70a89e085c0d9928"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::SetTargetRect </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_rect.html">wxRect</a> &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a117dc8edabb3e1250199eab089e4fa5b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::SetTargetWindow </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> *&#160;</td>
          <td class="paramname"><em>window</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Call this function to tell <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a> to perform the actual scrolling on a different window (and not on itself). </p>
<p>This method is useful when only a part of the window should be scrolled. A typical example is a control consisting of a fixed header and the scrollable contents window: the scrollbars are attached to the main window itself, hence it, and not the contents window must be derived from <a class="el" href="classwx_scrolled.html" title="The wxScrolled class manages scrolling for its client area, transforming the coordinates according to...">wxScrolled</a>, but only the contents window scrolls when the scrollbars are used. To implement such setup, you need to call this method with the contents window as argument.</p>
<p>Notice that if this method is used, <a class="el" href="classwx_scrolled.html#a81800886d1d5f094caeee683e707de12" title="Function which must be overridden to implement the size available for the scroll target for the given...">GetSizeAvailableForScrollTarget()</a> method must be overridden. </p>

</div>
</div>
<a class="anchor" id="a8590337dc643a64437c56031cf5f2e71"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::ShowScrollbars </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="scrolwin_8h.html#a4351a92a4d06bc722e0c604d6482a5a4">wxScrollbarVisibility</a>&#160;</td>
          <td class="paramname"><em>horz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="scrolwin_8h.html#a4351a92a4d06bc722e0c604d6482a5a4">wxScrollbarVisibility</a>&#160;</td>
          <td class="paramname"><em>vert</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the scrollbar visibility. </p>
<p>By default the scrollbar in the corresponding direction is only shown if it is needed, i.e. if the virtual size of the scrolled window in this direction is greater than the current physical window size. Using this function the scrollbar visibility can be changed to be:</p>
<ul>
<li>wxSHOW_SB_ALWAYS: To always show the scrollbar, even if it is not needed currently (wxALWAYS_SHOW_SB style can be used during the window creation to achieve the same effect but it applies in both directions).</li>
<li>wxSHOW_SB_NEVER: To never show the scrollbar at all. In this case the program should presumably provide some other way for the user to scroll the window.</li>
<li>wxSHOW_SB_DEFAULT: To restore the default behaviour described above.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">horz</td><td>The desired visibility for the horizontal scrollbar. </td></tr>
    <tr><td class="paramname">vert</td><td>The desired visibility for the vertical scrollbar.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>2.9.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a33c3daf5feb84c357357012e1b0e7a0a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scrolled.html">wxScrolled</a>&lt; T &gt;::StopAutoScrolling </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stop generating the scroll events when mouse is held outside the window. </p>

</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:56 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>