예제 #1
0
	EventHolder( IGUIEventListener* pEvent, int event_id )
		: m_pEvent( pEvent )
		, m_EventId( event_id )
	{
		//there should be no events registered for this id
		EVENTPAIR theEvent( m_pEvent, m_EventId );
		assert( m_EventListeners.find( theEvent ) == m_EventListeners.end());
		m_EventListeners[ theEvent ] = this;
	}
예제 #2
0
	static EventHolder* GetEventHolder( IGUIEventListener* pEvent, int event_id )
	{
		EVENTPAIR theEvent( pEvent, event_id );
		std::map<EVENTPAIR, EventHolder*>::iterator found = m_EventListeners.find( theEvent ) ;
		if( found != m_EventListeners.end() )
		{
			return found->second;
		}
		else
		{
			return 0;
		}
	}
예제 #3
0
void cbAuiNotebook::OnTabCtrlDblClick(wxMouseEvent& event)
{
    wxWindow* win = nullptr;
    wxAuiTabCtrl* tabCtrl = (wxAuiTabCtrl*)event.GetEventObject();
    if (tabCtrl && tabCtrl->TabHitTest(event.GetX(), event.GetY(), &win))
    {
        if (win != nullptr)
        {
            // send double-click-event
            CodeBlocksEvent theEvent(cbEVT_CBAUIBOOK_LEFT_DCLICK, GetParent()->GetId());
            theEvent.SetEventObject(win);
            GetParent()->GetEventHandler()->ProcessEvent(theEvent);
        }
    }
}
예제 #4
0
void wxMediaBackendCommonBase::QueueEvent(wxEventType evtType)
{
    wxMediaEvent theEvent(evtType, m_ctrl->GetId());
    m_ctrl->GetEventHandler()->AddPendingEvent(theEvent);
}
예제 #5
0
bool wxMediaBackendCommonBase::SendStopEvent()
{
    wxMediaEvent theEvent(wxEVT_MEDIA_STOP, m_ctrl->GetId());

    return !m_ctrl->GetEventHandler()->ProcessEvent(theEvent) || theEvent.IsAllowed();
}
예제 #6
0
	~EventHolder()
	{
		EVENTPAIR theEvent( m_pEvent, m_EventId );
		m_EventListeners.erase( theEvent );
	}