예제 #1
0
bool wxMenuBase::SendEvent(int itemid, int checked)
{
    wxCommandEvent event(wxEVT_MENU, itemid);
    event.SetInt(checked);

    return DoProcessEvent(this, event, GetWindow());
}
void Reactor::ProcessEvent(Socket *socket, LeaderFollowerPool *lfp) {
	StartTrace(Reactor.ProcessEvent);
	// We have to promote a new leader even if the socket we got from
	// the acceptor is invalid. Otherwise nobody sits at the phone to
	// wait for incoming calls :-)
	if (lfp) {
		lfp->PromoteNewLeader();
	}
	if (socket) {
		DoProcessEvent(socket);
		delete socket;
	}
}
예제 #3
0
/* static */
bool
wxMenuBase::ProcessMenuEvent(wxMenu* menu, wxMenuEvent& event, wxWindow* win)
{
    // Try to process the event in the usual places first.
    if ( DoProcessEvent(menu, event, win) )
        return true;

    // But the menu events should also reach the TLW parent if they were not
    // processed before so, as it's not a command event and hence doesn't
    // bubble up by default, send it there explicitly if not done yet.
    wxWindow* const tlw = wxGetTopLevelParent(win);
    if ( tlw != win && tlw->HandleWindowEvent(event) )
        return true;

    return false;
}