40class wxInitDialogEvent;
63 DIALOG_SHIM( wxWindow* aParent, wxWindowID
id,
const wxString& title,
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize,
66 long style = wxDEFAULT_FRAME_STYLE | wxRESIZE_BORDER,
67 const wxString&
name = wxDialogNameStr );
77 m_initialFocusTarget = aWindow;
80 int ShowModal()
override;
84 void EndQuasiModal(
int retCode );
93 void PrepareForModalSubDialog();
94 void CleanupAfterModalSubDialog();
96 bool Show(
bool show )
override;
98 bool Enable(
bool enable )
override;
100 void OnPaint( wxPaintEvent &event );
109 void SetPosition(
const wxPoint& aNewPosition );
116 void SelectAllInTextCtrls( wxWindowList& children );
118 void SetupStandardButtons( std::map<int, wxString> aLabels = {} );
120 static bool IsCtrl(
int aChar,
const wxKeyEvent& e )
122 return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
123 !e.ShiftDown() && !e.MetaDown();
128 return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
129 e.ShiftDown() && !e.MetaDown();
137 void LoadControlState();
142 void SaveControlState();
148 void OptOut( wxWindow* aWindow );
156 void RegisterUnitBinder(
UNIT_BINDER* aUnitBinder, wxWindow* aWindow );
169 void finishDialogSettings();
176 void setSizeInDU(
int x,
int y );
182 int horizPixelsFromDU(
int x )
const;
188 int vertPixelsFromDU(
int y )
const;
199 virtual void OnCharHook( wxKeyEvent& aEvt );
215 void OnCloseWindow( wxCloseEvent& aEvent );
217 void OnSize( wxSizeEvent& aEvent );
218 void OnMove( wxMoveEvent& aEvent );
224 void OnButton( wxCommandEvent& aEvent );
226 void onChildSetFocus( wxFocusEvent& aEvent );
228 void onInitDialog( wxInitDialogEvent& aEvent );
230 std::string generateKey(
const wxWindow* aWin )
const;
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
static bool IsShiftCtrl(int aChar, const wxKeyEvent &e)
std::vector< wxWindow * > m_tabOrder
virtual void TearDownQuasiModal()
Override this method to perform dialog tear down actions not suitable for object dtor.
static bool IsCtrl(int aChar, const wxKeyEvent &e)
wxGUIEventLoop * m_qmodal_loop
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
WINDOW_DISABLER * m_qmodal_parent_disabler
std::map< wxWindow *, wxString > m_beforeEditValues
bool IsQuasiModal() const
std::map< wxWindow *, UNIT_BINDER * > m_unitBinders
wxWindow * m_initialFocusTarget
EDA_BASE_FRAME * m_parentFrame
EDA_UNITS GetUserUnits() const
The base frame for deriving all KiCad main window classes.
A mix in class which holds the location of a wxWindow's KIWAY.
Temporarily disable a window, and then re-enable on destruction.