本文整理汇总了C++中PCB_EDIT_FRAME::GetPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ PCB_EDIT_FRAME::GetPosition方法的具体用法?C++ PCB_EDIT_FRAME::GetPosition怎么用?C++ PCB_EDIT_FRAME::GetPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCB_EDIT_FRAME
的用法示例。
在下文中一共展示了PCB_EDIT_FRAME::GetPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPrintPreview
void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
{
SetPrintParameters( );
// If no layer selected, we have no plot. prompt user if it happens
// because he could think there is a bug in Pcbnew:
if( s_Parameters.m_PrintMaskLayer == 0 )
{
DisplayError( this, _( "No layer selected" ) );
return;
}
// Pass two printout objects: for preview, and possible printing.
wxString title = _( "Print Preview" );
wxPrintPreview* preview =
new wxPrintPreview( new BOARD_PRINTOUT_CONTROLLER( s_Parameters, m_parent, title ),
new BOARD_PRINTOUT_CONTROLLER( s_Parameters, m_parent, title ),
s_PrintData );
if( preview == NULL )
{
DisplayError( this, wxT( "OnPrintPreview() problem" ) );
return;
}
// Uses the parent position and size.
wxPoint WPos = m_parent->GetPosition();
wxSize WSize = m_parent->GetSize();
preview->SetZoom( 100 );
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->SetMinSize( wxSize( 550, 350 ) );
frame->Initialize();
frame->Raise(); // Needed on Ubuntu/Unity to display the frame
frame->Show( true );
}