X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ceca854975482e71b634f3fca325e3df6c12116..5f9e369af0c834bbde0f7f5d2047abd736967f58:/tests/testableframe.h diff --git a/tests/testableframe.h b/tests/testableframe.h index 1e0fa21318..a0465d8296 100644 --- a/tests/testableframe.h +++ b/tests/testableframe.h @@ -2,9 +2,8 @@ // Name: testableframe.h // Purpose: An improved wxFrame for unit-testing // Author: Steven Lamerton -// RCS-ID: $Id$ // Copyright: (c) 2010 Steven Lamerton -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #include "wx/frame.h" @@ -18,13 +17,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; - //Used to clear an event count, after disconnecting a counter for example + int GetEventCount(wxEventType type); void ClearEventCount(wxEventType type); -private: wxLongToLongHashMap m_count; }; @@ -34,6 +32,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;