the coordinates according to the scrollbar positions, and setting the
scroll positions, thumb sizes and ranges according to the area in view.
the coordinates according to the scrollbar positions, and setting the
scroll positions, thumb sizes and ranges according to the area in view.
wxScrolledWindow. In particular, there are now three ways to set the
size of the scrolling area:
One way is to set the scrollbars directly using a call to
\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars}.
wxScrolledWindow. In particular, there are now three ways to set the
size of the scrolling area:
One way is to set the scrollbars directly using a call to
\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars}.
and it will be kept for backwards compatibility.
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 \helpref{wxWindow::SetVirtualSize}{wxwindowsetvirtualsize},
or \helpref{wxWindow::FitInside}{wxwindowfitinside}, and setting the
and it will be kept for backwards compatibility.
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 \helpref{wxWindow::SetVirtualSize}{wxwindowsetvirtualsize},
or \helpref{wxWindow::FitInside}{wxwindowfitinside}, and setting the
controlled by a sizer by calling
\helpref{wxWindow::SetVirtualSizeHints}{wxwindowsetvirtualsizehints}.
(calling \helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars}
controlled by a sizer by calling
\helpref{wxWindow::SetVirtualSizeHints}{wxwindowsetvirtualsizehints}.
(calling \helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars}
-or overriding the \helpref{OnDraw}{wxscrolledwindowondraw} function, which is passed
-a pre-scrolled device context (prepared by \helpref{PrepareDC}{wxscrolledwindowpreparedc}).
+or overriding the \helpref{OnDraw}{wxscrolledwindowondraw} function, which is
+passed a pre-scrolled device context (prepared by
+\helpref{DoPrepareDC}{wxscrolledwindowdopreparedc}).
-\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc}
+\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxClientDC}{wxclientdc},\\
+\helpref{wxPaintDC}{wxpaintdc}, \helpref{wxVScrolledWindow}{wxvscrolledwindow}
Call \helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars} to
specify how big the virtual window size should be.
Call \helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars} to
specify how big the virtual window size should be.
\membersection{wxScrolledWindow::CalcScrolledPosition}\label{wxscrolledwindowcalcscrolledposition}
\constfunc{void}{CalcScrolledPosition}{
\membersection{wxScrolledWindow::CalcScrolledPosition}\label{wxscrolledwindowcalcscrolledposition}
\constfunc{void}{CalcScrolledPosition}{
\perlnote{In wxPerl this method takes two parameters and returns a
2-element list {\tt ( xx, yy )}.}
\perlnote{In wxPerl this method takes two parameters and returns a
2-element list {\tt ( xx, yy )}.}
\membersection{wxScrolledWindow::CalcUnscrolledPosition}\label{wxscrolledwindowcalcunscrolledposition}
\constfunc{void}{CalcUnscrolledPosition}{
\membersection{wxScrolledWindow::CalcUnscrolledPosition}\label{wxscrolledwindowcalcunscrolledposition}
\constfunc{void}{CalcUnscrolledPosition}{
\perlnote{In wxPerl this method takes two parameters and returns a
2-element list {\tt ( xx, yy )}.}
\perlnote{In wxPerl this method takes two parameters and returns a
2-element list {\tt ( xx, yy )}.}
\membersection{wxScrolledWindow::Create}\label{wxscrolledwindowcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id = -1},\rtfsp
\membersection{wxScrolledWindow::Create}\label{wxscrolledwindowcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id = -1},\rtfsp
\param{long}{ style = wxHSCROLL \pipe wxVSCROLL}, \param{const wxString\& }{name = ``scrolledWindow"}}
Creates the window for two-step construction. Derived classes
\param{long}{ style = wxHSCROLL \pipe wxVSCROLL}, \param{const wxString\& }{name = ``scrolledWindow"}}
Creates the window for two-step construction. Derived classes
\membersection{wxScrolledWindow::EnableScrolling}\label{wxscrolledwindowenablescrolling}
\func{void}{EnableScrolling}{\param{const bool}{ xScrolling}, \param{const bool}{ yScrolling}}
\membersection{wxScrolledWindow::EnableScrolling}\label{wxscrolledwindowenablescrolling}
\func{void}{EnableScrolling}{\param{const bool}{ xScrolling}, \param{const bool}{ yScrolling}}
\membersection{wxScrolledWindow::GetScrollPixelsPerUnit}\label{wxscrolledwindowgetscrollpixelsperunit}
\constfunc{void}{GetScrollPixelsPerUnit}{\param{int* }{xUnit}, \param{int* }{yUnit}}
\membersection{wxScrolledWindow::GetScrollPixelsPerUnit}\label{wxscrolledwindowgetscrollpixelsperunit}
\constfunc{void}{GetScrollPixelsPerUnit}{\param{int* }{xUnit}, \param{int* }{yUnit}}
\perlnote{In wxPerl this method takes no parameters and returns a
2-element list {\tt ( xUnit, yUnit )}.}
\perlnote{In wxPerl this method takes no parameters and returns a
2-element list {\tt ( xUnit, yUnit )}.}
\membersection{wxScrolledWindow::GetViewStart}\label{wxscrolledwindowgetviewstart}
\constfunc{void}{GetViewStart}{\param{int* }{x}, \param{int* }{ y}}
\membersection{wxScrolledWindow::GetViewStart}\label{wxscrolledwindowgetviewstart}
\constfunc{void}{GetViewStart}{\param{int* }{x}, \param{int* }{ y}}
\perlnote{In wxPerl this method takes no parameters and returns a
2-element list {\tt ( x, y )}.}
\perlnote{In wxPerl this method takes no parameters and returns a
2-element list {\tt ( x, y )}.}
\membersection{wxScrolledWindow::GetVirtualSize}\label{wxscrolledwindowgetvirtualsize}
\constfunc{void}{GetVirtualSize}{\param{int* }{x}, \param{int* }{y}}
\membersection{wxScrolledWindow::GetVirtualSize}\label{wxscrolledwindowgetvirtualsize}
\constfunc{void}{GetVirtualSize}{\param{int* }{x}, \param{int* }{y}}
\perlnote{In wxPerl this method takes no parameters and returns a
2-element list {\tt ( x, y )}.}
\perlnote{In wxPerl this method takes no parameters and returns a
2-element list {\tt ( x, y )}.}
\membersection{wxScrolledWindow::IsRetained}\label{wxscrolledwindowisretained}
\constfunc{bool}{IsRetained}{\void}
\membersection{wxScrolledWindow::IsRetained}\label{wxscrolledwindowisretained}
\constfunc{bool}{IsRetained}{\void}
Call this function to prepare the device context for drawing a scrolled image. It
sets the device origin according to the current scroll position.
Call this function to prepare the device context for drawing a scrolled image. It
sets the device origin according to the current scroll position.
handler, so your \helpref{wxScrolledWindow::OnDraw}{wxscrolledwindowondraw} override
will be passed a 'pre-scrolled' device context. However, if you wish to draw from
outside of OnDraw (via OnPaint), or you wish to implement OnPaint yourself, you must
handler, so your \helpref{wxScrolledWindow::OnDraw}{wxscrolledwindowondraw} override
will be passed a 'pre-scrolled' device context. However, if you wish to draw from
outside of OnDraw (via OnPaint), or you wish to implement OnPaint yourself, you must
\membersection{wxScrolledWindow::OnDraw}\label{wxscrolledwindowondraw}
\func{virtual void}{OnDraw}{\param{wxDC\& }{dc}}
Called by the default paint event handler to allow the application to define
\membersection{wxScrolledWindow::OnDraw}\label{wxscrolledwindowondraw}
\func{virtual void}{OnDraw}{\param{wxDC\& }{dc}}
Called by the default paint event handler to allow the application to define
-painting behaviour without having to worry about calling
-\helpref{wxScrolledWindow::PrepareDC}{wxscrolledwindowpreparedc}.
+painting behaviour without having to worry about calling
+\helpref{wxScrolledWindow::DoPrepareDC}{wxscrolledwindowdopreparedc}.
+
+\membersection{wxScrolledWindow::PrepareDC}\label{wxscrolledwindowpreparedc}
+
+\func{void}{PrepareDC}{\param{wxDC\& }{dc}}
+
+This function is for backwards compatibility only and simply calls
+\helpref{DoPrepareDC}{wxscrolledwindowdopreparedc} now. Notice that it is
+\emph{not} called by the default paint event handle (DoPrepareDC() is), so
+overriding this method in your derived class is useless.
+
+
\membersection{wxScrolledWindow::Scroll}\label{wxscrolledwindowscroll}
\func{void}{Scroll}{\param{int}{ x}, \param{int}{ y}}
\membersection{wxScrolledWindow::Scroll}\label{wxscrolledwindowscroll}
\func{void}{Scroll}{\param{int}{ x}, \param{int}{ y}}
\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars},\rtfsp
\helpref{wxScrolledWindow::GetScrollPixelsPerUnit}{wxscrolledwindowgetscrollpixelsperunit}
\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars},\rtfsp
\helpref{wxScrolledWindow::GetScrollPixelsPerUnit}{wxscrolledwindowgetscrollpixelsperunit}
\membersection{wxScrolledWindow::SetScrollbars}\label{wxscrolledwindowsetscrollbars}
\func{void}{SetScrollbars}{\param{int}{ pixelsPerUnitX}, \param{int}{ pixelsPerUnitY},\rtfsp
\param{int}{ noUnitsX}, \param{int}{ noUnitsY},\rtfsp
\param{int }{xPos = 0}, \param{int}{ yPos = 0},\rtfsp
\membersection{wxScrolledWindow::SetScrollbars}\label{wxscrolledwindowsetscrollbars}
\func{void}{SetScrollbars}{\param{int}{ pixelsPerUnitX}, \param{int}{ pixelsPerUnitY},\rtfsp
\param{int}{ noUnitsX}, \param{int}{ noUnitsY},\rtfsp
\param{int }{xPos = 0}, \param{int}{ yPos = 0},\rtfsp
\membersection{wxScrolledWindow::SetTargetWindow}\label{wxscrolledwindowsettargetwindow}
\func{void}{SetTargetWindow}{\param{wxWindow* }{window}}
Call this function to tell wxScrolledWindow to perform the actual scrolling on
\membersection{wxScrolledWindow::SetTargetWindow}\label{wxscrolledwindowsettargetwindow}
\func{void}{SetTargetWindow}{\param{wxWindow* }{window}}
Call this function to tell wxScrolledWindow to perform the actual scrolling on