Commit 7e7f101a authored by jean-pierre charras's avatar jean-pierre charras

Convert gendrill dialog from Dialogblocks to wxFormBuilder

parent facbe280
...@@ -54,7 +54,8 @@ set(PCBNEW_SRCS ...@@ -54,7 +54,8 @@ set(PCBNEW_SRCS
dialog_export_3Dfiles_base.cpp dialog_export_3Dfiles_base.cpp
dialog_freeroute_exchange.cpp dialog_freeroute_exchange.cpp
dialog_freeroute_exchange_base.cpp dialog_freeroute_exchange_base.cpp
# dialog_gendrill.cpp dialog_gendrill.cpp
dialog_gendrill_base.cpp
dialog_general_options.cpp dialog_general_options.cpp
dialog_general_options_BoardEditor_base.cpp dialog_general_options_BoardEditor_base.cpp
dialog_global_edit_tracks_and_vias.cpp dialog_global_edit_tracks_and_vias.cpp
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_gendrill.h // Name: dialog_gendrill.h
// Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Created: 2010 apr 30
// Created: 13/01/2008 17:26:dialog_gendrill // Licence: GPL
// RCS-ID:
// Copyright: License GNU
// Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:dialog_gendrill
#ifndef _DIALOG_GENDRILL_H_ #ifndef _DIALOG_GENDRILL_H_
#define _DIALOG_GENDRILL_H_ #define _DIALOG_GENDRILL_H_
#include "dialog_gendrill_base.h"
/*! class DIALOG_GENDRILL: public DIALOG_GENDRILL_BASE
* Includes
*/
////@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()
public: private:
/// Constructors WinEDA_PcbFrame* m_Parent;
WinEDA_DrillFrame(); int m_PadsHoleCount;
WinEDA_DrillFrame( WinEDA_PcbFrame* parent, int m_ThroughViasCount;
wxWindowID id = SYMBOL_WINEDA_DRILLFRAME_IDNAME, int m_MicroViasCount;
const wxString& caption = SYMBOL_WINEDA_DRILLFRAME_TITLE, int m_BlindOrBuriedViasCount;
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 public:
~WinEDA_DrillFrame(); DIALOG_GENDRILL( WinEDA_PcbFrame* parent );
~DIALOG_GENDRILL();
private:
/// Initialises member variables /// Initialises member variables
void Init(); void initDialog();
/// 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 );
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_DRILL_UNITS /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_DRILL_UNITS
void OnSelDrillUnitsSelected( wxCommandEvent& event ); void OnSelDrillUnitsSelected( wxCommandEvent& event );
...@@ -102,50 +40,6 @@ public: ...@@ -102,50 +40,6 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event ); 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: private:
void InitDisplayParams(void); void InitDisplayParams(void);
...@@ -162,5 +56,4 @@ private: ...@@ -162,5 +56,4 @@ private:
int Gen_Liste_Tools( std::vector<DRILL_TOOL> & buffer, bool print_header ); int Gen_Liste_Tools( std::vector<DRILL_TOOL> & buffer, bool print_header );
}; };
#endif #endif // _DIALOG_GENDRILL_H_
// _DIALOG_GENDRILL_H_
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// 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 );
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// 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 <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/statbox.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// 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__
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "gendrill.h" #include "gendrill.h"
#include "dialog_gendrill.h" // Dialog box for drill file generation
#include "build_version.h" #include "build_version.h"
const wxString DrillFileExtension( wxT( "drl" ) ); const wxString DrillFileExtension( wxT( "drl" ) );
...@@ -40,7 +42,7 @@ const wxString DrillFileWildcard( _( "Drill files (*.drl)|*.drl" ) ); ...@@ -40,7 +42,7 @@ const wxString DrillFileWildcard( _( "Drill files (*.drl)|*.drl" ) );
* *
* The drill maps can be created in HPGL or PS format * 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 * the Dialog box for drill file generation
*/ */
...@@ -74,12 +76,10 @@ static std::vector<HOLE_INFO> s_HoleListBuffer; ...@@ -74,12 +76,10 @@ static std::vector<HOLE_INFO> s_HoleListBuffer;
#define UnitDrillInchKey wxT( "DrillUnit" ) #define UnitDrillInchKey wxT( "DrillUnit" )
#define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" ) #define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" )
#include "dialog_gendrill.cpp" // Dialog box for drill file generation
/* some param values initialization before display dialog window /* some param values initialization before display dialog window
*/ */
void WinEDA_DrillFrame::InitDisplayParams( void ) void DIALOG_GENDRILL::InitDisplayParams( void )
{ {
wxString msg; wxString msg;
...@@ -123,7 +123,6 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) ...@@ -123,7 +123,6 @@ void WinEDA_DrillFrame::InitDisplayParams( void )
m_BlindOrBuriedViasCount++; m_BlindOrBuriedViasCount++;
} }
m_MicroViasDrillSizer->Enable( m_MicroViasCount );
m_MicroViaDrillValue->Enable( m_MicroViasCount ); m_MicroViaDrillValue->Enable( m_MicroViasCount );
// Pads holes round: // Pads holes round:
...@@ -162,7 +161,7 @@ void WinEDA_DrillFrame::InitDisplayParams( void ) ...@@ -162,7 +161,7 @@ void WinEDA_DrillFrame::InitDisplayParams( void )
} }
void WinEDA_DrillFrame::SetParams( void ) void DIALOG_GENDRILL::SetParams( void )
{ {
wxString msg; wxString msg;
long ltmp; long ltmp;
...@@ -221,14 +220,14 @@ void WinEDA_PcbFrame::InstallDrillFrame( wxCommandEvent& event ) ...@@ -221,14 +220,14 @@ void WinEDA_PcbFrame::InstallDrillFrame( wxCommandEvent& event )
Config->Read( DrillOriginIsAuxAxisKey, &DrillOriginIsAuxAxis ); Config->Read( DrillOriginIsAuxAxisKey, &DrillOriginIsAuxAxis );
} }
WinEDA_DrillFrame* frame = new WinEDA_DrillFrame( this ); DIALOG_GENDRILL* frame = new DIALOG_GENDRILL( this );
frame->ShowModal(); frame->ShowModal();
frame->Destroy(); frame->Destroy();
} }
/* Save drill options: */ /* Save drill options: */
void WinEDA_DrillFrame::UpdateConfig() void DIALOG_GENDRILL::UpdateConfig()
{ {
SetParams(); SetParams();
...@@ -256,7 +255,7 @@ void WinEDA_DrillFrame::UpdateConfig() ...@@ -256,7 +255,7 @@ void WinEDA_DrillFrame::UpdateConfig()
* And one file per layer pair, which have one or more holes, excluding * And one file per layer pair, which have one or more holes, excluding
* through holes, already in the first file. * through holes, already in the first file.
*/ */
void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event ) void DIALOG_GENDRILL::GenDrillFiles( wxCommandEvent& event )
{ {
wxFileName fn; wxFileName fn;
wxString layer_extend; /* added to the Board FileName to wxString layer_extend; /* added to the Board FileName to
...@@ -383,7 +382,7 @@ void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event ) ...@@ -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 ) if( m_Choice_Unit->GetSelection()==1 )
{ {
...@@ -410,7 +409,7 @@ void WinEDA_DrillFrame::UpdatePrecisionOptions( wxCommandEvent& event ) ...@@ -410,7 +409,7 @@ void WinEDA_DrillFrame::UpdatePrecisionOptions( wxCommandEvent& event )
* @param aHoleListBuffer = hole descriptor list * @param aHoleListBuffer = hole descriptor list
* @param aToolListBuffer = Drill tools 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<HOLE_INFO>& aHoleListBuffer, std::vector<HOLE_INFO>& aHoleListBuffer,
std::vector<DRILL_TOOL>& aToolListBuffer ) std::vector<DRILL_TOOL>& aToolListBuffer )
{ {
...@@ -652,7 +651,7 @@ void Gen_Line_EXCELLON( char* line, float x, float y ) ...@@ -652,7 +651,7 @@ void Gen_Line_EXCELLON( char* line, float x, float y )
* ICI,OFF * ICI,OFF
* ATC,ON * ATC,ON
*/ */
void WinEDA_DrillFrame::Write_Excellon_Header( FILE* aFile ) void DIALOG_GENDRILL::Write_Excellon_Header( FILE* aFile )
{ {
char Line[256]; char Line[256];
...@@ -733,7 +732,7 @@ void Write_End_Of_File_Drill( FILE* aFile ) ...@@ -733,7 +732,7 @@ void Write_End_Of_File_Drill( FILE* aFile )
/* Generate the drill plan (Drill map) format HPGL or POSTSCRIPT /* 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<HOLE_INFO>& aHoleListBuffer, std::vector<HOLE_INFO>& aHoleListBuffer,
std::vector<DRILL_TOOL>& buffer, std::vector<DRILL_TOOL>& buffer,
int format ) int format )
...@@ -766,7 +765,7 @@ void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName, ...@@ -766,7 +765,7 @@ void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName,
break; break;
default: default:
DisplayError( this, wxT( "WinEDA_DrillFrame::GenDrillMap() error" ) ); DisplayError( this, wxT( "DIALOG_GENDRILL::GenDrillMap() error" ) );
return; return;
} }
...@@ -806,7 +805,7 @@ void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName, ...@@ -806,7 +805,7 @@ void WinEDA_DrillFrame::GenDrillMap( const wxString aFileName,
/* /*
* Create a list of drill values and drill count * 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; wxFileName fn;
wxString msg; wxString msg;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment