centralized Esc key handling for closing the dialogs in wxDialogBase:
1. added wxDialogBase::OnCharHook() and removed this event handler from all the other ports 2. also removed ad hoc code doing the same thing in wxMSW (MSWProcessMessage() override in wxDialog) and wxGTK (in gtk_window_key_press_callback()) 3. reimplemented EmulateButtonClickIfPresent() portably and also moved it to wxDialogBase from wxMSW wxDialog git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,8 +17,6 @@ class WXDLLEXPORT wxEventLoop;
|
||||
// Dialog boxes
|
||||
class WXDLLEXPORT wxDialog : public wxDialogBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
|
||||
public:
|
||||
wxDialog();
|
||||
|
||||
@@ -70,7 +68,6 @@ public:
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
private:
|
||||
@@ -97,7 +94,7 @@ protected:
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DIALOG_H_
|
||||
#endif // _WX_DIALOG_H_
|
||||
|
Reference in New Issue
Block a user