本文整理汇总了C++中TOOL_EVENT::IsKeyPressed方法的典型用法代码示例。如果您正苦于以下问题:C++ TOOL_EVENT::IsKeyPressed方法的具体用法?C++ TOOL_EVENT::IsKeyPressed怎么用?C++ TOOL_EVENT::IsKeyPressed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TOOL_EVENT
的用法示例。
在下文中一共展示了TOOL_EVENT::IsKeyPressed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleCommonEvents
void ROUTER_TOOL::handleCommonEvents( const TOOL_EVENT& aEvent )
{
#ifdef DEBUG
if( aEvent.IsKeyPressed() )
{
switch( aEvent.KeyCode() )
{
case '0':
TRACEn( 2, "saving drag/route log...\n" );
m_router->DumpLog();
break;
}
}
else
#endif
if( aEvent.IsAction( &ACT_RouterOptions ) )
{
DIALOG_PNS_SETTINGS settingsDlg( m_frame, m_router->Settings() );
if( settingsDlg.ShowModal() )
{
// FIXME: do we need an explicit update?
}
}
else if( aEvent.IsAction( &ACT_SetDpDimensions ) )
{
PNS_SIZES_SETTINGS sizes = m_router->Sizes();
DIALOG_PNS_DIFF_PAIR_DIMENSIONS settingsDlg( m_frame, sizes );
if( settingsDlg.ShowModal() )
{
m_router->UpdateSizes( sizes );
}
}
else if( aEvent.IsAction( &ACT_CustomTrackWidth ) )
{
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
DIALOG_TRACK_VIA_SIZE sizeDlg( m_frame, bds );
if( sizeDlg.ShowModal() )
{
bds.UseCustomTrackViaSize( true );
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
}
}
else if( aEvent.IsAction( &COMMON_ACTIONS::trackViaSizeChanged ) )
{
PNS_SIZES_SETTINGS sizes( m_router->Sizes() );
sizes.ImportCurrent( m_board->GetDesignSettings() );
m_router->UpdateSizes( sizes );
}
}
示例2: handleCommonEvents
void ROUTER_TOOL::handleCommonEvents( const TOOL_EVENT& aEvent )
{
#ifdef DEBUG
if( aEvent.IsKeyPressed() )
{
switch( aEvent.KeyCode() )
{
case '0':
wxLogTrace( "PNS", "saving drag/route log...\n" );
m_router->DumpLog();
break;
}
}
#endif
}