KiCad PCB EDA Suite
WDO_ENABLE_DISABLE Class Reference

Toggle a window's "enable" status to disabled, then enabled on destruction. More...

Public Member Functions

 WDO_ENABLE_DISABLE (wxWindow *aWindow)
 
 ~WDO_ENABLE_DISABLE ()
 

Private Attributes

wxWindow * m_win
 

Detailed Description

Toggle a window's "enable" status to disabled, then enabled on destruction.

Definition at line 42 of file dialog_shim.cpp.

Constructor & Destructor Documentation

◆ WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::WDO_ENABLE_DISABLE ( wxWindow *  aWindow)
inline

Definition at line 48 of file dialog_shim.cpp.

48  :
49  m_win( aWindow )
50  {
51  if( m_win )
52  m_win->Disable();
53  }

References m_win.

◆ ~WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::~WDO_ENABLE_DISABLE ( )
inline

Definition at line 55 of file dialog_shim.cpp.

56  {
57  if( m_win )
58  {
59  m_win->Enable();
60  m_win->SetFocus(); // let's focus back on the parent window
61  }
62  }

References m_win.

Member Data Documentation

◆ m_win

wxWindow* WDO_ENABLE_DISABLE::m_win
private

Definition at line 44 of file dialog_shim.cpp.

Referenced by WDO_ENABLE_DISABLE(), and ~WDO_ENABLE_DISABLE().


The documentation for this class was generated from the following file: