Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event type constants themselves. This makes them much more comfortable to use, e.g. Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED). The old long names are still kept for backwards compatibility and shouldn't be removed as it doesn't really cost anything to continue providing them, but all new event types should only use the short versions. Closes #10661. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,7 +74,7 @@ void BitmapToggleButtonTestCase::tearDown()
|
||||
void BitmapToggleButtonTestCase::Click()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
EventCounter clicked(m_button, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED);
|
||||
EventCounter clicked(m_button, wxEVT_TOGGLEBUTTON);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -101,7 +101,7 @@ void BitmapToggleButtonTestCase::Click()
|
||||
|
||||
void BitmapToggleButtonTestCase::Value()
|
||||
{
|
||||
EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED);
|
||||
EventCounter clicked(m_button, wxEVT_BUTTON);
|
||||
|
||||
m_button->SetValue(true);
|
||||
|
||||
|
@@ -82,7 +82,7 @@ void ButtonTestCase::Click()
|
||||
{
|
||||
//We use the internal class EventCounter which handles connecting and
|
||||
//disconnecting the control to the wxTestableFrame
|
||||
EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED);
|
||||
EventCounter clicked(m_button, wxEVT_BUTTON);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -99,7 +99,7 @@ void ButtonTestCase::Click()
|
||||
|
||||
void ButtonTestCase::Disabled()
|
||||
{
|
||||
EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED);
|
||||
EventCounter clicked(m_button, wxEVT_BUTTON);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
|
@@ -83,7 +83,7 @@ void CheckBoxTestCase::tearDown()
|
||||
|
||||
void CheckBoxTestCase::Check()
|
||||
{
|
||||
EventCounter clicked(m_check, wxEVT_COMMAND_CHECKBOX_CLICKED);
|
||||
EventCounter clicked(m_check, wxEVT_CHECKBOX);
|
||||
|
||||
//We should be unchecked by default
|
||||
CPPUNIT_ASSERT(!m_check->IsChecked());
|
||||
|
@@ -65,7 +65,7 @@ void CheckListBoxTestCase::tearDown()
|
||||
|
||||
void CheckListBoxTestCase::Check()
|
||||
{
|
||||
EventCounter toggled(m_check, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED);
|
||||
EventCounter toggled(m_check, wxEVT_CHECKLISTBOX);
|
||||
|
||||
wxArrayInt checkedItems;
|
||||
wxArrayString testitems;
|
||||
|
@@ -35,10 +35,10 @@ private:
|
||||
virtual wxBookCtrlBase *GetBase() const { return m_choicebook; }
|
||||
|
||||
virtual wxEventType GetChangedEvent() const
|
||||
{ return wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED; }
|
||||
{ return wxEVT_CHOICEBOOK_PAGE_CHANGED; }
|
||||
|
||||
virtual wxEventType GetChangingEvent() const
|
||||
{ return wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING; }
|
||||
{ return wxEVT_CHOICEBOOK_PAGE_CHANGING; }
|
||||
|
||||
CPPUNIT_TEST_SUITE( ChoicebookTestCase );
|
||||
wxBOOK_CTRL_BASE_TESTS();
|
||||
|
@@ -129,8 +129,8 @@ void ComboBoxTestCase::Size()
|
||||
void ComboBoxTestCase::PopDismiss()
|
||||
{
|
||||
#if defined(__WXMSW__) || defined(__WXGTK210__)
|
||||
EventCounter drop(m_combo, wxEVT_COMMAND_COMBOBOX_DROPDOWN);
|
||||
EventCounter close(m_combo, wxEVT_COMMAND_COMBOBOX_CLOSEUP);
|
||||
EventCounter drop(m_combo, wxEVT_COMBOBOX_DROPDOWN);
|
||||
EventCounter close(m_combo, wxEVT_COMBOBOX_CLOSEUP);
|
||||
|
||||
m_combo->Popup();
|
||||
m_combo->Dismiss();
|
||||
|
@@ -94,7 +94,7 @@ void HyperlinkCtrlTestCase::Url()
|
||||
void HyperlinkCtrlTestCase::Click()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__)
|
||||
EventCounter hyperlink(m_hyperlink, wxEVT_COMMAND_HYPERLINK);
|
||||
EventCounter hyperlink(m_hyperlink, wxEVT_HYPERLINK);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
|
@@ -199,10 +199,10 @@ void ListBaseTestCase::ItemClick()
|
||||
list->SetItem(0, 1, "first column");
|
||||
list->SetItem(0, 2, "second column");
|
||||
|
||||
EventCounter selected(list, wxEVT_COMMAND_LIST_ITEM_SELECTED);
|
||||
EventCounter focused(list, wxEVT_COMMAND_LIST_ITEM_FOCUSED);
|
||||
EventCounter activated(list, wxEVT_COMMAND_LIST_ITEM_ACTIVATED);
|
||||
EventCounter rclick(list, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK);
|
||||
EventCounter selected(list, wxEVT_LIST_ITEM_SELECTED);
|
||||
EventCounter focused(list, wxEVT_LIST_ITEM_FOCUSED);
|
||||
EventCounter activated(list, wxEVT_LIST_ITEM_ACTIVATED);
|
||||
EventCounter rclick(list, wxEVT_LIST_ITEM_RIGHT_CLICK);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -241,7 +241,7 @@ void ListBaseTestCase::KeyDown()
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
wxListCtrl* const list = GetList();
|
||||
|
||||
EventCounter keydown(list, wxEVT_COMMAND_LIST_KEY_DOWN);
|
||||
EventCounter keydown(list, wxEVT_LIST_KEY_DOWN);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -258,8 +258,8 @@ void ListBaseTestCase::DeleteItems()
|
||||
#ifndef __WXOSX__
|
||||
wxListCtrl* const list = GetList();
|
||||
|
||||
EventCounter deleteitem(list, wxEVT_COMMAND_LIST_DELETE_ITEM);
|
||||
EventCounter deleteall(list, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS);
|
||||
EventCounter deleteitem(list, wxEVT_LIST_DELETE_ITEM);
|
||||
EventCounter deleteall(list, wxEVT_LIST_DELETE_ALL_ITEMS);
|
||||
|
||||
|
||||
list->InsertColumn(0, "Column 0", wxLIST_FORMAT_LEFT, 60);
|
||||
@@ -296,7 +296,7 @@ void ListBaseTestCase::InsertItem()
|
||||
{
|
||||
wxListCtrl* const list = GetList();
|
||||
|
||||
EventCounter insert(list, wxEVT_COMMAND_LIST_INSERT_ITEM);
|
||||
EventCounter insert(list, wxEVT_LIST_INSERT_ITEM);
|
||||
|
||||
list->InsertColumn(0, "Column 0", wxLIST_FORMAT_LEFT, 60);
|
||||
|
||||
@@ -391,8 +391,8 @@ void ListBaseTestCase::EditLabel()
|
||||
list->InsertItem(0, "Item 0");
|
||||
list->InsertItem(1, "Item 1");
|
||||
|
||||
EventCounter beginedit(list, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT);
|
||||
EventCounter endedit(list, wxEVT_COMMAND_LIST_END_LABEL_EDIT);
|
||||
EventCounter beginedit(list, wxEVT_LIST_BEGIN_LABEL_EDIT);
|
||||
EventCounter endedit(list, wxEVT_LIST_END_LABEL_EDIT);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
|
@@ -36,10 +36,10 @@ private:
|
||||
virtual wxBookCtrlBase *GetBase() const { return m_listbook; }
|
||||
|
||||
virtual wxEventType GetChangedEvent() const
|
||||
{ return wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED; }
|
||||
{ return wxEVT_LISTBOOK_PAGE_CHANGED; }
|
||||
|
||||
virtual wxEventType GetChangingEvent() const
|
||||
{ return wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING; }
|
||||
{ return wxEVT_LISTBOOK_PAGE_CHANGING; }
|
||||
|
||||
CPPUNIT_TEST_SUITE( ListbookTestCase );
|
||||
wxBOOK_CTRL_BASE_TESTS();
|
||||
|
@@ -184,8 +184,8 @@ void ListBoxTestCase::ClickEvents()
|
||||
wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(),
|
||||
wxTestableFrame);
|
||||
|
||||
EventCounter selected(frame, wxEVT_COMMAND_LISTBOX_SELECTED);
|
||||
EventCounter dclicked(frame, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
|
||||
EventCounter selected(frame, wxEVT_LISTBOX);
|
||||
EventCounter dclicked(frame, wxEVT_LISTBOX_DCLICK);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -220,8 +220,8 @@ void ListBoxTestCase::ClickNotOnItem()
|
||||
wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(),
|
||||
wxTestableFrame);
|
||||
|
||||
EventCounter selected(frame, wxEVT_COMMAND_LISTBOX_SELECTED);
|
||||
EventCounter dclicked(frame, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
|
||||
EventCounter selected(frame, wxEVT_LISTBOX);
|
||||
EventCounter dclicked(frame, wxEVT_LISTBOX_DCLICK);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
|
@@ -97,9 +97,9 @@ void ListCtrlTestCase::EditLabel()
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
void ListCtrlTestCase::ColumnDrag()
|
||||
{
|
||||
EventCounter begindrag(m_list, wxEVT_COMMAND_LIST_COL_BEGIN_DRAG);
|
||||
EventCounter dragging(m_list, wxEVT_COMMAND_LIST_COL_DRAGGING);
|
||||
EventCounter enddrag(m_list, wxEVT_COMMAND_LIST_COL_END_DRAG);
|
||||
EventCounter begindrag(m_list, wxEVT_LIST_COL_BEGIN_DRAG);
|
||||
EventCounter dragging(m_list, wxEVT_LIST_COL_DRAGGING);
|
||||
EventCounter enddrag(m_list, wxEVT_LIST_COL_END_DRAG);
|
||||
|
||||
m_list->InsertColumn(0, "Column 0");
|
||||
m_list->InsertColumn(1, "Column 1");
|
||||
@@ -132,8 +132,8 @@ void ListCtrlTestCase::ColumnDrag()
|
||||
|
||||
void ListCtrlTestCase::ColumnClick()
|
||||
{
|
||||
EventCounter colclick(m_list, wxEVT_COMMAND_LIST_COL_CLICK);
|
||||
EventCounter colrclick(m_list, wxEVT_COMMAND_LIST_COL_RIGHT_CLICK);
|
||||
EventCounter colclick(m_list, wxEVT_LIST_COL_CLICK);
|
||||
EventCounter colrclick(m_list, wxEVT_LIST_COL_RIGHT_CLICK);
|
||||
|
||||
|
||||
m_list->InsertColumn(0, "Column 0", wxLIST_FORMAT_LEFT, 60);
|
||||
|
@@ -35,10 +35,10 @@ private:
|
||||
virtual wxBookCtrlBase *GetBase() const { return m_notebook; }
|
||||
|
||||
virtual wxEventType GetChangedEvent() const
|
||||
{ return wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED; }
|
||||
{ return wxEVT_NOTEBOOK_PAGE_CHANGED; }
|
||||
|
||||
virtual wxEventType GetChangingEvent() const
|
||||
{ return wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING; }
|
||||
{ return wxEVT_NOTEBOOK_PAGE_CHANGING; }
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE( NotebookTestCase );
|
||||
|
@@ -129,8 +129,8 @@ void OwnerDrawnComboBoxTestCase::Size()
|
||||
|
||||
void OwnerDrawnComboBoxTestCase::PopDismiss()
|
||||
{
|
||||
EventCounter drop(m_combo, wxEVT_COMMAND_COMBOBOX_DROPDOWN);
|
||||
EventCounter close(m_combo, wxEVT_COMMAND_COMBOBOX_CLOSEUP);
|
||||
EventCounter drop(m_combo, wxEVT_COMBOBOX_DROPDOWN);
|
||||
EventCounter close(m_combo, wxEVT_COMBOBOX_CLOSEUP);
|
||||
|
||||
m_combo->Popup();
|
||||
m_combo->Dismiss();
|
||||
|
@@ -71,7 +71,7 @@ void RadioButtonTestCase::Click()
|
||||
{
|
||||
// GTK does not support selecting a single radio button
|
||||
#if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__)
|
||||
EventCounter selected(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED);
|
||||
EventCounter selected(m_radio, wxEVT_RADIOBUTTON);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -87,7 +87,7 @@ void RadioButtonTestCase::Click()
|
||||
void RadioButtonTestCase::Value()
|
||||
{
|
||||
#ifndef __WXGTK__
|
||||
EventCounter selected(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED);
|
||||
EventCounter selected(m_radio, wxEVT_RADIOBUTTON);
|
||||
|
||||
m_radio->SetValue(true);
|
||||
|
||||
|
@@ -121,8 +121,8 @@ void RichTextCtrlTestCase::CharacterEvent()
|
||||
// There seems to be an event sequence problem on GTK+ that causes the events
|
||||
// to be disconnected before they're processed, generating spurious errors.
|
||||
#if !defined(__WXGTK__)
|
||||
EventCounter character(m_rich, wxEVT_COMMAND_RICHTEXT_CHARACTER);
|
||||
EventCounter content(m_rich, wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED);
|
||||
EventCounter character(m_rich, wxEVT_RICHTEXT_CHARACTER);
|
||||
EventCounter content(m_rich, wxEVT_RICHTEXT_CONTENT_INSERTED);
|
||||
|
||||
m_rich->SetFocus();
|
||||
|
||||
@@ -153,8 +153,8 @@ void RichTextCtrlTestCase::DeleteEvent()
|
||||
// There seems to be an event sequence problem on GTK+ that causes the events
|
||||
// to be disconnected before they're processed, generating spurious errors.
|
||||
#if !defined(__WXGTK__)
|
||||
EventCounter deleteevent(m_rich, wxEVT_COMMAND_RICHTEXT_DELETE);
|
||||
EventCounter contentdelete(m_rich, wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED);
|
||||
EventCounter deleteevent(m_rich, wxEVT_RICHTEXT_DELETE);
|
||||
EventCounter contentdelete(m_rich, wxEVT_RICHTEXT_CONTENT_DELETED);
|
||||
|
||||
m_rich->SetFocus();
|
||||
|
||||
@@ -177,7 +177,7 @@ void RichTextCtrlTestCase::ReturnEvent()
|
||||
// There seems to be an event sequence problem on GTK+ that causes the events
|
||||
// to be disconnected before they're processed, generating spurious errors.
|
||||
#if !defined(__WXGTK__)
|
||||
EventCounter returnevent(m_rich, wxEVT_COMMAND_RICHTEXT_RETURN);
|
||||
EventCounter returnevent(m_rich, wxEVT_RICHTEXT_RETURN);
|
||||
|
||||
m_rich->SetFocus();
|
||||
|
||||
@@ -192,7 +192,7 @@ void RichTextCtrlTestCase::ReturnEvent()
|
||||
|
||||
void RichTextCtrlTestCase::StyleEvent()
|
||||
{
|
||||
EventCounter stylechanged(m_rich, wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED);
|
||||
EventCounter stylechanged(m_rich, wxEVT_RICHTEXT_STYLE_CHANGED);
|
||||
|
||||
m_rich->SetValue("Sometext");
|
||||
m_rich->SetStyle(0, 8, wxTextAttr(*wxRED, *wxWHITE));
|
||||
@@ -202,7 +202,7 @@ void RichTextCtrlTestCase::StyleEvent()
|
||||
|
||||
void RichTextCtrlTestCase::BufferResetEvent()
|
||||
{
|
||||
EventCounter reset(m_rich, wxEVT_COMMAND_RICHTEXT_BUFFER_RESET);
|
||||
EventCounter reset(m_rich, wxEVT_RICHTEXT_BUFFER_RESET);
|
||||
|
||||
m_rich->AppendText("more text!");
|
||||
m_rich->SetValue("");
|
||||
@@ -227,7 +227,7 @@ void RichTextCtrlTestCase::UrlEvent()
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
// Mouse up event not being caught on GTK+
|
||||
#if !defined(__WXGTK__)
|
||||
EventCounter url(m_rich, wxEVT_COMMAND_TEXT_URL);
|
||||
EventCounter url(m_rich, wxEVT_TEXT_URL);
|
||||
|
||||
m_rich->BeginURL("http://www.wxwidgets.org");
|
||||
m_rich->WriteText("http://www.wxwidgets.org");
|
||||
@@ -249,7 +249,7 @@ void RichTextCtrlTestCase::TextEvent()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
#if !defined(__WXGTK__)
|
||||
EventCounter updated(m_rich, wxEVT_COMMAND_TEXT_UPDATED);
|
||||
EventCounter updated(m_rich, wxEVT_TEXT);
|
||||
|
||||
m_rich->SetFocus();
|
||||
|
||||
@@ -409,7 +409,7 @@ void RichTextCtrlTestCase::Editable()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
#if !defined(__WXGTK__)
|
||||
EventCounter updated(m_rich, wxEVT_COMMAND_TEXT_UPDATED);
|
||||
EventCounter updated(m_rich, wxEVT_TEXT);
|
||||
|
||||
m_rich->SetFocus();
|
||||
|
||||
|
@@ -70,7 +70,7 @@ void SpinCtrlDoubleTestCase::tearDown()
|
||||
void SpinCtrlDoubleTestCase::Arrows()
|
||||
{
|
||||
#ifndef __WXGTK__
|
||||
EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED);
|
||||
EventCounter updated(m_spin, wxEVT_SPINCTRLDOUBLE);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
|
@@ -107,7 +107,7 @@ void SpinCtrlTestCase::NoEventsInCtor()
|
||||
delete m_spin;
|
||||
m_spin = new wxSpinCtrl;
|
||||
|
||||
EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRL_UPDATED);
|
||||
EventCounter updated(m_spin, wxEVT_SPINCTRL);
|
||||
|
||||
m_spin->Create(parent, wxID_ANY, "",
|
||||
wxDefaultPosition, wxDefaultSize, 0,
|
||||
@@ -119,7 +119,7 @@ void SpinCtrlTestCase::NoEventsInCtor()
|
||||
void SpinCtrlTestCase::Arrows()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRL_UPDATED);
|
||||
EventCounter updated(m_spin, wxEVT_SPINCTRL);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -177,7 +177,7 @@ void SpinCtrlTestCase::Range()
|
||||
// that this doesn't result in any events (as this is not something done by
|
||||
// the user).
|
||||
{
|
||||
EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRL_UPDATED);
|
||||
EventCounter updated(m_spin, wxEVT_SPINCTRL);
|
||||
|
||||
m_spin->SetRange(1, 10);
|
||||
CPPUNIT_ASSERT_EQUAL(1, m_spin->GetValue());
|
||||
|
@@ -188,7 +188,7 @@ void TextCtrlTestCase::ReadOnly()
|
||||
delete m_text;
|
||||
CreateText(wxTE_READONLY);
|
||||
|
||||
EventCounter updated(m_text, wxEVT_COMMAND_TEXT_UPDATED);
|
||||
EventCounter updated(m_text, wxEVT_TEXT);
|
||||
|
||||
m_text->SetFocus();
|
||||
|
||||
@@ -213,8 +213,8 @@ void TextCtrlTestCase::ReadOnly()
|
||||
void TextCtrlTestCase::MaxLength()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
EventCounter updated(m_text, wxEVT_COMMAND_TEXT_UPDATED);
|
||||
EventCounter maxlen(m_text, wxEVT_COMMAND_TEXT_MAXLEN);
|
||||
EventCounter updated(m_text, wxEVT_TEXT);
|
||||
EventCounter maxlen(m_text, wxEVT_TEXT_MAXLEN);
|
||||
|
||||
m_text->SetFocus();
|
||||
m_text->SetMaxLength(10);
|
||||
@@ -319,7 +319,7 @@ void TextCtrlTestCase::ProcessEnter()
|
||||
wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(),
|
||||
wxTestableFrame);
|
||||
|
||||
EventCounter count(m_text, wxEVT_COMMAND_TEXT_ENTER);
|
||||
EventCounter count(m_text, wxEVT_TEXT_ENTER);
|
||||
|
||||
m_text->SetFocus();
|
||||
|
||||
@@ -327,7 +327,7 @@ void TextCtrlTestCase::ProcessEnter()
|
||||
sim.Char(WXK_RETURN);
|
||||
wxYield();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(0, frame->GetEventCount(wxEVT_COMMAND_TEXT_ENTER));
|
||||
CPPUNIT_ASSERT_EQUAL(0, frame->GetEventCount(wxEVT_TEXT_ENTER));
|
||||
|
||||
// we need a text control with wxTE_PROCESS_ENTER for this test
|
||||
delete m_text;
|
||||
@@ -338,7 +338,7 @@ void TextCtrlTestCase::ProcessEnter()
|
||||
sim.Char(WXK_RETURN);
|
||||
wxYield();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount(wxEVT_COMMAND_TEXT_ENTER));
|
||||
CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount(wxEVT_TEXT_ENTER));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -349,7 +349,7 @@ void TextCtrlTestCase::Url()
|
||||
delete m_text;
|
||||
CreateText(wxTE_RICH | wxTE_AUTO_URL);
|
||||
|
||||
EventCounter url(m_text, wxEVT_COMMAND_TEXT_URL);
|
||||
EventCounter url(m_text, wxEVT_TEXT_URL);
|
||||
|
||||
m_text->AppendText("http://www.wxwidgets.org");
|
||||
|
||||
|
@@ -41,7 +41,7 @@ void TextEntryTestCase::SetValue()
|
||||
|
||||
void TextEntryTestCase::TextChangeEvents()
|
||||
{
|
||||
EventCounter updated(GetTestWindow(), wxEVT_COMMAND_TEXT_UPDATED);
|
||||
EventCounter updated(GetTestWindow(), wxEVT_TEXT);
|
||||
|
||||
wxTextEntry * const entry = GetTestEntry();
|
||||
|
||||
@@ -184,7 +184,7 @@ void TextEntryTestCase::Editable()
|
||||
wxTextEntry * const entry = GetTestEntry();
|
||||
wxWindow * const window = GetTestWindow();
|
||||
|
||||
EventCounter updated(window, wxEVT_COMMAND_TEXT_UPDATED);
|
||||
EventCounter updated(window, wxEVT_TEXT);
|
||||
|
||||
window->SetFocus();
|
||||
wxYield();
|
||||
|
@@ -64,7 +64,7 @@ void ToggleButtonTestCase::tearDown()
|
||||
void ToggleButtonTestCase::Click()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
EventCounter clicked(m_button, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED);
|
||||
EventCounter clicked(m_button, wxEVT_TOGGLEBUTTON);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -89,7 +89,7 @@ void ToggleButtonTestCase::Click()
|
||||
|
||||
void ToggleButtonTestCase::Value()
|
||||
{
|
||||
EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED);
|
||||
EventCounter clicked(m_button, wxEVT_BUTTON);
|
||||
|
||||
m_button->SetValue(true);
|
||||
|
||||
|
@@ -36,10 +36,10 @@ private:
|
||||
virtual wxBookCtrlBase *GetBase() const { return m_toolbook; }
|
||||
|
||||
virtual wxEventType GetChangedEvent() const
|
||||
{ return wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED; }
|
||||
{ return wxEVT_TOOLBOOK_PAGE_CHANGED; }
|
||||
|
||||
virtual wxEventType GetChangingEvent() const
|
||||
{ return wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING; }
|
||||
{ return wxEVT_TOOLBOOK_PAGE_CHANGING; }
|
||||
|
||||
CPPUNIT_TEST_SUITE( ToolbookTestCase );
|
||||
wxBOOK_CTRL_BASE_TESTS();
|
||||
|
@@ -35,10 +35,10 @@ private:
|
||||
virtual wxBookCtrlBase *GetBase() const { return m_treebook; }
|
||||
|
||||
virtual wxEventType GetChangedEvent() const
|
||||
{ return wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED; }
|
||||
{ return wxEVT_TREEBOOK_PAGE_CHANGED; }
|
||||
|
||||
virtual wxEventType GetChangingEvent() const
|
||||
{ return wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING; }
|
||||
{ return wxEVT_TREEBOOK_PAGE_CHANGING; }
|
||||
|
||||
CPPUNIT_TEST_SUITE( TreebookTestCase );
|
||||
wxBOOK_CTRL_BASE_TESTS();
|
||||
|
@@ -239,8 +239,8 @@ void TreeCtrlTestCase::SelectItemMulti()
|
||||
void TreeCtrlTestCase::ItemClick()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
EventCounter activated(m_tree, wxEVT_COMMAND_TREE_ITEM_ACTIVATED);
|
||||
EventCounter rclick(m_tree, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK);
|
||||
EventCounter activated(m_tree, wxEVT_TREE_ITEM_ACTIVATED);
|
||||
EventCounter rclick(m_tree, wxEVT_TREE_ITEM_RIGHT_CLICK);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -266,7 +266,7 @@ void TreeCtrlTestCase::ItemClick()
|
||||
|
||||
void TreeCtrlTestCase::DeleteItem()
|
||||
{
|
||||
EventCounter deleteitem(m_tree, wxEVT_COMMAND_TREE_DELETE_ITEM);
|
||||
EventCounter deleteitem(m_tree, wxEVT_TREE_DELETE_ITEM);
|
||||
|
||||
wxTreeItemId todelete = m_tree->AppendItem(m_root, "deleteme");
|
||||
m_tree->Delete(todelete);
|
||||
@@ -280,8 +280,8 @@ void TreeCtrlTestCase::DeleteItem()
|
||||
|
||||
void TreeCtrlTestCase::LabelEdit()
|
||||
{
|
||||
EventCounter beginedit(m_tree, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT);
|
||||
EventCounter endedit(m_tree, wxEVT_COMMAND_TREE_END_LABEL_EDIT);
|
||||
EventCounter beginedit(m_tree, wxEVT_TREE_BEGIN_LABEL_EDIT);
|
||||
EventCounter endedit(m_tree, wxEVT_TREE_END_LABEL_EDIT);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -301,7 +301,7 @@ void TreeCtrlTestCase::LabelEdit()
|
||||
|
||||
void TreeCtrlTestCase::KeyDown()
|
||||
{
|
||||
EventCounter keydown(m_tree, wxEVT_COMMAND_TREE_KEY_DOWN);
|
||||
EventCounter keydown(m_tree, wxEVT_TREE_KEY_DOWN);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -318,10 +318,10 @@ void TreeCtrlTestCase::CollapseExpandEvents()
|
||||
{
|
||||
m_tree->CollapseAll();
|
||||
|
||||
EventCounter collapsed(m_tree, wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
|
||||
EventCounter collapsing(m_tree, wxEVT_COMMAND_TREE_ITEM_COLLAPSING);
|
||||
EventCounter expanded(m_tree, wxEVT_COMMAND_TREE_ITEM_EXPANDED);
|
||||
EventCounter expanding(m_tree, wxEVT_COMMAND_TREE_ITEM_EXPANDING);
|
||||
EventCounter collapsed(m_tree, wxEVT_TREE_ITEM_COLLAPSED);
|
||||
EventCounter collapsing(m_tree, wxEVT_TREE_ITEM_COLLAPSING);
|
||||
EventCounter expanded(m_tree, wxEVT_TREE_ITEM_EXPANDED);
|
||||
EventCounter expanding(m_tree, wxEVT_TREE_ITEM_EXPANDING);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -352,8 +352,8 @@ void TreeCtrlTestCase::SelectionChange()
|
||||
m_tree->ExpandAll();
|
||||
m_tree->UnselectAll();
|
||||
|
||||
EventCounter changed(m_tree, wxEVT_COMMAND_TREE_SEL_CHANGED);
|
||||
EventCounter changing(m_tree, wxEVT_COMMAND_TREE_SEL_CHANGING);
|
||||
EventCounter changed(m_tree, wxEVT_TREE_SEL_CHANGED);
|
||||
EventCounter changing(m_tree, wxEVT_TREE_SEL_CHANGING);
|
||||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
@@ -385,7 +385,7 @@ void TreeCtrlTestCase::SelectionChange()
|
||||
|
||||
void TreeCtrlTestCase::Menu()
|
||||
{
|
||||
EventCounter menu(m_tree, wxEVT_COMMAND_TREE_ITEM_MENU);
|
||||
EventCounter menu(m_tree, wxEVT_TREE_ITEM_MENU);
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
wxRect pos;
|
||||
|
@@ -77,9 +77,10 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( WebTestCase, "WebTestCase" );
|
||||
|
||||
void WebTestCase::setUp()
|
||||
{
|
||||
m_loaded = new EventCounter(m_browser, wxEVT_WEBVIEW_LOADED);
|
||||
|
||||
m_browser = wxWebView::New(wxTheApp->GetTopWindow(), wxID_ANY);
|
||||
|
||||
m_loaded = new EventCounter(m_browser, wxEVT_COMMAND_WEBVIEW_LOADED);
|
||||
ENSURE_LOADED;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user