Commit c087883d authored by Marco Mattila's avatar Marco Mattila
Browse files

Move layers into a wxCheckListBox in pcbnew plot dialog.

parent a609f260
Loading
Loading
Loading
Loading
+9 −23
Original line number Diff line number Diff line
@@ -26,13 +26,13 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	
	m_staticText121 = new wxStaticText( this, wxID_ANY, _("Plot format:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText121->Wrap( -1 );
	bSizer27->Add( m_staticText121, 0, wxALL, 5 );
	bSizer27->Add( m_staticText121, 0, wxTOP, 5 );
	
	wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("Postscript A4"), _("DXF") };
	int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
	m_plotFormatOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 0 );
	m_plotFormatOpt->SetSelection( 0 );
	bSizer27->Add( m_plotFormatOpt, 0, wxALL, 5 );
	bSizer27->Add( m_plotFormatOpt, 0, 0, 5 );
	
	bSizer26->Add( bSizer27, 0, wxEXPAND, 5 );
	
@@ -41,7 +41,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	
	m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextDir->Wrap( -1 );
	bSizer28->Add( m_staticTextDir, 0, wxALL|wxEXPAND, 5 );
	bSizer28->Add( m_staticTextDir, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
	
	wxBoxSizer* bSizer29;
	bSizer29 = new wxBoxSizer( wxHORIZONTAL );
@@ -63,18 +63,9 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	wxBoxSizer* bUpperSizer;
	bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
	
	wxStaticBoxSizer* sbLayersSizer;
	sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
	m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
	
	m_CopperLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers") ), wxVERTICAL );
	
	sbLayersSizer->Add( m_CopperLayersBoxSizer, 1, wxALL, 5 );
	
	m_TechnicalLayersBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers") ), wxVERTICAL );
	
	sbLayersSizer->Add( m_TechnicalLayersBoxSizer, 1, wxALL, 5 );
	
	bUpperSizer->Add( sbLayersSizer, 1, wxALL, 3 );
	bUpperSizer->Add( m_LayersSizer, 1, wxALL, 3 );
	
	m_PlotOptionsSizer = new wxBoxSizer( wxVERTICAL );
	
@@ -135,7 +126,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	int m_drillShapeOptNChoices = sizeof( m_drillShapeOptChoices ) / sizeof( wxString );
	m_drillShapeOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_drillShapeOptNChoices, m_drillShapeOptChoices, 0 );
	m_drillShapeOpt->SetSelection( 0 );
	bSizer15->Add( m_drillShapeOpt, 0, wxEXPAND, 5 );
	bSizer15->Add( m_drillShapeOpt, 0, wxEXPAND|wxLEFT, 5 );
	
	m_staticText12 = new wxStaticText( this, wxID_ANY, _("Scaling:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
@@ -145,7 +136,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	int m_scaleOptNChoices = sizeof( m_scaleOptChoices ) / sizeof( wxString );
	m_scaleOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_scaleOptNChoices, m_scaleOptChoices, 0 );
	m_scaleOpt->SetSelection( 0 );
	bSizer15->Add( m_scaleOpt, 0, wxEXPAND, 5 );
	bSizer15->Add( m_scaleOpt, 0, wxEXPAND|wxLEFT, 5 );
	
	m_staticText13 = new wxStaticText( this, wxID_ANY, _("Plot mode:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
@@ -155,7 +146,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	int m_plotModeOptNChoices = sizeof( m_plotModeOptChoices ) / sizeof( wxString );
	m_plotModeOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotModeOptNChoices, m_plotModeOptChoices, 0 );
	m_plotModeOpt->SetSelection( 0 );
	bSizer15->Add( m_plotModeOpt, 0, wxEXPAND, 5 );
	bSizer15->Add( m_plotModeOpt, 0, wxEXPAND|wxLEFT, 5 );
	
	m_textDefaultPenSize = new wxStaticText( this, wxID_ANY, _("Default linewidth"), wxDefaultPosition, wxDefaultSize, 0 );
	m_textDefaultPenSize->Wrap( -1 );
@@ -166,7 +157,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	m_linesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_linesWidth->SetToolTip( _("Line width for, e.g., sheet references.") );
	
	bSizer15->Add( m_linesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	bSizer15->Add( m_linesWidth, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
	
	bSizer14->Add( bSizer15, 1, wxALL, 3 );
	
@@ -316,9 +307,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	m_plotButton->SetDefault(); 
	bSizer191->Add( m_plotButton, 0, wxALL, 5 );
	
	m_buttonSaveOpt = new wxButton( this, ID_SAVE_OPT_PLOT, _("Apply Settings"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer191->Add( m_buttonSaveOpt, 0, wxALL, 5 );
	
	m_buttonDrill = new wxButton( this, ID_CREATE_DRILL_FILE, _("Generate Drill File"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer191->Add( m_buttonDrill, 0, wxALL, 5 );
	
@@ -340,7 +328,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
	m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
	m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
	m_buttonSaveOpt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::applyPlotSettings ), NULL, this );
	m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
	m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
}
@@ -354,7 +341,6 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
	m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
	m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
	m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
	m_buttonSaveOpt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::applyPlotSettings ), NULL, this );
	m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
	m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
	
+11 −124
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@
                                        <property name="permission">none</property>
                                        <object class="sizeritem" expanded="0">
                                            <property name="border">5</property>
                                            <property name="flag">wxALL</property>
                                            <property name="flag">wxTOP</property>
                                            <property name="proportion">0</property>
                                            <object class="wxStaticText" expanded="0">
                                                <property name="BottomDockable">1</property>
@@ -226,7 +226,7 @@
                                        </object>
                                        <object class="sizeritem" expanded="0">
                                            <property name="border">5</property>
                                            <property name="flag">wxALL</property>
                                            <property name="flag"></property>
                                            <property name="proportion">0</property>
                                            <object class="wxChoice" expanded="0">
                                                <property name="BottomDockable">1</property>
@@ -321,7 +321,7 @@
                                        <property name="permission">none</property>
                                        <object class="sizeritem" expanded="0">
                                            <property name="border">5</property>
                                            <property name="flag">wxALL|wxEXPAND</property>
                                            <property name="flag">wxEXPAND|wxLEFT|wxTOP</property>
                                            <property name="proportion">0</property>
                                            <object class="wxStaticText" expanded="0">
                                                <property name="BottomDockable">1</property>
@@ -600,48 +600,20 @@
                                <property name="name">bUpperSizer</property>
                                <property name="orient">wxHORIZONTAL</property>
                                <property name="permission">none</property>
                                <object class="sizeritem" expanded="0">
                                <object class="sizeritem" expanded="1">
                                    <property name="border">3</property>
                                    <property name="flag">wxALL</property>
                                    <property name="proportion">1</property>
                                    <object class="wxStaticBoxSizer" expanded="0">
                                    <object class="wxStaticBoxSizer" expanded="1">
                                        <property name="id">wxID_ANY</property>
                                        <property name="label">Layers</property>
                                        <property name="minimum_size"></property>
                                        <property name="name">sbLayersSizer</property>
                                        <property name="name">m_LayersSizer</property>
                                        <property name="orient">wxHORIZONTAL</property>
                                        <property name="permission">none</property>
                                        <event name="OnUpdateUI"></event>
                                        <object class="sizeritem" expanded="0">
                                            <property name="border">5</property>
                                            <property name="flag">wxALL</property>
                                            <property name="proportion">1</property>
                                            <object class="wxStaticBoxSizer" expanded="0">
                                                <property name="id">wxID_ANY</property>
                                                <property name="label">Copper Layers</property>
                                                <property name="minimum_size"></property>
                                                <property name="name">m_CopperLayersBoxSizer</property>
                                                <property name="orient">wxVERTICAL</property>
                                                <property name="permission">protected</property>
                                                <event name="OnUpdateUI"></event>
                                            </object>
                                        </object>
                                        <object class="sizeritem" expanded="0">
                                            <property name="border">5</property>
                                            <property name="flag">wxALL</property>
                                            <property name="proportion">1</property>
                                            <object class="wxStaticBoxSizer" expanded="0">
                                                <property name="id">wxID_ANY</property>
                                                <property name="label">Technical Layers</property>
                                                <property name="minimum_size"></property>
                                                <property name="name">m_TechnicalLayersBoxSizer</property>
                                                <property name="orient">wxVERTICAL</property>
                                        <property name="permission">protected</property>
                                        <event name="OnUpdateUI"></event>
                                    </object>
                                </object>
                                    </object>
                                </object>
                                <object class="sizeritem" expanded="1">
                                    <property name="border">5</property>
                                    <property name="flag"></property>
@@ -1467,7 +1439,7 @@
                                                                        </object>
                                                                        <object class="sizeritem" expanded="0">
                                                                            <property name="border">5</property>
                                                                            <property name="flag">wxEXPAND</property>
                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
                                                                            <property name="proportion">0</property>
                                                                            <object class="wxChoice" expanded="0">
                                                                                <property name="BottomDockable">1</property>
@@ -1635,7 +1607,7 @@
                                                                        </object>
                                                                        <object class="sizeritem" expanded="0">
                                                                            <property name="border">5</property>
                                                                            <property name="flag">wxEXPAND</property>
                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
                                                                            <property name="proportion">0</property>
                                                                            <object class="wxChoice" expanded="0">
                                                                                <property name="BottomDockable">1</property>
@@ -1803,7 +1775,7 @@
                                                                        </object>
                                                                        <object class="sizeritem" expanded="0">
                                                                            <property name="border">5</property>
                                                                            <property name="flag">wxEXPAND</property>
                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
                                                                            <property name="proportion">0</property>
                                                                            <object class="wxChoice" expanded="0">
                                                                                <property name="BottomDockable">1</property>
@@ -1971,7 +1943,7 @@
                                                                        </object>
                                                                        <object class="sizeritem" expanded="0">
                                                                            <property name="border">5</property>
                                                                            <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
                                                                            <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT</property>
                                                                            <property name="proportion">0</property>
                                                                            <object class="wxTextCtrl" expanded="0">
                                                                                <property name="BottomDockable">1</property>
@@ -3760,91 +3732,6 @@
                                        <event name="OnUpdateUI"></event>
                                    </object>
                                </object>
                                <object class="sizeritem" expanded="0">
                                    <property name="border">5</property>
                                    <property name="flag">wxALL</property>
                                    <property name="proportion">0</property>
                                    <object class="wxButton" expanded="0">
                                        <property name="BottomDockable">1</property>
                                        <property name="LeftDockable">1</property>
                                        <property name="RightDockable">1</property>
                                        <property name="TopDockable">1</property>
                                        <property name="aui_name"></property>
                                        <property name="bg"></property>
                                        <property name="caption"></property>
                                        <property name="caption_visible">1</property>
                                        <property name="center_pane">0</property>
                                        <property name="close_button">1</property>
                                        <property name="context_help"></property>
                                        <property name="context_menu">1</property>
                                        <property name="default">0</property>
                                        <property name="default_pane">0</property>
                                        <property name="dock">Dock</property>
                                        <property name="dock_fixed">0</property>
                                        <property name="docking">Left</property>
                                        <property name="enabled">1</property>
                                        <property name="fg"></property>
                                        <property name="floatable">1</property>
                                        <property name="font"></property>
                                        <property name="gripper">0</property>
                                        <property name="hidden">0</property>
                                        <property name="id">ID_SAVE_OPT_PLOT</property>
                                        <property name="label">Apply Settings</property>
                                        <property name="layer"></property>
                                        <property name="maximize_button">0</property>
                                        <property name="maximum_size"></property>
                                        <property name="minimize_button">0</property>
                                        <property name="minimum_size"></property>
                                        <property name="moveable">1</property>
                                        <property name="name">m_buttonSaveOpt</property>
                                        <property name="pane_border">1</property>
                                        <property name="pane_position"></property>
                                        <property name="pane_size"></property>
                                        <property name="permission">protected</property>
                                        <property name="pin_button">1</property>
                                        <property name="pos"></property>
                                        <property name="position"></property>
                                        <property name="resize">Resizable</property>
                                        <property name="row"></property>
                                        <property name="show">1</property>
                                        <property name="size"></property>
                                        <property name="style"></property>
                                        <property name="subclass"></property>
                                        <property name="toolbar_pane">0</property>
                                        <property name="tooltip"></property>
                                        <property name="validator_data_type"></property>
                                        <property name="validator_style">wxFILTER_NONE</property>
                                        <property name="validator_type">wxDefaultValidator</property>
                                        <property name="validator_variable"></property>
                                        <property name="window_extra_style"></property>
                                        <property name="window_name"></property>
                                        <property name="window_style"></property>
                                        <event name="OnButtonClick">applyPlotSettings</event>
                                        <event name="OnChar"></event>
                                        <event name="OnEnterWindow"></event>
                                        <event name="OnEraseBackground"></event>
                                        <event name="OnKeyDown"></event>
                                        <event name="OnKeyUp"></event>
                                        <event name="OnKillFocus"></event>
                                        <event name="OnLeaveWindow"></event>
                                        <event name="OnLeftDClick"></event>
                                        <event name="OnLeftDown"></event>
                                        <event name="OnLeftUp"></event>
                                        <event name="OnMiddleDClick"></event>
                                        <event name="OnMiddleDown"></event>
                                        <event name="OnMiddleUp"></event>
                                        <event name="OnMotion"></event>
                                        <event name="OnMouseEvents"></event>
                                        <event name="OnMouseWheel"></event>
                                        <event name="OnPaint"></event>
                                        <event name="OnRightDClick"></event>
                                        <event name="OnRightDown"></event>
                                        <event name="OnRightUp"></event>
                                        <event name="OnSetFocus"></event>
                                        <event name="OnSize"></event>
                                        <event name="OnUpdateUI"></event>
                                    </object>
                                </object>
                                <object class="sizeritem" expanded="0">
                                    <property name="border">5</property>
                                    <property name="flag">wxALL</property>
+1 −5
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ class DIALOG_PLOT_BASE : public wxDialog
			ID_ALLOW_PRINT_PAD_ON_SILKSCREEN = 1000,
			ID_PRINT_REF,
			ID_MIROR_OPT,
			ID_SAVE_OPT_PLOT,
			ID_CREATE_DRILL_FILE,
		};
		
@@ -49,8 +48,7 @@ class DIALOG_PLOT_BASE : public wxDialog
		wxStaticText* m_staticTextDir;
		wxTextCtrl* m_outputDirectoryName;
		wxButton* m_browseButton;
		wxStaticBoxSizer* m_CopperLayersBoxSizer;
		wxStaticBoxSizer* m_TechnicalLayersBoxSizer;
		wxStaticBoxSizer* m_LayersSizer;
		wxBoxSizer* m_PlotOptionsSizer;
		wxCheckBox* m_plotSheetRef;
		wxCheckBox* m_plotPads_on_Silkscreen;
@@ -90,7 +88,6 @@ class DIALOG_PLOT_BASE : public wxDialog
		wxTextCtrl* m_messagesBox;
		
		wxButton* m_plotButton;
		wxButton* m_buttonSaveOpt;
		wxButton* m_buttonDrill;
		wxButton* m_buttonQuit;
		
@@ -101,7 +98,6 @@ class DIALOG_PLOT_BASE : public wxDialog
		virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnSetScaleOpt( wxCommandEvent& event ) { event.Skip(); }
		virtual void Plot( wxCommandEvent& event ) { event.Skip(); }
		virtual void applyPlotSettings( wxCommandEvent& event ) { event.Skip(); }
		virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }
		
+25 −39

File changed.

Preview size limit exceeded, changes collapsed.