void EventBase::Init(Context* ctx) { trace0("EventBase Init\n"); u2 argc = ctx->GetArgCount(); if (argc == 1) { EventConfig* config = ctx->GetArgT<EventConfig>(0); this->base = event_base_new_with_config(config->_GetConfig()); } else if (argc == 0) { this->base = event_base_new(); } else { ctx->WrongArgCount(); } }
bool mitk::EventConfig::AddConfig(const EventConfig& config) { if (!config.IsValid()) return false; d->m_PropertyList->ConcatenatePropertyList(config.d->m_PropertyList->Clone(), true); d->m_EventPropertyList = config.d->m_EventPropertyList->Clone(); d->m_CurrEventMapping = config.d->m_CurrEventMapping; d->CopyMapping( config.d->m_EventList ); return true; }
bool mitk::InteractionEventHandler::SetEventConfig(const EventConfig& config) { if (config.IsValid()) { m_EventConfig = config; // notify sub-classes that new config is set ConfigurationChanged(); return true; } return false; }