]>
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 lifetime by using 
  13     wxWindow::Freeze() and wxWindow::Thaw() methods. 
  15     It is typically used for creating automatic objects to temporarily suppress 
  16     window updates before a batch of 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 wxWindow::Freeze() and 
  31     wxWindow::Thaw() because you don't risk to forget calling the latter. 
  36 class wxWindowUpdateLocker
 
  40         Creates an object preventing the updates of the specified @e win. 
  41         The parameter must be non-@NULL and the window must exist for longer than 
  42         wxWindowUpdateLocker object itself. 
  44     wxWindowUpdateLocker(wxWindow
* win
); 
  47         Destructor reenables updates for the window this object is associated with. 
  49     ~wxWindowUpdateLocker();