From 7e7f101a95d40a4cc2414c0da230162abe69bc6e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 30 Apr 2010 20:39:10 +0200 Subject: [PATCH] Convert gendrill dialog from Dialogblocks to wxFormBuilder --- pcbnew/CMakeLists.txt | 3 +- pcbnew/dialog_gendrill.cpp | 349 +----- pcbnew/dialog_gendrill.h | 139 +-- pcbnew/dialog_gendrill.pjd | 2026 ------------------------------- pcbnew/dialog_gendrill_base.cpp | 181 +++ pcbnew/dialog_gendrill_base.fbp | 1258 +++++++++++++++++++ pcbnew/dialog_gendrill_base.h | 75 ++ pcbnew/gendrill.cpp | 29 +- 8 files changed, 1563 insertions(+), 2497 deletions(-) delete mode 100644 pcbnew/dialog_gendrill.pjd create mode 100644 pcbnew/dialog_gendrill_base.cpp create mode 100644 pcbnew/dialog_gendrill_base.fbp create mode 100644 pcbnew/dialog_gendrill_base.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 4c99c51fae..ba44b3ce58 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -54,7 +54,8 @@ set(PCBNEW_SRCS dialog_export_3Dfiles_base.cpp dialog_freeroute_exchange.cpp dialog_freeroute_exchange_base.cpp -# dialog_gendrill.cpp + dialog_gendrill.cpp + dialog_gendrill_base.cpp dialog_general_options.cpp dialog_general_options_BoardEditor_base.cpp dialog_global_edit_tracks_and_vias.cpp diff --git a/pcbnew/dialog_gendrill.cpp b/pcbnew/dialog_gendrill.cpp index f1a2f58379..01965715a8 100644 --- a/pcbnew/dialog_gendrill.cpp +++ b/pcbnew/dialog_gendrill.cpp @@ -1,114 +1,35 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dialog_gendrill.cpp -// Purpose: // Author: jean-pierre Charras -// Modified by: -// Created: 13/01/2008 17:26:27 -// RCS-ID: -// Copyright: License GNU -// Licence: +// Licence: GPL ///////////////////////////////////////////////////////////////////////////// -// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27 - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes +#include "fctsys.h" +#include "pcbnew.h" +#include "wxPcbStruct.h" +#include "gendrill.h" #include "dialog_gendrill.h" -////@begin XPM images -////@end XPM images - -/*! - * WinEDA_DrillFrame type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( WinEDA_DrillFrame, wxDialog ) - - -/*! - * WinEDA_DrillFrame event table definition - */ - -BEGIN_EVENT_TABLE( WinEDA_DrillFrame, wxDialog ) - -////@begin WinEDA_DrillFrame event table entries - EVT_CLOSE( WinEDA_DrillFrame::OnCloseWindow ) - - EVT_RADIOBOX( ID_SEL_DRILL_UNITS, WinEDA_DrillFrame::OnSelDrillUnitsSelected ) - - EVT_RADIOBOX( ID_SEL_ZEROS_FMT, WinEDA_DrillFrame::OnSelZerosFmtSelected ) - - EVT_BUTTON( wxID_OK, WinEDA_DrillFrame::OnOkClick ) - - EVT_BUTTON( wxID_CANCEL, WinEDA_DrillFrame::OnCancelClick ) - -////@end WinEDA_DrillFrame event table entries - -END_EVENT_TABLE() - - -/*! - * WinEDA_DrillFrame constructors - */ - -WinEDA_DrillFrame::WinEDA_DrillFrame() -{ - Init(); -} - -WinEDA_DrillFrame::WinEDA_DrillFrame( WinEDA_PcbFrame* parent, wxWindowID id, - const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +DIALOG_GENDRILL::DIALOG_GENDRILL( WinEDA_PcbFrame* parent ) + : DIALOG_GENDRILL_BASE( parent ) { m_Parent = parent; SetReturnCode( 1 ); - Init(); - Create(parent, id, caption, pos, size, style); + initDialog(); + GetSizer()->SetSizeHints( this ); + Centre( ); } /*! - * WinEDA_DrillFrame creator + * DIALOG_GENDRILL destructor */ -bool WinEDA_DrillFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +DIALOG_GENDRILL::~DIALOG_GENDRILL() { -////@begin WinEDA_DrillFrame creation - SetExtraStyle(wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - if (GetSizer()) - { - GetSizer()->SetSizeHints(this); - } - Centre(); -////@end WinEDA_DrillFrame creation - return true; -} - - -/*! - * WinEDA_DrillFrame destructor - */ - -WinEDA_DrillFrame::~WinEDA_DrillFrame() -{ -////@begin WinEDA_DrillFrame destruction -////@end WinEDA_DrillFrame destruction } @@ -116,194 +37,8 @@ WinEDA_DrillFrame::~WinEDA_DrillFrame() * Member initialisation */ -void WinEDA_DrillFrame::Init() +void DIALOG_GENDRILL::initDialog() { -////@begin WinEDA_DrillFrame member initialisation - m_LeftBoxSizer = NULL; - m_Choice_Unit = NULL; - m_Choice_Zeros_Format = NULL; - m_Choice_Precision = NULL; - m_Choice_Drill_Offset = NULL; - m_Choice_Drill_Map = NULL; - m_Choice_Drill_Report = NULL; - m_PenSpeed = NULL; - m_PenNum = NULL; - m_Check_Mirror = NULL; - m_Check_Minimal = NULL; - m_DefaultViasDrillSizer = NULL; - m_ViaDrillValue = NULL; - m_MicroViasDrillSizer = NULL; - m_MicroViaDrillValue = NULL; - m_PadsCountInfoMsg = NULL; - m_ThroughViasInfoMsg = NULL; - m_MicroViasInfoMsg = NULL; - m_BuriedViasInfoMsg = NULL; - m_OkButton = NULL; - m_CancelButton = NULL; -////@end WinEDA_DrillFrame member initialisation -} - - -/*! - * Control creation for WinEDA_DrillFrame - */ - -void WinEDA_DrillFrame::CreateControls() -{ -////@begin WinEDA_DrillFrame content construction - // Generated by DialogBlocks, 29/06/2009 20:34:44 (unregistered) - - WinEDA_DrillFrame* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL); - itemDialog1->SetSizer(itemBoxSizer2); - - m_LeftBoxSizer = new wxBoxSizer(wxVERTICAL); - itemBoxSizer2->Add(m_LeftBoxSizer, 0, wxGROW|wxALL, 5); - - wxArrayString m_Choice_UnitStrings; - m_Choice_UnitStrings.Add(_("Millimeters")); - m_Choice_UnitStrings.Add(_("Inches")); - m_Choice_Unit = new wxRadioBox( itemDialog1, ID_SEL_DRILL_UNITS, _("Drill Units:"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitStrings, 1, wxRA_SPECIFY_COLS ); - m_Choice_Unit->SetSelection(0); - m_LeftBoxSizer->Add(m_Choice_Unit, 0, wxGROW|wxALL, 5); - - wxArrayString m_Choice_Zeros_FormatStrings; - m_Choice_Zeros_FormatStrings.Add(_("decimal format")); - m_Choice_Zeros_FormatStrings.Add(_("suppress leading zeros")); - m_Choice_Zeros_FormatStrings.Add(_("suppress trailing zeros")); - m_Choice_Zeros_FormatStrings.Add(_("keep zeros")); - m_Choice_Zeros_Format = new wxRadioBox( itemDialog1, ID_SEL_ZEROS_FMT, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatStrings, 1, wxRA_SPECIFY_COLS ); - m_Choice_Zeros_Format->SetSelection(0); - if (WinEDA_DrillFrame::ShowToolTips()) - m_Choice_Zeros_Format->SetToolTip(_("Choose EXCELLON numbers notation")); - m_LeftBoxSizer->Add(m_Choice_Zeros_Format, 0, wxALIGN_LEFT|wxALL, 5); - - wxArrayString m_Choice_PrecisionStrings; - m_Choice_PrecisionStrings.Add(_("2:3")); - m_Choice_PrecisionStrings.Add(_("2:4")); - m_Choice_Precision = new wxRadioBox( itemDialog1, ID_SEL_PRECISION, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionStrings, 1, wxRA_SPECIFY_COLS ); - m_Choice_Precision->SetSelection(0); - if (WinEDA_DrillFrame::ShowToolTips()) - m_Choice_Precision->SetToolTip(_("Choose EXCELLON numbers precision")); - m_LeftBoxSizer->Add(m_Choice_Precision, 0, wxGROW|wxALL, 5); - - wxArrayString m_Choice_Drill_OffsetStrings; - m_Choice_Drill_OffsetStrings.Add(_("absolute")); - m_Choice_Drill_OffsetStrings.Add(_("auxiliary axis")); - m_Choice_Drill_Offset = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Origin:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetStrings, 1, wxRA_SPECIFY_COLS ); - m_Choice_Drill_Offset->SetSelection(0); - if (WinEDA_DrillFrame::ShowToolTips()) - m_Choice_Drill_Offset->SetToolTip(_("Choose the coordinate origin: absolute or relative to the auxiliray axis")); - m_LeftBoxSizer->Add(m_Choice_Drill_Offset, 0, wxGROW|wxALL, 5); - - wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer2->Add(itemBoxSizer8, 0, wxGROW|wxALL, 5); - - wxArrayString m_Choice_Drill_MapStrings; - m_Choice_Drill_MapStrings.Add(_("None")); - m_Choice_Drill_MapStrings.Add(_("drill sheet (HPGL)")); - m_Choice_Drill_MapStrings.Add(_("drill sheet (PostScript)")); - m_Choice_Drill_MapStrings.Add(_("Drill sheet (Gerber)")); - m_Choice_Drill_MapStrings.Add(_("Drill sheet (DXF)")); - m_Choice_Drill_Map = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapStrings, 1, wxRA_SPECIFY_COLS ); - m_Choice_Drill_Map->SetSelection(0); - if (WinEDA_DrillFrame::ShowToolTips()) - m_Choice_Drill_Map->SetToolTip(_("Creates a drill map in PS or HPGL format")); - itemBoxSizer8->Add(m_Choice_Drill_Map, 0, wxGROW|wxALL, 5); - - wxArrayString m_Choice_Drill_ReportStrings; - m_Choice_Drill_ReportStrings.Add(_("None")); - m_Choice_Drill_ReportStrings.Add(_("Drill report")); - m_Choice_Drill_Report = new wxRadioBox( itemDialog1, ID_SEL_DRILL_REPORT, _("Drill Report:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_ReportStrings, 1, wxRA_SPECIFY_COLS ); - m_Choice_Drill_Report->SetSelection(0); - if (WinEDA_DrillFrame::ShowToolTips()) - m_Choice_Drill_Report->SetToolTip(_("Creates a plain text report")); - itemBoxSizer8->Add(m_Choice_Drill_Report, 0, wxGROW|wxALL, 5); - - wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemDialog1, wxID_ANY, _("HPGL plotter Options:")); - wxStaticBoxSizer* itemStaticBoxSizer11 = new wxStaticBoxSizer(itemStaticBoxSizer11Static, wxVERTICAL); - itemBoxSizer8->Add(itemStaticBoxSizer11, 0, wxGROW|wxALL, 5); - - wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("Speed (cm/s)"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer11->Add(itemStaticText12, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); - - m_PenSpeed = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer11->Add(m_PenSpeed, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); - - wxStaticText* itemStaticText14 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer11->Add(itemStaticText14, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); - - m_PenNum = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer11->Add(m_PenNum, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); - - wxStaticBox* itemStaticBoxSizer16Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Options:")); - wxStaticBoxSizer* itemStaticBoxSizer16 = new wxStaticBoxSizer(itemStaticBoxSizer16Static, wxVERTICAL); - itemStaticBoxSizer11->Add(itemStaticBoxSizer16, 0, wxGROW|wxALL, 5); - - m_Check_Mirror = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Check_Mirror->SetValue(false); - itemStaticBoxSizer16->Add(m_Check_Mirror, 0, wxGROW|wxALL, 5); - - m_Check_Minimal = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("minimal header"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Check_Minimal->SetValue(false); - if (WinEDA_DrillFrame::ShowToolTips()) - m_Check_Minimal->SetToolTip(_("If checked, the EXCELLON header is minimal")); - itemStaticBoxSizer16->Add(m_Check_Minimal, 0, wxGROW|wxALL, 5); - - wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer2->Add(itemBoxSizer19, 0, wxGROW|wxALL, 5); - - wxStaticBox* itemStaticBoxSizer20Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Info:")); - wxStaticBoxSizer* itemStaticBoxSizer20 = new wxStaticBoxSizer(itemStaticBoxSizer20Static, wxVERTICAL); - itemBoxSizer19->Add(itemStaticBoxSizer20, 0, wxGROW|wxALL, 5); - - m_DefaultViasDrillSizer = new wxStaticBox(itemDialog1, wxID_ANY, _("Default Vias Drill:")); - wxStaticBoxSizer* itemStaticBoxSizer21 = new wxStaticBoxSizer(m_DefaultViasDrillSizer, wxVERTICAL); - itemStaticBoxSizer20->Add(itemStaticBoxSizer21, 0, wxGROW|wxALL, 5); - - m_ViaDrillValue = new wxStaticText( itemDialog1, wxID_STATIC, _("Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer21->Add(m_ViaDrillValue, 0, wxGROW|wxALL, 5); - - m_MicroViasDrillSizer = new wxStaticBox(itemDialog1, wxID_ANY, _("Micro Vias Drill:")); - wxStaticBoxSizer* itemStaticBoxSizer23 = new wxStaticBoxSizer(m_MicroViasDrillSizer, wxVERTICAL); - itemStaticBoxSizer20->Add(itemStaticBoxSizer23, 0, wxGROW|wxALL, 5); - - m_MicroViaDrillValue = new wxStaticText( itemDialog1, wxID_STATIC, _("Micro Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer23->Add(m_MicroViaDrillValue, 0, wxGROW|wxALL, 5); - - wxStaticBox* itemStaticBoxSizer25Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Holes Count:")); - wxStaticBoxSizer* itemStaticBoxSizer25 = new wxStaticBoxSizer(itemStaticBoxSizer25Static, wxVERTICAL); - itemStaticBoxSizer20->Add(itemStaticBoxSizer25, 0, wxGROW|wxALL, 5); - - m_PadsCountInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Pads:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer25->Add(m_PadsCountInfoMsg, 0, wxGROW|wxALL, 5); - - m_ThroughViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer25->Add(m_ThroughViasInfoMsg, 0, wxGROW|wxALL, 5); - - m_MicroViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer25->Add(m_MicroViasInfoMsg, 0, wxGROW|wxALL, 5); - - m_BuriedViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer25->Add(m_BuriedViasInfoMsg, 0, wxGROW|wxALL, 5); - - itemBoxSizer19->Add(5, 5, 1, wxGROW|wxALL, 5); - - m_OkButton = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OkButton->SetDefault(); - itemBoxSizer19->Add(m_OkButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - m_CancelButton = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer19->Add(m_CancelButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - // Set validators - m_Choice_Unit->SetValidator( wxGenericValidator(& s_Unit_Drill_is_Inch) ); - m_Choice_Zeros_Format->SetValidator( wxGenericValidator(& s_Zeros_Format) ); - m_Check_Mirror->SetValidator( wxGenericValidator(& Mirror) ); - m_Check_Minimal->SetValidator( wxGenericValidator(& Minimal) ); -////@end WinEDA_DrillFrame content construction - SetFocus(); // Under wxGTK: mandatory to close dialog by the ESC key InitDisplayParams(); } @@ -313,7 +48,7 @@ void WinEDA_DrillFrame::CreateControls() * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX */ -void WinEDA_DrillFrame::OnSelDrillUnitsSelected( wxCommandEvent& event ) +void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event ) { UpdatePrecisionOptions(event); } @@ -323,7 +58,7 @@ void WinEDA_DrillFrame::OnSelDrillUnitsSelected( wxCommandEvent& event ) * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK */ -void WinEDA_DrillFrame::OnOkClick( wxCommandEvent& event ) +void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event ) { GenDrillFiles(event); } @@ -333,68 +68,18 @@ void WinEDA_DrillFrame::OnOkClick( wxCommandEvent& event ) * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE */ -void WinEDA_DrillFrame::OnCancelClick( wxCommandEvent& event ) +void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event ) { UpdateConfig(); /* Save drill options: */ event.Skip(); // Process the default cancel event (close dialog) } - -/*! - * Should we show tooltips? - */ - -bool WinEDA_DrillFrame::ShowToolTips() -{ - return true; -} - -/*! - * Get bitmap resources - */ - -wxBitmap WinEDA_DrillFrame::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin WinEDA_DrillFrame bitmap retrieval - wxUnusedVar(name); - return wxNullBitmap; -////@end WinEDA_DrillFrame bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon WinEDA_DrillFrame::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin WinEDA_DrillFrame icon retrieval - wxUnusedVar(name); - return wxNullIcon; -////@end WinEDA_DrillFrame icon retrieval -} - - /*! * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_ZEROS_FMT */ -void WinEDA_DrillFrame::OnSelZerosFmtSelected( wxCommandEvent& event ) +void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event ) { UpdatePrecisionOptions(event); } - -/*! - * wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME - */ - -void WinEDA_DrillFrame::OnCloseWindow( wxCloseEvent& event ) -{ -////@begin wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame. - // Before editing this code, remove the block markers. - event.Skip(); -////@end wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame. -} - diff --git a/pcbnew/dialog_gendrill.h b/pcbnew/dialog_gendrill.h index ecccd3d275..4f63c9fc7b 100644 --- a/pcbnew/dialog_gendrill.h +++ b/pcbnew/dialog_gendrill.h @@ -1,94 +1,32 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dialog_gendrill.h -// Purpose: // Author: jean-pierre Charras -// Modified by: -// Created: 13/01/2008 17:26:dialog_gendrill -// RCS-ID: -// Copyright: License GNU -// Licence: +// Created: 2010 apr 30 +// Licence: GPL ///////////////////////////////////////////////////////////////////////////// -// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:dialog_gendrill - #ifndef _DIALOG_GENDRILL_H_ #define _DIALOG_GENDRILL_H_ +#include "dialog_gendrill_base.h" -/*! - * Includes - */ +class DIALOG_GENDRILL: public DIALOG_GENDRILL_BASE +{ -////@begin includes -#include "wx/valgen.h" -////@end includes - -/*! - * Forward declarations - */ - -////@begin forward declarations -class wxBoxSizer; -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_WINEDA_DRILLFRAME 10000 -#define ID_SEL_DRILL_UNITS 10002 -#define ID_SEL_ZEROS_FMT 10001 -#define ID_SEL_PRECISION 10003 -#define ID_SEL_DRILL_SHEET 10004 -#define ID_SEL_DRILL_REPORT 10010 -#define ID_TEXTCTRL2 10007 -#define ID_TEXTCTRL 10006 -#define ID_CHECKBOX2 10011 -#define ID_CHECKBOX3 10012 -#define SYMBOL_WINEDA_DRILLFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL -#define SYMBOL_WINEDA_DRILLFRAME_TITLE _("Drill Files Generation") -#define SYMBOL_WINEDA_DRILLFRAME_IDNAME ID_WINEDA_DRILLFRAME -#define SYMBOL_WINEDA_DRILLFRAME_SIZE wxSize(400, 300) -#define SYMBOL_WINEDA_DRILLFRAME_POSITION wxDefaultPosition -////@end control identifiers - - -/*! - * WinEDA_DrillFrame class declaration - */ - -class WinEDA_DrillFrame: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( WinEDA_DrillFrame ) - DECLARE_EVENT_TABLE() +private: + WinEDA_PcbFrame* m_Parent; + int m_PadsHoleCount; + int m_ThroughViasCount; + int m_MicroViasCount; + int m_BlindOrBuriedViasCount; public: - /// Constructors - WinEDA_DrillFrame(); - WinEDA_DrillFrame( WinEDA_PcbFrame* parent, - wxWindowID id = SYMBOL_WINEDA_DRILLFRAME_IDNAME, - const wxString& caption = SYMBOL_WINEDA_DRILLFRAME_TITLE, - const wxPoint& pos = SYMBOL_WINEDA_DRILLFRAME_POSITION, - const wxSize& size = SYMBOL_WINEDA_DRILLFRAME_SIZE, - long style = SYMBOL_WINEDA_DRILLFRAME_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_DRILLFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_DRILLFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_DRILLFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_DRILLFRAME_SIZE, long style = SYMBOL_WINEDA_DRILLFRAME_STYLE ); - - /// Destructor - ~WinEDA_DrillFrame(); + DIALOG_GENDRILL( WinEDA_PcbFrame* parent ); + ~DIALOG_GENDRILL(); +private: /// Initialises member variables - void Init(); - - /// Creates the controls and sizers - void CreateControls(); - -////@begin WinEDA_DrillFrame event handler declarations - - /// wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME - void OnCloseWindow( wxCloseEvent& event ); + void initDialog(); /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_DRILL_UNITS void OnSelDrillUnitsSelected( wxCommandEvent& event ); @@ -102,50 +40,6 @@ public: /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL void OnCancelClick( wxCommandEvent& event ); -////@end WinEDA_DrillFrame event handler declarations - -////@begin WinEDA_DrillFrame member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end WinEDA_DrillFrame member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - -////@begin WinEDA_DrillFrame member variables - wxBoxSizer* m_LeftBoxSizer; - wxRadioBox* m_Choice_Unit; - wxRadioBox* m_Choice_Zeros_Format; - wxRadioBox* m_Choice_Precision; - wxRadioBox* m_Choice_Drill_Offset; - wxRadioBox* m_Choice_Drill_Map; - wxRadioBox* m_Choice_Drill_Report; - wxTextCtrl* m_PenSpeed; - wxTextCtrl* m_PenNum; - wxCheckBox* m_Check_Mirror; - wxCheckBox* m_Check_Minimal; - wxStaticBox* m_DefaultViasDrillSizer; - wxStaticText* m_ViaDrillValue; - wxStaticBox* m_MicroViasDrillSizer; - wxStaticText* m_MicroViaDrillValue; - wxStaticText* m_PadsCountInfoMsg; - wxStaticText* m_ThroughViasInfoMsg; - wxStaticText* m_MicroViasInfoMsg; - wxStaticText* m_BuriedViasInfoMsg; - wxButton* m_OkButton; - wxButton* m_CancelButton; -////@end WinEDA_DrillFrame member variables - -private: - WinEDA_PcbFrame* m_Parent; - int m_PadsHoleCount; - int m_ThroughViasCount; - int m_MicroViasCount; - int m_BlindOrBuriedViasCount; private: void InitDisplayParams(void); @@ -162,5 +56,4 @@ private: int Gen_Liste_Tools( std::vector & buffer, bool print_header ); }; -#endif - // _DIALOG_GENDRILL_H_ +#endif // _DIALOG_GENDRILL_H_ diff --git a/pcbnew/dialog_gendrill.pjd b/pcbnew/dialog_gendrill.pjd deleted file mode 100644 index 4dd4f99039..0000000000 --- a/pcbnew/dialog_gendrill.pjd +++ /dev/null @@ -1,2026 +0,0 @@ - - -
- 0 - "" - "" - "" - "" - "" - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - "jean-pierre Charras" - "License GNU" - "" - 0 - 0 - 0 - 0 - "<All platforms>" - "2.8.7" - "///////////////////////////////////////////////////////////////////////////// -// Name: %HEADER-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SOURCE-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SYMBOLS-FILENAME% -// Purpose: Symbols file -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "" - "// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -" - " /// %BODY% -" - " -/*! - * %BODY% - */ - -" - "app_resources.h" - "app_resources.cpp" - "AppResources" - "app.h" - "app.cpp" - "Application" - 0 - "" - "<None>" - "iso-8859-1" - "utf-8" - "utf-8" - "" - 0 - 0 - 4 - " " - "" - 0 - 0 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 -
- - - "" - "data-document" - "" - "" - 0 - 1 - 0 - 0 - - "Configurations" - "config-data-document" - "" - "" - 0 - 1 - 0 - 0 - "" - 1 - -8519680 - "" - "Debug" - "ANSI" - "Static" - "Modular" - "GUI" - "wxMSW" - "Dynamic" - "Yes" - "No" - "No" - "No" - "Yes" - "%WXVERSION%" - "%EXECUTABLE%" - "" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - 0 - 1 - "" - - - - - - - "Projects" - "root-document" - "" - "project" - 1 - 1 - 0 - 1 - - "Windows" - "html-document" - "" - "dialogsfolder" - 1 - 1 - 0 - 1 - - "WinEDA_DrillFrame" - "dialog-document" - "" - "dialog" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbDialogProxy" - 10000 - 0 - "" - 0 - "" - 0 - 0 - "wxEVT_CLOSE_WINDOW|OnCloseWindow|NONE||" - "ID_WINEDA_DRILLFRAME" - 10000 - "WinEDA_DrillFrame" - "wxDialog" - "wxDialog" - "dialog_gendrill.cpp" - "dialog_gendrill.h" - "" - "Drill Files Generation" - 1 - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "Tiled" - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 1 - 0 - "" - 0 - 1 - -1 - -1 - 400 - 300 - 0 - "" - - "wxBoxSizer H" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbBoxSizerProxy" - "Horizontal" - "" - 0 - 0 - 0 - "<Any platform>" - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbBoxSizerProxy" - "Vertical" - "m_LeftBoxSizer" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxRadioBox: ID_SEL_DRILL_UNITS" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbRadioBoxProxy" - "wxEVT_COMMAND_RADIOBOX_SELECTED|OnSelDrillUnitsSelected|NONE||WinEDA_DrillFrame" - "ID_SEL_DRILL_UNITS" - 10002 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_Choice_Unit" - "Drill Units:" - 1 - "Millimeters|Inches" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "s_Unit_Drill_is_Inch" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxRadioBox: ID_SEL_ZEROS_FMT" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbRadioBoxProxy" - "wxEVT_COMMAND_RADIOBOX_SELECTED|OnSelZerosFmtSelected|NONE||WinEDA_DrillFrame" - "ID_SEL_ZEROS_FMT" - 10001 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_Choice_Zeros_Format" - "Zeros Format" - 1 - "decimal format|suppress leading zeros|suppress trailing zeros|keep zeros" - 0 - "" - "Choose EXCELLON numbers notation" - "" - "" - "" - 0 - 1 - "<Any platform>" - "s_Zeros_Format" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxRadioBox: ID_SEL_PRECISION" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbRadioBoxProxy" - "ID_SEL_PRECISION" - 10003 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_Choice_Precision" - "Precision" - 1 - "2:3|2:4" - 0 - "" - "Choose EXCELLON numbers precision" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxRadioBox: ID_SEL_DRILL_SHEET" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbRadioBoxProxy" - "ID_SEL_DRILL_SHEET" - 10004 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_Choice_Drill_Offset" - "Drill Origin:" - 1 - "absolute|auxiliary axis" - 0 - "" - "Choose the coordinate origin: absolute or relative to the auxiliray axis" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxRadioBox: ID_SEL_DRILL_SHEET" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbRadioBoxProxy" - "ID_SEL_DRILL_SHEET" - 10004 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_Choice_Drill_Map" - "Drill Sheet:" - 1 - "None|drill sheet (HPGL)|drill sheet (PostScript)|Drill sheet (Gerber)|Drill sheet (DXF)" - 0 - "" - "Creates a drill map in PS or HPGL format" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxRadioBox: ID_SEL_DRILL_REPORT" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbRadioBoxProxy" - "ID_SEL_DRILL_REPORT" - 10010 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_Choice_Drill_Report" - "Drill Report:" - 1 - "None|Drill report" - 0 - "" - "Creates a plain text report" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "HPGL plotter Options:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "" - "Speed (cm/s)" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL2" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbTextCtrlProxy" - "ID_TEXTCTRL2" - 10007 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_PenSpeed" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "" - "Pen Number" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbTextCtrlProxy" - "ID_TEXTCTRL" - 10006 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_PenNum" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Options:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxCheckBox: ID_CHECKBOX2" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbCheckBoxProxy" - "ID_CHECKBOX2" - 10011 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_Check_Mirror" - "mirror y axis" - 0 - "" - "" - "Mirror" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX3" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbCheckBoxProxy" - "ID_CHECKBOX3" - 10012 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_Check_Minimal" - "minimal header" - 0 - "" - "If checked, the EXCELLON header is minimal" - "Minimal" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Info:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Default Vias Drill:" - "m_DefaultViasDrillSizer" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_ViaDrillValue" - "Via Drill Value" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Micro Vias Drill:" - "m_MicroViasDrillSizer" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_MicroViaDrillValue" - "Micro Via Drill Value" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Holes Count:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_PadsCountInfoMsg" - "Pads:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_ThroughViasInfoMsg" - "Through Vias:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_MicroViasInfoMsg" - "Micro Vias:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "14/1/2008" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_BuriedViasInfoMsg" - "Buried Vias:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - "Spacer" - "dialog-control-document" - "" - "spacer" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbSpacerProxy" - 5 - 5 - "Expand" - "Centre" - 1 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - - "wxButton: wxID_OK" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||WinEDA_DrillFrame" - "wxID_OK" - 5100 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "m_OkButton" - "OK" - 1 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_CANCEL" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "13/1/2008" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||WinEDA_DrillFrame" - "wxID_CANCEL" - 5101 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "m_CancelButton" - "Cancel" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - - - "Sources" - "html-document" - "" - "sourcesfolder" - 1 - 1 - 0 - 1 - - "dialog_gendrill.rc" - "source-editor-document" - "dialog_gendrill.rc" - "source-editor" - 0 - 0 - 1 - 0 - "13/1/2008" - "" - - - - "Images" - "html-document" - "" - "bitmapsfolder" - 1 - 1 - 0 - 1 - - - - -
diff --git a/pcbnew/dialog_gendrill_base.cpp b/pcbnew/dialog_gendrill_base.cpp new file mode 100644 index 0000000000..df5989c803 --- /dev/null +++ b/pcbnew/dialog_gendrill_base.cpp @@ -0,0 +1,181 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_gendrill_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_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* bMainSizer; + bMainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* m_LeftBoxSizer; + m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") }; + int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString ); + m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units:"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS ); + m_Choice_Unit->SetSelection( 1 ); + m_LeftBoxSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 ); + + wxString m_Choice_Zeros_FormatChoices[] = { _("decimal format"), _("suppress leading zeros"), _("suppress trailing zeros"), _("keep zeros") }; + int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString ); + m_Choice_Zeros_Format = new wxRadioBox( this, wxID_ANY, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatNChoices, m_Choice_Zeros_FormatChoices, 1, wxRA_SPECIFY_COLS ); + m_Choice_Zeros_Format->SetSelection( 0 ); + m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") ); + + m_LeftBoxSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 ); + + wxString m_Choice_PrecisionChoices[] = { _("2:3"), _("2:4") }; + int m_Choice_PrecisionNChoices = sizeof( m_Choice_PrecisionChoices ) / sizeof( wxString ); + m_Choice_Precision = new wxRadioBox( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionNChoices, m_Choice_PrecisionChoices, 1, wxRA_SPECIFY_COLS ); + m_Choice_Precision->SetSelection( 1 ); + m_Choice_Precision->SetToolTip( _("Choose EXCELLON numbers precision") ); + + m_LeftBoxSizer->Add( m_Choice_Precision, 0, wxALL|wxEXPAND, 5 ); + + wxString m_Choice_Drill_OffsetChoices[] = { _("absolute"), _("auxiliary axis") }; + int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString ); + m_Choice_Drill_Offset = new wxRadioBox( this, wxID_ANY, _("Drill Origin:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetNChoices, m_Choice_Drill_OffsetChoices, 1, wxRA_SPECIFY_COLS ); + m_Choice_Drill_Offset->SetSelection( 0 ); + m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the auxiliray axis") ); + + m_LeftBoxSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 ); + + bMainSizer->Add( m_LeftBoxSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bMiddleBoxSizer; + bMiddleBoxSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_Choice_Drill_MapChoices[] = { _("None"), _("drill sheet (HPGL)"), _("drill sheet (PostScript)"), _("Drill sheet (Gerber)"), _("Drill sheet (DXF)") }; + int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString ); + m_Choice_Drill_Map = new wxRadioBox( this, wxID_ANY, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapNChoices, m_Choice_Drill_MapChoices, 1, wxRA_SPECIFY_COLS ); + m_Choice_Drill_Map->SetSelection( 0 ); + m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PSr HPGL or others formats") ); + + bMiddleBoxSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 ); + + wxString m_Choice_Drill_ReportChoices[] = { _("None"), _("Drill report") }; + int m_Choice_Drill_ReportNChoices = sizeof( m_Choice_Drill_ReportChoices ) / sizeof( wxString ); + m_Choice_Drill_Report = new wxRadioBox( this, wxID_ANY, _("Drill Report:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_ReportNChoices, m_Choice_Drill_ReportChoices, 1, wxRA_SPECIFY_COLS ); + m_Choice_Drill_Report->SetSelection( 0 ); + m_Choice_Drill_Report->SetToolTip( _("Creates a plain text report") ); + + bMiddleBoxSizer->Add( m_Choice_Drill_Report, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbHPGOptionsSizer; + sbHPGOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL plotter Options:") ), wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Speed (cm/s)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + sbHPGOptionsSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_PenSpeed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbHPGOptionsSizer->Add( m_PenSpeed, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + sbHPGOptionsSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_PenNum = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbHPGOptionsSizer->Add( m_PenNum, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + bMiddleBoxSizer->Add( sbHPGOptionsSizer, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbOptSizer; + sbOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); + + m_Check_Mirror = new wxCheckBox( this, wxID_ANY, _("mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbOptSizer->Add( m_Check_Mirror, 0, wxALL, 5 ); + + m_Check_Minimal = new wxCheckBox( this, wxID_ANY, _("minimal header"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbOptSizer->Add( m_Check_Minimal, 0, wxALL, 5 ); + + bMiddleBoxSizer->Add( sbOptSizer, 1, wxEXPAND, 5 ); + + bMainSizer->Add( bMiddleBoxSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bRightBoxSizer; + bRightBoxSizer = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizerInfo; + sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Info:") ), wxVERTICAL ); + + m_DefaultViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Vias Drill:") ), wxVERTICAL ); + + m_ViaDrillValue = new wxStaticText( this, wxID_ANY, _("Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ViaDrillValue->Wrap( -1 ); + m_DefaultViasDrillSizer->Add( m_ViaDrillValue, 0, wxALL, 5 ); + + sbSizerInfo->Add( m_DefaultViasDrillSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_MicroViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Micro Vias Drill:") ), wxVERTICAL ); + + m_MicroViaDrillValue = new wxStaticText( this, wxID_ANY, _("Micro Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MicroViaDrillValue->Wrap( -1 ); + m_MicroViasDrillSizer->Add( m_MicroViaDrillValue, 0, wxALL, 5 ); + + sbSizerInfo->Add( m_MicroViasDrillSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxStaticBoxSizer* sbSizerHoles; + sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Holes Count:") ), wxVERTICAL ); + + m_PadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Pads:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PadsCountInfoMsg->Wrap( -1 ); + sbSizerHoles->Add( m_PadsCountInfoMsg, 0, wxALL, 5 ); + + m_ThroughViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ThroughViasInfoMsg->Wrap( -1 ); + sbSizerHoles->Add( m_ThroughViasInfoMsg, 0, wxALL, 5 ); + + m_MicroViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MicroViasInfoMsg->Wrap( -1 ); + sbSizerHoles->Add( m_MicroViasInfoMsg, 0, wxALL, 5 ); + + m_BuriedViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_BuriedViasInfoMsg->Wrap( -1 ); + sbSizerHoles->Add( m_BuriedViasInfoMsg, 0, wxALL, 5 ); + + + sbSizerHoles->Add( 10, 10, 1, wxEXPAND, 5 ); + + m_OkButton = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OkButton->SetDefault(); + sbSizerHoles->Add( m_OkButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_CancelButton = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerHoles->Add( m_CancelButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + sbSizerInfo->Add( sbSizerHoles, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + bRightBoxSizer->Add( sbSizerInfo, 1, wxEXPAND|wxTOP, 5 ); + + bMainSizer->Add( bRightBoxSizer, 1, wxEXPAND, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + m_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this ); + m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this ); + m_OkButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOkClick ), NULL, this ); + m_CancelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this ); +} + +DIALOG_GENDRILL_BASE::~DIALOG_GENDRILL_BASE() +{ + // Disconnect Events + m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this ); + m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this ); + m_OkButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOkClick ), NULL, this ); + m_CancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this ); +} diff --git a/pcbnew/dialog_gendrill_base.fbp b/pcbnew/dialog_gendrill_base.fbp new file mode 100644 index 0000000000..79dfe0191b --- /dev/null +++ b/pcbnew/dialog_gendrill_base.fbp @@ -0,0 +1,1258 @@ + + + + + + C++ + 1 + UTF-8 + connect + dialog_gendrill_base + 1000 + none + 1 + dialog_gendrill_base + + . + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + DIALOG_GENDRILL_BASE + + 447,439 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Drill Files Generation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + m_LeftBoxSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + "Millimeters" "Inches" + + 1 + + + 0 + wxID_ANY + Drill Units: + 1 + + + m_Choice_Unit + protected + + 1 + + wxRA_SPECIFY_COLS + + + + + + + + + + + + + + + + + + + + + + + OnSelDrillUnitsSelected + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "decimal format" "suppress leading zeros" "suppress trailing zeros" "keep zeros" + + 1 + + + 0 + wxID_ANY + Zeros Format + 1 + + + m_Choice_Zeros_Format + protected + + 0 + + wxRA_SPECIFY_COLS + + Choose EXCELLON numbers notation + + + + + + + + + + + + + + + + + + + + + OnSelZerosFmtSelected + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "2:3" "2:4" + + 1 + + + 0 + wxID_ANY + Precision + 1 + + + m_Choice_Precision + protected + + 1 + + wxRA_SPECIFY_COLS + + Choose EXCELLON numbers precision + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "absolute" "auxiliary axis" + + 1 + + + 0 + wxID_ANY + Drill Origin: + 1 + + + m_Choice_Drill_Offset + protected + + 0 + + wxRA_SPECIFY_COLS + + Choose the coordinate origin: absolute or relative to the auxiliray axis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bMiddleBoxSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + "None" "drill sheet (HPGL)" "drill sheet (PostScript)" "Drill sheet (Gerber)" "Drill sheet (DXF)" + + 1 + + + 0 + wxID_ANY + Drill Sheet: + 1 + + + m_Choice_Drill_Map + protected + + 0 + + wxRA_SPECIFY_COLS + + Creates a drill map in PSr HPGL or others formats + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "None" "Drill report" + + 1 + + + 0 + wxID_ANY + Drill Report: + 1 + + + m_Choice_Drill_Report + protected + + 0 + + wxRA_SPECIFY_COLS + + Creates a plain text report + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + HPGL plotter Options: + + sbHPGOptionsSizer + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Speed (cm/s) + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_PenSpeed + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Pen Number + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_PenNum + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Options: + + sbOptSizer + wxVERTICAL + none + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + mirror y axis + + + m_Check_Mirror + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + minimal header + + + m_Check_Minimal + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bRightBoxSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP + 1 + + wxID_ANY + Info: + + sbSizerInfo + wxVERTICAL + none + + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 0 + + wxID_ANY + Default Vias Drill: + + m_DefaultViasDrillSizer + wxVERTICAL + protected + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Via Drill Value + + + m_ViaDrillValue + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 0 + + wxID_ANY + Micro Vias Drill: + + m_MicroViasDrillSizer + wxVERTICAL + protected + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Micro Via Drill Value + + + m_MicroViaDrillValue + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 1 + + wxID_ANY + Holes Count: + + sbSizerHoles + wxVERTICAL + none + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Pads: + + + m_PadsCountInfoMsg + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Through Vias: + + + m_ThroughViasInfoMsg + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Micro Vias: + + + m_MicroViasInfoMsg + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Buried Vias: + + + m_BuriedViasInfoMsg + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 10 + protected + 10 + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 1 + 1 + + + 0 + wxID_OK + OK + + + m_OkButton + protected + + + + + + + + + OnOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + Cancel + + + m_CancelButton + protected + + + + + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialog_gendrill_base.h b/pcbnew/dialog_gendrill_base.h new file mode 100644 index 0000000000..d44a4b482c --- /dev/null +++ b/pcbnew/dialog_gendrill_base.h @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_gendrill_base__ +#define __dialog_gendrill_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_GENDRILL_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_GENDRILL_BASE : public wxDialog +{ + private: + + protected: + wxRadioBox* m_Choice_Unit; + wxRadioBox* m_Choice_Zeros_Format; + wxRadioBox* m_Choice_Precision; + wxRadioBox* m_Choice_Drill_Offset; + wxRadioBox* m_Choice_Drill_Map; + wxRadioBox* m_Choice_Drill_Report; + wxStaticText* m_staticText1; + wxTextCtrl* m_PenSpeed; + wxStaticText* m_staticText2; + wxTextCtrl* m_PenNum; + wxCheckBox* m_Check_Mirror; + wxCheckBox* m_Check_Minimal; + wxStaticBoxSizer* m_DefaultViasDrillSizer; + wxStaticText* m_ViaDrillValue; + wxStaticBoxSizer* m_MicroViasDrillSizer; + wxStaticText* m_MicroViaDrillValue; + wxStaticText* m_PadsCountInfoMsg; + wxStaticText* m_ThroughViasInfoMsg; + wxStaticText* m_MicroViasInfoMsg; + wxStaticText* m_BuriedViasInfoMsg; + + wxButton* m_OkButton; + wxButton* m_CancelButton; + + // Virtual event handlers, overide them in your derived class + virtual void OnSelDrillUnitsSelected( wxCommandEvent& event ){ event.Skip(); } + virtual void OnSelZerosFmtSelected( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drill Files Generation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 447,439 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_GENDRILL_BASE(); + +}; + +#endif //__dialog_gendrill_base__ diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index e59611c454..f50450fe35 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -22,6 +22,8 @@ #include "gendrill.h" +#include "dialog_gendrill.h" // Dialog box for drill file generation + #include "build_version.h" const wxString DrillFileExtension( wxT( "drl" ) ); @@ -40,7 +42,7 @@ const wxString DrillFileWildcard( _( "Drill files (*.drl)|*.drl" ) ); * * The drill maps can be created in HPGL or PS format * - * dialog_gendrill.cpp is the file (included in this file) which handles + * dialog_gendrill.cpp is the filewhich handles * the Dialog box for drill file generation */ @@ -74,12 +76,10 @@ static std::vector s_HoleListBuffer; #define UnitDrillInchKey wxT( "DrillUnit" ) #define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" ) -#include "dialog_gendrill.cpp" // Dialog box for drill file generation - /* some param values initialization before display dialog window */ -void WinEDA_DrillFrame::InitDisplayParams( void ) +void DIALOG_GENDRILL::InitDisplayParams( void ) { wxString msg; @@ -123,7 +123,6 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) m_BlindOrBuriedViasCount++; } - m_MicroViasDrillSizer->Enable( m_MicroViasCount ); m_MicroViaDrillValue->Enable( m_MicroViasCount ); // Pads holes round: @@ -162,7 +161,7 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) } -void WinEDA_DrillFrame::SetParams( void ) +void DIALOG_GENDRILL::SetParams( void ) { wxString msg; long ltmp; @@ -221,14 +220,14 @@ void WinEDA_PcbFrame::InstallDrillFrame( wxCommandEvent& event ) Config->Read( DrillOriginIsAuxAxisKey, &DrillOriginIsAuxAxis ); } - WinEDA_DrillFrame* frame = new WinEDA_DrillFrame( this ); + DIALOG_GENDRILL* frame = new DIALOG_GENDRILL( this ); frame->ShowModal(); frame->Destroy(); } /* Save drill options: */ -void WinEDA_DrillFrame::UpdateConfig() +void DIALOG_GENDRILL::UpdateConfig() { SetParams(); @@ -256,7 +255,7 @@ void WinEDA_DrillFrame::UpdateConfig() * And one file per layer pair, which have one or more holes, excluding * through holes, already in the first file. */ -void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event ) +void DIALOG_GENDRILL::GenDrillFiles( wxCommandEvent& event ) { wxFileName fn; wxString layer_extend; /* added to the Board FileName to @@ -383,7 +382,7 @@ void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event ) } -void WinEDA_DrillFrame::UpdatePrecisionOptions( wxCommandEvent& event ) +void DIALOG_GENDRILL::UpdatePrecisionOptions( wxCommandEvent& event ) { if( m_Choice_Unit->GetSelection()==1 ) { @@ -410,7 +409,7 @@ void WinEDA_DrillFrame::UpdatePrecisionOptions( wxCommandEvent& event ) * @param aHoleListBuffer = hole descriptor list * @param aToolListBuffer = Drill tools list */ -int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( FILE* excellon_dest, +int DIALOG_GENDRILL::Create_Drill_File_EXCELLON( FILE* excellon_dest, std::vector& aHoleListBuffer, std::vector& aToolListBuffer ) { @@ -652,7 +651,7 @@ void Gen_Line_EXCELLON( char* line, float x, float y ) * ICI,OFF * ATC,ON */ -void WinEDA_DrillFrame::Write_Excellon_Header( FILE* aFile ) +void DIALOG_GENDRILL::Write_Excellon_Header( FILE* aFile ) { char Line[256]; @@ -733,7 +732,7 @@ void Write_End_Of_File_Drill( FILE* aFile ) /* Generate the drill plan (Drill map) format HPGL or POSTSCRIPT */ -void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName, +void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName, std::vector& aHoleListBuffer, std::vector& buffer, int format ) @@ -766,7 +765,7 @@ void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName, break; default: - DisplayError( this, wxT( "WinEDA_DrillFrame::GenDrillMap() error" ) ); + DisplayError( this, wxT( "DIALOG_GENDRILL::GenDrillMap() error" ) ); return; } @@ -806,7 +805,7 @@ void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName, /* * Create a list of drill values and drill count */ -void WinEDA_DrillFrame::GenDrillReport( const wxString aFileName ) +void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName ) { wxFileName fn; wxString msg;