X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/265a3864bbbc7ac8af309c80321efbba8c0ca6e9..5c35d5c1d984f46d33e8181c907936e96160d795:/docs/latex/wx/bufferdc.tex diff --git a/docs/latex/wx/bufferdc.tex b/docs/latex/wx/bufferdc.tex index 0e903887ec..27e750b524 100644 --- a/docs/latex/wx/bufferdc.tex +++ b/docs/latex/wx/bufferdc.tex @@ -19,7 +19,11 @@ object is destroyed. It can be used in the same way as any other device context. wxBufferedDC itself typically replaces \helpref{wxClientDC}{wxclientdc}, if you want to use it in your \texttt{OnPaint()} handler, you should look at -\helpref{wxBufferedPaintDC}{wxbufferedpaintdc}. +\helpref{wxBufferedPaintDC}{wxbufferedpaintdc} or \helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc}. + +Please note that GTK+ 2.0 as well as OS X provide double buffering themselves ++natively. Use \helpref{wxWindow::IsDoubleBuffered}{wxwindowisdoublebuffered} to ++determine whether you need to use buffering or not. \wxheading{Derived from} @@ -33,7 +37,10 @@ your \texttt{OnPaint()} handler, you should look at \wxheading{See also} -\helpref{wxDC}{wxdc} +\helpref{wxDC}{wxdc},\rtfsp +\helpref{wxMemoryDC}{wxmemorydc},\rtfsp +\helpref{wxBufferedPaintDC}{wxbufferedpaintdc},\rtfsp +\helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc} \latexignore{\rtfignore{\wxheading{Members}}} @@ -96,14 +103,16 @@ this object, if any. This is a subclass of \helpref{wxBufferedDC}{wxbuffereddc} which can be used inside of an \texttt{OnPaint()} event handler. Just create an object of this class instead -of \helpref{wxPaintDC}{wxpaintdc} and that's all you have to do to (mostly) -avoid flicker. The only thing to watch out for is that if you are using this -class together with \helpref{wxScrolledWindow}{wxscrolledwindow}, you probably +of \helpref{wxPaintDC}{wxpaintdc} and make sure \helpref{wxWindow::SetBackgroundStyle}{wxwindowgetbackgroundstyle} +is called with wxBG\_STYLE\_CUSTOM somewhere in the class initialization code, and that's all +you have to do to (mostly) avoid flicker. The only thing to watch out for is that if you are +using this class together with \helpref{wxScrolledWindow}{wxscrolledwindow}, you probably do \textbf{not} want to call \helpref{PrepareDC}{wxscrolledwindowpreparedc} on it as it already does this internally for the real underlying wxPaintDC. \wxheading{Derived from} +\helpref{wxBufferedDC}{wxbuffereddc}\\ \helpref{wxMemoryDC}{wxmemorydc}\\ \helpref{wxDC}{wxdc}\\ \helpref{wxObject}{wxobject} @@ -112,6 +121,12 @@ already does this internally for the real underlying wxPaintDC. <wx/dcbuffer.h> +\wxheading{See also} + +\helpref{wxDC}{wxdc},\rtfsp +\helpref{wxBufferedDC}{wxbuffereddc},\rtfsp +\helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc} + \latexignore{\rtfignore{\wxheading{Members}}} @@ -136,3 +151,43 @@ Copies everything drawn on the DC so far to the window associated with this object, using a \helpref{wxPaintDC}{wxpaintdc}. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxAutoBufferedPaintDC}}\label{wxautobufferedpaintdc} + +This wxDC derivative can be used inside of an \texttt{OnPaint()} event handler to achieve +double-buffered drawing. Just create an object of this class instead of \helpref{wxPaintDC}{wxpaintdc} +and make sure \helpref{wxWindow::SetBackgroundStyle}{wxwindowgetbackgroundstyle} is called +with wxBG\_STYLE\_CUSTOM somewhere in the class initialization code, and that's all you have +to do to (mostly) avoid flicker. + +The difference between \helpref{wxBufferedPaintDC}{wxbufferedpaintdc} and this class, +is the lightweigthness - on platforms which have native double-buffering, wxAutoBufferedPaintDC is simply +a typedef of wxPaintDC. Otherwise, it is a typedef of wxBufferedPaintDC. + + +\wxheading{Derived from} + +\helpref{wxBufferedPaintDC}{wxbufferedpaintdc}\\ +\helpref{wxPaintDC}{wxpaintdc}\\ +\helpref{wxDC}{wxdc}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + +<wx/dcbuffer.h> + +\wxheading{See also} + +\helpref{wxDC}{wxdc},\rtfsp +\helpref{wxBufferedPaintDC}{wxbufferedpaintdc} + + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxAutoBufferedPaintDC::wxAutoBufferedPaintDC}\label{wxautobufferedpaintdcctor} + +\func{}{wxAutoBufferedPaintDC}{\param{wxWindow *}{window}} + +Constructor. Pass a pointer to the window on which you wish to paint. +