// 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"
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;
};
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;