CHANGED: flatten image properties dialogs.

Also moves scale to UNIT_BINDER for correct locale
handling.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17837
This commit is contained in:
Jeff Young 2025-08-23 20:31:37 +01:00
parent 8520bfefa0
commit a7772e3b91
10 changed files with 1295 additions and 1508 deletions

View File

@ -26,30 +26,30 @@
#include <wx/msgdlg.h>
#include <bitmap_base.h>
#include <pcb_base_edit_frame.h>
#include <tool/tool_manager.h>
#include <tool/actions.h>
#include <confirm.h>
#include <units_provider.h>
#include <dialogs/panel_image_editor.h>
#include <algorithm>
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<BITMAP_BASE>( 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
{

View File

@ -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" ) );

View File

@ -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 );
}

File diff suppressed because it is too large Load Diff

View File

@ -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 <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/notebook.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// 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();

View File

@ -25,19 +25,22 @@
#pragma once
#include <panel_image_editor_base.h>
#include <widgets/unit_binder.h>
#include <memory>
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<BITMAP_BASE> m_workingImage;
private:
UNIT_BINDER m_scale;
std::unique_ptr<BITMAP_BASE> m_workingImage; // A copy of BITMAP_BASE to be edited
};

View File

@ -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() );

View File

@ -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 );
}

File diff suppressed because it is too large Load Diff

View File

@ -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 <wx/checkbox.h>
#include <wx/gbsizer.h>
#include <wx/sizer.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/notebook.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// 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;