diff --git a/common/dialogs/panel_image_editor.cpp b/common/dialogs/panel_image_editor.cpp index 885e6f76ff..5b605c2fae 100644 --- a/common/dialogs/panel_image_editor.cpp +++ b/common/dialogs/panel_image_editor.cpp @@ -26,30 +26,30 @@ #include #include #include -#include #include #include - +#include #include #include -PANEL_IMAGE_EDITOR::PANEL_IMAGE_EDITOR( wxWindow* aParent, const BITMAP_BASE& aItem ) : +PANEL_IMAGE_EDITOR::PANEL_IMAGE_EDITOR( UNITS_PROVIDER* aUnitsProvider, wxWindow* aParent, const BITMAP_BASE& aItem ) : PANEL_IMAGE_EDITOR_BASE( aParent ), + m_scale( aUnitsProvider, aParent, m_staticTextScale, m_textCtrlScale, nullptr ), m_workingImage( std::make_unique( aItem ) ) { - wxString msg; - msg.Printf( wxT( "%f" ), m_workingImage->GetScale() ); - m_textCtrlScale->SetValue( msg ); - - msg.Printf( wxT( "%d" ), m_workingImage->GetPPI() ); - m_stPPI_Value->SetLabel( msg ); + m_scale.SetUnits( EDA_UNITS::UNSCALED ); } -PANEL_IMAGE_EDITOR::~PANEL_IMAGE_EDITOR() +bool PANEL_IMAGE_EDITOR::TransferDataToWindow() { + m_scale.SetDoubleValue( m_workingImage->GetScale() ); + + m_stPPI_Value->SetLabel( wxString::Format( wxT( "%d" ), m_workingImage->GetPPI() ) ); + + return true; } @@ -72,11 +72,10 @@ bool PANEL_IMAGE_EDITOR::CheckValues() #define MIN_SIZE 15 // Min size in pixels after scaling (50 mils) #define MAX_SIZE 6000 // Max size in pixels after scaling (20 inches) - double tmp; - wxString msg = m_textCtrlScale->GetValue(); + double tmp = m_scale.GetDoubleValue(); // Test number correctness - if( !msg.ToDouble( &tmp ) || tmp < 0.0 ) + if( tmp < 0.0 ) { DisplayErrorMessage( host, _( "Scale must be a positive number." ) ); return false; @@ -84,7 +83,7 @@ bool PANEL_IMAGE_EDITOR::CheckValues() // Test value correctness VECTOR2I psize = m_workingImage->GetSizePixels(); - int size_min = (int) std::min( ( psize.x * tmp ), ( psize.y * tmp ) ); + int size_min = (int) std::min( ( psize.x * tmp ), ( psize.y * tmp ) ); if( size_min < MIN_SIZE ) // if the size is too small, the image will be hard to locate { diff --git a/eeschema/dialogs/dialog_image_properties.cpp b/eeschema/dialogs/dialog_image_properties.cpp index 236b12ea1e..3ef5e21d43 100644 --- a/eeschema/dialogs/dialog_image_properties.cpp +++ b/eeschema/dialogs/dialog_image_properties.cpp @@ -30,14 +30,17 @@ DIALOG_IMAGE_PROPERTIES::DIALOG_IMAGE_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_BITMAP& aBitmap ) : - DIALOG_IMAGE_PROPERTIES_BASE( aParent ), m_frame( aParent ), m_bitmap( aBitmap ), + DIALOG_IMAGE_PROPERTIES_BASE( aParent ), + m_frame( aParent ), + m_bitmap( aBitmap ), m_posX( aParent, m_XPosLabel, m_ModPositionX, m_XPosUnit ), m_posY( aParent, m_YPosLabel, m_ModPositionY, m_YPosUnit ) { // Create the image editor page const REFERENCE_IMAGE& refImage = aBitmap.GetReferenceImage(); - m_imageEditor = new PANEL_IMAGE_EDITOR( m_Notebook, refImage.GetImage() ); - m_Notebook->AddPage( m_imageEditor, _( "Image" ), false ); + m_imageEditor = new PANEL_IMAGE_EDITOR( aParent, this, refImage.GetImage() ); + + m_imageSizer->Add( m_imageEditor, 1, wxEXPAND | wxALL, 5 ); m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD ); m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD ); @@ -53,7 +56,7 @@ bool DIALOG_IMAGE_PROPERTIES::TransferDataToWindow() m_posX.SetValue( m_bitmap.GetPosition().x ); m_posY.SetValue( m_bitmap.GetPosition().y ); - return true; + return m_imageEditor->TransferDataToWindow(); } @@ -72,7 +75,7 @@ bool DIALOG_IMAGE_PROPERTIES::TransferDataFromWindow() // Update our bitmap from the editor m_imageEditor->TransferToImage( refImage.MutableImage() ); - m_bitmap.SetPosition( VECTOR2I( m_posX.GetValue(), m_posY.GetValue() ) ); + m_bitmap.SetPosition( VECTOR2I( m_posX.GetIntValue(), m_posY.GetIntValue() ) ); if( !commit.Empty() ) commit.Push( _( "Image Properties" ) ); diff --git a/eeschema/dialogs/dialog_image_properties_base.cpp b/eeschema/dialogs/dialog_image_properties_base.cpp index fa03dd754b..6e3422a9b0 100644 --- a/eeschema/dialogs/dialog_image_properties_base.cpp +++ b/eeschema/dialogs/dialog_image_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -13,16 +13,11 @@ DIALOG_IMAGE_PROPERTIES_BASE::DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wx { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - wxBoxSizer* m_GeneralBoxSizer; - m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); - m_Notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_PanelGeneral = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizerProperties; - bSizerProperties = new wxBoxSizer( wxVERTICAL ); - wxStaticBoxSizer* sbSizerProperties; - sbSizerProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Position") ), wxVERTICAL ); + bMainSizer->Add( 0, 5, 0, wxEXPAND, 5 ); wxFlexGridSizer* fgSizerPos; fgSizerPos = new wxFlexGridSizer( 2, 3, 1, 0 ); @@ -31,41 +26,36 @@ DIALOG_IMAGE_PROPERTIES_BASE::DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wx fgSizerPos->SetFlexibleDirection( wxBOTH ); fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_XPosLabel = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosLabel = new wxStaticText( this, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosLabel->Wrap( -1 ); fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_ModPositionX = new wxTextCtrl( sbSizerProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ModPositionX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_XPosUnit = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosUnit->Wrap( -1 ); fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - m_YPosLabel = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosLabel = new wxStaticText( this, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosLabel->Wrap( -1 ); fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_ModPositionY = new wxTextCtrl( sbSizerProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ModPositionY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 1 ); - m_YPosUnit = new wxStaticText( sbSizerProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosUnit->Wrap( -1 ); fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - sbSizerProperties->Add( fgSizerPos, 0, wxBOTTOM|wxEXPAND, 3 ); + bMainSizer->Add( fgSizerPos, 0, wxEXPAND|wxALL, 8 ); + m_imageSizer = new wxBoxSizer( wxVERTICAL ); - bSizerProperties->Add( sbSizerProperties, 1, wxALL|wxEXPAND, 5 ); + m_imageSizer->SetMinSize( wxSize( 360,-1 ) ); - - m_PanelGeneral->SetSizer( bSizerProperties ); - m_PanelGeneral->Layout(); - bSizerProperties->Fit( m_PanelGeneral ); - m_Notebook->AddPage( m_PanelGeneral, _("General"), false ); - - m_GeneralBoxSizer->Add( m_Notebook, 1, wxEXPAND | wxALL, 5 ); + bMainSizer->Add( m_imageSizer, 1, wxEXPAND, 5 ); m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); @@ -74,11 +64,12 @@ DIALOG_IMAGE_PROPERTIES_BASE::DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wx m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); m_sdbSizerStdButtons->Realize(); - m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxALL|wxEXPAND, 5 ); + bMainSizer->Add( m_sdbSizerStdButtons, 0, wxALL|wxEXPAND, 5 ); - this->SetSizer( m_GeneralBoxSizer ); + this->SetSizer( bMainSizer ); this->Layout(); + bMainSizer->Fit( this ); this->Centre( wxBOTH ); } diff --git a/eeschema/dialogs/dialog_image_properties_base.fbp b/eeschema/dialogs/dialog_image_properties_base.fbp index d82b659297..0b52dd4e48 100644 --- a/eeschema/dialogs/dialog_image_properties_base.fbp +++ b/eeschema/dialogs/dialog_image_properties_base.fbp @@ -1,611 +1,505 @@ - + - - - ; - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_image_properties_base - 1000 - none - - - 1 - DIALOG_IMAGE_PROPERTIES_BASE - - . - - 1 - 1 - 1 - 1 - UI - 0 - 0 - 0 - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - DIALOG_IMAGE_PROPERTIES_BASE - - 363,281 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h; forward_declare - Image Properties - - 0 - - - - - - m_GeneralBoxSizer - wxVERTICAL - none - - 5 - wxEXPAND | wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_Notebook - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - - - General - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_PanelGeneral - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxTAB_TRAVERSAL - - - bSizerProperties - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 1 - - wxID_ANY - Position - - sbSizerProperties - wxVERTICAL - 1 - none - - 3 - wxBOTTOM|wxEXPAND - 0 - - 3 - wxBOTH - 1 - 0 - 0 - - fgSizerPos - wxFLEX_GROWMODE_SPECIFIED - none - 2 - 1 - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - X: - 0 - - 0 - - - 0 - - 1 - m_XPosLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ModPositionX - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - 0 - - 0 - - - 0 - - 1 - m_XPosUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Y: - 0 - - 0 - - - 0 - - 1 - m_YPosLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ModPositionY - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - 0 - - 0 - - - 0 - - 1 - m_YPosUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizerStdButtons - protected - - - + + + C++ + ; + 1 + connect + none + + + 0 + 0 + res + UTF-8 + dialog_image_properties_base + 1000 + 1 + 1 + UI + DIALOG_IMAGE_PROPERTIES_BASE + . + 0 + source_name + 1 + 0 + source_name + + + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_IMAGE_PROPERTIES_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h; forward_declare + Image Properties + + 0 + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 5 + protected + 0 + + + 8 + wxEXPAND|wxALL + 0 + + 3 + wxBOTH + 1 + 0 + 0 + + fgSizerPos + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 1 + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Position X: + 0 + + 0 + + + 0 + + 1 + m_XPosLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionX + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_XPosUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Position Y: + 0 + + 0 + + + 0 + + 1 + m_YPosLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionY + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_YPosUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + 5 + wxEXPAND + 1 + + 360,-1 + m_imageSizer + wxVERTICAL + protected + + + + 5 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerStdButtons + protected + + + + diff --git a/eeschema/dialogs/dialog_image_properties_base.h b/eeschema/dialogs/dialog_image_properties_base.h index df4909f6fb..2061cf7faa 100644 --- a/eeschema/dialogs/dialog_image_properties_base.h +++ b/eeschema/dialogs/dialog_image_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -19,18 +19,11 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include #include /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_IMAGE_PROPERTIES_BASE /////////////////////////////////////////////////////////////////////////////// @@ -39,21 +32,20 @@ class DIALOG_IMAGE_PROPERTIES_BASE : public DIALOG_SHIM private: protected: - wxNotebook* m_Notebook; - wxPanel* m_PanelGeneral; wxStaticText* m_XPosLabel; wxTextCtrl* m_ModPositionX; wxStaticText* m_XPosUnit; wxStaticText* m_YPosLabel; wxTextCtrl* m_ModPositionY; wxStaticText* m_YPosUnit; + wxBoxSizer* m_imageSizer; wxStdDialogButtonSizer* m_sdbSizerStdButtons; wxButton* m_sdbSizerStdButtonsOK; wxButton* m_sdbSizerStdButtonsCancel; public: - DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Image Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 363,281 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_IMAGE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Image Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_IMAGE_PROPERTIES_BASE(); diff --git a/include/dialogs/panel_image_editor.h b/include/dialogs/panel_image_editor.h index a09d7d6746..0fb2cbdb49 100644 --- a/include/dialogs/panel_image_editor.h +++ b/include/dialogs/panel_image_editor.h @@ -25,19 +25,22 @@ #pragma once #include +#include #include +class UNITS_PROVIDER; class BITMAP_BASE; class PANEL_IMAGE_EDITOR : public PANEL_IMAGE_EDITOR_BASE { public: - PANEL_IMAGE_EDITOR( wxWindow* aParent, const BITMAP_BASE& aItem ); - ~PANEL_IMAGE_EDITOR(); + PANEL_IMAGE_EDITOR( UNITS_PROVIDER* aUnitsProvider, wxWindow* aParent, const BITMAP_BASE& aItem ); + ~PANEL_IMAGE_EDITOR() = default; public: + bool TransferDataToWindow() override; bool TransferDataFromWindow() override; /** @@ -51,6 +54,7 @@ private: bool CheckValues(); - // A copy of BITMAP_BASE to be edited - std::unique_ptr m_workingImage; +private: + UNIT_BINDER m_scale; + std::unique_ptr m_workingImage; // A copy of BITMAP_BASE to be edited }; diff --git a/pcbnew/dialogs/dialog_reference_image_properties.cpp b/pcbnew/dialogs/dialog_reference_image_properties.cpp index aac45a949e..1773e2d542 100644 --- a/pcbnew/dialogs/dialog_reference_image_properties.cpp +++ b/pcbnew/dialogs/dialog_reference_image_properties.cpp @@ -41,8 +41,9 @@ DIALOG_REFERENCE_IMAGE_PROPERTIES::DIALOG_REFERENCE_IMAGE_PROPERTIES( PCB_BASE_F m_posY( aParent, m_YPosLabel, m_ModPositionY, m_YPosUnit ) { // Create the image editor page - m_imageEditor = new PANEL_IMAGE_EDITOR( m_Notebook, aBitmap.GetReferenceImage().MutableImage() ); - m_Notebook->AddPage( m_imageEditor, _( "Image" ), false ); + m_imageEditor = new PANEL_IMAGE_EDITOR( aParent, this, aBitmap.GetReferenceImage().MutableImage() ); + + m_imageSizer->Add( m_imageEditor, 1, wxEXPAND | wxALL, 5 ); m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD ); m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD ); @@ -87,7 +88,7 @@ bool DIALOG_REFERENCE_IMAGE_PROPERTIES::TransferDataToWindow() m_cbLocked->SetToolTip( _( "Locked items cannot be freely moved and oriented on the canvas and can only be " "selected when the 'Locked items' checkbox is checked in the selection filter." ) ); - return true; + return m_imageEditor->TransferDataToWindow(); } @@ -103,7 +104,7 @@ bool DIALOG_REFERENCE_IMAGE_PROPERTIES::TransferDataFromWindow() m_imageEditor->TransferToImage( m_bitmap.GetReferenceImage().MutableImage() ); // Set position, etc. - m_bitmap.SetPosition( VECTOR2I( m_posX.GetValue(), m_posY.GetValue() ) ); + m_bitmap.SetPosition( VECTOR2I( m_posX.GetIntValue(), m_posY.GetIntValue() ) ); m_bitmap.SetLayer( ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) ); m_bitmap.SetLocked( m_cbLocked->GetValue() ); diff --git a/pcbnew/dialogs/dialog_reference_image_properties_base.cpp b/pcbnew/dialogs/dialog_reference_image_properties_base.cpp index 263a9f720a..3e8881d429 100644 --- a/pcbnew/dialogs/dialog_reference_image_properties_base.cpp +++ b/pcbnew/dialogs/dialog_reference_image_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -15,13 +15,11 @@ DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE::DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE( { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - wxBoxSizer* m_GeneralBoxSizer; - m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); - m_Notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_PanelGeneral = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizerProperties; - bSizerProperties = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bMargins; + bMargins = new wxBoxSizer( wxVERTICAL ); wxGridBagSizer* gbSizer1; gbSizer1 = new wxGridBagSizer( 3, 5 ); @@ -29,51 +27,51 @@ DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE::DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE( gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL ); gbSizer1->SetEmptyCellSize( wxSize( -1,5 ) ); - m_XPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosLabel = new wxStaticText( this, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosLabel->Wrap( -1 ); gbSizer1->Add( m_XPosLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_ModPositionX = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ModPositionX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gbSizer1->Add( m_ModPositionX, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_XPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_XPosUnit->Wrap( -1 ); gbSizer1->Add( m_XPosUnit, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_YPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosLabel = new wxStaticText( this, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosLabel->Wrap( -1 ); gbSizer1->Add( m_YPosLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_ModPositionY = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ModPositionY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gbSizer1->Add( m_ModPositionY, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_YPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_YPosUnit->Wrap( -1 ); gbSizer1->Add( m_YPosUnit, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_LayerLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Associated layer:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_LayerLabel = new wxStaticText( this, wxID_ANY, _("Associated layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayerLabel->Wrap( -1 ); gbSizer1->Add( m_LayerLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); gbSizer1->Add( m_LayerSelectionCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_cbLocked = new wxCheckBox( m_PanelGeneral, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbLocked = new wxCheckBox( this, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 ); gbSizer1->Add( m_cbLocked, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 ); gbSizer1->AddGrowableCol( 1 ); gbSizer1->AddGrowableRow( 0 ); - bSizerProperties->Add( gbSizer1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); + bMargins->Add( gbSizer1, 0, wxEXPAND|wxALL, 5 ); + + m_imageSizer = new wxBoxSizer( wxVERTICAL ); - m_PanelGeneral->SetSizer( bSizerProperties ); - m_PanelGeneral->Layout(); - bSizerProperties->Fit( m_PanelGeneral ); - m_Notebook->AddPage( m_PanelGeneral, _("General"), false ); + bMargins->Add( m_imageSizer, 1, wxEXPAND, 5 ); - m_GeneralBoxSizer->Add( m_Notebook, 1, wxEXPAND|wxALL, 10 ); + + bMainSizer->Add( bMargins, 0, wxEXPAND|wxRIGHT|wxLEFT, 8 ); m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); @@ -82,12 +80,12 @@ DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE::DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE( m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); m_sdbSizerStdButtons->Realize(); - m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bMainSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - this->SetSizer( m_GeneralBoxSizer ); + this->SetSizer( bMainSizer ); this->Layout(); - m_GeneralBoxSizer->Fit( this ); + bMainSizer->Fit( this ); this->Centre( wxBOTH ); } diff --git a/pcbnew/dialogs/dialog_reference_image_properties_base.fbp b/pcbnew/dialogs/dialog_reference_image_properties_base.fbp index 57229afc45..92fca51a03 100644 --- a/pcbnew/dialogs/dialog_reference_image_properties_base.fbp +++ b/pcbnew/dialogs/dialog_reference_image_properties_base.fbp @@ -1,813 +1,725 @@ - + - - - ; - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_reference_image_properties_base - 1000 - none - - - 1 - DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE - - . - - 1 - 1 - 1 - 1 - UI - 0 - 0 - 0 - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - + + + C++ + ; + 1 + connect + none + + + 0 + 0 + res + UTF-8 + dialog_reference_image_properties_base + 1000 + 1 + 1 + UI + DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE + . + 0 + source_name + 1 + 0 + source_name + + + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h; forward_declare + Reference Image Properties + + 0 + + + + + + bMainSizer + wxVERTICAL + none + + 8 + wxEXPAND|wxRIGHT|wxLEFT + 0 + - DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE - - -1,-1 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h; forward_declare - Reference Image Properties - - 0 - - - - + bMargins + wxVERTICAL + none + + 5 + wxEXPAND|wxALL + 0 + + -1,5 + wxBOTH + 1 + 0 + 5 - m_GeneralBoxSizer - wxVERTICAL + gbSizer1 + wxFLEX_GROWMODE_ALL none - - 10 - wxEXPAND|wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_Notebook - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - - - General - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_PanelGeneral - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxTAB_TRAVERSAL - - - bSizerProperties - wxVERTICAL - none - - 10 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - -1,5 - wxBOTH - 1 - 0 - 5 - - gbSizer1 - wxFLEX_GROWMODE_ALL - none - 3 - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Position X: - 0 - - 0 - - - 0 - - 1 - m_XPosLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ModPositionX - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - 0 - - 0 - - - 0 - - 1 - m_XPosUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Position Y: - 0 - - 0 - - - 0 - - 1 - m_YPosLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ModPositionY - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - 0 - - 0 - - - 0 - - 1 - m_YPosUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 2 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Associated layer: - 0 - - 0 - - - 0 - - 1 - m_LayerLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 2 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_LayerSelectionCtrl - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - PCB_LAYER_BOX_SELECTOR; pcb_layer_box_selector.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 3 - 0 - wxALIGN_CENTER_VERTICAL - 4 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Locked - - 0 - - - 0 - - 1 - m_cbLocked - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - + 3 + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Position X: + 0 + + 0 + + + 0 + + 1 + m_XPosLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizerStdButtons - protected - + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionX + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_XPosUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Position Y: + 0 + + 0 + + + 0 + + 1 + m_YPosLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionY + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_YPosUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Associated layer: + 0 + + 0 + + + 0 + + 1 + m_LayerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_LayerSelectionCtrl + 1 + + + protected + 1 + + Resizable + -1 + 1 + + + PCB_LAYER_BOX_SELECTOR; pcb_layer_box_selector.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + 3 + 0 + wxALIGN_CENTER_VERTICAL + 4 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Locked + + 0 + + + 0 + + 1 + m_cbLocked + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND + 1 + + + m_imageSizer + wxVERTICAL + protected + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerStdButtons + protected + + + + diff --git a/pcbnew/dialogs/dialog_reference_image_properties_base.h b/pcbnew/dialogs/dialog_reference_image_properties_base.h index 284d31a249..25f9f4d4d7 100644 --- a/pcbnew/dialogs/dialog_reference_image_properties_base.h +++ b/pcbnew/dialogs/dialog_reference_image_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -24,17 +24,11 @@ class PCB_LAYER_BOX_SELECTOR; #include #include #include -#include -#include -#include -#include -#include #include #include /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE /////////////////////////////////////////////////////////////////////////////// @@ -43,8 +37,6 @@ class DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE : public DIALOG_SHIM private: protected: - wxNotebook* m_Notebook; - wxPanel* m_PanelGeneral; wxStaticText* m_XPosLabel; wxTextCtrl* m_ModPositionX; wxStaticText* m_XPosUnit; @@ -54,6 +46,7 @@ class DIALOG_REFERENCE_IMAGE_PROPERTIES_BASE : public DIALOG_SHIM wxStaticText* m_LayerLabel; PCB_LAYER_BOX_SELECTOR* m_LayerSelectionCtrl; wxCheckBox* m_cbLocked; + wxBoxSizer* m_imageSizer; wxStdDialogButtonSizer* m_sdbSizerStdButtons; wxButton* m_sdbSizerStdButtonsOK; wxButton* m_sdbSizerStdButtonsCancel;