X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/232fdc630c42eb165f7659981043e794be03b3b7..233f786e8e6abfe1f5fca6209c63dc12764d6887:/tests/testableframe.h diff --git a/tests/testableframe.h b/tests/testableframe.h index ad676a12fc..f3b87be0f9 100644 --- a/tests/testableframe.h +++ b/tests/testableframe.h @@ -2,9 +2,9 @@ // Name: testableframe.h // Purpose: An improved wxFrame for unit-testing // Author: Steven Lamerton -// RCS-ID: $Id:$ +// RCS-ID: $Id$ // Copyright: (c) 2010 Steven Lamerton -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #include "wx/frame.h" @@ -18,10 +18,12 @@ public: void OnEvent(wxEvent& evt); - //wxEVT_ANY get the count for all events or a type can be specified - int GetEventCount(wxEventType type = wxEVT_ANY); - private: + friend class EventCounter; + + int GetEventCount(wxEventType type); + void ClearEventCount(wxEventType type); + wxLongToLongHashMap m_count; }; @@ -31,6 +33,9 @@ public: EventCounter(wxWindow* win, wxEventType type); ~EventCounter(); + int GetCount() { return m_frame->GetEventCount(m_type); } + void Clear() { m_frame->ClearEventCount(m_type); } + private: wxEventType m_type; wxTestableFrame* m_frame;