kicad/pcbnew/dialog_gendrill.cpp

86 lines
1.6 KiB
C++
Raw Normal View History

2008-01-16 18:48:04 +00:00
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_gendrill.cpp
// Author: jean-pierre Charras
// Licence: GPL
2008-01-16 18:48:04 +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"
DIALOG_GENDRILL::DIALOG_GENDRILL( WinEDA_PcbFrame* parent )
: DIALOG_GENDRILL_BASE( parent )
2008-01-16 18:48:04 +00:00
{
m_Parent = parent;
SetReturnCode( 1 );
initDialog();
GetSizer()->SetSizeHints( this );
Centre( );
2008-01-16 18:48:04 +00:00
}
/*!
* DIALOG_GENDRILL destructor
2008-01-16 18:48:04 +00:00
*/
DIALOG_GENDRILL::~DIALOG_GENDRILL()
2008-01-16 18:48:04 +00:00
{
}
/*!
* Member initialisation
*/
void DIALOG_GENDRILL::initDialog()
{
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
*/
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
*/
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
*/
void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event )
2008-01-16 18:48:04 +00:00
{
UpdateConfig(); /* Save drill options: */
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
*/
void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event )
2008-01-16 18:48:04 +00:00
{
UpdatePrecisionOptions(event);
}