set eol-style native on new files

This commit is contained in:
raburton 2008-01-16 18:48:04 +00:00
parent 592ab30c0b
commit ed0265cb77
4 changed files with 890 additions and 890 deletions

View File

@ -1,251 +1,251 @@
/***************************************************/ /***************************************************/
/* class and functions to handle a graphic segment */ /* class and functions to handle a graphic segment */
/****************************************************/ /****************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "pcbnew.h" #include "pcbnew.h"
#ifdef CVPCB #ifdef CVPCB
#include "cvpcb.h" #include "cvpcb.h"
#endif #endif
#include "trigo.h" #include "trigo.h"
/* DRAWSEGMENT: constructor */ /* DRAWSEGMENT: constructor */
DRAWSEGMENT::DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype ) : DRAWSEGMENT::DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype ) :
BOARD_ITEM( StructFather, idtype ) BOARD_ITEM( StructFather, idtype )
{ {
m_Width = m_Flags = m_Shape = m_Type = m_Angle = 0; m_Width = m_Flags = m_Shape = m_Type = m_Angle = 0;
} }
/* destructor */ /* destructor */
DRAWSEGMENT:: ~DRAWSEGMENT() DRAWSEGMENT:: ~DRAWSEGMENT()
{ {
} }
void DRAWSEGMENT::UnLink() void DRAWSEGMENT::UnLink()
/** /**
* Function UnLink * Function UnLink
* remove item from linked list. * remove item from linked list.
*/ */
{ {
/* ereas back link */ /* ereas back link */
if( Pback ) if( Pback )
{ {
if( Pback->Type() != TYPEPCB ) if( Pback->Type() != TYPEPCB )
{ {
Pback->Pnext = Pnext; Pback->Pnext = Pnext;
} }
else /* Le chainage arriere pointe sur la structure "Pere" */ else /* Le chainage arriere pointe sur la structure "Pere" */
{ {
( (BOARD*) Pback )->m_Drawings = (BOARD_ITEM*) Pnext; ( (BOARD*) Pback )->m_Drawings = (BOARD_ITEM*) Pnext;
} }
} }
/* erase forward link */ /* erase forward link */
if( Pnext ) if( Pnext )
Pnext->Pback = Pback; Pnext->Pback = Pback;
Pnext = Pback = NULL; Pnext = Pback = NULL;
} }
/*******************************************/ /*******************************************/
void DRAWSEGMENT::Copy( DRAWSEGMENT* source ) void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
/*******************************************/ /*******************************************/
{ {
m_Type = source->m_Type; m_Type = source->m_Type;
m_Layer = source->m_Layer; m_Layer = source->m_Layer;
m_Width = source->m_Width; m_Width = source->m_Width;
m_Start = source->m_Start; m_Start = source->m_Start;
m_End = source->m_End; m_End = source->m_End;
m_Shape = source->m_Shape; m_Shape = source->m_Shape;
m_Angle = source->m_Angle; m_Angle = source->m_Angle;
m_TimeStamp = source->m_TimeStamp; m_TimeStamp = source->m_TimeStamp;
} }
bool DRAWSEGMENT::Save( FILE* aFile ) const bool DRAWSEGMENT::Save( FILE* aFile ) const
{ {
if( GetState( DELETED ) ) if( GetState( DELETED ) )
return true; return true;
bool rc = false; bool rc = false;
if( fprintf( aFile, "$DRAWSEGMENT\n" ) != sizeof("$DRAWSEGMENT\n") - 1 ) if( fprintf( aFile, "$DRAWSEGMENT\n" ) != sizeof("$DRAWSEGMENT\n") - 1 )
goto out; goto out;
fprintf( aFile, "Po %d %d %d %d %d %d\n", fprintf( aFile, "Po %d %d %d %d %d %d\n",
m_Shape, m_Shape,
m_Start.x, m_Start.y, m_Start.x, m_Start.y,
m_End.x, m_End.y, m_Width ); m_End.x, m_End.y, m_Width );
fprintf( aFile, "De %d %d %d %lX %X\n", fprintf( aFile, "De %d %d %d %lX %X\n",
m_Layer, m_Type, m_Angle, m_Layer, m_Type, m_Angle,
m_TimeStamp, ReturnStatus() ); m_TimeStamp, ReturnStatus() );
if( fprintf( aFile, "$EndDRAWSEGMENT\n" ) != sizeof("$EndDRAWSEGMENT\n") - 1 ) if( fprintf( aFile, "$EndDRAWSEGMENT\n" ) != sizeof("$EndDRAWSEGMENT\n") - 1 )
goto out; goto out;
rc = true; rc = true;
out: out:
return rc; return rc;
} }
/******************************************************************/ /******************************************************************/
bool DRAWSEGMENT::ReadDrawSegmentDescr( FILE* File, int* LineNum ) bool DRAWSEGMENT::ReadDrawSegmentDescr( FILE* File, int* LineNum )
/******************************************************************/ /******************************************************************/
/* Read a DRAWSEGMENT from a file /* Read a DRAWSEGMENT from a file
*/ */
{ {
char Line[2048]; char Line[2048];
while( GetLine( File, Line, LineNum ) != NULL ) while( GetLine( File, Line, LineNum ) != NULL )
{ {
if( strnicmp( Line, "$End", 4 ) == 0 ) if( strnicmp( Line, "$End", 4 ) == 0 )
return TRUE; /* End of description */ return TRUE; /* End of description */
if( Line[0] == 'P' ) if( Line[0] == 'P' )
{ {
sscanf( Line + 2, " %d %d %d %d %d %d", sscanf( Line + 2, " %d %d %d %d %d %d",
&m_Shape, &m_Start.x, &m_Start.y, &m_Shape, &m_Start.x, &m_Start.y,
&m_End.x, &m_End.y, &m_Width ); &m_End.x, &m_End.y, &m_Width );
if( m_Width < 0 ) if( m_Width < 0 )
m_Width = 0; m_Width = 0;
} }
if( Line[0] == 'D' ) if( Line[0] == 'D' )
{ {
int status; int status;
sscanf( Line + 2, " %d %d %d %lX %X", sscanf( Line + 2, " %d %d %d %lX %X",
&m_Layer, &m_Type, &m_Angle, &m_Layer, &m_Type, &m_Angle,
&m_TimeStamp, &status ); &m_TimeStamp, &status );
if( m_Layer < FIRST_NO_COPPER_LAYER ) if( m_Layer < FIRST_NO_COPPER_LAYER )
m_Layer = FIRST_NO_COPPER_LAYER; m_Layer = FIRST_NO_COPPER_LAYER;
if( m_Layer > LAST_NO_COPPER_LAYER ) if( m_Layer > LAST_NO_COPPER_LAYER )
m_Layer = LAST_NO_COPPER_LAYER; m_Layer = LAST_NO_COPPER_LAYER;
SetState( status, ON ); SetState( status, ON );
} }
} }
return FALSE; return FALSE;
} }
// see pcbstruct.h // see pcbstruct.h
void DRAWSEGMENT::Display_Infos( WinEDA_DrawFrame* frame ) void DRAWSEGMENT::Display_Infos( WinEDA_DrawFrame* frame )
{ {
int itype; int itype;
wxString msg; wxString msg;
frame->MsgPanel->EraseMsgBox(); frame->MsgPanel->EraseMsgBox();
itype = m_Type & 0x0F; itype = m_Type & 0x0F;
msg = wxT( "DRAWING" ); msg = wxT( "DRAWING" );
Affiche_1_Parametre( frame, 1, _( "Type" ), msg, DARKCYAN ); Affiche_1_Parametre( frame, 1, _( "Type" ), msg, DARKCYAN );
Affiche_1_Parametre( frame, 16, _( "Shape" ), wxEmptyString, RED ); Affiche_1_Parametre( frame, 16, _( "Shape" ), wxEmptyString, RED );
if( m_Shape == S_CIRCLE ) if( m_Shape == S_CIRCLE )
Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Circle" ), RED ); Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Circle" ), RED );
else if( m_Shape == S_ARC ) else if( m_Shape == S_ARC )
{ {
Affiche_1_Parametre( frame, -1, wxEmptyString, _( " Arc " ), RED ); Affiche_1_Parametre( frame, -1, wxEmptyString, _( " Arc " ), RED );
msg.Printf( wxT( "%d" ), m_Angle ); msg.Printf( wxT( "%d" ), m_Angle );
Affiche_1_Parametre( frame, 32, wxT( " l.arc " ), msg, RED ); Affiche_1_Parametre( frame, 32, wxT( " l.arc " ), msg, RED );
} }
else else
Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Segment" ), RED ); Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Segment" ), RED );
Affiche_1_Parametre( frame, 48, _( "Layer" ), Affiche_1_Parametre( frame, 48, _( "Layer" ),
ReturnPcbLayerName( m_Layer ), BROWN ); ReturnPcbLayerName( m_Layer ), BROWN );
valeur_param( (unsigned) m_Width, msg ); valeur_param( (unsigned) m_Width, msg );
Affiche_1_Parametre( frame, 60, _( "Width" ), msg, DARKCYAN ); Affiche_1_Parametre( frame, 60, _( "Width" ), msg, DARKCYAN );
} }
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * tests if the given wxPoint is within the bounds of this object.
* @param ref_pos A wxPoint to test * @param ref_pos A wxPoint to test
* @return bool - true if a hit, else false * @return bool - true if a hit, else false
*/ */
bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos ) bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
{ {
int ux0 = m_Start.x; int ux0 = m_Start.x;
int uy0 = m_Start.y; int uy0 = m_Start.y;
/* recalcul des coordonnees avec ux0, uy0 = origine des coordonnees */ /* recalcul des coordonnees avec ux0, uy0 = origine des coordonnees */
int dx = m_End.x - ux0; int dx = m_End.x - ux0;
int dy = m_End.y - uy0; int dy = m_End.y - uy0;
int spot_cX = ref_pos.x - ux0; int spot_cX = ref_pos.x - ux0;
int spot_cY = ref_pos.y - uy0; int spot_cY = ref_pos.y - uy0;
if( m_Shape==S_CIRCLE || m_Shape==S_ARC ) if( m_Shape==S_CIRCLE || m_Shape==S_ARC )
{ {
int rayon, dist, stAngle, endAngle, mouseAngle; int rayon, dist, stAngle, endAngle, mouseAngle;
rayon = (int) hypot( (double) (dx), (double) (dy) ); rayon = (int) hypot( (double) (dx), (double) (dy) );
dist = (int) hypot( (double) (spot_cX), (double) (spot_cY) ); dist = (int) hypot( (double) (spot_cX), (double) (spot_cY) );
if( abs( rayon - dist ) <= (m_Width / 2) ) if( abs( rayon - dist ) <= (m_Width / 2) )
{ {
if( m_Shape == S_CIRCLE ) if( m_Shape == S_CIRCLE )
return true; return true;
/* pour un arc, controle complementaire */ /* pour un arc, controle complementaire */
mouseAngle = (int) ArcTangente( spot_cY, spot_cX ); mouseAngle = (int) ArcTangente( spot_cY, spot_cX );
stAngle = (int) ArcTangente( dy, dx ); stAngle = (int) ArcTangente( dy, dx );
endAngle = stAngle + m_Angle; endAngle = stAngle + m_Angle;
if( endAngle > 3600 ) if( endAngle > 3600 )
{ {
stAngle -= 3600; stAngle -= 3600;
endAngle -= 3600; endAngle -= 3600;
} }
if( mouseAngle >= stAngle && mouseAngle <= endAngle ) if( mouseAngle >= stAngle && mouseAngle <= endAngle )
return true; return true;
} }
} }
else else
{ {
if( DistanceTest( m_Width / 2, dx, dy, spot_cX, spot_cY ) ) if( DistanceTest( m_Width / 2, dx, dy, spot_cX, spot_cY ) )
return true; return true;
} }
return false; return false;
} }
/** /**
* Function HitTest (overlayed) * Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object. * tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect. * For now, an ending point must be inside this rect.
* @param refArea : the given EDA_Rect * @param refArea : the given EDA_Rect
* @return bool - true if a hit, else false * @return bool - true if a hit, else false
*/ */
bool DRAWSEGMENT::HitTest( EDA_Rect& refArea ) bool DRAWSEGMENT::HitTest( EDA_Rect& refArea )
{ {
if( refArea.Inside( m_Start ) ) if( refArea.Inside( m_Start ) )
return true; return true;
if( refArea.Inside( m_End ) ) if( refArea.Inside( m_End ) )
return true; return true;
return false; return false;
} }

View File

@ -1,91 +1,91 @@
/*************************************/ /*************************************/
/* class to handle a graphic segment */ /* class to handle a graphic segment */
/**************************************/ /**************************************/
#ifndef CLASS_DRAWSEGMENT_H #ifndef CLASS_DRAWSEGMENT_H
#define CLASS_DRAWSEGMENT_H #define CLASS_DRAWSEGMENT_H
class DRAWSEGMENT : public BOARD_ITEM class DRAWSEGMENT : public BOARD_ITEM
{ {
public: public:
int m_Width; // 0 = line. if > 0 = tracks, bus ... int m_Width; // 0 = line. if > 0 = tracks, bus ...
wxPoint m_Start; // Line start point wxPoint m_Start; // Line start point
wxPoint m_End; // Line end point wxPoint m_End; // Line end point
int m_Shape; // Shape: line, Circle, Arc int m_Shape; // Shape: line, Circle, Arc
int m_Type; // Used in complex associations ( Dimensions.. ) int m_Type; // Used in complex associations ( Dimensions.. )
int m_Angle; // Used only for Arcs: Arc angle in 1/10 deg int m_Angle; // Used only for Arcs: Arc angle in 1/10 deg
public: public:
DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype = TYPEDRAWSEGMENT ); DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype = TYPEDRAWSEGMENT );
~DRAWSEGMENT(); ~DRAWSEGMENT();
/** /**
* Function GetPosition * Function GetPosition
* returns the position of this object. * returns the position of this object.
* Required by pure virtual BOARD_ITEM::GetPosition() * Required by pure virtual BOARD_ITEM::GetPosition()
* @return const wxPoint& - The position of this object. * @return const wxPoint& - The position of this object.
*/ */
wxPoint& GetPosition() wxPoint& GetPosition()
{ {
return m_Start; return m_Start;
} }
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.brd" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
bool ReadDrawSegmentDescr( FILE* File, int* LineNum ); bool ReadDrawSegmentDescr( FILE* File, int* LineNum );
/* remove this from the linked list */ /* remove this from the linked list */
void UnLink(); void UnLink();
void Copy( DRAWSEGMENT* source ); void Copy( DRAWSEGMENT* source );
/** /**
* Function Display_Infos * Function Display_Infos
* has knowledge about the frame and how and where to put status information * has knowledge about the frame and how and where to put status information
* about this object into the frame's message panel. * about this object into the frame's message panel.
* Is virtual from EDA_BaseStruct. * Is virtual from EDA_BaseStruct.
* @param frame A WinEDA_BasePcbFrame in which to print status information. * @param frame A WinEDA_BasePcbFrame in which to print status information.
*/ */
void Display_Infos( WinEDA_DrawFrame* frame ); void Display_Infos( WinEDA_DrawFrame* frame );
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * tests if the given wxPoint is within the bounds of this object.
* @param ref_pos A wxPoint to test * @param ref_pos A wxPoint to test
* @return bool - true if a hit, else false * @return bool - true if a hit, else false
*/ */
bool HitTest( const wxPoint& ref_pos ); bool HitTest( const wxPoint& ref_pos );
/** /**
* Function HitTest (overlayed) * Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object. * tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect. * For now, an ending point must be inside this rect.
* @param refPos the given EDA_Rect to test * @param refPos the given EDA_Rect to test
* @return bool - true if a hit, else false * @return bool - true if a hit, else false
*/ */
bool HitTest( EDA_Rect& refArea ); bool HitTest( EDA_Rect& refArea );
/** /**
* Function GetClass * Function GetClass
* returns the class name. * returns the class name.
* @return wxString * @return wxString
*/ */
wxString GetClass() const wxString GetClass() const
{ {
return wxT( "DRAWSEGMENT" ); return wxT( "DRAWSEGMENT" );
} }
}; };
#endif // #ifndef CLASS_DRAWSEGMENT_H #endif // #ifndef CLASS_DRAWSEGMENT_H

View File

@ -1,385 +1,385 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_gendrill.cpp // Name: dialog_gendrill.cpp
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 13/01/2008 17:26:27 // Created: 13/01/2008 17:26:27
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27 // Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27
// For compilers that support precompilation, includes "wx/wx.h". // For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
////@begin includes ////@begin includes
////@end includes ////@end includes
#include "dialog_gendrill.h" #include "dialog_gendrill.h"
////@begin XPM images ////@begin XPM images
////@end XPM images ////@end XPM images
/*! /*!
* WinEDA_DrillFrame type definition * WinEDA_DrillFrame type definition
*/ */
IMPLEMENT_DYNAMIC_CLASS( WinEDA_DrillFrame, wxDialog ) IMPLEMENT_DYNAMIC_CLASS( WinEDA_DrillFrame, wxDialog )
/*! /*!
* WinEDA_DrillFrame event table definition * WinEDA_DrillFrame event table definition
*/ */
BEGIN_EVENT_TABLE( WinEDA_DrillFrame, wxDialog ) BEGIN_EVENT_TABLE( WinEDA_DrillFrame, wxDialog )
////@begin WinEDA_DrillFrame event table entries ////@begin WinEDA_DrillFrame event table entries
EVT_CLOSE( WinEDA_DrillFrame::OnCloseWindow ) EVT_CLOSE( WinEDA_DrillFrame::OnCloseWindow )
EVT_RADIOBOX( ID_SEL_DRILL_UNITS, WinEDA_DrillFrame::OnSelDrillUnitsSelected ) EVT_RADIOBOX( ID_SEL_DRILL_UNITS, WinEDA_DrillFrame::OnSelDrillUnitsSelected )
EVT_RADIOBOX( ID_SEL_ZEROS_FMT, WinEDA_DrillFrame::OnSelZerosFmtSelected ) EVT_RADIOBOX( ID_SEL_ZEROS_FMT, WinEDA_DrillFrame::OnSelZerosFmtSelected )
EVT_BUTTON( wxID_OK, WinEDA_DrillFrame::OnOkClick ) EVT_BUTTON( wxID_OK, WinEDA_DrillFrame::OnOkClick )
EVT_BUTTON( wxID_CLOSE, WinEDA_DrillFrame::OnCloseClick ) EVT_BUTTON( wxID_CLOSE, WinEDA_DrillFrame::OnCloseClick )
////@end WinEDA_DrillFrame event table entries ////@end WinEDA_DrillFrame event table entries
END_EVENT_TABLE() END_EVENT_TABLE()
/*! /*!
* WinEDA_DrillFrame constructors * WinEDA_DrillFrame constructors
*/ */
WinEDA_DrillFrame::WinEDA_DrillFrame() WinEDA_DrillFrame::WinEDA_DrillFrame()
{ {
Init(); Init();
} }
WinEDA_DrillFrame::WinEDA_DrillFrame( WinEDA_PcbFrame* parent, wxWindowID id, WinEDA_DrillFrame::WinEDA_DrillFrame( WinEDA_PcbFrame* parent, wxWindowID id,
const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{ {
m_Parent = parent; m_Parent = parent;
SetFont( *g_DialogFont ); SetFont( *g_DialogFont );
SetReturnCode( 1 ); SetReturnCode( 1 );
Init(); Init();
Create(parent, id, caption, pos, size, style); Create(parent, id, caption, pos, size, style);
} }
/*! /*!
* WinEDA_DrillFrame creator * WinEDA_DrillFrame creator
*/ */
bool WinEDA_DrillFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) bool WinEDA_DrillFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{ {
////@begin WinEDA_DrillFrame creation ////@begin WinEDA_DrillFrame creation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS); SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style ); wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls(); CreateControls();
if (GetSizer()) if (GetSizer())
{ {
GetSizer()->SetSizeHints(this); GetSizer()->SetSizeHints(this);
} }
Centre(); Centre();
////@end WinEDA_DrillFrame creation ////@end WinEDA_DrillFrame creation
return true; return true;
} }
/*! /*!
* WinEDA_DrillFrame destructor * WinEDA_DrillFrame destructor
*/ */
WinEDA_DrillFrame::~WinEDA_DrillFrame() WinEDA_DrillFrame::~WinEDA_DrillFrame()
{ {
////@begin WinEDA_DrillFrame destruction ////@begin WinEDA_DrillFrame destruction
////@end WinEDA_DrillFrame destruction ////@end WinEDA_DrillFrame destruction
} }
/*! /*!
* Member initialisation * Member initialisation
*/ */
void WinEDA_DrillFrame::Init() void WinEDA_DrillFrame::Init()
{ {
////@begin WinEDA_DrillFrame member initialisation ////@begin WinEDA_DrillFrame member initialisation
m_LeftBoxSizer = NULL; m_LeftBoxSizer = NULL;
m_Choice_Unit = NULL; m_Choice_Unit = NULL;
m_Choice_Zeros_Format = NULL; m_Choice_Zeros_Format = NULL;
m_Choice_Precision = NULL; m_Choice_Precision = NULL;
m_Choice_Drill_Offset = NULL; m_Choice_Drill_Offset = NULL;
m_Choice_Drill_Map = NULL; m_Choice_Drill_Map = NULL;
m_Choice_Drill_Report = NULL; m_Choice_Drill_Report = NULL;
m_PenSpeed = NULL; m_PenSpeed = NULL;
m_PenNum = NULL; m_PenNum = NULL;
m_Check_Mirror = NULL; m_Check_Mirror = NULL;
m_Check_Minimal = NULL; m_Check_Minimal = NULL;
m_DefaultViasDrillSizer = NULL; m_DefaultViasDrillSizer = NULL;
m_ViaDrillValue = NULL; m_ViaDrillValue = NULL;
m_MicroViasDrillSizer = NULL; m_MicroViasDrillSizer = NULL;
m_MicroViaDrillValue = NULL; m_MicroViaDrillValue = NULL;
m_PadsCountInfoMsg = NULL; m_PadsCountInfoMsg = NULL;
m_ThroughViasInfoMsg = NULL; m_ThroughViasInfoMsg = NULL;
m_MicroViasInfoMsg = NULL; m_MicroViasInfoMsg = NULL;
m_BuriedViasInfoMsg = NULL; m_BuriedViasInfoMsg = NULL;
////@end WinEDA_DrillFrame member initialisation ////@end WinEDA_DrillFrame member initialisation
} }
/*! /*!
* Control creation for WinEDA_DrillFrame * Control creation for WinEDA_DrillFrame
*/ */
void WinEDA_DrillFrame::CreateControls() void WinEDA_DrillFrame::CreateControls()
{ {
////@begin WinEDA_DrillFrame content construction ////@begin WinEDA_DrillFrame content construction
// Generated by DialogBlocks, 14/01/2008 08:32:06 (unregistered) // Generated by DialogBlocks, 14/01/2008 08:32:06 (unregistered)
WinEDA_DrillFrame* itemDialog1 = this; WinEDA_DrillFrame* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
itemDialog1->SetSizer(itemBoxSizer2); itemDialog1->SetSizer(itemBoxSizer2);
m_LeftBoxSizer = new wxBoxSizer(wxVERTICAL); m_LeftBoxSizer = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(m_LeftBoxSizer, 0, wxGROW|wxALL, 5); itemBoxSizer2->Add(m_LeftBoxSizer, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_UnitStrings; wxArrayString m_Choice_UnitStrings;
m_Choice_UnitStrings.Add(_("Millimeters")); m_Choice_UnitStrings.Add(_("Millimeters"));
m_Choice_UnitStrings.Add(_("Inches")); 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 = new wxRadioBox( itemDialog1, ID_SEL_DRILL_UNITS, _("Drill Units:"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Unit->SetSelection(0); m_Choice_Unit->SetSelection(0);
m_LeftBoxSizer->Add(m_Choice_Unit, 0, wxGROW|wxALL, 5); m_LeftBoxSizer->Add(m_Choice_Unit, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_Zeros_FormatStrings; wxArrayString m_Choice_Zeros_FormatStrings;
m_Choice_Zeros_FormatStrings.Add(_("decimal format")); m_Choice_Zeros_FormatStrings.Add(_("decimal format"));
m_Choice_Zeros_FormatStrings.Add(_("suppress leading zeros")); m_Choice_Zeros_FormatStrings.Add(_("suppress leading zeros"));
m_Choice_Zeros_FormatStrings.Add(_("suppress trailing zeros")); m_Choice_Zeros_FormatStrings.Add(_("suppress trailing zeros"));
m_Choice_Zeros_FormatStrings.Add(_("keep 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 = 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); m_Choice_Zeros_Format->SetSelection(0);
m_LeftBoxSizer->Add(m_Choice_Zeros_Format, 0, wxALIGN_LEFT|wxALL, 5); m_LeftBoxSizer->Add(m_Choice_Zeros_Format, 0, wxALIGN_LEFT|wxALL, 5);
wxArrayString m_Choice_PrecisionStrings; wxArrayString m_Choice_PrecisionStrings;
m_Choice_PrecisionStrings.Add(_("2:3")); m_Choice_PrecisionStrings.Add(_("2:3"));
m_Choice_PrecisionStrings.Add(_("2:4")); 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 = new wxRadioBox( itemDialog1, ID_SEL_PRECISION, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Precision->SetSelection(0); m_Choice_Precision->SetSelection(0);
m_LeftBoxSizer->Add(m_Choice_Precision, 0, wxGROW|wxALL, 5); m_LeftBoxSizer->Add(m_Choice_Precision, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_Drill_OffsetStrings; wxArrayString m_Choice_Drill_OffsetStrings;
m_Choice_Drill_OffsetStrings.Add(_("absolute")); m_Choice_Drill_OffsetStrings.Add(_("absolute"));
m_Choice_Drill_OffsetStrings.Add(_("auxiliary axis")); 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 = 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); m_Choice_Drill_Offset->SetSelection(0);
m_LeftBoxSizer->Add(m_Choice_Drill_Offset, 0, wxGROW|wxALL, 5); m_LeftBoxSizer->Add(m_Choice_Drill_Offset, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer8, 0, wxGROW|wxALL, 5); itemBoxSizer2->Add(itemBoxSizer8, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_Drill_MapStrings; wxArrayString m_Choice_Drill_MapStrings;
m_Choice_Drill_MapStrings.Add(_("None")); m_Choice_Drill_MapStrings.Add(_("None"));
m_Choice_Drill_MapStrings.Add(_("drill sheet (HPGL)")); m_Choice_Drill_MapStrings.Add(_("drill sheet (HPGL)"));
m_Choice_Drill_MapStrings.Add(_("drill sheet (PostScript)")); m_Choice_Drill_MapStrings.Add(_("drill sheet (PostScript)"));
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 = 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); m_Choice_Drill_Map->SetSelection(0);
itemBoxSizer8->Add(m_Choice_Drill_Map, 0, wxGROW|wxALL, 5); itemBoxSizer8->Add(m_Choice_Drill_Map, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_Drill_ReportStrings; wxArrayString m_Choice_Drill_ReportStrings;
m_Choice_Drill_ReportStrings.Add(_("None")); m_Choice_Drill_ReportStrings.Add(_("None"));
m_Choice_Drill_ReportStrings.Add(_("Drill report")); 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 = 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); m_Choice_Drill_Report->SetSelection(0);
itemBoxSizer8->Add(m_Choice_Drill_Report, 0, wxGROW|wxALL, 5); itemBoxSizer8->Add(m_Choice_Drill_Report, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemDialog1, wxID_ANY, _("HPGL plotter Options:")); wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemDialog1, wxID_ANY, _("HPGL plotter Options:"));
wxStaticBoxSizer* itemStaticBoxSizer11 = new wxStaticBoxSizer(itemStaticBoxSizer11Static, wxVERTICAL); wxStaticBoxSizer* itemStaticBoxSizer11 = new wxStaticBoxSizer(itemStaticBoxSizer11Static, wxVERTICAL);
itemBoxSizer8->Add(itemStaticBoxSizer11, 0, wxGROW|wxALL, 5); itemBoxSizer8->Add(itemStaticBoxSizer11, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("Speed (cm/s)"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("Speed (cm/s)"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer11->Add(itemStaticText12, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); itemStaticBoxSizer11->Add(itemStaticText12, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
m_PenSpeed = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_PenSpeed = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer11->Add(m_PenSpeed, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); itemStaticBoxSizer11->Add(m_PenSpeed, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxStaticText* itemStaticText14 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticText* itemStaticText14 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer11->Add(itemStaticText14, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); itemStaticBoxSizer11->Add(itemStaticText14, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
m_PenNum = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_PenNum = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer11->Add(m_PenNum, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); itemStaticBoxSizer11->Add(m_PenNum, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxStaticBox* itemStaticBoxSizer16Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Options:")); wxStaticBox* itemStaticBoxSizer16Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Options:"));
wxStaticBoxSizer* itemStaticBoxSizer16 = new wxStaticBoxSizer(itemStaticBoxSizer16Static, wxVERTICAL); wxStaticBoxSizer* itemStaticBoxSizer16 = new wxStaticBoxSizer(itemStaticBoxSizer16Static, wxVERTICAL);
itemStaticBoxSizer11->Add(itemStaticBoxSizer16, 0, wxGROW|wxALL, 5); itemStaticBoxSizer11->Add(itemStaticBoxSizer16, 0, wxGROW|wxALL, 5);
m_Check_Mirror = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 ); m_Check_Mirror = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 );
m_Check_Mirror->SetValue(false); m_Check_Mirror->SetValue(false);
itemStaticBoxSizer16->Add(m_Check_Mirror, 0, wxGROW|wxALL, 5); 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 = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
m_Check_Minimal->SetValue(false); m_Check_Minimal->SetValue(false);
itemStaticBoxSizer16->Add(m_Check_Minimal, 0, wxGROW|wxALL, 5); itemStaticBoxSizer16->Add(m_Check_Minimal, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer19, 0, wxGROW|wxALL, 5); itemBoxSizer2->Add(itemBoxSizer19, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer20Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Info:")); wxStaticBox* itemStaticBoxSizer20Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Info:"));
wxStaticBoxSizer* itemStaticBoxSizer20 = new wxStaticBoxSizer(itemStaticBoxSizer20Static, wxVERTICAL); wxStaticBoxSizer* itemStaticBoxSizer20 = new wxStaticBoxSizer(itemStaticBoxSizer20Static, wxVERTICAL);
itemBoxSizer19->Add(itemStaticBoxSizer20, 0, wxGROW|wxALL, 5); itemBoxSizer19->Add(itemStaticBoxSizer20, 0, wxGROW|wxALL, 5);
m_DefaultViasDrillSizer = new wxStaticBox(itemDialog1, wxID_ANY, _("Default Vias Drill:")); m_DefaultViasDrillSizer = new wxStaticBox(itemDialog1, wxID_ANY, _("Default Vias Drill:"));
wxStaticBoxSizer* itemStaticBoxSizer21 = new wxStaticBoxSizer(m_DefaultViasDrillSizer, wxVERTICAL); wxStaticBoxSizer* itemStaticBoxSizer21 = new wxStaticBoxSizer(m_DefaultViasDrillSizer, wxVERTICAL);
itemStaticBoxSizer20->Add(itemStaticBoxSizer21, 0, wxGROW|wxALL, 5); itemStaticBoxSizer20->Add(itemStaticBoxSizer21, 0, wxGROW|wxALL, 5);
m_ViaDrillValue = new wxStaticText( itemDialog1, wxID_STATIC, _("Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 ); m_ViaDrillValue = new wxStaticText( itemDialog1, wxID_STATIC, _("Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer21->Add(m_ViaDrillValue, 0, wxGROW|wxALL, 5); itemStaticBoxSizer21->Add(m_ViaDrillValue, 0, wxGROW|wxALL, 5);
m_MicroViasDrillSizer = new wxStaticBox(itemDialog1, wxID_ANY, _("Micro Vias Drill:")); m_MicroViasDrillSizer = new wxStaticBox(itemDialog1, wxID_ANY, _("Micro Vias Drill:"));
wxStaticBoxSizer* itemStaticBoxSizer23 = new wxStaticBoxSizer(m_MicroViasDrillSizer, wxVERTICAL); wxStaticBoxSizer* itemStaticBoxSizer23 = new wxStaticBoxSizer(m_MicroViasDrillSizer, wxVERTICAL);
itemStaticBoxSizer20->Add(itemStaticBoxSizer23, 0, wxGROW|wxALL, 5); itemStaticBoxSizer20->Add(itemStaticBoxSizer23, 0, wxGROW|wxALL, 5);
m_MicroViaDrillValue = new wxStaticText( itemDialog1, wxID_STATIC, _("Micro Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 ); m_MicroViaDrillValue = new wxStaticText( itemDialog1, wxID_STATIC, _("Micro Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer23->Add(m_MicroViaDrillValue, 0, wxGROW|wxALL, 5); itemStaticBoxSizer23->Add(m_MicroViaDrillValue, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer25Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Holes Count:")); wxStaticBox* itemStaticBoxSizer25Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Holes Count:"));
wxStaticBoxSizer* itemStaticBoxSizer25 = new wxStaticBoxSizer(itemStaticBoxSizer25Static, wxVERTICAL); wxStaticBoxSizer* itemStaticBoxSizer25 = new wxStaticBoxSizer(itemStaticBoxSizer25Static, wxVERTICAL);
itemStaticBoxSizer20->Add(itemStaticBoxSizer25, 0, wxGROW|wxALL, 5); itemStaticBoxSizer20->Add(itemStaticBoxSizer25, 0, wxGROW|wxALL, 5);
m_PadsCountInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Pads:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadsCountInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer25->Add(m_PadsCountInfoMsg, 0, wxGROW|wxALL, 5); itemStaticBoxSizer25->Add(m_PadsCountInfoMsg, 0, wxGROW|wxALL, 5);
m_ThroughViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); m_ThroughViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer25->Add(m_ThroughViasInfoMsg, 0, wxGROW|wxALL, 5); itemStaticBoxSizer25->Add(m_ThroughViasInfoMsg, 0, wxGROW|wxALL, 5);
m_MicroViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); m_MicroViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer25->Add(m_MicroViasInfoMsg, 0, wxGROW|wxALL, 5); itemStaticBoxSizer25->Add(m_MicroViasInfoMsg, 0, wxGROW|wxALL, 5);
m_BuriedViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); m_BuriedViasInfoMsg = new wxStaticText( itemDialog1, wxID_STATIC, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer25->Add(m_BuriedViasInfoMsg, 0, wxGROW|wxALL, 5); itemStaticBoxSizer25->Add(m_BuriedViasInfoMsg, 0, wxGROW|wxALL, 5);
itemBoxSizer19->Add(5, 5, 1, wxGROW|wxALL, 5); itemBoxSizer19->Add(5, 5, 1, wxGROW|wxALL, 5);
wxButton* itemButton31 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton31 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton31->SetForegroundColour(wxColour(156, 1, 5)); itemButton31->SetForegroundColour(wxColour(156, 1, 5));
itemBoxSizer19->Add(itemButton31, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemBoxSizer19->Add(itemButton31, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton32 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton32 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton32->SetForegroundColour(wxColour(16, 1, 205)); itemButton32->SetForegroundColour(wxColour(16, 1, 205));
itemBoxSizer19->Add(itemButton32, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemBoxSizer19->Add(itemButton32, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
// Set validators // Set validators
m_Choice_Unit->SetValidator( wxGenericValidator(& s_Unit_Drill_is_Inch) ); m_Choice_Unit->SetValidator( wxGenericValidator(& s_Unit_Drill_is_Inch) );
m_Choice_Zeros_Format->SetValidator( wxGenericValidator(& s_Zeros_Format) ); m_Choice_Zeros_Format->SetValidator( wxGenericValidator(& s_Zeros_Format) );
m_Check_Mirror->SetValidator( wxGenericValidator(& Mirror) ); m_Check_Mirror->SetValidator( wxGenericValidator(& Mirror) );
m_Check_Minimal->SetValidator( wxGenericValidator(& Minimal) ); m_Check_Minimal->SetValidator( wxGenericValidator(& Minimal) );
////@end WinEDA_DrillFrame content construction ////@end WinEDA_DrillFrame content construction
InitDisplayParams(); InitDisplayParams();
} }
/*! /*!
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX
*/ */
void WinEDA_DrillFrame::OnSelDrillUnitsSelected( wxCommandEvent& event ) void WinEDA_DrillFrame::OnSelDrillUnitsSelected( wxCommandEvent& event )
{ {
UpdatePrecisionOptions(event); UpdatePrecisionOptions(event);
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
*/ */
void WinEDA_DrillFrame::OnOkClick( wxCommandEvent& event ) void WinEDA_DrillFrame::OnOkClick( wxCommandEvent& event )
{ {
GenDrillFiles(event); GenDrillFiles(event);
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/ */
void WinEDA_DrillFrame::OnCloseClick( wxCommandEvent& event ) void WinEDA_DrillFrame::OnCloseClick( wxCommandEvent& event )
{ {
UpdateConfig(); /* Save drill options: */ UpdateConfig(); /* Save drill options: */
Close( true ); // true is to force the frame to close Close( true ); // true is to force the frame to close
} }
/*! /*!
* Should we show tooltips? * Should we show tooltips?
*/ */
bool WinEDA_DrillFrame::ShowToolTips() bool WinEDA_DrillFrame::ShowToolTips()
{ {
return true; return true;
} }
/*! /*!
* Get bitmap resources * Get bitmap resources
*/ */
wxBitmap WinEDA_DrillFrame::GetBitmapResource( const wxString& name ) wxBitmap WinEDA_DrillFrame::GetBitmapResource( const wxString& name )
{ {
// Bitmap retrieval // Bitmap retrieval
////@begin WinEDA_DrillFrame bitmap retrieval ////@begin WinEDA_DrillFrame bitmap retrieval
wxUnusedVar(name); wxUnusedVar(name);
return wxNullBitmap; return wxNullBitmap;
////@end WinEDA_DrillFrame bitmap retrieval ////@end WinEDA_DrillFrame bitmap retrieval
} }
/*! /*!
* Get icon resources * Get icon resources
*/ */
wxIcon WinEDA_DrillFrame::GetIconResource( const wxString& name ) wxIcon WinEDA_DrillFrame::GetIconResource( const wxString& name )
{ {
// Icon retrieval // Icon retrieval
////@begin WinEDA_DrillFrame icon retrieval ////@begin WinEDA_DrillFrame icon retrieval
wxUnusedVar(name); wxUnusedVar(name);
return wxNullIcon; return wxNullIcon;
////@end WinEDA_DrillFrame icon retrieval ////@end WinEDA_DrillFrame icon retrieval
} }
/*! /*!
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_ZEROS_FMT * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_ZEROS_FMT
*/ */
void WinEDA_DrillFrame::OnSelZerosFmtSelected( wxCommandEvent& event ) void WinEDA_DrillFrame::OnSelZerosFmtSelected( wxCommandEvent& event )
{ {
UpdatePrecisionOptions(event); UpdatePrecisionOptions(event);
} }
/*! /*!
* wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME * wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME
*/ */
void WinEDA_DrillFrame::OnCloseWindow( wxCloseEvent& event ) void WinEDA_DrillFrame::OnCloseWindow( wxCloseEvent& event )
{ {
////@begin wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame. ////@begin wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame.
// Before editing this code, remove the block markers. // Before editing this code, remove the block markers.
event.Skip(); event.Skip();
////@end wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame. ////@end wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME in WinEDA_DrillFrame.
} }

View File

@ -1,163 +1,163 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_gendrill.h // Name: dialog_gendrill.h
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 13/01/2008 17:26:27 // Created: 13/01/2008 17:26:27
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27 // Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27
#ifndef _DIALOG_GENDRILL_H_ #ifndef _DIALOG_GENDRILL_H_
#define _DIALOG_GENDRILL_H_ #define _DIALOG_GENDRILL_H_
/*! /*!
* Includes * Includes
*/ */
////@begin includes ////@begin includes
#include "wx/valgen.h" #include "wx/valgen.h"
////@end includes ////@end includes
/*! /*!
* Forward declarations * Forward declarations
*/ */
////@begin forward declarations ////@begin forward declarations
class wxBoxSizer; class wxBoxSizer;
////@end forward declarations ////@end forward declarations
/*! /*!
* Control identifiers * Control identifiers
*/ */
////@begin control identifiers ////@begin control identifiers
#define ID_WINEDA_DRILLFRAME 10000 #define ID_WINEDA_DRILLFRAME 10000
#define ID_SEL_DRILL_UNITS 10002 #define ID_SEL_DRILL_UNITS 10002
#define ID_SEL_ZEROS_FMT 10001 #define ID_SEL_ZEROS_FMT 10001
#define ID_SEL_PRECISION 10003 #define ID_SEL_PRECISION 10003
#define ID_SEL_DRILL_SHEET 10004 #define ID_SEL_DRILL_SHEET 10004
#define ID_SEL_DRILL_REPORT 10010 #define ID_SEL_DRILL_REPORT 10010
#define ID_TEXTCTRL2 10007 #define ID_TEXTCTRL2 10007
#define ID_TEXTCTRL 10006 #define ID_TEXTCTRL 10006
#define ID_CHECKBOX2 10011 #define ID_CHECKBOX2 10011
#define ID_CHECKBOX3 10012 #define ID_CHECKBOX3 10012
#define SYMBOL_WINEDA_DRILLFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL #define SYMBOL_WINEDA_DRILLFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_WINEDA_DRILLFRAME_TITLE _("WinEDA_DrillFrame") #define SYMBOL_WINEDA_DRILLFRAME_TITLE _("WinEDA_DrillFrame")
#define SYMBOL_WINEDA_DRILLFRAME_IDNAME ID_WINEDA_DRILLFRAME #define SYMBOL_WINEDA_DRILLFRAME_IDNAME ID_WINEDA_DRILLFRAME
#define SYMBOL_WINEDA_DRILLFRAME_SIZE wxSize(400, 300) #define SYMBOL_WINEDA_DRILLFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_DRILLFRAME_POSITION wxDefaultPosition #define SYMBOL_WINEDA_DRILLFRAME_POSITION wxDefaultPosition
////@end control identifiers ////@end control identifiers
/*! /*!
* WinEDA_DrillFrame class declaration * WinEDA_DrillFrame class declaration
*/ */
class WinEDA_DrillFrame: public wxDialog class WinEDA_DrillFrame: public wxDialog
{ {
DECLARE_DYNAMIC_CLASS( WinEDA_DrillFrame ) DECLARE_DYNAMIC_CLASS( WinEDA_DrillFrame )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
public: public:
/// Constructors /// Constructors
WinEDA_DrillFrame(); WinEDA_DrillFrame();
WinEDA_DrillFrame( WinEDA_PcbFrame* parent, WinEDA_DrillFrame( WinEDA_PcbFrame* parent,
wxWindowID id = SYMBOL_WINEDA_DRILLFRAME_IDNAME, wxWindowID id = SYMBOL_WINEDA_DRILLFRAME_IDNAME,
const wxString& caption = SYMBOL_WINEDA_DRILLFRAME_TITLE, const wxString& caption = SYMBOL_WINEDA_DRILLFRAME_TITLE,
const wxPoint& pos = SYMBOL_WINEDA_DRILLFRAME_POSITION, const wxPoint& pos = SYMBOL_WINEDA_DRILLFRAME_POSITION,
const wxSize& size = SYMBOL_WINEDA_DRILLFRAME_SIZE, const wxSize& size = SYMBOL_WINEDA_DRILLFRAME_SIZE,
long style = SYMBOL_WINEDA_DRILLFRAME_STYLE ); long style = SYMBOL_WINEDA_DRILLFRAME_STYLE );
/// Creation /// 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 ); 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 /// Destructor
~WinEDA_DrillFrame(); ~WinEDA_DrillFrame();
/// Initialises member variables /// Initialises member variables
void Init(); void Init();
/// Creates the controls and sizers /// Creates the controls and sizers
void CreateControls(); void CreateControls();
////@begin WinEDA_DrillFrame event handler declarations ////@begin WinEDA_DrillFrame event handler declarations
/// wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME /// wxEVT_CLOSE_WINDOW event handler for ID_WINEDA_DRILLFRAME
void OnCloseWindow( wxCloseEvent& event ); 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 );
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_ZEROS_FMT /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_SEL_ZEROS_FMT
void OnSelZerosFmtSelected( wxCommandEvent& event ); void OnSelZerosFmtSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOkClick( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
void OnCloseClick( wxCommandEvent& event ); void OnCloseClick( wxCommandEvent& event );
////@end WinEDA_DrillFrame event handler declarations ////@end WinEDA_DrillFrame event handler declarations
////@begin WinEDA_DrillFrame member function declarations ////@begin WinEDA_DrillFrame member function declarations
/// Retrieves bitmap resources /// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name ); wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources /// Retrieves icon resources
wxIcon GetIconResource( const wxString& name ); wxIcon GetIconResource( const wxString& name );
////@end WinEDA_DrillFrame member function declarations ////@end WinEDA_DrillFrame member function declarations
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips(); static bool ShowToolTips();
////@begin WinEDA_DrillFrame member variables ////@begin WinEDA_DrillFrame member variables
wxBoxSizer* m_LeftBoxSizer; wxBoxSizer* m_LeftBoxSizer;
wxRadioBox* m_Choice_Unit; wxRadioBox* m_Choice_Unit;
wxRadioBox* m_Choice_Zeros_Format; wxRadioBox* m_Choice_Zeros_Format;
wxRadioBox* m_Choice_Precision; wxRadioBox* m_Choice_Precision;
wxRadioBox* m_Choice_Drill_Offset; wxRadioBox* m_Choice_Drill_Offset;
wxRadioBox* m_Choice_Drill_Map; wxRadioBox* m_Choice_Drill_Map;
wxRadioBox* m_Choice_Drill_Report; wxRadioBox* m_Choice_Drill_Report;
wxTextCtrl* m_PenSpeed; wxTextCtrl* m_PenSpeed;
wxTextCtrl* m_PenNum; wxTextCtrl* m_PenNum;
wxCheckBox* m_Check_Mirror; wxCheckBox* m_Check_Mirror;
wxCheckBox* m_Check_Minimal; wxCheckBox* m_Check_Minimal;
wxStaticBox* m_DefaultViasDrillSizer; wxStaticBox* m_DefaultViasDrillSizer;
wxStaticText* m_ViaDrillValue; wxStaticText* m_ViaDrillValue;
wxStaticBox* m_MicroViasDrillSizer; wxStaticBox* m_MicroViasDrillSizer;
wxStaticText* m_MicroViaDrillValue; wxStaticText* m_MicroViaDrillValue;
wxStaticText* m_PadsCountInfoMsg; wxStaticText* m_PadsCountInfoMsg;
wxStaticText* m_ThroughViasInfoMsg; wxStaticText* m_ThroughViasInfoMsg;
wxStaticText* m_MicroViasInfoMsg; wxStaticText* m_MicroViasInfoMsg;
wxStaticText* m_BuriedViasInfoMsg; wxStaticText* m_BuriedViasInfoMsg;
////@end WinEDA_DrillFrame member variables ////@end WinEDA_DrillFrame member variables
private: private:
WinEDA_PcbFrame* m_Parent; WinEDA_PcbFrame* m_Parent;
int m_PadsHoleCount; int m_PadsHoleCount;
int m_ThroughViasCount; int m_ThroughViasCount;
int m_MicroViasCount; int m_MicroViasCount;
int m_BlindOrBuriedViasCount; int m_BlindOrBuriedViasCount;
private: private:
void InitDisplayParams(void); void InitDisplayParams(void);
void SetParams(void); void SetParams(void);
void GenDrillFiles( wxCommandEvent& event ); void GenDrillFiles( wxCommandEvent& event );
void GenDrillMap( int format ); void GenDrillMap( int format );
void UpdatePrecisionOptions( wxCommandEvent& event ); void UpdatePrecisionOptions( wxCommandEvent& event );
void UpdateConfig(); void UpdateConfig();
int Plot_Drill_PcbMap( DRILL_TOOL* buffer, int format ); int Plot_Drill_PcbMap( DRILL_TOOL* buffer, int format );
void GenDrillReport(); void GenDrillReport();
int Gen_Liste_Forets( DRILL_TOOL* buffer, bool print_header ); int Gen_Liste_Forets( DRILL_TOOL* buffer, bool print_header );
int Create_Drill_File_EXCELLON( DRILL_TOOL* buffer ); int Create_Drill_File_EXCELLON( DRILL_TOOL* buffer );
void Init_Drill(); void Init_Drill();
}; };
#endif #endif
// _DIALOG_GENDRILL_H_ // _DIALOG_GENDRILL_H_