diff --git a/CMakeLists.txt b/CMakeLists.txt index d59751db2d..8d35d542f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,11 +83,11 @@ else (KICAD_STABLE_VERSION ) endif(KICAD_STABLE_VERSION ) # Nanometers must be enabled when USE_PCBNEW_SEXPR_FILE_FORMAT=ON. -#if( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES ) -# set( TMP "The Pcbnew s-expression file format requires nano-meter internal units to be " ) -# set( TMP "${TMP} enabled using -DUSE_PCBNEW_NANOMETRES=ON." ) -# message( FATAL_ERROR ${TMP} ) -#endif( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES ) +if( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES ) + set( TMP "The Pcbnew s-expression file format requires nano-meter internal units to be " ) + set( TMP "${TMP} enabled using -DUSE_PCBNEW_NANOMETRES=ON." ) + message( FATAL_ERROR ${TMP} ) +endif( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES ) #================================================ # Set flags for GCC. diff --git a/common/base_screen.cpp b/common/base_screen.cpp index 5d802f322e..0aa24fac66 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -119,7 +119,7 @@ bool BASE_SCREEN::SetZoom( double iu_per_du ) if( iu_per_du == m_Zoom ) return false; - wxLogDebug( "Zoom:%.16g 1/Zoom:%.16g", iu_per_du, 1/iu_per_du ); + //wxLogDebug( "Zoom:%.16g 1/Zoom:%.16g", iu_per_du, 1/iu_per_du ); if( iu_per_du < GetMinAllowedZoom() ) return false; diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index ca20a621f4..6d21f20d12 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -62,23 +62,41 @@ public: return ( DIALOG_PRINT_USING_PRINTER* )wxWindow::GetParent(); } - void OnCloseWindow( wxCloseEvent& event ) + bool Show( bool show ) // overload { - if( !IsIconized() ) - { - GetParent()->GetParent()->SetPreviewPosition( GetPosition() ); - GetParent()->GetParent()->SetPreviewSize( GetSize() ); - } + bool ret; - wxPreviewFrame::OnCloseWindow( event ); + // Show or hide the window. If hiding, save current position and size. + // If showing, use previous position and size. + if( show ) + { + ret = wxPreviewFrame::Show( show ); + + if( s_size.x != 0 && s_size.y != 0 ) + SetSize( s_pos.x, s_pos.y, s_size.x, s_size.y, 0 ); + } + else + { + // Save the dialog's position & size before hiding + s_size = GetSize(); + s_pos = GetPosition(); + + ret = wxPreviewFrame::Show( show ); + } + return ret; } private: + static wxPoint s_pos; + static wxSize s_size; + DECLARE_CLASS( SCH_PREVIEW_FRAME ) DECLARE_EVENT_TABLE() DECLARE_NO_COPY_CLASS( SCH_PREVIEW_FRAME ) }; +wxPoint SCH_PREVIEW_FRAME::s_pos; +wxSize SCH_PREVIEW_FRAME::s_size; IMPLEMENT_CLASS( SCH_PREVIEW_FRAME, wxPreviewFrame ) @@ -133,6 +151,15 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) if ( GetSizer() ) GetSizer()->SetSizeHints( this ); +#if 0 + Does not work on a two monitor system when the 2nd monitor is not attached, + and when the coords were saved to disk when the playground was bigger while the + 2nd monitor was attached. + + Simply rely on the policy in class DIALOG_SHIM, which centers the dialog + initially during a runtime session but gives user the ability to move it in + that session. + if( parent->GetPrintDialogPosition() == wxDefaultPosition && parent->GetPrintDialogSize() == wxDefaultSize ) { @@ -143,12 +170,18 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) SetPosition( parent->GetPrintDialogPosition() ); SetSize( parent->GetPrintDialogSize() ); } +#else + // This dialog may get moved and resized in Show(), but in case this is + // the first time, center it for starters. + Center(); +#endif - SetFocus(); - - m_buttonPrint->SetDefault(); + m_buttonPrint->SetDefault(); // on linux, this is inadequate to determine + // what ENTER does. Must also SetFocus(). + m_buttonPrint->SetFocus(); } + void DIALOG_PRINT_USING_PRINTER::GetPrintOptions() { SCH_EDIT_FRAME* parent = GetParent(); @@ -210,9 +243,13 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) preview->SetZoom( 100 ); - SCH_PREVIEW_FRAME* frame = new SCH_PREVIEW_FRAME( preview, this, title, - parent->GetPreviewPosition(), - parent->GetPreviewSize() ); + SCH_PREVIEW_FRAME* frame = new SCH_PREVIEW_FRAME( preview, this, title ); + + // on first invocation in this runtime session, set to 2/3 size of my parent, + // but will be changed in Show() if not first time as will position. + frame->SetSize( (2 * parent->GetSize()) / 3 ); + frame->Center(); + frame->Initialize(); frame->Show( true ); } diff --git a/eeschema/dialogs/dialog_print_using_printer_base.cpp b/eeschema/dialogs/dialog_print_using_printer_base.cpp index e3e584456c..8b6c425d62 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.cpp +++ b/eeschema/dialogs/dialog_print_using_printer_base.cpp @@ -1,82 +1,82 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_print_using_printer_base.h" - -/////////////////////////////////////////////////////////////////////////// - -DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); - - wxBoxSizer* bMainSizer; - bMainSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bleftSizer; - bleftSizer = new wxBoxSizer( wxVERTICAL ); - - m_staticText1 = new wxStaticText( this, wxID_ANY, _("Print options:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1->Wrap( -1 ); - m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - - bleftSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT, 5 ); - - m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkReference->SetValue(true); - m_checkReference->SetToolTip( _("Print (or not) the Frame references.") ); - - bleftSizer->Add( m_checkReference, 0, wxALL, 10 ); - - m_checkMonochrome = new wxCheckBox( this, wxID_ANY, _("Print in &black and white only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkMonochrome->SetValue(true); - bleftSizer->Add( m_checkMonochrome, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); - - - bMainSizer->Add( bleftSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 12 ); - - wxBoxSizer* bbuttonsSizer; - bbuttonsSizer = new wxBoxSizer( wxVERTICAL ); - - m_buttonPageSetup = new wxButton( this, wxID_ANY, _("Page Setup"), wxDefaultPosition, wxDefaultSize, 0 ); - bbuttonsSizer->Add( m_buttonPageSetup, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); - - m_buttonPreview = new wxButton( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 ); - bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonPrint = new wxButton( this, wxID_ANY, _("Print"), wxDefaultPosition, wxDefaultSize, 0 ); - bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); - bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - - bMainSizer->Add( bbuttonsSizer, 0, wxALL, 12 ); - - - this->SetSizer( bMainSizer ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); - this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnInitDialog ) ); - m_buttonPageSetup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this ); - m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); - m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this ); - m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this ); -} - -DIALOG_PRINT_USING_PRINTER_BASE::~DIALOG_PRINT_USING_PRINTER_BASE() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); - this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnInitDialog ) ); - m_buttonPageSetup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this ); - m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); - m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this ); - m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this ); - -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 11 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_print_using_printer_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bleftSizer; + bleftSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Print options:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + + bleftSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT, 5 ); + + m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkReference->SetValue(true); + m_checkReference->SetToolTip( _("Print (or not) the Frame references.") ); + + bleftSizer->Add( m_checkReference, 0, wxALL, 10 ); + + m_checkMonochrome = new wxCheckBox( this, wxID_ANY, _("Print in &black and white only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkMonochrome->SetValue(true); + bleftSizer->Add( m_checkMonochrome, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + + + bMainSizer->Add( bleftSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 12 ); + + wxBoxSizer* bbuttonsSizer; + bbuttonsSizer = new wxBoxSizer( wxVERTICAL ); + + m_buttonPageSetup = new wxButton( this, wxID_ANY, _("Page Setup"), wxDefaultPosition, wxDefaultSize, 0 ); + bbuttonsSizer->Add( m_buttonPageSetup, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); + + m_buttonPreview = new wxButton( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 ); + bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonPrint = new wxButton( this, wxID_ANY, _("Print"), wxDefaultPosition, wxDefaultSize, 0 ); + bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + + bMainSizer->Add( bbuttonsSizer, 0, wxALL, 12 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnInitDialog ) ); + m_buttonPageSetup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this ); + m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); + m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this ); + m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this ); +} + +DIALOG_PRINT_USING_PRINTER_BASE::~DIALOG_PRINT_USING_PRINTER_BASE() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnInitDialog ) ); + m_buttonPageSetup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPageSetup ), NULL, this ); + m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); + m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this ); + m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this ); + +} diff --git a/eeschema/dialogs/dialog_print_using_printer_base.fbp b/eeschema/dialogs/dialog_print_using_printer_base.fbp index b8cfa1792b..05f62f19a5 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.fbp +++ b/eeschema/dialogs/dialog_print_using_printer_base.fbp @@ -1,768 +1,730 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_print_using_printer_base - 1000 - none - 1 - dialog_print_schematic - - . - - 1 - 1 - 1 - 1 - 0 - - 1 - 1 - 1 - 1 - - 0 - - - - - - - 1 - - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - -1,-1 - 1 - DIALOG_PRINT_USING_PRINTER_BASE - 1 - - - 1 - - Resizable - 1 - 388,185 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Print - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - OnCloseWindow - - - - - - OnInitDialog - - - - - - - - - - - - - - - - - - - - - - - bMainSizer - wxHORIZONTAL - none - - 12 - wxBOTTOM|wxEXPAND|wxLEFT|wxTOP - 1 - - - bleftSizer - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,92,-1,70,0 - 0 - 0 - wxID_ANY - Print options: - - 0 - - - 0 - - 1 - m_staticText1 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Print sheet &reference and title block - - 0 - - - 0 - - 1 - m_checkReference - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Print (or not) the Frame references. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Print in &black and white only - - 0 - - - 0 - - 1 - m_checkMonochrome - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - wxALL - 0 - - - bbuttonsSizer - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Page Setup - - 0 - - - 0 - - 1 - m_buttonPageSetup - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnPageSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Preview - - 0 - - - 0 - - 1 - m_buttonPreview - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnPrintPreview - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Print - - 0 - - - 0 - - 1 - m_buttonPrint - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnPrintButtonClick - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Close - - 0 - - - 0 - - 1 - m_buttonQuit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnButtonCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_print_using_printer_base + 1000 + none + 1 + dialog_print_schematic + + . + + 1 + 1 + 1 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + DIALOG_PRINT_USING_PRINTER_BASE + + 388,185 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Print + + + + + + + + + + + + + + OnCloseWindow + + + + + + OnInitDialog + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxHORIZONTAL + none + + 12 + wxBOTTOM|wxEXPAND|wxLEFT|wxTOP + 1 + + + bleftSizer + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Print options: + + 0 + + + 0 + + 1 + m_staticText1 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Print sheet &reference and title block + + 0 + + + 0 + + 1 + m_checkReference + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Print (or not) the Frame references. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Print in &black and white only + + 0 + + + 0 + + 1 + m_checkMonochrome + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + wxALL + 0 + + + bbuttonsSizer + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Page Setup + + 0 + + + 0 + + 1 + m_buttonPageSetup + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnPageSetup + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Preview + + 0 + + + 0 + + 1 + m_buttonPreview + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnPrintPreview + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Print + + 0 + + + 0 + + 1 + m_buttonPrint + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnPrintButtonClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Close + + 0 + + + 0 + + 1 + m_buttonQuit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eeschema/dialogs/dialog_print_using_printer_base.h b/eeschema/dialogs/dialog_print_using_printer_base.h index 3bc79205cc..a481d2b2b8 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.h +++ b/eeschema/dialogs/dialog_print_using_printer_base.h @@ -1,59 +1,60 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_PRINT_USING_PRINTER_BASE_H__ -#define __DIALOG_PRINT_USING_PRINTER_BASE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_PRINT_USING_PRINTER_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_PRINT_USING_PRINTER_BASE : public wxDialog -{ - private: - - protected: - wxStaticText* m_staticText1; - wxCheckBox* m_checkReference; - wxCheckBox* m_checkMonochrome; - wxButton* m_buttonPageSetup; - wxButton* m_buttonPreview; - wxButton* m_buttonPrint; - wxButton* m_buttonQuit; - - // Virtual event handlers, overide them in your derived class - virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } - virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } - virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); } - virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); } - virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,185 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_PRINT_USING_PRINTER_BASE(); - -}; - -#endif //__DIALOG_PRINT_USING_PRINTER_BASE_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 11 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_PRINT_USING_PRINTER_BASE_H__ +#define __DIALOG_PRINT_USING_PRINTER_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_PRINT_USING_PRINTER_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_PRINT_USING_PRINTER_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxStaticText* m_staticText1; + wxCheckBox* m_checkReference; + wxCheckBox* m_checkMonochrome; + wxButton* m_buttonPageSetup; + wxButton* m_buttonPreview; + wxButton* m_buttonPrint; + wxButton* m_buttonQuit; + + // Virtual event handlers, overide them in your derived class + virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } + virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } + virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,185 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_PRINT_USING_PRINTER_BASE(); + +}; + +#endif //__DIALOG_PRINT_USING_PRINTER_BASE_H__ diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 9ea21de65c..3c9b2d8611 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -177,7 +177,7 @@ static inline const char* ShowHorizJustify( EDA_TEXT_HJUSTIFY_T horizontal ) return rs; } -static inline EDA_TEXT_HJUSTIFY_T HorizJustify( const char* horizontal ) +static EDA_TEXT_HJUSTIFY_T horizJustify( const char* horizontal ) { if( !strcmp( "L", horizontal ) ) return GR_TEXT_HJUSTIFY_LEFT; @@ -186,7 +186,7 @@ static inline EDA_TEXT_HJUSTIFY_T HorizJustify( const char* horizontal ) return GR_TEXT_HJUSTIFY_CENTER; } -static inline EDA_TEXT_VJUSTIFY_T VertJustify( const char* vertical ) +static EDA_TEXT_VJUSTIFY_T vertJustify( const char* vertical ) { if( !strcmp( "T", vertical ) ) return GR_TEXT_VJUSTIFY_TOP; @@ -1582,10 +1582,10 @@ void LEGACY_PLUGIN::loadMODULE_TEXT( TEXTE_MODULE* aText ) aText->SetItalic( italic && *italic == 'I' ); if( hjust ) - aText->SetHorizJustify( HorizJustify( hjust ) ); + aText->SetHorizJustify( horizJustify( hjust ) ); if( vjust ) - aText->SetVertJustify( VertJustify( vjust ) ); + aText->SetVertJustify( vertJustify( vjust ) ); if( layer < 0 ) layer = 0; @@ -1908,7 +1908,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT() pcbtxt->SetItalic( !strcmp( style, "Italic" ) ); if( hJustify ) - pcbtxt->SetHorizJustify( HorizJustify( hJustify ) ); + pcbtxt->SetHorizJustify( horizJustify( hJustify ) ); else { // boom, somebody changed a constructor, I was relying on this: @@ -1916,7 +1916,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT() } if( vJustify ) - pcbtxt->SetVertJustify( VertJustify( vJustify ) ); + pcbtxt->SetVertJustify( vertJustify( vJustify ) ); if( layer < FIRST_COPPER_LAYER ) layer = FIRST_COPPER_LAYER;