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 35 of file dialog_shim.cpp.

Constructor & Destructor Documentation

◆ WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::WDO_ENABLE_DISABLE ( wxWindow *  aWindow)
inline

Definition at line 41 of file dialog_shim.cpp.

41  :
42  m_win( aWindow )
43  {
44  if( m_win )
45  m_win->Disable();
46  }

References m_win.

◆ ~WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::~WDO_ENABLE_DISABLE ( )
inline

Definition at line 48 of file dialog_shim.cpp.

49  {
50  if( m_win )
51  {
52  m_win->Enable();
53  m_win->SetFocus(); // let's focus back on the parent window
54  }
55  }

References m_win.

Member Data Documentation

◆ m_win

wxWindow* WDO_ENABLE_DISABLE::m_win
private

Definition at line 37 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: