1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: testableframe.h
3 // Purpose: An improved wxFrame for unit-testing
4 // Author: Steven Lamerton
5 // Copyright: (c) 2010 Steven Lamerton
6 // Licence: wxWindows licence
7 ///////////////////////////////////////////////////////////////////////////////
10 #include "wx/hashmap.h"
13 class wxTestableFrame
: public wxFrame
18 void OnEvent(wxEvent
& evt
);
21 friend class EventCounter
;
23 int GetEventCount(wxEventType type
);
24 void ClearEventCount(wxEventType type
);
26 wxLongToLongHashMap m_count
;
32 EventCounter(wxWindow
* win
, wxEventType type
);
35 int GetCount() { return m_frame
->GetEventCount(m_type
); }
36 void Clear() { m_frame
->ClearEventCount(m_type
); }
40 wxTestableFrame
* m_frame
;