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

Constructor & Destructor Documentation

◆ WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::WDO_ENABLE_DISABLE ( wxWindow *  aWindow)
inline

Definition at line 44 of file dialog_shim.cpp.

44  :
45  m_win( aWindow )
46  {
47  if( m_win )
48  m_win->Disable();
49  }

References m_win.

◆ ~WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::~WDO_ENABLE_DISABLE ( )
inline

Definition at line 51 of file dialog_shim.cpp.

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

References m_win.

Member Data Documentation

◆ m_win

wxWindow* WDO_ENABLE_DISABLE::m_win
private

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