wxWidgets/tests/testableframe.h
Dimitri Schoolwerth 3fdcd5d5ab Changed licence references to "wxWindows licence".
Use "wxWindows licence" and not "wxWidgets licence" and also use British spelling for licence. Updated new occurrences in recently added files and a couple of previously (r64940) missed ones.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-04 09:21:52 +00:00

42 lines
1.0 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: testableframe.h
// Purpose: An improved wxFrame for unit-testing
// Author: Steven Lamerton
// RCS-ID: $Id$
// Copyright: (c) 2010 Steven Lamerton
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#include "wx/frame.h"
#include "wx/hashmap.h"
#include "wx/event.h"
class wxTestableFrame : public wxFrame
{
public:
wxTestableFrame();
void OnEvent(wxEvent& evt);
//wxEVT_ANY get the count for all events or a type can be specified
int GetEventCount(wxEventType type = wxEVT_ANY);
//Used to clear an event count, after disconnecting a counter for example
void ClearEventCount(wxEventType type);
private:
wxLongToLongHashMap m_count;
};
class EventCounter
{
public:
EventCounter(wxWindow* win, wxEventType type);
~EventCounter();
private:
wxEventType m_type;
wxTestableFrame* m_frame;
wxWindow* m_win;
};