1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxWindowUpdateLocker documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxWindowUpdateLocker
}}\label{wxwindowupdatelocker
}
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:
23 m_text = new wxTextCtrl(this, ...);
25 wxWindowUpdateLocker noUpdates(m_text);
27 ... many other operations with m_text...
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.
37 \wxheading{Derived from
}
41 \wxheading{Include files
}
45 \latexignore{\rtfignore{\wxheading{Members
}}}
48 \membersection{wxWindowUpdateLocker::wxWindowUpdateLocker
}\label{wxwindowupdatelockerctor
}
50 \func{}{wxWindowUpdateLocker
}{\param{wxWindow *
}{win
}}
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.
57 \membersection{wxWindowUpdateLocker::
\destruct{wxWindowUpdateLocker
}}\label{wxwindowupdatelockerdtor
}
59 \func{}{\destruct{wxWindowUpdateLocker
}}{\void}
61 Destructor reenables updates for the window this object is associated with.