コード例 #1
0
ファイル: InputManager.cpp プロジェクト: Esteban-Rocha/digsby
bool InputManager::InvokeActions(Context* context, wxEvent* e, wxWindow* win)
{
    wxEventType eventType(e->GetEventType);

    EventTypeIter i = actions.find(eventType);
    if (i == actions.end()) return;

    ActionMap* actionMap = i->second;

    ActionMapIter j = actionMap->find(context);
    if (j == actionMap.end()) return;

    ActionSet* actionSet = j->second;

    wxString actionname;
    if (actionSet->matchesEvent(e, win, &actionname))
        return InvokeEvent(actionname, win);
    else
        return false;
}