update callbacks for name dialog

This commit is contained in:
jp9000
2013-12-29 03:56:07 -07:00
parent 7a4bc231eb
commit 6526c47907
3 changed files with 19 additions and 3 deletions

View File

@@ -862,8 +862,18 @@ NameDialogBase::NameDialogBase( wxWindow* parent, wxWindowID id, const wxString&
this->Layout();
this->Centre( wxBOTH );
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( NameDialogBase::OnClose ) );
okButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NameDialogBase::OKPressed ), NULL, this );
cancelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NameDialogBase::CancelPressed ), NULL, this );
}
NameDialogBase::~NameDialogBase()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( NameDialogBase::OnClose ) );
okButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NameDialogBase::OKPressed ), NULL, this );
cancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NameDialogBase::CancelPressed ), NULL, this );
}

View File

@@ -7784,7 +7784,7 @@
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnClose">OnClose</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
@@ -8092,7 +8092,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick"></event>
<event name="OnButtonClick">OKPressed</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
@@ -8180,7 +8180,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick"></event>
<event name="OnButtonClick">CancelPressed</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>

View File

@@ -308,6 +308,12 @@ class NameDialogBase : public wxDialog
wxTextCtrl* nameEdit;
wxButton* okButton;
wxButton* cancelButton;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OKPressed( wxCommandEvent& event ) { event.Skip(); }
virtual void CancelPressed( wxCommandEvent& event ) { event.Skip(); }
public: