parent
cd2c20fc06
commit
98eff47054
@ -25,13 +25,16 @@
|
|||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
|
wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
|
||||||
EVT_UPDATE_UI_RANGE(wxID_SEND_COMPOSED, wxID_SEND_ABORT, wxZRColaFrame::OnSendUpdate)
|
EVT_UPDATE_UI_RANGE(wxID_CUT, wxID_CLEAR, wxZRColaFrame::OnForwardEventUpdate)
|
||||||
|
EVT_MENU_RANGE(wxID_CUT, wxID_CLEAR, wxZRColaFrame::OnForwardEvent)
|
||||||
|
|
||||||
|
EVT_UPDATE_UI_RANGE(wxID_SEND_COMPOSED, wxID_SEND_ABORT, wxZRColaFrame::OnSendUpdate)
|
||||||
EVT_MENU(wxID_SEND_COMPOSED , wxZRColaFrame::OnSendComposed )
|
EVT_MENU(wxID_SEND_COMPOSED , wxZRColaFrame::OnSendComposed )
|
||||||
EVT_MENU(wxID_SEND_DECOMPOSED, wxZRColaFrame::OnSendDecomposed )
|
EVT_MENU(wxID_SEND_DECOMPOSED, wxZRColaFrame::OnSendDecomposed )
|
||||||
EVT_MENU(wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort )
|
EVT_MENU(wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort )
|
||||||
|
|
||||||
EVT_MENU(wxID_EXIT , wxZRColaFrame::OnExit )
|
EVT_MENU(wxID_EXIT , wxZRColaFrame::OnExit )
|
||||||
EVT_MENU(wxID_ABOUT , wxZRColaFrame::OnAbout )
|
EVT_MENU(wxID_ABOUT, wxZRColaFrame::OnAbout)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
@ -67,6 +70,26 @@ wxZRColaFrame::~wxZRColaFrame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxZRColaFrame::OnForwardEventUpdate(wxUpdateUIEvent& event)
|
||||||
|
{
|
||||||
|
wxControl *focusWnd = wxDynamicCast(FindFocus(), wxControl);
|
||||||
|
if (focusWnd)
|
||||||
|
focusWnd->GetEventHandler()->ProcessEvent(event);
|
||||||
|
else
|
||||||
|
event.Enable(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxZRColaFrame::OnForwardEvent(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxControl *focusWnd = wxDynamicCast(FindFocus(), wxControl);
|
||||||
|
if (focusWnd)
|
||||||
|
focusWnd->GetEventHandler()->ProcessEvent(event);
|
||||||
|
else
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxZRColaFrame::OnSendUpdate(wxUpdateUIEvent& event)
|
void wxZRColaFrame::OnSendUpdate(wxUpdateUIEvent& event)
|
||||||
{
|
{
|
||||||
event.Enable(m_hWndSource ? true : false);
|
event.Enable(m_hWndSource ? true : false);
|
||||||
|
@ -46,6 +46,8 @@ public:
|
|||||||
virtual ~wxZRColaFrame();
|
virtual ~wxZRColaFrame();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void OnForwardEventUpdate(wxUpdateUIEvent& event);
|
||||||
|
void OnForwardEvent(wxCommandEvent& event);
|
||||||
void OnSendUpdate(wxUpdateUIEvent& event);
|
void OnSendUpdate(wxUpdateUIEvent& event);
|
||||||
void OnSendComposed(wxCommandEvent& event);
|
void OnSendComposed(wxCommandEvent& event);
|
||||||
void OnSendDecomposed(wxCommandEvent& event);
|
void OnSendDecomposed(wxCommandEvent& event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user