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