1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: testableframe.h
3 // Purpose: An improved wxFrame for unit-testing
4 // Author: Steven Lamerton
6 // Copyright: (c) 2010 Steven Lamerton
7 // Licence: wxWidgets licence
8 ///////////////////////////////////////////////////////////////////////////////
11 #include "wx/hashmap.h"
14 class wxTestableFrame
: public wxFrame
19 void OnEvent(wxEvent
& evt
);
21 //wxEVT_ANY get the count for all events or a type can be specified
22 int GetEventCount(wxEventType type
= wxEVT_ANY
);
24 //Used to clear an event count, after disconnecting a counter for example
25 void ClearEventCount(wxEventType type
);
28 wxLongToLongHashMap m_count
;
34 EventCounter(wxWindow
* win
, wxEventType type
);
39 wxTestableFrame
* m_frame
;