scrolwin.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: scrolwin.h
  3. // Purpose: interface of wxScrolled template
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. Possible values for the second argument of wxScrolled::ShowScrollbars().
  9. */
  10. enum wxScrollbarVisibility
  11. {
  12. wxSHOW_SB_NEVER = -1, ///< Never show the scrollbar at all.
  13. wxSHOW_SB_DEFAULT, ///< Show scrollbar only if it is needed.
  14. wxSHOW_SB_ALWAYS ///< Always show scrollbar, even if not needed.
  15. };
  16. /**
  17. The wxScrolled class manages scrolling for its client area, transforming
  18. the coordinates according to the scrollbar positions, and setting the
  19. scroll positions, thumb sizes and ranges according to the area in view.
  20. There are two commonly used (but not the only possible!) specializations of
  21. this class:
  22. - ::wxScrolledWindow, aka wxScrolled<wxPanel>, is equivalent to
  23. ::wxScrolledWindow from earlier versions. Derived from wxPanel, it shares
  24. wxPanel's behaviour with regard to TAB traversal and focus handling. Use
  25. this if the scrolled window will have child controls.
  26. - ::wxScrolledCanvas, aka wxScrolled<wxWindow>, derives from wxWindow and
  27. so doesn't handle children specially. This is suitable e.g. for
  28. implementing scrollable controls such as tree or list controls.
  29. Starting from version 2.4 of wxWidgets, there are several ways to use a
  30. ::wxScrolledWindow (and now wxScrolled). In particular, there are
  31. three ways to set the size of the scrolling area:
  32. One way is to set the scrollbars directly using a call to SetScrollbars().
  33. This is the way it used to be in any previous version of wxWidgets and it
  34. will be kept for backwards compatibility.
  35. An additional method of manual control, which requires a little less
  36. computation of your own, is to set the total size of the scrolling area by
  37. calling either wxWindow::SetVirtualSize(), or wxWindow::FitInside(), and
  38. setting the scrolling increments for it by calling SetScrollRate().
  39. Scrolling in some orientation is enabled by setting a non-zero increment
  40. for it.
  41. The most automatic and newest way is to simply let sizers determine the
  42. scrolling area. This is now the default when you set an interior sizer into
  43. a wxScrolled with wxWindow::SetSizer(). The scrolling area will be
  44. set to the size requested by the sizer and the scrollbars will be assigned
  45. for each orientation according to the need for them and the scrolling
  46. increment set by SetScrollRate(). As above, scrolling is only enabled in
  47. orientations with a non-zero increment. You can influence the minimum size
  48. of the scrolled area controlled by a sizer by calling
  49. wxWindow::SetVirtualSizeHints(). (Calling SetScrollbars() has analogous
  50. effects in wxWidgets 2.4 -- in later versions it may not continue to
  51. override the sizer.)
  52. Note that if maximum size hints are still supported by
  53. wxWindow::SetVirtualSizeHints(), use them at your own dire risk. They may
  54. or may not have been removed for 2.4, but it really only makes sense to set
  55. minimum size hints here. We should probably replace
  56. wxWindow::SetVirtualSizeHints() with wxWindow::SetMinVirtualSize() or
  57. similar and remove it entirely in future.
  58. @todo review docs for this class replacing SetVirtualSizeHints() with
  59. SetMinClientSize().
  60. As with all windows, an application can draw onto a wxScrolled using a
  61. @ref overview_dc "device context".
  62. You have the option of handling the OnPaint handler or overriding the
  63. wxScrolled::OnDraw() function, which is passed a pre-scrolled device
  64. context (prepared by wxScrolled::DoPrepareDC()).
  65. If you don't wish to calculate your own scrolling, you must call
  66. DoPrepareDC() when not drawing from within OnDraw(), to set the device
  67. origin for the device context according to the current scroll position.
  68. A wxScrolled will normally scroll itself and therefore its child windows
  69. as well. It might however be desired to scroll a different window than
  70. itself: e.g. when designing a spreadsheet, you will normally only have to
  71. scroll the (usually white) cell area, whereas the (usually grey) label area
  72. will scroll very differently. For this special purpose, you can call
  73. SetTargetWindow() which means that pressing the scrollbars will scroll a
  74. different window.
  75. Note that the underlying system knows nothing about scrolling coordinates,
  76. so that all system functions (mouse events, expose events, refresh calls
  77. etc) as well as the position of subwindows are relative to the "physical"
  78. origin of the scrolled window. If the user insert a child window at
  79. position (10,10) and scrolls the window down 100 pixels (moving the child
  80. window out of the visible area), the child window will report a position
  81. of (10,-90).
  82. @beginStyleTable
  83. @style{wxHSCROLL}
  84. If this style is specified and ::wxVSCROLL isn't, the window will be
  85. scrollable only in horizontal direction (by default, i.e. if neither
  86. this style nor ::wxVSCROLL is specified, it scrolls in both
  87. directions).
  88. @style{wxVSCROLL}
  89. If this style is specified and ::wxHSCROLL isn't, the window will be
  90. scrollable only in vertical direction (by default, i.e. if neither
  91. this style nor ::wxHSCROLL is specified, it scrolls in both
  92. directions).
  93. @style{wxALWAYS_SHOW_SB}
  94. Since wxWidgets 2.9.5, specifying this style makes the window always
  95. show its scrollbars, even if they are not used. See ShowScrollbars().
  96. @style{wxRETAINED}
  97. Uses a backing pixmap to speed refreshes. Motif only.
  98. @endStyleTable
  99. @beginEventEmissionTable{wxScrollWinEvent}
  100. @event{EVT_SCROLLWIN(func)}
  101. Process all scroll events.
  102. @event{EVT_SCROLLWIN_TOP(func)}
  103. Process @c wxEVT_SCROLLWIN_TOP scroll-to-top events.
  104. @event{EVT_SCROLLWIN_BOTTOM(func)}
  105. Process @c wxEVT_SCROLLWIN_BOTTOM scroll-to-bottom events.
  106. @event{EVT_SCROLLWIN_LINEUP(func)}
  107. Process @c wxEVT_SCROLLWIN_LINEUP line up events.
  108. @event{EVT_SCROLLWIN_LINEDOWN(func)}
  109. Process @c wxEVT_SCROLLWIN_LINEDOWN line down events.
  110. @event{EVT_SCROLLWIN_PAGEUP(func)}
  111. Process @c wxEVT_SCROLLWIN_PAGEUP page up events.
  112. @event{EVT_SCROLLWIN_PAGEDOWN(func)}
  113. Process @c wxEVT_SCROLLWIN_PAGEDOWN page down events.
  114. @event{EVT_SCROLLWIN_THUMBTRACK(func)}
  115. Process @c wxEVT_SCROLLWIN_THUMBTRACK thumbtrack events
  116. (frequent events sent as the user drags the thumbtrack).
  117. @event{EVT_SCROLLWIN_THUMBRELEASE(func)}
  118. Process @c wxEVT_SCROLLWIN_THUMBRELEASE thumb release events.
  119. @endEventTable
  120. @note
  121. Don't confuse wxScrollWinEvents generated by this class with
  122. wxScrollEvent objects generated by wxScrollBar and wxSlider.
  123. @remarks
  124. Use wxScrolled for applications where the user scrolls by a fixed amount,
  125. and where a 'page' can be interpreted to be the current visible portion of
  126. the window. For more sophisticated applications, use the wxScrolled
  127. implementation as a guide to build your own scroll behaviour or use
  128. wxVScrolledWindow or its variants.
  129. @since The wxScrolled template exists since version 2.9.0. In older versions,
  130. only ::wxScrolledWindow (equivalent of wxScrolled<wxPanel>) was
  131. available.
  132. @library{wxcore}
  133. @category{miscwnd}
  134. @see wxScrollBar, wxClientDC, wxPaintDC,
  135. wxVScrolledWindow, wxHScrolledWindow, wxHVScrolledWindow,
  136. */
  137. template<class T>
  138. class wxScrolled : public T
  139. {
  140. public:
  141. /// Default constructor.
  142. wxScrolled();
  143. /**
  144. Constructor.
  145. @param parent
  146. Parent window.
  147. @param id
  148. Window identifier. The value @c wxID_ANY indicates a default value.
  149. @param pos
  150. Window position. If a position of ::wxDefaultPosition is specified
  151. then a default position is chosen.
  152. @param size
  153. Window size. If a size of ::wxDefaultSize is specified then the
  154. window is sized appropriately.
  155. @param style
  156. Window style. See wxScrolled.
  157. @param name
  158. Window name.
  159. @remarks The window is initially created without visible scrollbars.
  160. Call SetScrollbars() to specify how big the virtual window
  161. size should be.
  162. */
  163. wxScrolled(wxWindow* parent, wxWindowID id = -1,
  164. const wxPoint& pos = wxDefaultPosition,
  165. const wxSize& size = wxDefaultSize,
  166. long style = wxHSCROLL | wxVSCROLL,
  167. const wxString& name = "scrolledWindow");
  168. /**
  169. Translates the logical coordinates to the device ones. For example, if
  170. a window is scrolled 10 pixels to the bottom, the device coordinates of
  171. the origin are (0, 0) (as always), but the logical coordinates are (0,
  172. 10) and so the call to CalcScrolledPosition(0, 10, xx, yy) will return
  173. 0 in yy.
  174. @beginWxPerlOnly
  175. In wxPerl this method takes two parameters and returns a
  176. 2-element list (xx, yy).
  177. @endWxPerlOnly
  178. @see CalcUnscrolledPosition()
  179. */
  180. void CalcScrolledPosition(int x, int y, int* xx, int* yy) const;
  181. wxPoint CalcScrolledPosition(const wxPoint& pt) const;
  182. /**
  183. Translates the device coordinates to the logical ones. For example, if
  184. a window is scrolled 10 pixels to the bottom, the device coordinates of
  185. the origin are (0, 0) (as always), but the logical coordinates are (0,
  186. 10) and so the call to CalcUnscrolledPosition(0, 0, xx, yy) will return
  187. 10 in yy.
  188. @beginWxPerlOnly
  189. In wxPerl this method takes two parameters and returns a
  190. 2-element list (xx, yy).
  191. @endWxPerlOnly
  192. @see CalcScrolledPosition()
  193. */
  194. void CalcUnscrolledPosition(int x, int y, int* xx, int* yy) const;
  195. wxPoint CalcUnscrolledPosition(const wxPoint& pt) const;
  196. /**
  197. Creates the window for two-step construction. Derived classes
  198. should call or replace this function. See wxScrolled::wxScrolled()
  199. for details.
  200. */
  201. bool Create(wxWindow* parent, wxWindowID id = -1,
  202. const wxPoint& pos = wxDefaultPosition,
  203. const wxSize& size = wxDefaultSize,
  204. long style = wxHSCROLL | wxVSCROLL,
  205. const wxString& name = "scrolledWindow");
  206. /**
  207. Disable use of keyboard keys for scrolling.
  208. By default cursor movement keys (including Home, End, Page Up and Down)
  209. are used to scroll the window appropriately. If the derived class uses
  210. these keys for something else, e.g. changing the currently selected
  211. item, this function can be used to disable this behaviour as it's not
  212. only not necessary then but can actually be actively harmful if another
  213. object forwards a keyboard event corresponding to one of the above keys
  214. to us using ProcessWindowEvent() because the event will always be
  215. processed which can be undesirable.
  216. @since 2.9.1
  217. */
  218. void DisableKeyboardScrolling();
  219. /**
  220. Call this function to prepare the device context for drawing a scrolled
  221. image.
  222. It sets the device origin according to the current scroll position.
  223. DoPrepareDC() is called automatically within the default @c wxEVT_PAINT
  224. event handler, so your OnDraw() override will be passed an already
  225. 'pre-scrolled' device context. However, if you wish to draw from
  226. outside of OnDraw() (e.g. from your own @c wxEVT_PAINT handler), you
  227. must call this function yourself.
  228. For example:
  229. @code
  230. void MyWindow::OnEvent(wxMouseEvent& event)
  231. {
  232. wxClientDC dc(this);
  233. DoPrepareDC(dc);
  234. dc.SetPen(*wxBLACK_PEN);
  235. float x, y;
  236. event.Position(&x, &y);
  237. if (xpos > -1 && ypos > -1 && event.Dragging())
  238. {
  239. dc.DrawLine(xpos, ypos, x, y);
  240. }
  241. xpos = x;
  242. ypos = y;
  243. }
  244. @endcode
  245. Notice that the function sets the origin by moving it relatively to the
  246. current origin position, so you shouldn't change the origin before
  247. calling DoPrepareDC() or, if you do, reset it to (0, 0) later. If you
  248. call DoPrepareDC() immediately after device context creation, as in the
  249. example above, this problem doesn't arise, of course, so it is
  250. customary to do it like this.
  251. */
  252. void DoPrepareDC(wxDC& dc);
  253. /**
  254. Enable or disable use of wxWindow::ScrollWindow() for scrolling.
  255. By default, when a scrolled window is logically scrolled,
  256. wxWindow::ScrollWindow() is called on the underlying window which
  257. scrolls the window contents and only invalidates the part of the window
  258. newly brought into view. If @false is passed as an argument, then this
  259. "physical scrolling" is disabled and the window is entirely invalidated
  260. whenever it is scrolled by calling wxWindow::Refresh().
  261. It should be rarely necessary to disable physical scrolling, so this
  262. method shouldn't be called in normal circumstances.
  263. @param xScrolling
  264. If @true, enables physical scrolling in the x direction.
  265. @param yScrolling
  266. If @true, enables physical scrolling in the y direction.
  267. */
  268. void EnableScrolling(bool xScrolling, bool yScrolling);
  269. /**
  270. Set the scrollbar visibility.
  271. By default the scrollbar in the corresponding direction is only shown
  272. if it is needed, i.e. if the virtual size of the scrolled window in
  273. this direction is greater than the current physical window size. Using
  274. this function the scrollbar visibility can be changed to be:
  275. - wxSHOW_SB_ALWAYS: To always show the scrollbar, even if it is
  276. not needed currently (wxALWAYS_SHOW_SB style can be used during
  277. the window creation to achieve the same effect but it applies
  278. in both directions).
  279. - wxSHOW_SB_NEVER: To never show the scrollbar at all. In this case
  280. the program should presumably provide some other way for the
  281. user to scroll the window.
  282. - wxSHOW_SB_DEFAULT: To restore the default behaviour described
  283. above.
  284. @param horz
  285. The desired visibility for the horizontal scrollbar.
  286. @param vert
  287. The desired visibility for the vertical scrollbar.
  288. @since 2.9.0
  289. */
  290. void ShowScrollbars(wxScrollbarVisibility horz, wxScrollbarVisibility vert);
  291. /**
  292. Get the number of pixels per scroll unit (line), in each direction, as
  293. set by SetScrollbars(). A value of zero indicates no scrolling in that
  294. direction.
  295. @param xUnit
  296. Receives the number of pixels per horizontal unit.
  297. @param yUnit
  298. Receives the number of pixels per vertical unit.
  299. @beginWxPerlOnly
  300. In wxPerl this method takes no parameters and returns a
  301. 2-element list (xUnit, yUnit).
  302. @endWxPerlOnly
  303. @see SetScrollbars(), GetVirtualSize()
  304. */
  305. void GetScrollPixelsPerUnit(int* xUnit, int* yUnit) const;
  306. /**
  307. Get the position at which the visible portion of the window starts.
  308. @param x
  309. Receives the first visible x position in scroll units.
  310. @param y
  311. Receives the first visible y position in scroll units.
  312. @remarks
  313. If either of the scrollbars is not at the home position, @a x
  314. and/or @a y will be greater than zero.
  315. Combined with wxWindow::GetClientSize(), the application can use this
  316. function to efficiently redraw only the visible portion of the window.
  317. The positions are in logical scroll units, not pixels, so to convert
  318. to pixels you will have to multiply by the number of pixels per scroll
  319. increment.
  320. @beginWxPerlOnly
  321. In wxPerl this method takes no parameters and returns a
  322. 2-element list (x, y).
  323. @endWxPerlOnly
  324. @see SetScrollbars(), Scroll()
  325. */
  326. void GetViewStart(int* x, int* y) const;
  327. /**
  328. This is a simple overload of GetViewStart(int*,int*); see that function
  329. for more info.
  330. */
  331. wxPoint GetViewStart() const;
  332. /**
  333. Gets the size in device units of the scrollable window area (as
  334. opposed to the client size, which is the area of the window currently
  335. visible).
  336. @param x
  337. Receives the length of the scrollable window, in pixels.
  338. @param y
  339. Receives the height of the scrollable window, in pixels.
  340. @remarks Use wxDC::DeviceToLogicalX() and wxDC::DeviceToLogicalY() to
  341. translate these units to logical units.
  342. @beginWxPerlOnly
  343. In wxPerl this method takes no parameters and returns a
  344. 2-element list (xUnit, yUnit).
  345. @endWxPerlOnly
  346. @see SetScrollbars(), GetScrollPixelsPerUnit()
  347. */
  348. void GetVirtualSize(int* x, int* y) const;
  349. /**
  350. Motif only: @true if the window has a backing bitmap.
  351. */
  352. bool IsRetained() const;
  353. /**
  354. Called by the default paint event handler to allow the application to
  355. define painting behaviour without having to worry about calling
  356. DoPrepareDC().
  357. Instead of overriding this function you may also just process the paint
  358. event in the derived class as usual, but then you will have to call
  359. DoPrepareDC() yourself.
  360. */
  361. virtual void OnDraw(wxDC& dc);
  362. /**
  363. This function is for backwards compatibility only and simply calls
  364. DoPrepareDC() now. Notice that it is not called by the default paint
  365. event handle (DoPrepareDC() is), so overriding this method in your
  366. derived class is useless.
  367. */
  368. void PrepareDC(wxDC& dc);
  369. /**
  370. Scrolls a window so the view start is at the given point.
  371. @param x
  372. The x position to scroll to, in scroll units.
  373. @param y
  374. The y position to scroll to, in scroll units.
  375. @remarks The positions are in scroll units, not pixels, so to convert to
  376. pixels you will have to multiply by the number of
  377. pixels per scroll increment. If either parameter is
  378. ::wxDefaultCoord (-1), that position will be ignored (no change
  379. in that direction).
  380. @see SetScrollbars(), GetScrollPixelsPerUnit()
  381. */
  382. void Scroll(int x, int y);
  383. /**
  384. This is an overload of Scroll(int,int); see that function for more info.
  385. */
  386. void Scroll(const wxPoint& pt);
  387. /**
  388. Set the horizontal and vertical scrolling increment only. See the
  389. pixelsPerUnit parameter in SetScrollbars().
  390. */
  391. void SetScrollRate(int xstep, int ystep);
  392. /**
  393. Sets up vertical and/or horizontal scrollbars.
  394. The first pair of parameters give the number of pixels per 'scroll
  395. step', i.e. amount moved when the up or down scroll arrows are pressed.
  396. The second pair gives the length of scrollbar in scroll steps, which
  397. sets the size of the virtual window.
  398. @a xPos and @a yPos optionally specify a position to scroll to
  399. immediately.
  400. For example, the following gives a window horizontal and vertical
  401. scrollbars with 20 pixels per scroll step, and a size of 50 steps (1000
  402. pixels) in each direction:
  403. @code
  404. window->SetScrollbars(20, 20, 50, 50);
  405. @endcode
  406. wxScrolled manages the page size itself, using the current client
  407. window size as the page size.
  408. Note that for more sophisticated scrolling applications, for example
  409. where scroll steps may be variable according to the position in the
  410. document, it will be necessary to derive a new class from wxWindow,
  411. overriding OnSize() and adjusting the scrollbars appropriately.
  412. @param pixelsPerUnitX
  413. Pixels per scroll unit in the horizontal direction.
  414. @param pixelsPerUnitY
  415. Pixels per scroll unit in the vertical direction.
  416. @param noUnitsX
  417. Number of units in the horizontal direction.
  418. @param noUnitsY
  419. Number of units in the vertical direction.
  420. @param xPos
  421. Position to initialize the scrollbars in the horizontal direction,
  422. in scroll units.
  423. @param yPos
  424. Position to initialize the scrollbars in the vertical direction, in
  425. scroll units.
  426. @param noRefresh
  427. Will not refresh window if @true.
  428. @see wxWindow::SetVirtualSize()
  429. */
  430. void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
  431. int noUnitsX,
  432. int noUnitsY,
  433. int xPos = 0,
  434. int yPos = 0,
  435. bool noRefresh = false);
  436. /**
  437. Call this function to tell wxScrolled to perform the actual scrolling
  438. on a different window (and not on itself).
  439. This method is useful when only a part of the window should be
  440. scrolled. A typical example is a control consisting of a fixed header
  441. and the scrollable contents window: the scrollbars are attached to the
  442. main window itself, hence it, and not the contents window must be
  443. derived from wxScrolled, but only the contents window scrolls when the
  444. scrollbars are used. To implement such setup, you need to call this
  445. method with the contents window as argument.
  446. Notice that if this method is used, GetSizeAvailableForScrollTarget()
  447. method must be overridden.
  448. */
  449. void SetTargetWindow(wxWindow *window);
  450. wxWindow *GetTargetWindow() const;
  451. void SetTargetRect(const wxRect& rect);
  452. wxRect GetTargetRect() const;
  453. int GetScrollPageSize(int orient) const;
  454. void SetScrollPageSize(int orient, int pageSize);
  455. int GetScrollLines( int orient ) const;
  456. void SetScale(double xs, double ys);
  457. double GetScaleX() const;
  458. double GetScaleY() const;
  459. virtual void AdjustScrollbars();
  460. /**
  461. Are we generating the autoscroll events?
  462. */
  463. bool IsAutoScrolling() const;
  464. /**
  465. Stop generating the scroll events when mouse is held outside the
  466. window.
  467. */
  468. void StopAutoScrolling();
  469. /**
  470. This method can be overridden in a derived class to forbid sending the
  471. auto scroll events - note that unlike StopAutoScrolling() it doesn't
  472. stop the timer, so it will be called repeatedly and will typically
  473. return different values depending on the current mouse position
  474. The base class version just returns true.
  475. */
  476. virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
  477. protected:
  478. /**
  479. Function which must be overridden to implement the size available for
  480. the scroll target for the given size of the main window.
  481. This method must be overridden if SetTargetWindow() is used (it is
  482. never called otherwise). The implementation should decrease the @a size
  483. to account for the size of the non-scrollable parts of the main window
  484. and return only the size available for the scrollable window itself.
  485. E.g. in the example given in SetTargetWindow() documentation the
  486. function would subtract the height of the header window from the
  487. vertical component of @a size.
  488. */
  489. virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size);
  490. };
  491. /**
  492. Scrolled window derived from wxPanel.
  493. See wxScrolled for a detailed description.
  494. @note Note that because this class derives from wxPanel, it shares its
  495. behaviour with regard to TAB traversal and focus handling (in
  496. particular, it forwards focus to its children). If you don't want
  497. this behaviour, use ::wxScrolledCanvas instead.
  498. @note ::wxScrolledWindow is an alias for wxScrolled<wxPanel> since version
  499. 2.9.0. In older versions, it was a standalone class.
  500. @library{wxcore}
  501. @category{miscwnd}
  502. @see wxScrolled, ::wxScrolledCanvas
  503. */
  504. typedef wxScrolled<wxPanel> wxScrolledWindow;
  505. /**
  506. Alias for wxScrolled<wxWindow>. Scrolled window that doesn't have children
  507. and so doesn't need or want special handling of TAB traversal.
  508. @since 2.9.0
  509. @library{wxcore}
  510. @category{miscwnd}
  511. @see wxScrolled, ::wxScrolledWindow
  512. */
  513. typedef wxScrolled<wxWindow> wxScrolledCanvas;