]>
git.saurik.com Git - wxWidgets.git/blob - interface/wupdlock.h
ffd5b419fe47cf356f78e1a28e21763d181a2a16
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxWindowUpdateLocker class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxWindowUpdateLocker
13 This tiny class prevents redrawing of a wxWindow during its
14 lifetime by using wxWindow::Freeze and
15 wxWindow::Thaw methods. It is typically used for creating
16 automatic objects to temporarily suppress window updates before a batch of
17 operations is performed:
22 m_text = new wxTextCtrl(this, ...);
24 wxWindowUpdateLocker noUpdates(m_text);
26 ... many other operations with m_text...
31 Using this class is easier and safer than calling
32 wxWindow::Freeze and wxWindow::Thaw because you
33 don't risk to forget calling the latter.
38 class wxWindowUpdateLocker
42 Creates an object preventing the updates of the specified @e win. The
43 parameter must be non-@NULL and the window must exist for longer than
44 wxWindowUpdateLocker object itself.
46 wxWindowUpdateLocker(wxWindow
* win
);
49 Destructor reenables updates for the window this object is associated with.
51 ~wxWindowUpdateLocker();