本文整理汇总了C++中wxEvent::IsKindOf方法的典型用法代码示例。如果您正苦于以下问题:C++ wxEvent::IsKindOf方法的具体用法?C++ wxEvent::IsKindOf怎么用?C++ wxEvent::IsKindOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxEvent
的用法示例。
在下文中一共展示了wxEvent::IsKindOf方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void Interactor2DRegionEdit::UpdateCursor( wxEvent& event, wxWindow* wnd )
{
if ( wnd->FindFocus() == wnd )
{
if ( event.IsKindOf( CLASSINFO( wxMouseEvent ) )
&& ( event.GetEventType() == wxEVT_MIDDLE_DOWN || event.GetEventType() == wxEVT_RIGHT_DOWN )
&& !m_bEditing )
{
Interactor2D::UpdateCursor( event, wnd );
return;
}
if ( m_nAction == EM_Freehand || m_nAction == EM_Polyline )
{
if ( event.IsKindOf( CLASSINFO( wxKeyEvent ) ) && (( wxKeyEvent* )&event)->GetKeyCode() == WXK_CONTROL &&
(( wxKeyEvent* )&event)->GetEventType() != wxEVT_KEY_UP )
{
wnd->SetCursor( CursorFactory::CursorFill );
}
else if ( event.IsKindOf( CLASSINFO( wxMouseEvent ) ) && (( wxMouseEvent* )&event)->CmdDown() )
{
wnd->SetCursor( CursorFactory::CursorFill );
}
else
wnd->SetCursor( m_nAction == EM_Freehand ? CursorFactory::CursorPencil : CursorFactory::CursorPolyline );
}
else if ( m_nAction == EM_Fill )
wnd->SetCursor( CursorFactory::CursorFill );
else
Interactor2D::UpdateCursor( event, wnd );
}
else
Interactor2D::UpdateCursor( event, wnd );
}
示例2: if
void Interactor2DVolumeEdit::UpdateCursor( wxEvent& event, wxWindow* wnd )
{
if ( wnd->FindFocus() == wnd )
{
if ( event.IsKindOf( CLASSINFO( wxMouseEvent ) ) )
{
wxMouseEvent* e = ( wxMouseEvent* )&event;
if ( ( ( e->MiddleDown() || e->RightDown() ) && !m_bEditing ) ||
( e->CmdDown() && e->ShiftDown() ) )
{
Interactor2D::UpdateCursor( event, wnd );
return;
}
}
if ( m_nAction != EM_Fill )
{
if ( event.IsKindOf( CLASSINFO( wxKeyEvent ) ) )
{
wxKeyEvent* e = ( wxKeyEvent* )&event;
if ( e->GetEventType() != wxEVT_KEY_UP && ( e->GetKeyCode() == WXK_CONTROL && !e->ShiftDown() && !e->AltDown() ) )
{
wnd->SetCursor( CursorFactory::CursorFill );
return;
}
}
if ( event.IsKindOf( CLASSINFO( wxMouseEvent ) ) && (( wxMouseEvent* )&event)->CmdDown()
&& !(( wxMouseEvent* )&event)->ShiftDown() && !(( wxMouseEvent* )&event)->AltDown() )
{
wnd->SetCursor( CursorFactory::CursorFill );
}
else if ( m_nAction == EM_ColorPicker )
wnd->SetCursor( CursorFactory::CursorColorPicker );
else if ( event.IsKindOf( CLASSINFO( wxMouseEvent ) ) )
{
switch ( m_nAction )
{
case EM_Freehand:
wnd->SetCursor( CursorFactory::CursorPencil );
break;
case EM_Polyline:
wnd->SetCursor( CursorFactory::CursorPolyline );
break;
case EM_Contour:
wnd->SetCursor( CursorFactory::CursorContour );
break;
}
}
}
else
wnd->SetCursor( CursorFactory::CursorFill );
}
else
Interactor2D::UpdateCursor( event, wnd );
}
示例3: if
void Interactor3DMeasure::UpdateCursor( wxEvent& event, wxWindow* wnd )
{
if ( event.IsKindOf( CLASSINFO( wxMouseEvent ) ) )
{
wxMouseEvent* e = ( wxMouseEvent* )&event;
if ( !e->RightDown() && !e->MiddleDown() )
{
if ( e->CmdDown() && !e->ShiftDown() )
{
wnd->SetCursor( CursorFactory::CursorContour );
return;
}
else if ( e->CmdDown() && e->ShiftDown() )
{
wnd->SetCursor( CursorFactory::CursorAdd );
return;
}
else if ( !e->CmdDown() && e->ShiftDown() )
{
wnd->SetCursor( CursorFactory::CursorRemove );
return;
}
}
}
else if ( event.IsKindOf( CLASSINFO( wxKeyEvent ) ) )
{
wxKeyEvent* e = ( wxKeyEvent* )&event;
if ( e->GetEventType() != wxEVT_KEY_UP )
{
if ( e->GetKeyCode() == WXK_CONTROL && !e->ShiftDown() )
{
wnd->SetCursor( CursorFactory::CursorContour );
return;
}
else if ( ( e->GetKeyCode() == WXK_CONTROL && e->ShiftDown() ) ||
( e->GetKeyCode() == WXK_SHIFT && e->CmdDown() ) )
{
wnd->SetCursor( CursorFactory::CursorAdd );
return;
}
else if ( e->GetKeyCode() == WXK_SHIFT && !e->CmdDown() )
{
wnd->SetCursor( CursorFactory::CursorRemove );
return;
}
}
}
Interactor3D::UpdateCursor( event, wnd );
}
示例4: ProcessEvent
// Extend event processing to search the view's event table
bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event)
{
static wxEvent *ActiveEvent = NULL;
// Break recursion loops
if (ActiveEvent == &event)
return false;
ActiveEvent = &event;
bool ret;
if ( !m_childView || ! m_childView->ProcessEvent(event) )
{
// Only hand up to the parent if it's a menu command
if (!event.IsKindOf(CLASSINFO(wxCommandEvent)) || !GetParent() || !GetParent()->ProcessEvent(event))
ret = wxEvtHandler::ProcessEvent(event);
else
ret = true;
}
else
ret = true;
ActiveEvent = NULL;
return ret;
}
示例5: if
void Interactor2DMeasure::UpdateCursor( wxEvent& event, wxWindow* wnd )
{
RenderView2D* view = ( RenderView2D* )wnd;
if ( wnd->FindFocus() == wnd )
{
if ( event.IsKindOf( CLASSINFO( wxMouseEvent ) ) )
{
wxMouseEvent* e = ( wxMouseEvent* )&event;
if ( ( ( e->MiddleDown() || e->RightDown() ) && !m_bEditing ) ||
( e->CmdDown() && e->ShiftDown() ) )
{
Interactor2D::UpdateCursor( event, wnd );
return;
}
else if ( ( !m_bEditing && !m_bDrawing && view->GetRegion( e->GetX(), e->GetY() ) ) ||
( m_bEditing && m_nPointIndex < 0 ) )
{
wnd->SetCursor( CursorFactory::CursorGrab );
}
else
{
if ( m_nAction == MM_Line )
wnd->SetCursor( CursorFactory::CursorMeasureLine );
else if ( m_nAction == MM_Rectangle )
wnd->SetCursor( CursorFactory::CursorMeasureRectangle );
else if ( m_nAction == MM_Polyline || m_nAction == MM_Spline )
wnd->SetCursor( CursorFactory::CursorMeasurePolyline );
}
}
}
else
Interactor2D::UpdateCursor( event, wnd );
}
示例6: ProcessEvent
// Extend event processing to call OnCommand
bool wxPropertyFormView::ProcessEvent(wxEvent& event)
{
if (wxEvtHandler::ProcessEvent(event))
return true;
else if (event.IsCommandEvent() && !event.IsKindOf(CLASSINFO(wxUpdateUIEvent)) && event.GetEventObject())
{
OnCommand(* ((wxWindow*) event.GetEventObject()), (wxCommandEvent&) event);
return true;
}
else
return false;
}
示例7: ProcessEvent
// Redirect events to active child first
bool wxMDIParentFrame::ProcessEvent(wxEvent& event)
{
// Stops the same event being processed repeatedly
static wxEventType inEvent = wxEVT_NULL;
if (inEvent == event.GetEventType())
return false;
inEvent = event.GetEventType();
bool res = false;
if (m_activeChild && event.IsKindOf(CLASSINFO(wxCommandEvent)))
{
res = m_activeChild->GetEventHandler()->ProcessEvent(event);
}
if (!res)
res = GetEventHandler()->wxEvtHandler::ProcessEvent(event);
inEvent = wxEVT_NULL;
return res;
}
示例8: ProcessEvent
// Forward command events to the current rich text control, if any
bool IceNoteFrame::ProcessEvent(wxEvent& event)
{
if (event.IsCommandEvent() && !event.IsKindOf(CLASSINFO(wxChildFocusEvent)))
{
// Problem: we can get infinite recursion because the events
// climb back up to this frame, and repeat.
// Assume that command events don't cause another command event
// to be called, so we can rely on inCommand not being overwritten
static int s_eventType = 0;
static wxWindowID s_id = 0;
if (s_id != event.GetId() && s_eventType != event.GetEventType())
{
s_eventType = event.GetEventType();
s_id = event.GetId();
wxWindow* focusWin = wxFindFocusDescendant(this);
if (focusWin && focusWin->GetEventHandler()->ProcessEvent(event))
{
//s_command = NULL;
s_eventType = 0;
s_id = 0;
return true;
}
s_eventType = 0;
s_id = 0;
}
else
{
return false;
}
}
return wxFrame::ProcessEvent(event);
}