2008-01-16 18:48:04 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dialog_gendrill.cpp
|
|
|
|
// Author: jean-pierre Charras
|
2010-04-30 18:39:10 +00:00
|
|
|
// Licence: GPL
|
2008-01-16 18:48:04 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
#include "fctsys.h"
|
|
|
|
#include "pcbnew.h"
|
|
|
|
#include "wxPcbStruct.h"
|
|
|
|
#include "gendrill.h"
|
2008-01-16 18:48:04 +00:00
|
|
|
|
|
|
|
#include "dialog_gendrill.h"
|
|
|
|
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
DIALOG_GENDRILL::DIALOG_GENDRILL( WinEDA_PcbFrame* parent )
|
|
|
|
: DIALOG_GENDRILL_BASE( parent )
|
2008-01-16 18:48:04 +00:00
|
|
|
{
|
|
|
|
m_Parent = parent;
|
|
|
|
|
|
|
|
SetReturnCode( 1 );
|
2010-04-30 18:39:10 +00:00
|
|
|
initDialog();
|
|
|
|
GetSizer()->SetSizeHints( this );
|
|
|
|
Centre( );
|
2008-01-16 18:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2010-04-30 18:39:10 +00:00
|
|
|
* DIALOG_GENDRILL destructor
|
2008-01-16 18:48:04 +00:00
|
|
|
*/
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
DIALOG_GENDRILL::~DIALOG_GENDRILL()
|
2008-01-16 18:48:04 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Member initialisation
|
|
|
|
*/
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
void DIALOG_GENDRILL::initDialog()
|
2008-08-16 17:42:40 +00:00
|
|
|
{
|
|
|
|
SetFocus(); // Under wxGTK: mandatory to close dialog by the ESC key
|
2008-01-16 18:48:04 +00:00
|
|
|
InitDisplayParams();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX
|
|
|
|
*/
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event )
|
2008-01-16 18:48:04 +00:00
|
|
|
{
|
|
|
|
UpdatePrecisionOptions(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
|
|
|
*/
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event )
|
2008-01-16 18:48:04 +00:00
|
|
|
{
|
|
|
|
GenDrillFiles(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
|
|
|
|
*/
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event )
|
2008-01-16 18:48:04 +00:00
|
|
|
{
|
|
|
|
UpdateConfig(); /* Save drill options: */
|
2008-08-16 17:42:40 +00:00
|
|
|
event.Skip(); // Process the default cancel event (close dialog)
|
2008-01-16 18:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_ZEROS_FMT
|
|
|
|
*/
|
|
|
|
|
2010-04-30 18:39:10 +00:00
|
|
|
void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event )
|
2008-01-16 18:48:04 +00:00
|
|
|
{
|
|
|
|
UpdatePrecisionOptions(event);
|
|
|
|
}
|
|
|
|
|