From 7e7f101a95d40a4cc2414c0da230162abe69bc6e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 30 Apr 2010 20:39:10 +0200 Subject: [PATCH 1/4] 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; From a35a083690dd5245a8c94c7b4a14edb93cdacdf6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 1 May 2010 11:22:12 +0200 Subject: [PATCH 2/4] Convert gendrill dialog from Dialogblocks to wxFormBuilder. Minor fixes. --- pcbnew/dialog_export_3Dfiles_base.cpp | 4 +- pcbnew/dialog_export_3Dfiles_base.fbp | 4 +- pcbnew/dialog_gendrill_base.cpp | 28 +-- pcbnew/dialog_gendrill_base.fbp | 246 +++++++++++++------------- pcbnew/dialog_gendrill_base.h | 2 +- pcbnew/dialog_general_options.cpp | 4 +- pcbnew/editrack.cpp | 2 +- pcbnew/pcbnew.cpp | 4 +- pcbnew/pcbnew.h | 2 +- 9 files changed, 148 insertions(+), 148 deletions(-) diff --git a/pcbnew/dialog_export_3Dfiles_base.cpp b/pcbnew/dialog_export_3Dfiles_base.cpp index e312d5a42c..1c5f3b6fc6 100644 --- a/pcbnew/dialog_export_3Dfiles_base.cpp +++ b/pcbnew/dialog_export_3Dfiles_base.cpp @@ -45,10 +45,10 @@ DIALOG_EXPORT_3DFILE_BASE::DIALOG_EXPORT_3DFILE_BASE( wxWindow* parent, wxWindow m_rbSelectUnits->SetSelection( 0 ); bLowerSizer->Add( m_rbSelectUnits, 1, wxALL|wxEXPAND, 5 ); - wxString m_rb3DFilesOptionChoices[] = { _("Copy 3D Shapes Files in Subdir"), _("Use Absolute Path in Wrml File ") }; + wxString m_rb3DFilesOptionChoices[] = { _("Copy 3D Shapes Files in Subdir"), _("Use Absolute Path in Vrml File ") }; int m_rb3DFilesOptionNChoices = sizeof( m_rb3DFilesOptionChoices ) / sizeof( wxString ); m_rb3DFilesOption = new wxRadioBox( this, wxID_ANY, _("3D Shapes Files Option:"), wxDefaultPosition, wxDefaultSize, m_rb3DFilesOptionNChoices, m_rb3DFilesOptionChoices, 1, wxRA_SPECIFY_COLS ); - m_rb3DFilesOption->SetSelection( 0 ); + m_rb3DFilesOption->SetSelection( 1 ); bLowerSizer->Add( m_rb3DFilesOption, 1, wxALL|wxEXPAND, 5 ); bSizer1->Add( bLowerSizer, 1, wxEXPAND, 5 ); diff --git a/pcbnew/dialog_export_3Dfiles_base.fbp b/pcbnew/dialog_export_3Dfiles_base.fbp index f0cf0f5a21..74d44bbb94 100644 --- a/pcbnew/dialog_export_3Dfiles_base.fbp +++ b/pcbnew/dialog_export_3Dfiles_base.fbp @@ -365,7 +365,7 @@ 1 - "Copy 3D Shapes Files in Subdir" "Use Absolute Path in Wrml File " + "Copy 3D Shapes Files in Subdir" "Use Absolute Path in Vrml File " 1 @@ -379,7 +379,7 @@ m_rb3DFilesOption protected - 0 + 1 wxRA_SPECIFY_COLS diff --git a/pcbnew/dialog_gendrill_base.cpp b/pcbnew/dialog_gendrill_base.cpp index df5989c803..0b9daf1b0d 100644 --- a/pcbnew/dialog_gendrill_base.cpp +++ b/pcbnew/dialog_gendrill_base.cpp @@ -25,7 +25,7 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con 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") }; + 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 ); @@ -41,7 +41,7 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con m_LeftBoxSizer->Add( m_Choice_Precision, 0, wxALL|wxEXPAND, 5 ); - wxString m_Choice_Drill_OffsetChoices[] = { _("absolute"), _("auxiliary axis") }; + 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 ); @@ -54,7 +54,7 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con wxBoxSizer* bMiddleBoxSizer; bMiddleBoxSizer = new wxBoxSizer( wxVERTICAL ); - wxString m_Choice_Drill_MapChoices[] = { _("None"), _("drill sheet (HPGL)"), _("drill sheet (PostScript)"), _("Drill sheet (Gerber)"), _("Drill sheet (DXF)") }; + wxString m_Choice_Drill_MapChoices[] = { _("None"), _("Drill map (HPGL)"), _("Drill map (PostScript)"), _("Drill map (Gerber)"), _("Drill map (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 ); @@ -87,20 +87,20 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con 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 ); + bMiddleBoxSizer->Add( sbHPGOptionsSizer, 0, 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 ); + 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 ); + 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 ); + bMiddleBoxSizer->Add( sbOptSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( bMiddleBoxSizer, 1, wxEXPAND, 5 ); @@ -145,19 +145,19 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con m_BuriedViasInfoMsg->Wrap( -1 ); sbSizerHoles->Add( m_BuriedViasInfoMsg, 0, wxALL, 5 ); + sbSizerInfo->Add( sbSizerHoles, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - sbSizerHoles->Add( 10, 10, 1, wxEXPAND, 5 ); + bRightBoxSizer->Add( sbSizerInfo, 0, wxEXPAND|wxTOP, 5 ); + + + bRightBoxSizer->Add( 10, 10, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 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 ); + bRightBoxSizer->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 ); + bRightBoxSizer->Add( m_CancelButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bMainSizer->Add( bRightBoxSizer, 1, wxEXPAND, 5 ); diff --git a/pcbnew/dialog_gendrill_base.fbp b/pcbnew/dialog_gendrill_base.fbp index 79dfe0191b..dee44347e4 100644 --- a/pcbnew/dialog_gendrill_base.fbp +++ b/pcbnew/dialog_gendrill_base.fbp @@ -32,7 +32,7 @@ DIALOG_GENDRILL_BASE - 447,439 + 447,412 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Drill Files Generation @@ -144,7 +144,7 @@ 0 - "decimal format" "suppress leading zeros" "suppress trailing zeros" "keep zeros" + "Decimal format" "Suppress leading zeros" "Suppress trailing zeros" "Keep zeros" 1 @@ -252,7 +252,7 @@ 0 - "absolute" "auxiliary axis" + "Absolute" "Auxiliary axis" 1 @@ -317,7 +317,7 @@ 0 - "None" "drill sheet (HPGL)" "drill sheet (PostScript)" "Drill sheet (Gerber)" "Drill sheet (DXF)" + "None" "Drill map (HPGL)" "Drill map (PostScript)" "Drill map (Gerber)" "Drill map (DXF)" 1 @@ -422,7 +422,7 @@ 5 wxEXPAND - 1 + 0 wxID_ANY HPGL plotter Options: @@ -648,7 +648,7 @@ 5 wxEXPAND - 1 + 0 wxID_ANY Options: @@ -670,7 +670,7 @@ 0 wxID_ANY - mirror y axis + Mirror y axis m_Check_Mirror @@ -722,7 +722,7 @@ 0 wxID_ANY - minimal header + Minimal header m_Check_Minimal @@ -777,7 +777,7 @@ 5 wxEXPAND|wxTOP - 1 + 0 wxID_ANY Info: @@ -1132,124 +1132,124 @@ - - 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 - - - - - - - - - - - - - - - - - - - - - - - - - + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 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 index d44a4b482c..b8136d83f1 100644 --- a/pcbnew/dialog_gendrill_base.h +++ b/pcbnew/dialog_gendrill_base.h @@ -67,7 +67,7 @@ class DIALOG_GENDRILL_BASE : public wxDialog 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( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drill Files Generation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 447,412 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_GENDRILL_BASE(); }; diff --git a/pcbnew/dialog_general_options.cpp b/pcbnew/dialog_general_options.cpp index b0378c2622..c0bbaef8d8 100644 --- a/pcbnew/dialog_general_options.cpp +++ b/pcbnew/dialog_general_options.cpp @@ -50,7 +50,7 @@ void Dialog_GeneralOptions::init() m_ShowModuleRatsnest->SetValue( g_Show_Module_Ratsnest ); m_ShowGlobalRatsnest->SetValue( m_Board->IsElementVisible(RATSNEST_VISIBLE) ); m_TrackAutodel->SetValue( g_AutoDeleteOldTrack ); - m_Track_45_Only_Ctrl->SetValue( Track_45_Only ); + m_Track_45_Only_Ctrl->SetValue( g_Track_45_Only_Allowed ); m_Segments_45_Only_Ctrl->SetValue( Segments_45_Only ); m_AutoPANOpt->SetValue( m_Parent->DrawPanel->m_AutoPAN_Enable ); m_Segments_45_Only_Ctrl->SetValue( Segments_45_Only ); @@ -92,7 +92,7 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event ) g_Show_Module_Ratsnest = m_ShowModuleRatsnest->GetValue(); g_AutoDeleteOldTrack = m_TrackAutodel->GetValue(); Segments_45_Only = m_Segments_45_Only_Ctrl->GetValue(); - Track_45_Only = m_Track_45_Only_Ctrl->GetValue(); + g_Track_45_Only_Allowed = m_Track_45_Only_Ctrl->GetValue(); m_Parent->DrawPanel->m_AutoPAN_Enable = m_AutoPANOpt->GetValue(); g_TwoSegmentTrackBuild = m_Track_DoubleSegm_Ctrl->GetValue(); diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index c76df22c58..0edb5aed33 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -736,7 +736,7 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, } } - if( Track_45_Only ) + if( g_Track_45_Only_Allowed ) { if( g_TwoSegmentTrackBuild ) { diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index f41099570c..953fb72ec2 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -43,8 +43,8 @@ bool g_Drag_Pistes_On; bool g_Show_Module_Ratsnest; bool g_Show_Pads_Module_in_Move = true; bool g_Raccord_45_Auto = true; -bool Track_45_Only; -bool Segments_45_Only; +bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. and 45deg only tracks +bool Segments_45_Only; // True to allow horiz, vert. and 45deg only graphic segments bool g_TwoSegmentTrackBuild = true; bool g_HighLight_Status; diff --git a/pcbnew/pcbnew.h b/pcbnew/pcbnew.h index b1ee5dc5ae..6409eb3c2e 100644 --- a/pcbnew/pcbnew.h +++ b/pcbnew/pcbnew.h @@ -60,7 +60,7 @@ extern bool g_Raccord_45_Auto; extern const wxString g_FootprintLibFileWildcard; // Wildcard for footprint libraries filesnames -extern bool Track_45_Only; +extern bool g_Track_45_Only_Allowed; extern bool Segments_45_Only; extern wxString g_Shapes3DExtBuffer; extern wxString g_DocModulesFileName; From e14311997dbbe91c9b92d314dd79027b55b10100 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 1 May 2010 14:46:33 +0200 Subject: [PATCH 3/4] Auto update 3D display after footprint or board edition. --- 3d-viewer/3d_frame.cpp | 10 ++++++---- 3d-viewer/3d_viewer.h | 23 +++++++++++++++++------ include/wxBasePcbFrame.h | 4 +++- include/wxPcbStruct.h | 16 ++++++++++++++++ pcbnew/basepcbframe.cpp | 2 ++ pcbnew/modedit.cpp | 1 + pcbnew/moduleframe.cpp | 13 +++++++++++++ pcbnew/pcbframe.cpp | 14 ++++++++++++++ 8 files changed, 72 insertions(+), 11 deletions(-) diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index 5ad9e45493..4e2f420203 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -57,6 +57,7 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, m_HToolBar = NULL; m_VToolBar = NULL; m_InternalUnits = 10000; // Internal units = 1/10000 inch + m_reloadRequest = false; // Give it an icon SetIcon( wxICON( icon_w3d ) ); @@ -343,6 +344,8 @@ error: unknown command" ) ); void WinEDA3D_DrawFrame::NewDisplay() { + m_reloadRequest = false; + m_Canvas->ClearLists(); m_Canvas->CreateDrawGL_List(); @@ -356,10 +359,9 @@ void WinEDA3D_DrawFrame::OnActivate( wxActivateEvent& event ) { // Reload data if 3D frame shows a footprint, // because it can be changed since last frame activation - if( m_Parent->m_Ident == MODULE_EDITOR_FRAME ) - { -// NewDisplay(); - } + if( m_reloadRequest ) + NewDisplay(); + event.Skip(); // required under wxMAC } diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index e066b7499b..b9477cc39f 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -185,23 +185,25 @@ class WinEDA3D_DrawFrame : public wxFrame { public: WinEDA_BasePcbFrame* m_Parent; +private: + wxString m_FrameName; // name used for writing and reading setup + // It is "Frame3D" Pcb3D_GLCanvas* m_Canvas; WinEDA_Toolbar* m_HToolBar; WinEDA_Toolbar* m_VToolBar; int m_InternalUnits; wxPoint m_FramePos; wxSize m_FrameSize; - wxAuiManager m_auimgr; - ~WinEDA3D_DrawFrame() { m_auimgr.UnInit(); }; - -private: - wxString m_FrameName; // name used for writing and reading setup - // It is "Frame3D" + bool m_reloadRequest; public: WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, const wxString& title, long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE ); + ~WinEDA3D_DrawFrame() + { + m_auimgr.UnInit(); + }; void Exit3DFrame( wxCommandEvent& event ); void OnCloseWindow( wxCloseEvent& Event ); @@ -211,6 +213,15 @@ public: void SetToolbars(); void GetSettings(); void SaveSettings(); + /** function ReloadRequest + * must be called when reloading data from Pcbnew is needed + * mainly after edition of the board or footprint beeing displayed. + * mainly for the mudule editor. + */ + void ReloadRequest( ) + { + m_reloadRequest = true; + } void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index d5d81ccab7..18397136d2 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -218,9 +218,11 @@ public: /** Function OnModify() * Virtual - * Must be called after a schematic change + * Must be called after a change * in order to set the "modify" flag of the current screen * and update the date in frame reference + * do not forget to call this basic OnModify function to update info + * in derived OnModify functions */ virtual void OnModify( ); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 924e528d53..0aeb7579f5 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -274,6 +274,14 @@ public: void ReCreateMenuBar(); WinEDAChoiceBox* ReCreateLayerBox( WinEDA_Toolbar* parent ); + /** Virtual Function OnModify() + * Must be called after a board change + * in order to set the "modify" flag of the current screen + * and prepare, if needed the refresh of the 3D frame showing the footprint + * do not forget to call the basic OnModify function to update auxiliary info + */ + virtual void OnModify( ); + /** * Function IsElementVisible * tests whether a given element category is visible. Keep this as an @@ -1069,6 +1077,14 @@ public: void GeneralControle( wxDC* DC, wxPoint Mouse ); void LoadModuleFromBoard( wxCommandEvent& event ); + /** Virtual Function OnModify() + * Must be called after a footprint change + * in order to set the "modify" flag of the current screen + * and prepare, if needed the refresh of the 3D frame showing the footprint + * do not forget to call the basic OnModify function to update auxiliary info + */ + virtual void OnModify( ); + /** function ToPrinter * Install the print dialog */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index f8385eb8a5..fc2a9dfda3 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -423,6 +423,8 @@ void WinEDA_BasePcbFrame::SaveSettings() * Must be called after a schematic change * in order to set the "modify" flag of the current screen * and update the date in frame reference + * do not forget to call this basic OnModify function to update info + * in derived OnModify functions */ void WinEDA_BasePcbFrame::OnModify( ) { diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index cae9f4ec9e..f9f57efa5d 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -802,4 +802,5 @@ void WinEDA_ModuleEditFrame::Transform( MODULE* module, int transform ) } module->Set_Rectangle_Encadrement(); + OnModify(); } diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 315d883cbf..511905194f 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -531,3 +531,16 @@ void WinEDA_ModuleEditFrame::GeneralControle( wxDC* DC, wxPoint Mouse ) SetToolbars(); UpdateStatusBar(); } + +/** Virtual Function OnModify() + * Must be called after a change + * in order to set the "modify" flag of the current screen + * and prepare, if needed the refresh of the 3D frame showing the footprint + * do not forget to call the basic OnModify function to update auxiliary info + */ +void WinEDA_ModuleEditFrame::OnModify( ) +{ + WinEDA_BasePcbFrame::OnModify( ); + if( m_Draw3DFrame ) + m_Draw3DFrame->ReloadRequest( ); +} diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 1731dceeef..1e0570856d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -678,3 +678,17 @@ void WinEDA_PcbFrame::SetLastNetListRead( const wxString& aLastNetListRead ) m_lastNetListRead = relativeFileName.GetFullPath(); } } + +/** Virtual Function OnModify() + * Must be called after a change + * in order to set the "modify" flag of the current screen + * and prepare, if needed the refresh of the 3D frame showing the footprint + * do not forget to call the basic OnModify function to update auxiliary info + */ +void WinEDA_PcbFrame::OnModify( ) +{ + WinEDA_BasePcbFrame::OnModify( ); + if( m_Draw3DFrame ) + m_Draw3DFrame->ReloadRequest( ); +} + From 67fd5ae31d5e9944baf3cd7119f24a15de1d66e5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 1 May 2010 14:49:50 +0200 Subject: [PATCH 4/4] Auto update 3D display after footprint or board edition. --- CHANGELOG.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9c9123ac7b..0f99b7e82b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,14 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. +2010-may-01, UPDATE Jean-Pierre Charras +================================================================================ +++Pcbnew: + Board and footprint editors: + Auto update 3D display after footprint or board edition. + (board or footprint is reloaded only when the 3D frame is reactivated, so + no extra time is needed during edition) + 2010-apr-29, UPDATE Jean-Pierre Charras ================================================================================ ++Pcbnew: