28 #include <wx/dialog.h> 69 #define SHOWQUASIMODAL ShowQuasiModal 70 #define ENDQUASIMODAL EndQuasiModal 85 DIALOG_SHIM( wxWindow* aParent, wxWindowID
id,
const wxString& title,
86 const wxPoint& pos = wxDefaultPosition,
87 const wxSize& size = wxDefaultSize,
88 long style = wxDEFAULT_FRAME_STYLE | wxRESIZE_BORDER,
89 const wxString&
name = wxDialogNameStr );
108 bool Show(
bool show )
override;
110 bool Enable(
bool enable )
override;
112 void OnPaint( wxPaintEvent &event );
126 static bool IsCtrl(
int aChar,
const wxKeyEvent& e )
128 return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
129 !e.ShiftDown() && !e.MetaDown();
134 return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
135 e.ShiftDown() && !e.MetaDown();
192 void OnButton( wxCommandEvent& aEvent );
226 #endif // DIALOG_SHIM_
A mix in class which holds the location of a wxWindow's KIWAY.
void setSizeInDU(int x, int y)
Set the dialog to the given dimensions in "dialog units".
void OnButton(wxCommandEvent &aEvent)
Properly handle the default button events when in the quasimodal mode when not calling EndQuasiModal ...
std::vector< wxWindow * > m_tabOrder
bool IsQuasiModal() const
wxWindow * m_initialFocusTarget
int horizPixelsFromDU(int x) const
Convert an integer number of dialog units to pixels, horizontally.
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
void OnGridEditorShown(wxGridEvent &event)
void OnGridEditorHidden(wxGridEvent &event)
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
EDA_UNITS GetUserUnits() const
WX_EVENT_LOOP * m_qmodal_loop
void OnCloseWindow(wxCloseEvent &aEvent)
Properly handle the wxCloseEvent when in the quasimodal mode when not calling EndQuasiModal which is ...
WINDOW_THAWER(wxWindow *aWindow)
void SetPosition(const wxPoint &aNewPosition)
Force the position of the dialog to a new position.
EDA_BASE_FRAME * m_parentFrame
void OnPaint(wxPaintEvent &event)
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
virtual void OnCharHook(wxKeyEvent &aEvt)
void EndQuasiModal(int retCode)
static bool IsShiftCtrl(int aChar, const wxKeyEvent &e)
The base frame for deriving all KiCad main window classes.
Toggle a window's "enable" status to disabled, then enabled on destruction.
void resetSize()
Clear the existing dialog size and position.
int vertPixelsFromDU(int y) const
Convert an integer number of dialog units to pixels, vertically.
bool Enable(bool enable) override
static bool IsCtrl(int aChar, const wxKeyEvent &e)