]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/wupdlock.tex
document wxDataViewItem
[wxWidgets.git] / docs / latex / wx / wupdlock.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: wupdlock.tex
3 %% Purpose: wxWindowUpdateLocker documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 2006-03-06
7 %% RCS-ID: $Id$
8 %% Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxWindowUpdateLocker}}\label{wxwindowupdatelocker}
13
14 This tiny class prevents redrawing of a \helpref{wxWindow}{wxwindow} during its
15 lifetime by using \helpref{wxWindow::Freeze}{wxwindowfreeze} and
16 \helpref{Thaw}{wxwindowthaw} methods. It is typically used for creating
17 automatic objects to temporarily suppress window updates before a batch of
18 operations is performed:
19 {\small
20 \begin{verbatim}
21 void MyFrame::Foo()
22 {
23 m_text = new wxTextCtrl(this, ...);
24
25 wxWindowUpdateLocker noUpdates(m_text);
26 m_text->AppendText();
27 ... many other operations with m_text...
28 m_text->WriteText();
29 }
30 \end{verbatim}
31 }
32
33 Using this class is easier and safer than calling
34 \helpref{Freeze}{wxwindowfreeze} and \helpref{Thaw}{wxwindowthaw} because you
35 don't risk to forget calling the latter.
36
37 \wxheading{Derived from}
38
39 None.
40
41 \wxheading{Include files}
42
43 <wx/wupdlock.h>
44
45 \latexignore{\rtfignore{\wxheading{Members}}}
46
47
48 \membersection{wxWindowUpdateLocker::wxWindowUpdateLocker}\label{wxwindowupdatelockerctor}
49
50 \func{}{wxWindowUpdateLocker}{\param{wxWindow *}{win}}
51
52 Creates an object preventing the updates of the specified \arg{win}. The
53 parameter must be non-\NULL and the window must exist for longer than
54 wxWindowUpdateLocker object itself.
55
56
57 \membersection{wxWindowUpdateLocker::\destruct{wxWindowUpdateLocker}}\label{wxwindowupdatelockerdtor}
58
59 \func{}{\destruct{wxWindowUpdateLocker}}{\void}
60
61 Destructor reenables updates for the window this object is associated with.
62