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: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
11 #include "wx/hashmap.h"
14 class wxTestableFrame
: public wxFrame
19 void OnEvent(wxEvent
& evt
);
22 friend class EventCounter
;
24 int GetEventCount(wxEventType type
);
25 void ClearEventCount(wxEventType type
);
27 wxLongToLongHashMap m_count
;
33 EventCounter(wxWindow
* win
, wxEventType type
);
36 int GetCount() { return m_frame
->GetEventCount(m_type
); }
37 void Clear() { m_frame
->ClearEventCount(m_type
); }
41 wxTestableFrame
* m_frame
;