本文整理汇总了C++中wxWindow::GetEventHandler方法的典型用法代码示例。如果您正苦于以下问题:C++ wxWindow::GetEventHandler方法的具体用法?C++ wxWindow::GetEventHandler怎么用?C++ wxWindow::GetEventHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxWindow
的用法示例。
在下文中一共展示了wxWindow::GetEventHandler方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxLogDebug
void
raiseMovementEvent(
wxWindow &Control,
std::shared_ptr<StateAccessToken> &Access,
std::function<seec::cm::MovementResult (seec::cm::ProcessState &State)> Mover)
{
auto const Handler = Control.GetEventHandler();
if (!Handler) {
wxLogDebug("raiseMovementEvent: wxWindow does not have an event handler.");
return;
}
if (!Access) {
wxLogDebug("raiseMovementEvent: no access provided.");
return;
}
auto LockAccess = Access->getAccess();
if (!LockAccess) { // Token is out of date.
wxLogDebug("raiseMovementEvent: access token is outdated.");
return;
}
ProcessMoveEvent Ev {
SEEC_EV_PROCESS_MOVE,
Control.GetId(),
std::move(Mover)
};
Ev.SetEventObject(&Control);
LockAccess.release();
Handler->AddPendingEvent(Ev);
}
示例2: SendEvent
void wxJoystickThread::SendEvent(wxEventType type, long ts, int change)
{
wxJoystickEvent jwx_event(type, m_buttons, m_joystick, change);
jwx_event.SetTimestamp(ts);
jwx_event.SetPosition(m_lastposition);
jwx_event.SetZPosition(m_axe[wxJS_AXIS_Z]);
jwx_event.SetEventObject(m_catchwin);
if (m_catchwin)
m_catchwin->GetEventHandler()->AddPendingEvent(jwx_event);
}