Commit cfb354cb authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Gerbview: export to pcbnew enhancements and fixes.

parents e3505ff5 57604b0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
#endif

#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2011-04-17)"
#define KICAD_BUILD_VERSION "(2011-04-24)"
#endif


+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
set(DIALOGS_SRCS
    dialogs/gerbview_dialog_display_options_frame_base.cpp
    dialogs/gerbview_dialog_display_options_frame.cpp
    dialogs/dialog_layers_select_to_pcb_base.cpp
    dialogs/dialog_print_using_printer.cpp
    dialogs/dialog_print_using_printer_base.cpp
    )
+111 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "dialog_layers_select_to_pcb_base.h"

///////////////////////////////////////////////////////////////////////////

BEGIN_EVENT_TABLE( LAYERS_MAP_DIALOG_BASE, wxDialog )
	EVT_COMBOBOX( ID_M_COMBOCOPPERLAYERSCOUNT, LAYERS_MAP_DIALOG_BASE::_wxFB_OnBrdLayersCountSelection )
	EVT_BUTTON( ID_STORE_CHOICE, LAYERS_MAP_DIALOG_BASE::_wxFB_OnStoreSetup )
	EVT_BUTTON( ID_GET_PREVIOUS_CHOICE, LAYERS_MAP_DIALOG_BASE::_wxFB_OnGetSetup )
	EVT_BUTTON( ID_RESET_CHOICE, LAYERS_MAP_DIALOG_BASE::_wxFB_OnResetClick )
	EVT_BUTTON( wxID_CANCEL, LAYERS_MAP_DIALOG_BASE::_wxFB_OnCancelClick )
	EVT_BUTTON( wxID_OK, LAYERS_MAP_DIALOG_BASE::_wxFB_OnOkClick )
END_EVENT_TABLE()

