added default ctor to wxMouseEventsManager, this is convenient when deriving window classes (which must provide default ctors to e.g. allow loading them from XRC) from it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-05-31 14:43:01 +00:00
parent 0598625cb2
commit 4b14a2f79b
3 changed files with 39 additions and 7 deletions

View File

@@ -45,18 +45,27 @@ END_EVENT_TABLE()
// wxMouseEventsManager implementation
// ============================================================================
wxMouseEventsManager::wxMouseEventsManager(wxWindow *win)
: m_win(win)
void wxMouseEventsManager::Init()
{
m_win = NULL;
m_state = State_Normal;
m_item = wxNOT_FOUND;
}
bool wxMouseEventsManager::Create(wxWindow *win)
{
wxASSERT_MSG( !m_win, "Create() must not be called twice" );
m_win = win;
win->PushEventHandler(this);
return true;
}
wxMouseEventsManager::~wxMouseEventsManager()
{
m_win->RemoveEventHandler(this);
if ( m_win )
m_win->RemoveEventHandler(this);
}
void wxMouseEventsManager::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event))