]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/wupdlock.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxWindowUpdateLocker
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
9 @class wxWindowUpdateLocker
11 This tiny class prevents redrawing of a wxWindow during its lifetime by using
12 wxWindow::Freeze() and wxWindow::Thaw() methods.
14 It is typically used for creating automatic objects to temporarily suppress
15 window updates before a batch of operations is performed:
20 m_text = new wxTextCtrl(this, ...);
22 wxWindowUpdateLocker noUpdates(m_text);
24 ... many other operations with m_text...
29 Using this class is easier and safer than calling wxWindow::Freeze() and
30 wxWindow::Thaw() because you don't risk to forget calling the latter.
35 class wxWindowUpdateLocker
39 Creates an object preventing the updates of the specified @e win.
40 The parameter must be non-@NULL and the window must exist for longer than
41 wxWindowUpdateLocker object itself.
43 wxWindowUpdateLocker(wxWindow
* win
);
46 Destructor reenables updates for the window this object is associated with.
48 ~wxWindowUpdateLocker();