LAYERS_MAP_DIALOG_BASE::LAYERS_MAP_DIALOG_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( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizerMain;
	bSizerMain = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* sbUpperSizer;
	sbUpperSizer = new wxBoxSizer( wxHORIZONTAL );
	
	sbSizerLayersTable = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers selection:") ), wxHORIZONTAL );
	
	m_flexLeftColumnBoxSizer = new wxFlexGridSizer( 16, 4, 0, 0 );
	m_flexLeftColumnBoxSizer->AddGrowableCol( 0 );
	m_flexLeftColumnBoxSizer->AddGrowableCol( 1 );
	m_flexLeftColumnBoxSizer->AddGrowableCol( 2 );
	m_flexLeftColumnBoxSizer->AddGrowableCol( 3 );
	m_flexLeftColumnBoxSizer->SetFlexibleDirection( wxBOTH );
	m_flexLeftColumnBoxSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	sbSizerLayersTable->Add( m_flexLeftColumnBoxSizer, 1, wxEXPAND, 5 );
	
	m_staticlineSep = new wxStaticLine( this, ID_M_STATICLINESEP, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
	sbSizerLayersTable->Add( m_staticlineSep, 0, wxEXPAND | wxALL, 5 );
	
	sbUpperSizer->Add( sbSizerLayersTable, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bRightSizer;
	bRightSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerLyrCnt;
	bSizerLyrCnt = new wxBoxSizer( wxVERTICAL );
	
	m_staticTextCopperlayerCount = new wxStaticText( this, ID_M_STATICTEXTCOPPERLAYERCOUNT, _("Copper layers count:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextCopperlayerCount->Wrap( -1 );
	bSizerLyrCnt->Add( m_staticTextCopperlayerCount, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_comboCopperLayersCount = new wxComboBox( this, ID_M_COMBOCOPPERLAYERSCOUNT, _("2 Layers"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	m_comboCopperLayersCount->Append( _("2 Layers") );
	m_comboCopperLayersCount->Append( _("4 Layers") );
	m_comboCopperLayersCount->Append( _("6 Layers") );
	m_comboCopperLayersCount->Append( _("8 Layers") );
	m_comboCopperLayersCount->Append( _("10 Layers") );
	m_comboCopperLayersCount->Append( _("12 Layers") );
	m_comboCopperLayersCount->Append( _("14 Layers") );
	m_comboCopperLayersCount->Append( _("16 Layers") );
	bSizerLyrCnt->Add( m_comboCopperLayersCount, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	bRightSizer->Add( bSizerLyrCnt, 0, wxEXPAND, 5 );
	
	
	bRightSizer->Add( 5, 15, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizerButtons;
	bSizerButtons = new wxBoxSizer( wxVERTICAL );
	
	m_buttonStore = new wxButton( this, ID_STORE_CHOICE, _("Store Choice"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerButtons->Add( m_buttonStore, 0, wxALL|wxEXPAND, 5 );
	
	m_buttonRetrieve = new wxButton( this, ID_GET_PREVIOUS_CHOICE, _("Get Stored Choice"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerButtons->Add( m_buttonRetrieve, 0, wxALL|wxEXPAND, 5 );
	
	m_buttonReset = new wxButton( this, ID_RESET_CHOICE, _("Reset"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerButtons->Add( m_buttonReset, 0, wxALL|wxEXPAND, 5 );
	
	bRightSizer->Add( bSizerButtons, 0, wxEXPAND, 5 );
	
	sbUpperSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	bSizerMain->Add( sbUpperSizer, 1, wxEXPAND, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_sdbSizerButtons = new wxStdDialogButtonSizer();
	m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
	m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
	m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
	m_sdbSizerButtons->Realize();
	bSizerMain->Add( m_sdbSizerButtons, 0, wxALIGN_RIGHT|wxALL, 5 );
	
	this->SetSizer( bSizerMain );
	this->Layout();
	
	this->Centre( wxBOTH );
}

LAYERS_MAP_DIALOG_BASE::~LAYERS_MAP_DIALOG_BASE()
{
}
+821 −0

File added.

Preview size limit exceeded, changes collapsed.

+87 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#ifndef __dialog_layers_select_to_pcb_base__
#define __dialog_layers_select_to_pcb_base__

#include <wx/intl.h>

#include <wx/sizer.h>
#include <wx/gdicmn.h>
#include <wx/statline.h>
#include <wx/string.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/combobox.h>
#include <wx/button.h>
#include <wx/dialog.h>

///////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
/// Class LAYERS_MAP_DIALOG_BASE
///////////////////////////////////////////////////////////////////////////////
class LAYERS_MAP_DIALOG_BASE : public wxDialog 
{
	DECLARE_EVENT_TABLE()
	private:
		
		// Private event handlers
		void _wxFB_OnBrdLayersCountSelection( wxCommandEvent& event ){ OnBrdLayersCountSelection( event ); }
		void _wxFB_OnStoreSetup( wxCommandEvent& event ){ OnStoreSetup( event ); }
		void _wxFB_OnGetSetup( wxCommandEvent& event ){ OnGetSetup( event ); }
		void _wxFB_OnResetClick( wxCommandEvent& event ){ OnResetClick( event ); }
		void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); }
		void _wxFB_OnOkClick( wxCommandEvent& event ){ OnOkClick( event ); }
		
	
	protected:
		enum
		{
			ID_LAYERS_MAP_DIALOG_BASE = 1000,
			ID_M_STATICLINESEP,
			ID_M_STATICTEXTCOPPERLAYERCOUNT,
			ID_M_COMBOCOPPERLAYERSCOUNT,
			ID_STORE_CHOICE,
			ID_GET_PREVIOUS_CHOICE,
			ID_RESET_CHOICE,
		};
		
		wxStaticBoxSizer* sbSizerLayersTable;
		wxFlexGridSizer* m_flexLeftColumnBoxSizer;
		wxStaticLine* m_staticlineSep;
		wxStaticText* m_staticTextCopperlayerCount;
		wxComboBox* m_comboCopperLayersCount;
		
		wxButton* m_buttonStore;
		wxButton* m_buttonRetrieve;
		wxButton* m_buttonReset;
		wxStaticLine* m_staticline1;
		wxStdDialogButtonSizer* m_sdbSizerButtons;
		wxButton* m_sdbSizerButtonsOK;
		wxButton* m_sdbSizerButtonsCancel;
		
		// Virtual event handlers, overide them in your derived class
		virtual void OnBrdLayersCountSelection( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnStoreSetup( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnGetSetup( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnResetClick( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
		
	
	public:
		
		LAYERS_MAP_DIALOG_BASE( wxWindow* parent, wxWindowID id = ID_LAYERS_MAP_DIALOG_BASE, const wxString& title = _("Layer selection:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,286 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
		~LAYERS_MAP_DIALOG_BASE();
	
};

#endif //__dialog_layers_select_to_pcb_base__
Loading