本文整理汇总了C++中kigfx::VIEW_CONTROLS::EnableAutoPan方法的典型用法代码示例。如果您正苦于以下问题:C++ VIEW_CONTROLS::EnableAutoPan方法的具体用法?C++ VIEW_CONTROLS::EnableAutoPan怎么用?C++ VIEW_CONTROLS::EnableAutoPan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kigfx::VIEW_CONTROLS
的用法示例。
在下文中一共展示了VIEW_CONTROLS::EnableAutoPan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UseGalCanvas
void EDA_DRAW_FRAME::UseGalCanvas()
{
KIGFX::GAL* gal = GetGalCanvas()->GetGAL();
// Set up grid settings
gal->SetGridVisibility( IsGridVisible() );
gal->SetGridSize( VECTOR2D( GetScreen()->GetGridSize() ) );
gal->SetGridOrigin( VECTOR2D( GetGridOrigin() ) );
// Transfer EDA_DRAW_PANEL settings
KIGFX::VIEW_CONTROLS* viewControls = GetGalCanvas()->GetViewControls();
viewControls->EnableCursorWarping( !m_canvas->GetEnableZoomNoCenter() );
viewControls->EnableMousewheelPan( m_canvas->GetEnableMousewheelPan() );
viewControls->EnableAutoPan( m_canvas->GetEnableAutoPan() );
m_canvas->SetEvtHandlerEnabled( false );
GetGalCanvas()->SetEvtHandlerEnabled( true );
GetGalCanvas()->StartDrawing();
// Switch panes
// JEY TODO: drop down to a single pane....
m_auimgr.GetPane( "DrawFrame" ).Show( false );
m_auimgr.GetPane( "DrawFrameGal" ).Show( true );
m_auimgr.Update();
// Reset current tool on switch();
SetNoToolSelected();
}