本文整理汇总了C++中PCB_EDIT_FRAME::SetMsgPanel方法的典型用法代码示例。如果您正苦于以下问题:C++ PCB_EDIT_FRAME::SetMsgPanel方法的具体用法?C++ PCB_EDIT_FRAME::SetMsgPanel怎么用?C++ PCB_EDIT_FRAME::SetMsgPanel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCB_EDIT_FRAME
的用法示例。
在下文中一共展示了PCB_EDIT_FRAME::SetMsgPanel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOkClick
void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event )
{
if( !itemValuesOK() )
return;
m_parent->SaveCopyInUndoList( m_item, UR_CHANGED );
wxString msg;
if( m_DC )
m_item->Draw( m_parent->GetCanvas(), m_DC, GR_XOR );
msg = m_Center_StartXCtrl->GetValue();
m_item->SetStartX( ValueFromString( g_UserUnit, msg ) );
msg = m_Center_StartYCtrl->GetValue();
m_item->SetStartY( ValueFromString( g_UserUnit, msg ) );
msg = m_EndX_Radius_Ctrl->GetValue();
m_item->SetEndX( ValueFromString( g_UserUnit, msg ) );
msg = m_EndY_Ctrl->GetValue();
m_item->SetEndY( ValueFromString( g_UserUnit, msg ) );
msg = m_ThicknessCtrl->GetValue();
m_item->SetWidth( ValueFromString( g_UserUnit, msg ) );
msg = m_DefaultThicknessCtrl->GetValue();
int thickness = ValueFromString( g_UserUnit, msg );
m_item->SetLayer( ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) );
if( m_item->GetLayer() == Edge_Cuts )
m_brdSettings.m_EdgeSegmentWidth = thickness;
else
m_brdSettings.m_DrawSegmentWidth = thickness;
if( m_item->GetShape() == S_ARC )
{
double angle;
m_Angle_Ctrl->GetValue().ToDouble( &angle );
NORMALIZE_ANGLE_360( angle );
m_item->SetAngle( angle );
}
m_parent->OnModify();
if( m_DC )
m_item->Draw( m_parent->GetCanvas(), m_DC, GR_OR );
m_parent->SetMsgPanel( m_item );
m_parent->SetDesignSettings( m_brdSettings );
Close( true );
}
示例2: TransferDataFromWindow
bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow()
{
if( !DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::TransferDataFromWindow() )
return false;
m_parent->SaveCopyInUndoList( m_item, UR_CHANGED );
wxString msg;
if( m_DC )
m_item->Draw( m_parent->GetCanvas(), m_DC, GR_XOR );
msg = m_Center_StartXCtrl->GetValue();
m_item->SetStartX( ValueFromString( g_UserUnit, msg ) );
msg = m_Center_StartYCtrl->GetValue();
m_item->SetStartY( ValueFromString( g_UserUnit, msg ) );
msg = m_EndX_Radius_Ctrl->GetValue();
m_item->SetEndX( ValueFromString( g_UserUnit, msg ) );
msg = m_EndY_Ctrl->GetValue();
m_item->SetEndY( ValueFromString( g_UserUnit, msg ) );
msg = m_ThicknessCtrl->GetValue();
m_item->SetWidth( ValueFromString( g_UserUnit, msg ) );
msg = m_DefaultThicknessCtrl->GetValue();
int thickness = ValueFromString( g_UserUnit, msg );
m_item->SetLayer( ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) );
if( m_item->GetLayer() == Edge_Cuts )
m_brdSettings.m_EdgeSegmentWidth = thickness;
else
m_brdSettings.m_DrawSegmentWidth = thickness;
if( m_item->GetShape() == S_ARC )
{
m_item->SetAngle( m_AngleValue * 10.0 );
}
m_parent->OnModify();
if( m_DC )
m_item->Draw( m_parent->GetCanvas(), m_DC, GR_OR );
m_parent->SetMsgPanel( m_item );
m_parent->SetDesignSettings( m_brdSettings );
return true;
}