From c6f9dfe8ef435ffe848961cedeaa21c50946d982 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 13 Jul 2007 13:05:28 +0000 Subject: [PATCH] added commands to test how busy cursor behaves during wxExecute() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/exec/exec.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp index 932674772d..6cff3c090c 100644 --- a/samples/exec/exec.cpp +++ b/samples/exec/exec.cpp @@ -97,6 +97,9 @@ public: void OnClear(wxCommandEvent& event); + void OnBeginBusyCursor(wxCommandEvent& event); + void OnEndBusyCursor(wxCommandEvent& event); + void OnSyncExec(wxCommandEvent& event); void OnSyncNoEventsExec(wxCommandEvent& event); void OnAsyncExec(wxCommandEvent& event); @@ -300,6 +303,8 @@ enum Exec_Quit = 100, Exec_Kill, Exec_ClearLog, + Exec_BeginBusyCursor, + Exec_EndBusyCursor, Exec_SyncExec = 200, Exec_SyncNoEventsExec, Exec_AsyncExec, @@ -333,6 +338,8 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Exec_Quit, MyFrame::OnQuit) EVT_MENU(Exec_Kill, MyFrame::OnKill) EVT_MENU(Exec_ClearLog, MyFrame::OnClear) + EVT_MENU(Exec_BeginBusyCursor, MyFrame::OnBeginBusyCursor) + EVT_MENU(Exec_EndBusyCursor, MyFrame::OnEndBusyCursor) EVT_MENU(Exec_SyncExec, MyFrame::OnSyncExec) EVT_MENU(Exec_SyncNoEventsExec, MyFrame::OnSyncNoEventsExec) @@ -432,9 +439,12 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(Exec_Kill, _T("&Kill process...\tCtrl-K"), _T("Kill a process by PID")); menuFile->AppendSeparator(); - menuFile->Append(Exec_ClearLog, _T("&Clear log\tCtrl-C"), + menuFile->Append(Exec_ClearLog, _T("&Clear log\tCtrl-L"), _T("Clear the log window")); menuFile->AppendSeparator(); + menuFile->Append(Exec_BeginBusyCursor, _T("Show &busy cursor\tCtrl-C")); + menuFile->Append(Exec_EndBusyCursor, _T("Show &normal cursor\tShift-Ctrl-C")); + menuFile->AppendSeparator(); menuFile->Append(Exec_Quit, _T("E&xit\tAlt-X"), _T("Quit this program")); wxMenu *execMenu = new wxMenu; @@ -506,6 +516,16 @@ void MyFrame::OnClear(wxCommandEvent& WXUNUSED(event)) m_lbox->Clear(); } +void MyFrame::OnBeginBusyCursor(wxCommandEvent& WXUNUSED(event)) +{ + wxBeginBusyCursor(); +} + +void MyFrame::OnEndBusyCursor(wxCommandEvent& WXUNUSED(event)) +{ + wxEndBusyCursor(); +} + void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxMessageBox(_T("Exec wxWidgets Sample\n(c) 2000-2002 Vadim Zeitlin"),