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

Constructor & Destructor Documentation

◆ WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::WDO_ENABLE_DISABLE ( wxWindow *  aWindow)
inline

Definition at line 46 of file dialog_shim.cpp.

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

References m_win.

◆ ~WDO_ENABLE_DISABLE()

WDO_ENABLE_DISABLE::~WDO_ENABLE_DISABLE ( )
inline

Definition at line 53 of file dialog_shim.cpp.

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

References m_win.

Member Data Documentation

◆ m_win

wxWindow* WDO_ENABLE_DISABLE::m_win
private

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