Added demonstration of busy cursor bug.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-07-02 15:30:00 +00:00
parent e93c800b85
commit 5724671379
2 changed files with 22 additions and 5 deletions

View File

@@ -33,6 +33,8 @@
#include "listtest.h" #include "listtest.h"
BEGIN_EVENT_TABLE(MyFrame, wxFrame) BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(BUSY_ON, MyFrame::BusyOn)
EVT_MENU(BUSY_OFF, MyFrame::BusyOff)
EVT_MENU(LIST_QUIT, MyFrame::OnQuit) EVT_MENU(LIST_QUIT, MyFrame::OnQuit)
EVT_MENU(LIST_ABOUT, MyFrame::OnAbout) EVT_MENU(LIST_ABOUT, MyFrame::OnAbout)
EVT_MENU(LIST_LIST_VIEW, MyFrame::OnListView) EVT_MENU(LIST_LIST_VIEW, MyFrame::OnListView)
@@ -129,6 +131,8 @@ bool MyApp::OnInit(void)
file_menu->Append(LIST_SMALL_ICON_TEXT_VIEW, "Small icon &view with text"); file_menu->Append(LIST_SMALL_ICON_TEXT_VIEW, "Small icon &view with text");
file_menu->Append(LIST_DESELECT_ALL, "&Deselect All"); file_menu->Append(LIST_DESELECT_ALL, "&Deselect All");
file_menu->Append(LIST_SELECT_ALL, "S&elect All"); file_menu->Append(LIST_SELECT_ALL, "S&elect All");
file_menu->Append(BUSY_ON, "&Busy cursor on");
file_menu->Append(BUSY_OFF, "&Busy cursor off");
file_menu->AppendSeparator(); file_menu->AppendSeparator();
file_menu->Append(LIST_ABOUT, "&About"); file_menu->Append(LIST_ABOUT, "&About");
file_menu->Append(LIST_QUIT, "E&xit"); file_menu->Append(LIST_QUIT, "E&xit");
@@ -194,6 +198,16 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
Close(TRUE); Close(TRUE);
} }
void MyFrame::BusyOn(wxCommandEvent& WXUNUSED(event))
{
wxBeginBusyCursor();
}
void MyFrame::BusyOff(wxCommandEvent& WXUNUSED(event))
{
wxEndBusyCursor();
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{ {
wxMessageDialog dialog(this, "List test sample\nJulian Smart (c) 1997", wxMessageDialog dialog(this, "List test sample\nJulian Smart (c) 1997",
@@ -266,9 +280,9 @@ void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnIconView(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnIconView(wxCommandEvent& WXUNUSED(event))
{ {
m_listCtrl->DeleteAllItems(); m_listCtrl->DeleteAllItems();
m_logWindow->Clear(); m_logWindow->Clear();
m_listCtrl->SetSingleStyle(wxLC_ICON); m_listCtrl->SetSingleStyle(wxLC_ICON);
m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL);
m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL);

View File

@@ -26,7 +26,7 @@ public:
wxListCtrl(parent, id, pos, size, style) wxListCtrl(parent, id, pos, size, style)
{ {
} }
void OnBeginDrag(wxListEvent& event); void OnBeginDrag(wxListEvent& event);
void OnBeginRDrag(wxListEvent& event); void OnBeginRDrag(wxListEvent& event);
void OnBeginLabelEdit(wxListEvent& event); void OnBeginLabelEdit(wxListEvent& event);
@@ -64,7 +64,8 @@ class MyFrame: public wxFrame
void OnSmallIconTextView(wxCommandEvent& event); void OnSmallIconTextView(wxCommandEvent& event);
void OnDeselectAll(wxCommandEvent& event); void OnDeselectAll(wxCommandEvent& event);
void OnSelectAll(wxCommandEvent& event); void OnSelectAll(wxCommandEvent& event);
void BusyOn(wxCommandEvent& event);
void BusyOff(wxCommandEvent& event);
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
@@ -80,6 +81,8 @@ class MyFrame: public wxFrame
#define LIST_DESELECT_ALL 8 #define LIST_DESELECT_ALL 8
#define LIST_SELECT_ALL 9 #define LIST_SELECT_ALL 9
#define LIST_ABOUT 102 #define LIST_ABOUT 102
#define BUSY_ON 10
#define BUSY_OFF 11
#define LIST_CTRL 1000 #define LIST_CTRL 1000