Add PCBNew setting to remember last net list read and other minor fixes.
* PCBNew remembers last net list read during the current editing session as well as between project editing sessions. Closes bug 576902. * Separate PCBNew application settings from project file settings and allocate them dynamically instead of statically to make it easier to eliminate global variables.
This commit is contained in:
parent
5849675ad5
commit
c58c388aba
5
TODO.txt
5
TODO.txt
|
@ -78,8 +78,9 @@ GerbView
|
||||||
* Add excellon2 drill file support (small good library)
|
* Add excellon2 drill file support (small good library)
|
||||||
* Fix the polygon bug.
|
* Fix the polygon bug.
|
||||||
* Switch to use ZONE instead of SEGZONE for polygons.
|
* Switch to use ZONE instead of SEGZONE for polygons.
|
||||||
|
* Separate application settings and project configuration settings by converting
|
||||||
|
static list of parameters in gerbview_config.h to dynamically created lists of
|
||||||
|
settings. See eeschema/eeschema_config.cpp for an example.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "base_struct.h"
|
#include "base_struct.h"
|
||||||
|
#include "param_config.h"
|
||||||
|
|
||||||
#ifndef PCB_INTERNAL_UNIT
|
#ifndef PCB_INTERNAL_UNIT
|
||||||
#define PCB_INTERNAL_UNIT 10000
|
#define PCB_INTERNAL_UNIT 10000
|
||||||
|
@ -39,8 +40,7 @@ class PCB_LAYER_WIDGET;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @info see also class WinEDA_BasePcbFrame: Basic class for pcbnew and
|
* @info see also class WinEDA_BasePcbFrame: Basic class for pcbnew and gerbview.
|
||||||
*gerbview
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,6 +57,11 @@ protected:
|
||||||
|
|
||||||
DRC* m_drc; ///< the DRC controller, see drc.cpp
|
DRC* m_drc; ///< the DRC controller, see drc.cpp
|
||||||
|
|
||||||
|
PARAM_CFG_ARRAY m_projectFileParams; ///< List of PCBNew project file settings.
|
||||||
|
PARAM_CFG_ARRAY m_configSettings; ///< List of PCBNew configuration settings.
|
||||||
|
|
||||||
|
wxString m_lastNetListRead; ///< Last net list read with relative path.
|
||||||
|
|
||||||
// we'll use lower case function names for private member functions.
|
// we'll use lower case function names for private member functions.
|
||||||
void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu );
|
void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu );
|
||||||
void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu );
|
void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu );
|
||||||
|
@ -168,7 +173,7 @@ public:
|
||||||
|
|
||||||
/** Function SetGridVisibility() , virtual
|
/** Function SetGridVisibility() , virtual
|
||||||
* It may be overloaded by derived classes
|
* It may be overloaded by derived classes
|
||||||
* if you want to store/retrieve the grid visiblity in configuration.
|
* if you want to store/retrieve the grid visibility in configuration.
|
||||||
* @param aVisible = true if the grid must be shown
|
* @param aVisible = true if the grid must be shown
|
||||||
*/
|
*/
|
||||||
virtual void SetGridVisibility(bool aVisible);
|
virtual void SetGridVisibility(bool aVisible);
|
||||||
|
@ -186,16 +191,67 @@ public:
|
||||||
// Configurations:
|
// Configurations:
|
||||||
void InstallConfigFrame( const wxPoint& pos );
|
void InstallConfigFrame( const wxPoint& pos );
|
||||||
void Process_Config( wxCommandEvent& event );
|
void Process_Config( wxCommandEvent& event );
|
||||||
void Update_config( wxWindow* displayframe );
|
|
||||||
|
|
||||||
/** Function Read_Config
|
PARAM_CFG_ARRAY& GetProjectFileParameters();
|
||||||
* Read the project configuration file
|
void SaveProjectSettings();
|
||||||
* @param projectFileName = the config filename
|
|
||||||
* if not found use kicad.pro
|
/**
|
||||||
* if not found : initialize default values
|
* Load the project file configuration settings.
|
||||||
* @return true if the current config is modified, false if no change
|
*
|
||||||
|
* @param aProjectFileName = The project filename.
|
||||||
|
* if not found use kicad.pro and initialize default values
|
||||||
|
* @return always returns true.
|
||||||
*/
|
*/
|
||||||
bool Read_Config( const wxString& projectFileName );
|
bool LoadProjectSettings( const wxString& aProjectFileName );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the list of application specific settings.
|
||||||
|
*
|
||||||
|
* @return - Reference to the list of applications settings.
|
||||||
|
*/
|
||||||
|
PARAM_CFG_ARRAY& GetConfigurationSettings();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load applications settings specific to PCBNew.
|
||||||
|
*
|
||||||
|
* This overrides the base class WinEDA_BasePcbFrame::LoadSettings() to
|
||||||
|
* handle settings specific common to the PCB layout application. It
|
||||||
|
* calls down to the base class to load settings common to all PCB type
|
||||||
|
* drawing frames. Please put your application settings for PCBNew here
|
||||||
|
* to avoid having application settings loaded all over the place.
|
||||||
|
*/
|
||||||
|
virtual void LoadSettings();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save applications settings common to PCBNew.
|
||||||
|
*
|
||||||
|
* This overrides the base class WinEDA_BasePcbFrame::SaveSettings() to
|
||||||
|
* save settings specific to the PCB layout application main window. It
|
||||||
|
* calls down to the base class to save settings common to all PCB type
|
||||||
|
* drawing frames. Please put your application settings for PCBNew here
|
||||||
|
* to avoid having application settings saved all over the place.
|
||||||
|
*/
|
||||||
|
virtual void SaveSettings();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the last net list read with the net list dialog box.
|
||||||
|
*
|
||||||
|
* @return - Absolute path and file name of the last net list file successfully read.
|
||||||
|
*/
|
||||||
|
wxString GetLastNetListRead();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the last net list successfully read by the net list dialog box.
|
||||||
|
*
|
||||||
|
* Note: the file path is converted to a path relative to the project file path. If
|
||||||
|
* the path cannot be made relative, than m_lastNetListRead is set to and empty
|
||||||
|
* string. This could happen when the net list file is on a different drive than
|
||||||
|
* the project file. The advantage of relative paths is that is more likely to
|
||||||
|
* work when opening the same project from both Windows and Linux.
|
||||||
|
*
|
||||||
|
* @param aNetListFile - The last net list file with full path successfully read.
|
||||||
|
*/
|
||||||
|
void SetLastNetListRead( const wxString& aNetListFile );
|
||||||
|
|
||||||
void OnHotKey( wxDC* DC,
|
void OnHotKey( wxDC* DC,
|
||||||
int hotkey,
|
int hotkey,
|
||||||
|
@ -287,7 +343,7 @@ public:
|
||||||
* Function OnRightClick
|
* Function OnRightClick
|
||||||
* populates a popup menu with the choices appropriate for the current
|
* populates a popup menu with the choices appropriate for the current
|
||||||
*context.
|
*context.
|
||||||
* The caller will add the ZOOM menu choices afterwards.
|
* The caller will add the ZOOM menu choices afterward.
|
||||||
* @param aMousePos The current mouse position
|
* @param aMousePos The current mouse position
|
||||||
* @param aPopMenu The menu to add to.
|
* @param aPopMenu The menu to add to.
|
||||||
*/
|
*/
|
||||||
|
@ -331,7 +387,7 @@ public:
|
||||||
* @param aRedoCommand = a bool: true for redo, false for undo
|
* @param aRedoCommand = a bool: true for redo, false for undo
|
||||||
* @param aRebuildRatsnet = a bool: true to rebuild ratsnet (normal use),
|
* @param aRebuildRatsnet = a bool: true to rebuild ratsnet (normal use),
|
||||||
* false
|
* false
|
||||||
* to just retrieve las state (used in abort commands that do not need to
|
* to just retrieve last state (used in abort commands that do not need to
|
||||||
* rebuild ratsnest)
|
* rebuild ratsnest)
|
||||||
*/
|
*/
|
||||||
void PutDataInPreviousState( PICKED_ITEMS_LIST* aList,
|
void PutDataInPreviousState( PICKED_ITEMS_LIST* aList,
|
||||||
|
@ -420,7 +476,7 @@ public:
|
||||||
|
|
||||||
void SetToolbars();
|
void SetToolbars();
|
||||||
void Process_Settings( wxCommandEvent& event );
|
void Process_Settings( wxCommandEvent& event );
|
||||||
void InstallPcbOptionsFrame( int id );
|
void OnConfigurePcbOptions( wxCommandEvent& aEvent );
|
||||||
void InstallDisplayOptionsDialog( wxCommandEvent& aEvent );
|
void InstallDisplayOptionsDialog( wxCommandEvent& aEvent );
|
||||||
void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
|
void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
|
||||||
|
|
||||||
|
@ -963,28 +1019,6 @@ public:
|
||||||
void Begin_Self( wxDC* DC );
|
void Begin_Self( wxDC* DC );
|
||||||
MODULE* Genere_Self( wxDC* DC );
|
MODULE* Genere_Self( wxDC* DC );
|
||||||
|
|
||||||
/**
|
|
||||||
* Load applications settings specific to the PCBNew.
|
|
||||||
*
|
|
||||||
* This overrides the base class WinEDA_BasePcbFrame::LoadSettings() to
|
|
||||||
* handle settings specific common to the PCB layout application. It
|
|
||||||
* calls down to the base class to load settings common to all PCB type
|
|
||||||
* drawing frames. Please put your application settings for PCBNew here
|
|
||||||
* to avoid having application settings loaded all over the place.
|
|
||||||
*/
|
|
||||||
virtual void LoadSettings();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save applications settings common to PCB draw frame objects.
|
|
||||||
*
|
|
||||||
* This overrides the base class WinEDA_BasePcbFrame::SaveSettings() to
|
|
||||||
* save settings specific to the PCB layout application main window. It
|
|
||||||
* calls down to the base class to save settings common to all PCB type
|
|
||||||
* drawing frames. Please put your application settings for PCBNew here
|
|
||||||
* to avoid having application settings saved all over the place.
|
|
||||||
*/
|
|
||||||
virtual void SaveSettings();
|
|
||||||
|
|
||||||
/** function SetLanguage
|
/** function SetLanguage
|
||||||
* called on a language menu selection
|
* called on a language menu selection
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -99,7 +99,7 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
|
||||||
g_MagneticPadOption = m_MagneticPadOptCtrl->GetSelection();
|
g_MagneticPadOption = m_MagneticPadOptCtrl->GetSelection();
|
||||||
g_MagneticTrackOption = m_MagneticTrackOptCtrl->GetSelection();
|
g_MagneticTrackOption = m_MagneticTrackOptCtrl->GetSelection();
|
||||||
|
|
||||||
EndModal( 1 );
|
EndModal( wxID_OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,21 +16,11 @@
|
||||||
extern int g_DrawDefaultLineThickness;
|
extern int g_DrawDefaultLineThickness;
|
||||||
|
|
||||||
|
|
||||||
void WinEDA_PcbFrame::InstallPcbOptionsFrame( int id )
|
void WinEDA_PcbFrame::OnConfigurePcbOptions( wxCommandEvent& aEvent )
|
||||||
{
|
|
||||||
switch( id )
|
|
||||||
{
|
|
||||||
case ID_PCB_DRAWINGS_WIDTHS_SETUP:
|
|
||||||
{
|
{
|
||||||
DIALOG_GRAPHIC_ITEMS_OPTIONS dlg( this );
|
DIALOG_GRAPHIC_ITEMS_OPTIONS dlg( this );
|
||||||
dlg.ShowModal();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
dlg.ShowModal();
|
||||||
wxMessageBox( wxT( "InstallPcbOptionsFrame() id error" ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,7 +133,7 @@ void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick( wxCommandEvent& event )
|
||||||
if( g_DrawDefaultLineThickness < 0 )
|
if( g_DrawDefaultLineThickness < 0 )
|
||||||
g_DrawDefaultLineThickness = 0;
|
g_DrawDefaultLineThickness = 0;
|
||||||
|
|
||||||
EndModal( 1 );
|
EndModal( wxID_OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,18 @@ extern void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* fram
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
|
||||||
void WinEDA_PcbFrame::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
|
void WinEDA_PcbFrame::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
|
||||||
/*************************************************************************/
|
|
||||||
{
|
{
|
||||||
/* Setup the default netlist file name according to the board file name */
|
/* Setup the netlist file name to the last net list file read or the board file
|
||||||
wxFileName fn = GetScreen()->m_FileName;
|
* name if no last file read is not set.
|
||||||
|
*/
|
||||||
|
wxFileName fn = GetLastNetListRead();
|
||||||
|
|
||||||
|
if( !fn.FileExists() )
|
||||||
|
{
|
||||||
|
fn = GetScreen()->m_FileName;
|
||||||
fn.SetExt( NetExtBuffer );
|
fn.SetExt( NetExtBuffer );
|
||||||
|
}
|
||||||
|
|
||||||
DIALOG_NETLIST frame( this, DC, fn.GetFullPath() );
|
DIALOG_NETLIST frame( this, DC, fn.GetFullPath() );
|
||||||
|
|
||||||
|
@ -33,7 +37,8 @@ void WinEDA_PcbFrame::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_NETLIST::DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC, const wxString & aNetlistFull_Filename )
|
DIALOG_NETLIST::DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC,
|
||||||
|
const wxString & aNetlistFull_Filename )
|
||||||
: DIALOG_NETLIST_FBP( aParent )
|
: DIALOG_NETLIST_FBP( aParent )
|
||||||
{
|
{
|
||||||
m_Parent = aParent;
|
m_Parent = aParent;
|
||||||
|
@ -54,18 +59,30 @@ void DIALOG_NETLIST::Init()
|
||||||
|
|
||||||
void DIALOG_NETLIST::OnOpenNelistClick( wxCommandEvent& event )
|
void DIALOG_NETLIST::OnOpenNelistClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
wxString fullfilename;
|
wxString lastPath = wxFileName::GetCwd();
|
||||||
|
wxString lastNetlistRead = m_Parent->GetLastNetListRead();
|
||||||
|
|
||||||
wxFileDialog FilesDialog( this, _( "Netlist Selection:" ), wxGetCwd(),
|
if( !lastNetlistRead.IsEmpty() && !wxFileName::FileExists( lastNetlistRead ) )
|
||||||
wxEmptyString, NetlistFileWildcard,
|
{
|
||||||
wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
|
lastNetlistRead = wxEmptyString;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxFileName fn = lastNetlistRead;
|
||||||
|
lastPath = fn.GetPath();
|
||||||
|
lastNetlistRead = fn.GetName();
|
||||||
|
}
|
||||||
|
|
||||||
|
wxLogDebug( wxT( "Last net list read path <%s>, file name <%s>." ),
|
||||||
|
GetChars( lastPath ), GetChars( lastNetlistRead ) );
|
||||||
|
|
||||||
|
wxFileDialog FilesDialog( this, _( "Select Netlist" ), lastPath, lastNetlistRead,
|
||||||
|
NetlistFileWildcard, wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
if( FilesDialog.ShowModal() != wxID_OK )
|
if( FilesDialog.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fullfilename = FilesDialog.GetPath( );
|
m_NetlistFilenameCtrl->SetValue( FilesDialog.GetPath() );
|
||||||
|
|
||||||
m_NetlistFilenameCtrl->SetValue( fullfilename );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +102,8 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event )
|
||||||
|
|
||||||
void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
|
void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
TestFor_Duplicate_Missing_And_Extra_Footprints( this, m_NetlistFilenameCtrl->GetValue(), m_Parent->GetBoard() );
|
TestFor_Duplicate_Missing_And_Extra_Footprints( this, m_NetlistFilenameCtrl->GetValue(),
|
||||||
|
m_Parent->GetBoard() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -97,11 +97,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
|
||||||
void WinEDA_BasePcbFrame::InstallPadOptionsFrame( D_PAD* Pad )
|
void WinEDA_BasePcbFrame::InstallPadOptionsFrame( D_PAD* Pad )
|
||||||
/*************************************************************/
|
|
||||||
{
|
{
|
||||||
DIALOG_PAD_PROPERTIES dlg( this, Pad );
|
DIALOG_PAD_PROPERTIES dlg( this, Pad );
|
||||||
|
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,9 +440,12 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
g_Pad_Master.m_PadShape = CodeShape[m_PadShape->GetSelection()];
|
g_Pad_Master.m_PadShape = CodeShape[m_PadShape->GetSelection()];
|
||||||
|
|
||||||
// Read pad clearances values:
|
// Read pad clearances values:
|
||||||
g_Pad_Master.m_LocalClearance = ReturnValueFromTextCtrl( *m_NetClearanceValueCtrl, internalUnits );
|
g_Pad_Master.m_LocalClearance = ReturnValueFromTextCtrl( *m_NetClearanceValueCtrl,
|
||||||
g_Pad_Master.m_LocalSolderMaskMargin = ReturnValueFromTextCtrl( *m_SolderMaskMarginCtrl, internalUnits );
|
internalUnits );
|
||||||
g_Pad_Master.m_LocalSolderPasteMargin = ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl, internalUnits );
|
g_Pad_Master.m_LocalSolderMaskMargin = ReturnValueFromTextCtrl( *m_SolderMaskMarginCtrl,
|
||||||
|
internalUnits );
|
||||||
|
g_Pad_Master.m_LocalSolderPasteMargin = ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl,
|
||||||
|
internalUnits );
|
||||||
double dtmp = 0.0;
|
double dtmp = 0.0;
|
||||||
msg = m_SolderPasteMarginRatioCtrl->GetValue();
|
msg = m_SolderPasteMarginRatioCtrl->GetValue();
|
||||||
msg.ToDouble( &dtmp );
|
msg.ToDouble( &dtmp );
|
||||||
|
@ -664,7 +666,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
m_Parent->OnModify();
|
m_Parent->OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
EndModal(1);
|
EndModal( wxID_OK );
|
||||||
|
|
||||||
if( RastnestIsChanged ) // The net ratsnest must be recalculated
|
if( RastnestIsChanged ) // The net ratsnest must be recalculated
|
||||||
m_Parent->GetBoard()->m_Status_Pcb = 0;
|
m_Parent->GetBoard()->m_Status_Pcb = 0;
|
||||||
|
@ -674,6 +676,6 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
void DIALOG_PAD_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event )
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
{
|
{
|
||||||
EndModal(0);
|
EndModal( wxID_CANCEL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnOkClick( wxCommandEvent& event )
|
||||||
g_LibName_List.Add(m_ListLibr->GetString(ii) );
|
g_LibName_List.Add(m_ListLibr->GetString(ii) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Parent->Update_config( this );
|
m_Parent->SaveProjectSettings();
|
||||||
EndModal( wxID_OK );
|
EndModal( wxID_OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,17 +31,14 @@ void WinEDA_PcbFrame::OnFileHistory( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************/
|
|
||||||
void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
|
|
||||||
/****************************************************/
|
|
||||||
|
|
||||||
/* Handle the read/write file commands
|
/* Handle the read/write file commands
|
||||||
*/
|
*/
|
||||||
|
void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
|
|
||||||
// If an edition is in progress, stop it
|
// If an edition is in progress, stop it
|
||||||
DrawPanel->UnManageCursor( 0, wxCURSOR_ARROW );
|
DrawPanel->UnManageCursor( 0, wxCURSOR_ARROW );
|
||||||
|
|
||||||
|
@ -69,13 +66,13 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
|
||||||
|
|
||||||
if( !fn.FileExists() )
|
if( !fn.FileExists() )
|
||||||
{
|
{
|
||||||
msg = _( "Recovery file " ) + fn.GetFullPath() + _( " not found" );
|
msg = _( "Recovery file " ) + fn.GetFullPath() + _( " not found." );
|
||||||
DisplayInfoMessage( this, msg );
|
DisplayInfoMessage( this, msg );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg = _( "Ok to load Recovery file " ) + fn.GetFullPath();
|
msg = _( "OK to load recovery file " ) + fn.GetFullPath();
|
||||||
if( !IsOK( this, msg ) )
|
if( !IsOK( this, msg ) )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -209,7 +206,7 @@ this file again."));
|
||||||
ReadPcbFile( source, true );
|
ReadPcbFile( source, true );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Read_Config( GetScreen()->m_FileName );
|
LoadProjectSettings( GetScreen()->m_FileName );
|
||||||
|
|
||||||
// Update the option toolbar
|
// Update the option toolbar
|
||||||
m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
|
m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
|
||||||
|
@ -294,12 +291,9 @@ this file again."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************/
|
|
||||||
bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName )
|
|
||||||
/************************************************************/
|
|
||||||
|
|
||||||
/* Write the board file
|
/* Write the board file
|
||||||
*/
|
*/
|
||||||
|
bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName )
|
||||||
{
|
{
|
||||||
wxFileName backupFileName;
|
wxFileName backupFileName;
|
||||||
wxFileName pcbFileName;
|
wxFileName pcbFileName;
|
||||||
|
|
|
@ -116,8 +116,7 @@ FILE * OpenNetlistFile( const wxString& aFullFileName )
|
||||||
if( netfile == NULL )
|
if( netfile == NULL )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Netlist file %s not found" ),
|
msg.Printf( _( "Netlist file %s not found" ), GetChars( aFullFileName ) );
|
||||||
GetChars( aFullFileName ) );
|
|
||||||
DisplayError( NULL, msg );
|
DisplayError( NULL, msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,8 +148,7 @@ FILE * OpenNetlistFile( const wxString& aFullFileName )
|
||||||
* }
|
* }
|
||||||
* #End
|
* #End
|
||||||
*/
|
*/
|
||||||
bool WinEDA_PcbFrame::ReadPcbNetlist(
|
bool WinEDA_PcbFrame::ReadPcbNetlist( const wxString& aNetlistFullFilename,
|
||||||
const wxString& aNetlistFullFilename,
|
|
||||||
const wxString& aCmpFullFileName,
|
const wxString& aCmpFullFileName,
|
||||||
wxTextCtrl* aMessageWindow,
|
wxTextCtrl* aMessageWindow,
|
||||||
bool aChangeFootprint,
|
bool aChangeFootprint,
|
||||||
|
@ -168,11 +166,12 @@ bool WinEDA_PcbFrame::ReadPcbNetlist(
|
||||||
if( !netfile )
|
if( !netfile )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
SetLastNetListRead( aNetlistFullFilename );
|
||||||
|
|
||||||
if( aMessageWindow )
|
if( aMessageWindow )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Reading Netlist \"%s\"" ),
|
msg.Printf( _( "Reading Netlist \"%s\"" ), GetChars( aNetlistFullFilename ) );
|
||||||
GetChars( aNetlistFullFilename ) );
|
|
||||||
aMessageWindow->AppendText( msg + wxT( "\n" ) );
|
aMessageWindow->AppendText( msg + wxT( "\n" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +180,8 @@ bool WinEDA_PcbFrame::ReadPcbNetlist(
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
GetBoard()->m_Status_Pcb = 0;
|
GetBoard()->m_Status_Pcb = 0;
|
||||||
State = 0; Comment = 0;
|
State = 0;
|
||||||
|
Comment = 0;
|
||||||
s_NbNewModules = 0;
|
s_NbNewModules = 0;
|
||||||
|
|
||||||
wxBusyCursor dummy; // Shows an hourglass while calculating
|
wxBusyCursor dummy; // Shows an hourglass while calculating
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
#include "dialog_design_rules.h"
|
#include "dialog_design_rules.h"
|
||||||
#include "class_pcb_layer_widget.h"
|
#include "class_pcb_layer_widget.h"
|
||||||
#include "hotkeys.h"
|
#include "hotkeys.h"
|
||||||
|
#include "pcbnew_config.h"
|
||||||
|
|
||||||
|
|
||||||
extern int g_DrawDefaultLineThickness;
|
extern int g_DrawDefaultLineThickness;
|
||||||
|
|
||||||
|
@ -109,30 +111,24 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
|
||||||
EVT_MENU( wxID_EXIT, WinEDA_PcbFrame::OnQuit )
|
EVT_MENU( wxID_EXIT, WinEDA_PcbFrame::OnQuit )
|
||||||
|
|
||||||
// menu Config
|
// menu Config
|
||||||
EVT_MENU( ID_CONFIG_REQ,
|
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, WinEDA_PcbFrame::OnConfigurePcbOptions )
|
||||||
WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_CONFIG_REQ, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_CONFIG_SAVE,
|
EVT_MENU( ID_CONFIG_SAVE, WinEDA_PcbFrame::Process_Config )
|
||||||
WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_CONFIG_READ, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_CONFIG_READ,
|
|
||||||
WinEDA_PcbFrame::Process_Config )
|
|
||||||
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START,
|
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START,
|
||||||
ID_PREFERENCES_HOTKEY_END,
|
ID_PREFERENCES_HOTKEY_END,
|
||||||
WinEDA_PcbFrame::Process_Config )
|
WinEDA_PcbFrame::Process_Config )
|
||||||
|
|
||||||
EVT_MENU( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
|
EVT_MENU( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
|
||||||
WinEDA_PcbFrame::Process_Config )
|
WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_OPTIONS_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_OPTIONS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_LAYERS_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_PCB_LAYERS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_MASK_CLEARANCE, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_PCB_MASK_CLEARANCE, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, WinEDA_PcbFrame::Process_Config )
|
|
||||||
EVT_MENU( ID_PCB_PAD_SETUP, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_PCB_PAD_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_CONFIG_SAVE, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_CONFIG_SAVE, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_CONFIG_READ, WinEDA_PcbFrame::Process_Config )
|
EVT_MENU( ID_CONFIG_READ, WinEDA_PcbFrame::Process_Config )
|
||||||
EVT_MENU( ID_PCB_DISPLAY_OPTIONS_SETUP,
|
EVT_MENU( ID_PCB_DISPLAY_OPTIONS_SETUP,
|
||||||
WinEDA_PcbFrame::InstallDisplayOptionsDialog )
|
WinEDA_PcbFrame::InstallDisplayOptionsDialog )
|
||||||
|
EVT_MENU( ID_PCB_USER_GRID_SETUP, WinEDA_PcbFrame::Process_Special_Functions )
|
||||||
EVT_MENU( ID_PCB_USER_GRID_SETUP,
|
|
||||||
WinEDA_PcbFrame::Process_Special_Functions )
|
|
||||||
|
|
||||||
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
||||||
WinEDA_PcbFrame::SetLanguage )
|
WinEDA_PcbFrame::SetLanguage )
|
||||||
|
@ -390,9 +386,6 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
|
||||||
|
|
||||||
WinEDA_PcbFrame::~WinEDA_PcbFrame()
|
WinEDA_PcbFrame::~WinEDA_PcbFrame()
|
||||||
{
|
{
|
||||||
extern PARAM_CFG_BASE* ParamCfgList[];
|
|
||||||
|
|
||||||
wxGetApp().SaveCurrentSetupValues( ParamCfgList );
|
|
||||||
delete m_drc;
|
delete m_drc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,6 +443,13 @@ void WinEDA_PcbFrame::OnCloseWindow( wxCloseEvent& Event )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !GetScreen()->m_FileName.IsEmpty() )
|
||||||
|
{
|
||||||
|
wxFileName fn = GetScreen()->m_FileName;
|
||||||
|
fn.SetExt( ProjectFileExtension );
|
||||||
|
wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() );
|
||||||
|
}
|
||||||
|
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
|
|
||||||
// do not show the window because ScreenPcb will be deleted and we do not
|
// do not show the window because ScreenPcb will be deleted and we do not
|
||||||
|
@ -499,6 +499,11 @@ void WinEDA_PcbFrame::LoadSettings()
|
||||||
if( config == NULL )
|
if( config == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* The configuration setting that used to be mixed in with the project
|
||||||
|
* file settings.
|
||||||
|
*/
|
||||||
|
wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
|
||||||
|
|
||||||
WinEDA_BasePcbFrame::LoadSettings();
|
WinEDA_BasePcbFrame::LoadSettings();
|
||||||
|
|
||||||
long tmp;
|
long tmp;
|
||||||
|
@ -519,6 +524,11 @@ void WinEDA_PcbFrame::SaveSettings()
|
||||||
if( config == NULL )
|
if( config == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* The configuration setting that used to be mixed in with the project
|
||||||
|
* file settings.
|
||||||
|
*/
|
||||||
|
wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() );
|
||||||
|
|
||||||
WinEDA_BasePcbFrame::SaveSettings();
|
WinEDA_BasePcbFrame::SaveSettings();
|
||||||
|
|
||||||
wxRealPoint GridSize = GetScreen()->GetGridSize();
|
wxRealPoint GridSize = GetScreen()->GetGridSize();
|
||||||
|
@ -639,3 +649,32 @@ void WinEDA_PcbFrame::SetLanguage( wxCommandEvent& event )
|
||||||
if( m_ModuleEditFrame )
|
if( m_ModuleEditFrame )
|
||||||
m_ModuleEditFrame->WinEDA_DrawFrame::SetLanguage( event );
|
m_ModuleEditFrame->WinEDA_DrawFrame::SetLanguage( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxString WinEDA_PcbFrame::GetLastNetListRead()
|
||||||
|
{
|
||||||
|
wxFileName absoluteFileName = m_lastNetListRead;
|
||||||
|
wxFileName pcbFileName = GetScreen()->m_FileName;
|
||||||
|
|
||||||
|
if( !absoluteFileName.MakeAbsolute( pcbFileName.GetPath() )
|
||||||
|
|| !absoluteFileName.FileExists() )
|
||||||
|
{
|
||||||
|
absoluteFileName.Clear();
|
||||||
|
m_lastNetListRead = wxEmptyString;
|
||||||
|
}
|
||||||
|
|
||||||
|
return absoluteFileName.GetFullPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void WinEDA_PcbFrame::SetLastNetListRead( const wxString& aLastNetListRead )
|
||||||
|
{
|
||||||
|
wxFileName relativeFileName = aLastNetListRead;
|
||||||
|
wxFileName pcbFileName = GetScreen()->m_FileName;
|
||||||
|
|
||||||
|
if( relativeFileName.MakeRelativeTo( pcbFileName.GetPath() )
|
||||||
|
&& relativeFileName.GetFullPath() != aLastNetListRead )
|
||||||
|
{
|
||||||
|
m_lastNetListRead = relativeFileName.GetFullPath();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -63,8 +63,7 @@ wxPoint g_Offset_Module; /* Offset de trace du modul en depl
|
||||||
wxString g_Current_PadName; // Last used pad name (pad num)
|
wxString g_Current_PadName; // Last used pad name (pad num)
|
||||||
|
|
||||||
// Wildcard for footprint libraries filesnames
|
// Wildcard for footprint libraries filesnames
|
||||||
const wxString g_FootprintLibFileWildcard( wxT(
|
const wxString g_FootprintLibFileWildcard( wxT( "Kicad footprint library file (*.mod)|*.mod" ) );
|
||||||
"Kicad footprint library file (*.mod)|*.mod" ) );
|
|
||||||
|
|
||||||
/* Name of the document footprint list
|
/* Name of the document footprint list
|
||||||
* usually located in share/modules/footprints_doc
|
* usually located in share/modules/footprints_doc
|
||||||
|
@ -126,10 +125,8 @@ bool WinEDA_App::OnInit()
|
||||||
|
|
||||||
if( fn.GetExt() != BoardFileExtension )
|
if( fn.GetExt() != BoardFileExtension )
|
||||||
{
|
{
|
||||||
wxLogDebug( wxT(
|
wxLogDebug( wxT( "PcbNew file <%s> has the wrong extension. \
|
||||||
"PcbNew file <%s> has the wrong extension.\
|
Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
|
||||||
Changing extension to .brd." ),
|
|
||||||
GetChars( fn.GetFullPath() ) );
|
|
||||||
fn.SetExt( BoardFileExtension );
|
fn.SetExt( BoardFileExtension );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +134,6 @@ Changing extension to .brd."
|
||||||
wxSetWorkingDirectory( fn.GetPath() );
|
wxSetWorkingDirectory( fn.GetPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGetApp().ReadCurrentSetupValues( ParamCfgList );
|
|
||||||
g_DrawBgColor = BLACK;
|
g_DrawBgColor = BLACK;
|
||||||
Read_Hotkey_Config( frame, false ); /* Must be called before creating the
|
Read_Hotkey_Config( frame, false ); /* Must be called before creating the
|
||||||
* main frame in order to display the
|
* main frame in order to display the
|
||||||
|
@ -157,7 +153,7 @@ Changing extension to .brd."
|
||||||
SetupServerFunction( RemoteCommand );
|
SetupServerFunction( RemoteCommand );
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->Read_Config( fn.GetFullPath() );
|
frame->LoadProjectSettings( fn.GetFullPath() );
|
||||||
|
|
||||||
frame->Zoom_Automatique( true );
|
frame->Zoom_Automatique( true );
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,10 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
|
||||||
if( m_OptionsToolBar )
|
if( m_OptionsToolBar )
|
||||||
{ //This command is same as the Options Vertical Toolbar
|
{ //This command is same as the Options Vertical Toolbar
|
||||||
// tool Show/hide layers manager
|
// tool Show/hide layers manager
|
||||||
bool state = m_OptionsToolBar->GetToolState(ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR);
|
bool state =
|
||||||
m_OptionsToolBar->ToggleTool(ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, !state);
|
m_OptionsToolBar->GetToolState( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR );
|
||||||
|
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
|
||||||
|
!state );
|
||||||
wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED,
|
wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR );
|
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR );
|
||||||
wxPostEvent( this, event );
|
wxPostEvent( this, event );
|
||||||
|
@ -72,16 +74,12 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PCB_DRAWINGS_WIDTHS_SETUP:
|
|
||||||
InstallPcbOptionsFrame( id );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_PCB_PAD_SETUP:
|
case ID_PCB_PAD_SETUP:
|
||||||
InstallPadOptionsFrame( NULL );
|
InstallPadOptionsFrame( NULL );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_CONFIG_SAVE:
|
case ID_CONFIG_SAVE:
|
||||||
Update_config( this );
|
SaveProjectSettings();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_CONFIG_READ:
|
case ID_CONFIG_READ:
|
||||||
|
@ -104,15 +102,14 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Read_Config( dlg.GetPath() );
|
LoadProjectSettings( dlg.GetPath() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ID_PREFERENCES_HOTKEY_CREATE_CONFIG:
|
case ID_PREFERENCES_HOTKEY_CREATE_CONFIG:
|
||||||
fn.SetPath( ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ) );
|
fn.SetPath( ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ) );
|
||||||
fn.SetName( HOTKEY_FILENAME );
|
fn.SetName( HOTKEY_FILENAME );
|
||||||
fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
|
fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
|
||||||
WriteHotkeyConfigFile( fn.GetFullPath(), s_Pcbnew_Editor_Hokeys_Descr,
|
WriteHotkeyConfigFile( fn.GetFullPath(), s_Pcbnew_Editor_Hokeys_Descr, true );
|
||||||
true );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PREFERENCES_HOTKEY_READ_CONFIG:
|
case ID_PREFERENCES_HOTKEY_READ_CONFIG:
|
||||||
|
@ -141,8 +138,7 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DisplayError( this,
|
DisplayError( this, wxT( "WinEDA_PcbFrame::Process_Config internal error" ) );
|
||||||
wxT( "WinEDA_PcbFrame::Process_Config internal error" ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,28 +148,26 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
|
||||||
*/
|
*/
|
||||||
bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
|
bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
|
||||||
{
|
{
|
||||||
wxString FullFileName = ReturnHotkeyConfigFilePath(
|
wxString FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
|
||||||
g_ConfigFileLocationChoice );
|
|
||||||
|
|
||||||
FullFileName += HOTKEY_FILENAME;
|
FullFileName += HOTKEY_FILENAME;
|
||||||
FullFileName += wxT( "." );
|
FullFileName += wxT( "." );
|
||||||
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
|
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
|
||||||
return frame->ReadHotkeyConfigFile( FullFileName,
|
return frame->ReadHotkeyConfigFile( FullFileName, s_Pcbnew_Editor_Hokeys_Descr, verbose );
|
||||||
s_Pcbnew_Editor_Hokeys_Descr,
|
|
||||||
verbose );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Function Read_Config
|
/**
|
||||||
* Read the project configuration file
|
* Read the project configuration file settings.
|
||||||
* @param projectFileName = the config filename
|
*
|
||||||
* if not found use kicad.pro
|
* @param aProjectFileName = The project file name to load. If aProjectFileName
|
||||||
* if not found : initialize default values
|
* is not found load the default project file kicad.pro
|
||||||
* @return true if the current config is modified, false if no change
|
* and initialize setting to their default value.
|
||||||
|
* @return Always returns true.
|
||||||
*/
|
*/
|
||||||
bool WinEDA_PcbFrame::Read_Config( const wxString& projectFileName )
|
bool WinEDA_PcbFrame::LoadProjectSettings( const wxString& aProjectFileName )
|
||||||
{
|
{
|
||||||
wxFileName fn = projectFileName;
|
wxFileName fn = aProjectFileName;
|
||||||
|
|
||||||
if( fn.GetExt() != ProjectFileExtension )
|
if( fn.GetExt() != ProjectFileExtension )
|
||||||
fn.SetExt( ProjectFileExtension );
|
fn.SetExt( ProjectFileExtension );
|
||||||
|
@ -183,8 +177,7 @@ bool WinEDA_PcbFrame::Read_Config( const wxString& projectFileName )
|
||||||
/* Initialize default values. */
|
/* Initialize default values. */
|
||||||
g_LibName_List.Clear();
|
g_LibName_List.Clear();
|
||||||
|
|
||||||
wxGetApp().ReadProjectConfig( fn.GetFullPath(),
|
wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), FALSE );
|
||||||
GROUP, ParamCfgList, FALSE );
|
|
||||||
|
|
||||||
/* User library path takes precedent over default library search paths. */
|
/* User library path takes precedent over default library search paths. */
|
||||||
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
|
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
|
||||||
|
@ -203,20 +196,245 @@ bool WinEDA_PcbFrame::Read_Config( const wxString& projectFileName )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WinEDA_PcbFrame::Update_config( wxWindow* displayframe )
|
void WinEDA_PcbFrame::SaveProjectSettings()
|
||||||
{
|
{
|
||||||
wxFileName fn;
|
wxFileName fn;
|
||||||
|
|
||||||
fn = GetScreen()->m_FileName;
|
fn = GetScreen()->m_FileName;
|
||||||
fn.SetExt( ProjectFileExtension );
|
fn.SetExt( ProjectFileExtension );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Save Project File" ), fn.GetPath(),
|
wxFileDialog dlg( this, _( "Save Project File" ), fn.GetPath(), fn.GetFullName(),
|
||||||
fn.GetFullName(), ProjectFileWildcard,
|
ProjectFileWildcard, wxFD_SAVE | wxFD_CHANGE_DIR );
|
||||||
wxFD_SAVE | wxFD_CHANGE_DIR );
|
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxGetApp().WriteProjectConfig( fn.GetFullPath(), wxT( "/pcbnew" ),
|
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, GetProjectFileParameters() );
|
||||||
ParamCfgList );
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return project file parameter list for PCBNew.
|
||||||
|
*
|
||||||
|
* Populate the project file parameter array specific to PCBNew if it hasn't
|
||||||
|
* already been populated and return a reference to the array to the caller.
|
||||||
|
* Creating the parameter list at run time has the advantage of being able
|
||||||
|
* to define local variables. The old method of statically building the array
|
||||||
|
* at compile time requiring global variable definitions by design.
|
||||||
|
*/
|
||||||
|
PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetProjectFileParameters()
|
||||||
|
{
|
||||||
|
if( !m_projectFileParams.empty() )
|
||||||
|
return m_projectFileParams;
|
||||||
|
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "LibDir" ),&g_UserLibDirBuffer,
|
||||||
|
GROUPLIB ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ), &g_LibName_List,
|
||||||
|
GROUPLIB ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "PadDrlX" ), &g_Pad_Master.m_Drill.x,
|
||||||
|
320, 0, 0x7FFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "PadDimH" ), &g_Pad_Master.m_Size.x,
|
||||||
|
550, 0, 0x7FFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "PadDimV" ), &g_Pad_Master.m_Size.y,
|
||||||
|
550, 0, 0x7FFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "BoardThickness" ),
|
||||||
|
&boardDesignSettings.m_BoardThickness,
|
||||||
|
630, 0, 0xFFFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SgPcb45" ), &Segments_45_Only,
|
||||||
|
TRUE ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtPcbV" ),
|
||||||
|
&boardDesignSettings.m_PcbTextSize.y,
|
||||||
|
600, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtPcbH" ),
|
||||||
|
&boardDesignSettings.m_PcbTextSize.x,
|
||||||
|
600, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtModV" ), &ModuleTextSize.y,
|
||||||
|
500, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtModH" ), &ModuleTextSize.x,
|
||||||
|
500, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtModW" ), &ModuleTextWidth,
|
||||||
|
100, 1, TEXTS_MAX_WIDTH ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "VEgarde" ),
|
||||||
|
&boardDesignSettings.m_SolderMaskMargin,
|
||||||
|
100, 0, 10000 ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "DrawLar" ),
|
||||||
|
&boardDesignSettings.m_DrawSegmentWidth,
|
||||||
|
120, 0, 0xFFFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "EdgeLar" ),
|
||||||
|
&boardDesignSettings.m_EdgeSegmentWidth,
|
||||||
|
120, 0, 0xFFFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtLar" ),
|
||||||
|
&boardDesignSettings.m_PcbTextWidth,
|
||||||
|
120, 0, 0xFFFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "MSegLar" ), &ModuleSegmentWidth,
|
||||||
|
120, 0, 0xFFFF ) );
|
||||||
|
m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "LastNetListRead" ),
|
||||||
|
&m_lastNetListRead ) );
|
||||||
|
return m_projectFileParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the PCBNew applications settings list.
|
||||||
|
*
|
||||||
|
* This replaces the old statically define list that had the project
|
||||||
|
* file settings and the application settings mixed together. This
|
||||||
|
* was confusing and caused some settings to get saved and loaded
|
||||||
|
* incorrectly. Currently, only the settings that are needed at start
|
||||||
|
* up by the main window are defined here. There are other locally used
|
||||||
|
* settings are scattered throughout the PCBNew source code. If you need
|
||||||
|
* to define a configuration setting that need to be loaded at run time,
|
||||||
|
* this is the place to define it.
|
||||||
|
*
|
||||||
|
* @todo: Define the configuration variables as member variables instead of
|
||||||
|
* global variables or move them to the object class where they are
|
||||||
|
* used.
|
||||||
|
*/
|
||||||
|
PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings()
|
||||||
|
{
|
||||||
|
if( !m_configSettings.empty() )
|
||||||
|
return m_configSettings;
|
||||||
|
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaSHole" ),
|
||||||
|
&DisplayOpt.m_DisplayViaMode,
|
||||||
|
VIA_SPECIAL_HOLE_SHOW, VIA_HOLE_NOT_SHOW,
|
||||||
|
OPT_VIA_HOLE_END - 1 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ShowNetNamesMode" ),
|
||||||
|
&DisplayOpt.DisplayNetNamesMode, 3, 0, 3 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Unite" ), &g_UnitMetric, FALSE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegFill" ),
|
||||||
|
&DisplayOpt.DisplayPcbTrackFill, TRUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ),
|
||||||
|
&DisplayOpt.ShowTrackClearanceMode,
|
||||||
|
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ),
|
||||||
|
&DisplayOpt.DisplayPadFill, TRUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ),
|
||||||
|
&DisplayOpt.DisplayViaFill, TRUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadAffG" ),
|
||||||
|
&DisplayOpt.DisplayPadIsol, TRUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadSNum" ),
|
||||||
|
&DisplayOpt.DisplayPadNum, TRUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffC" ),
|
||||||
|
&DisplayOpt.DisplayModEdge, FILLED, 0, 2 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffT" ),
|
||||||
|
&DisplayOpt.DisplayModText, FILLED, 0, 2 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbAffT" ),
|
||||||
|
&DisplayOpt.DisplayDrawItems, FILLED, 0, 2 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay0" ), LOC_COLOR( 0 ),
|
||||||
|
GREEN ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay1" ), LOC_COLOR( 1 ),
|
||||||
|
BLUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay2" ), LOC_COLOR( 2 ),
|
||||||
|
LIGHTGRAY ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay3" ), LOC_COLOR( 3 ),
|
||||||
|
5 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay4" ), LOC_COLOR( 4 ),
|
||||||
|
4 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay5" ), LOC_COLOR( 5 ),
|
||||||
|
5 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay6" ), LOC_COLOR( 6 ),
|
||||||
|
6 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay7" ), LOC_COLOR( 7 ),
|
||||||
|
5 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay8" ), LOC_COLOR( 8 ),
|
||||||
|
7 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay9" ), LOC_COLOR( 9 ),
|
||||||
|
1 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayA" ), LOC_COLOR( 10 ),
|
||||||
|
2 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayB" ), LOC_COLOR( 11 ),
|
||||||
|
3 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayC" ), LOC_COLOR( 12 ),
|
||||||
|
12 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayD" ), LOC_COLOR( 13 ),
|
||||||
|
13 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayE" ), LOC_COLOR( 14 ),
|
||||||
|
14 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayF" ), LOC_COLOR( 15 ),
|
||||||
|
RED ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayG" ), LOC_COLOR( 16 ),
|
||||||
|
1 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayH" ), LOC_COLOR( 17 ),
|
||||||
|
5 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayI" ), LOC_COLOR( 18 ),
|
||||||
|
11 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayJ" ), LOC_COLOR( 19 ),
|
||||||
|
4 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayK" ), LOC_COLOR( 20 ),
|
||||||
|
5 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayL" ), LOC_COLOR( 21 ),
|
||||||
|
3 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayM" ), LOC_COLOR( 22 ),
|
||||||
|
6 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayN" ), LOC_COLOR( 23 ),
|
||||||
|
5 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayO" ), LOC_COLOR( 24 ),
|
||||||
|
LIGHTGRAY ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayP" ), LOC_COLOR( 25 ),
|
||||||
|
1 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayQ" ), LOC_COLOR( 26 ),
|
||||||
|
2 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayR" ), LOC_COLOR( 27 ),
|
||||||
|
14 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayS" ), LOC_COLOR( 28 ),
|
||||||
|
YELLOW ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayT" ), LOC_COLOR( 29 ),
|
||||||
|
13 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayU" ), LOC_COLOR( 30 ),
|
||||||
|
14 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLayV" ), LOC_COLOR( 31 ),
|
||||||
|
7 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CTxtMoC" ),
|
||||||
|
ITEM_COLOR( MOD_TEXT_FR_VISIBLE ),
|
||||||
|
LIGHTGRAY ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CTxtMoS" ),
|
||||||
|
ITEM_COLOR( MOD_TEXT_BK_VISIBLE ),
|
||||||
|
BLUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CTxtVis" ),
|
||||||
|
ITEM_COLOR( MOD_TEXT_INVISIBLE ),
|
||||||
|
DARKGRAY ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CAncreM" ),
|
||||||
|
ITEM_COLOR( ANCHOR_VISIBLE ), BLUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoPadCu" ),
|
||||||
|
ITEM_COLOR( PAD_BK_VISIBLE ), GREEN ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoPadCm" ),
|
||||||
|
ITEM_COLOR( PAD_FR_VISIBLE ), RED ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoViaTh" ),
|
||||||
|
ITEM_COLOR( VIA_THROUGH_VISIBLE ),
|
||||||
|
LIGHTGRAY ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoViaBu" ),
|
||||||
|
ITEM_COLOR( VIA_BBLIND_VISIBLE ),
|
||||||
|
BROWN ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoViaMi" ),
|
||||||
|
ITEM_COLOR( VIA_MICROVIA_VISIBLE ),
|
||||||
|
CYAN ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoRatsN" ),
|
||||||
|
ITEM_COLOR( RATSNEST_VISIBLE ),
|
||||||
|
WHITE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLnum" ),
|
||||||
|
&g_pcb_plot_options.HPGL_Pen_Num,
|
||||||
|
1, 1, 16 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGdiam" ),
|
||||||
|
&g_pcb_plot_options.HPGL_Pen_Diam,
|
||||||
|
15, 0, 100 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLSpd" ),
|
||||||
|
&g_pcb_plot_options.HPGL_Pen_Speed,
|
||||||
|
20, 0, 1000 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "HPGLrec" ),
|
||||||
|
&g_pcb_plot_options.HPGL_Pen_Recouvrement,
|
||||||
|
2, 0, 0x100 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut,
|
||||||
|
600, 0, 60000 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DPolair" ),
|
||||||
|
&DisplayOpt.DisplayPolarCood, FALSE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "MaxLnkS" ), &g_MaxLinksShowed,
|
||||||
|
3, 0, 15 ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowMRa" ),
|
||||||
|
&g_Show_Module_Ratsnest, TRUE ) );
|
||||||
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "TwoSegT" ),
|
||||||
|
&g_TwoSegmentTrackBuild, TRUE ) );
|
||||||
|
|
||||||
|
return m_configSettings;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************/
|
/************************************************************/
|
||||||
/** pcbcfg.h : configuration parameters for PCBNew **/
|
/** pcbnew_config.h : configuration parameters for PCBNew **/
|
||||||
/*****************************************************/
|
/************************************************************/
|
||||||
|
|
||||||
#include "param_config.h"
|
#include "param_config.h"
|
||||||
#include "colors_selection.h"
|
#include "colors_selection.h"
|
||||||
|
@ -9,800 +9,9 @@
|
||||||
#define GROUPLIB wxT( "/pcbnew/libraries" )
|
#define GROUPLIB wxT( "/pcbnew/libraries" )
|
||||||
#define GROUPCOMMON wxT( "/common" )
|
#define GROUPCOMMON wxT( "/common" )
|
||||||
|
|
||||||
// Flag for member .m_Setup
|
|
||||||
// .m_Setup = TRUE: write info in user config
|
|
||||||
// (i.e. for all project, in registry base or equivalent)
|
|
||||||
// .m_Setup = FALSE: write info in project config (i.e. only for this
|
|
||||||
// project, in .pro file)
|
|
||||||
#define INSETUP TRUE
|
|
||||||
|
|
||||||
/* Useful macro : */
|
/* Useful macro : */
|
||||||
#define LOC_COLOR(layer) &g_ColorsSettings.m_LayersColors[layer]
|
#define LOC_COLOR(layer) &g_ColorsSettings.m_LayersColors[layer]
|
||||||
#define ITEM_COLOR(item_visible) &g_ColorsSettings.m_ItemsColors[item_visible]
|
#define ITEM_COLOR(item_visible) &g_ColorsSettings.m_ItemsColors[item_visible]
|
||||||
|
|
||||||
/* Configuration parameters. */
|
/* Configuration parameters. */
|
||||||
extern BOARD_DESIGN_SETTINGS boardDesignSettings;
|
extern BOARD_DESIGN_SETTINGS boardDesignSettings;
|
||||||
|
|
||||||
static PARAM_CFG_WXSTRING UserLibDirBufCfg
|
|
||||||
(
|
|
||||||
wxT( "LibDir" ),
|
|
||||||
&g_UserLibDirBuffer,
|
|
||||||
GROUPLIB
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_LIBNAME_LIST LibNameBufCfg
|
|
||||||
(
|
|
||||||
wxT( "LibName" ),
|
|
||||||
&g_LibName_List,
|
|
||||||
GROUPLIB
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT PadDrillCfg
|
|
||||||
(
|
|
||||||
wxT( "PadDrlX" ),
|
|
||||||
&g_Pad_Master.m_Drill.x,
|
|
||||||
320,
|
|
||||||
0, 0x7FFF
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT PadDimHCfg //Pad Diameter / H Size
|
|
||||||
(
|
|
||||||
wxT( "PadDimH" ),
|
|
||||||
&g_Pad_Master.m_Size.x,
|
|
||||||
550,
|
|
||||||
0, 0x7FFF
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT PadDimVCfg
|
|
||||||
(
|
|
||||||
wxT( "PadDimV" ),
|
|
||||||
&g_Pad_Master.m_Size.y,
|
|
||||||
550,
|
|
||||||
0, 0x7FFF
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
static PARAM_CFG_INT BoardThicknessCfg
|
|
||||||
(
|
|
||||||
wxT( "BoardThickness" ),
|
|
||||||
&boardDesignSettings.m_BoardThickness,
|
|
||||||
630,
|
|
||||||
0, 0xFFFF
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT ViaShowHoleCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ViaSHole" ),
|
|
||||||
&DisplayOpt.m_DisplayViaMode,
|
|
||||||
VIA_SPECIAL_HOLE_SHOW,
|
|
||||||
VIA_HOLE_NOT_SHOW,
|
|
||||||
OPT_VIA_HOLE_END - 1
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT ShowNetNamesModeCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ShowNetNamesMode" ),
|
|
||||||
&DisplayOpt.DisplayNetNamesMode,
|
|
||||||
3,
|
|
||||||
0,
|
|
||||||
3
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT RouteLayTopCfg // First current working layer
|
|
||||||
(
|
|
||||||
wxT( "RouteTo" ),
|
|
||||||
&Route_Layer_TOP,
|
|
||||||
15,
|
|
||||||
0, 15
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT RouteLayBotCfg // second current working layer
|
|
||||||
(
|
|
||||||
wxT( "RouteBo" ),
|
|
||||||
&Route_Layer_BOTTOM,
|
|
||||||
0,
|
|
||||||
0, 15
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL Segm45Cfg // 0, 90, and 45 degrees are the only
|
|
||||||
( // valid segment orientations.
|
|
||||||
wxT( "Segm45" ),
|
|
||||||
&Track_45_Only,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL Raccord45Cfg // Generate connections at 45 degrees
|
|
||||||
( // only.
|
|
||||||
wxT( "Racc45" ),
|
|
||||||
&g_Raccord_45_Auto,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT UnitCfg // Units: 0 inch, 1 mm
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "Unite" ),
|
|
||||||
&g_UnitMetric,
|
|
||||||
FALSE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL SegmFillCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "SegFill" ),
|
|
||||||
&DisplayOpt.DisplayPcbTrackFill,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
static PARAM_CFG_INT TrackDisplayClearanceCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "TrackDisplayClearance" ),
|
|
||||||
&DisplayOpt.ShowTrackClearanceMode,
|
|
||||||
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL PadFillCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "PadFill" ),
|
|
||||||
&DisplayOpt.DisplayPadFill,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL ViaFillCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ViaFill" ),
|
|
||||||
&DisplayOpt.DisplayViaFill,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL PadAfficheGardeCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "PadAffG" ),
|
|
||||||
&DisplayOpt.DisplayPadIsol,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL PadShowNumCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "PadSNum" ),
|
|
||||||
&DisplayOpt.DisplayPadNum,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT AfficheContourModuleCfg // Module Edges: fill/line/sketch
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ModAffC" ),
|
|
||||||
&DisplayOpt.DisplayModEdge,
|
|
||||||
FILLED,
|
|
||||||
0, 2
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT AfficheTexteModuleCfg // Module Texts: fill/line/sketch
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ModAffT" ),
|
|
||||||
&DisplayOpt.DisplayModText,
|
|
||||||
FILLED,
|
|
||||||
0, 2
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT AffichePcbTextCfg // PCB Texts: fill/line/sketch
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "PcbAffT" ),
|
|
||||||
&DisplayOpt.DisplayDrawItems,
|
|
||||||
FILLED,
|
|
||||||
0, 2
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL SegmPcb45Cfg // Force 45 degrees for segments
|
|
||||||
(
|
|
||||||
wxT( "SgPcb45" ),
|
|
||||||
&Segments_45_Only,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT PcbTextDimVCfg
|
|
||||||
(
|
|
||||||
wxT( "TxtPcbV" ),
|
|
||||||
&boardDesignSettings.m_PcbTextSize.y,
|
|
||||||
600,
|
|
||||||
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT PcbTextDimHCfg
|
|
||||||
(
|
|
||||||
wxT( "TxtPcbH" ),
|
|
||||||
&boardDesignSettings.m_PcbTextSize.x,
|
|
||||||
600,
|
|
||||||
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer0Cfg // CU Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay0" ),
|
|
||||||
LOC_COLOR(0),
|
|
||||||
GREEN
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer1Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay1" ),
|
|
||||||
LOC_COLOR(1),
|
|
||||||
BLUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer2Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay2" ),
|
|
||||||
LOC_COLOR(2),
|
|
||||||
LIGHTGRAY
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer3Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay3" ),
|
|
||||||
LOC_COLOR(3),
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer4Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay4" ),
|
|
||||||
LOC_COLOR(4),
|
|
||||||
4
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer5Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay5" ),
|
|
||||||
LOC_COLOR(5),
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer6Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay6" ),
|
|
||||||
LOC_COLOR(6),
|
|
||||||
6
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer7Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay7" ),
|
|
||||||
LOC_COLOR(7),
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer8Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay8" ),
|
|
||||||
LOC_COLOR(8),
|
|
||||||
7
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer9Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLay9" ),
|
|
||||||
LOC_COLOR(9),
|
|
||||||
1
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer10Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayA" ),
|
|
||||||
LOC_COLOR(10),
|
|
||||||
2
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer11Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayB" ),
|
|
||||||
LOC_COLOR(11),
|
|
||||||
3
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer12Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayC" ),
|
|
||||||
LOC_COLOR(12),
|
|
||||||
12
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer13Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayD" ),
|
|
||||||
LOC_COLOR(13),
|
|
||||||
13
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer14Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayE" ),
|
|
||||||
LOC_COLOR(14),
|
|
||||||
14
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer15Cfg // CMP Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayF" ),
|
|
||||||
LOC_COLOR(15),
|
|
||||||
RED
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer16Cfg // Adhesive CU Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayG" ),
|
|
||||||
LOC_COLOR(16),
|
|
||||||
1
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer17Cfg // Adhesive CMP Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayH" ),
|
|
||||||
LOC_COLOR(17),
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer18Cfg // Solder Mask CU Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayI" ),
|
|
||||||
LOC_COLOR(18),
|
|
||||||
11
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer19Cfg // Solder Mask CMP Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayJ" ),
|
|
||||||
LOC_COLOR(19),
|
|
||||||
4
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer20Cfg // Silk Screen CU Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayK" ),
|
|
||||||
LOC_COLOR(20),
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer21Cfg // Silk Screen CMP Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayL" ),
|
|
||||||
LOC_COLOR(21),
|
|
||||||
3
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer22Cfg // Mask CU Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayM" ),
|
|
||||||
LOC_COLOR(22),
|
|
||||||
6
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer23Cfg // Mask CMP Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayN" ),
|
|
||||||
LOC_COLOR(23),
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer24Cfg // DRAW Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayO" ),
|
|
||||||
LOC_COLOR(24),
|
|
||||||
LIGHTGRAY
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer25Cfg // Comment Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayP" ),
|
|
||||||
LOC_COLOR(25),
|
|
||||||
1
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer26Cfg // ECO1 Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayQ" ),
|
|
||||||
LOC_COLOR(26),
|
|
||||||
2
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer27Cfg //ECO2 Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayR" ),
|
|
||||||
LOC_COLOR(27),
|
|
||||||
14
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer28Cfg // EDGES Layer Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayS" ),
|
|
||||||
LOC_COLOR(28),
|
|
||||||
YELLOW
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer29Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayT" ),
|
|
||||||
LOC_COLOR(29),
|
|
||||||
13
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer30Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayU" ),
|
|
||||||
LOC_COLOR(30),
|
|
||||||
14
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorLayer31Cfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ColLayV" ),
|
|
||||||
LOC_COLOR(31),
|
|
||||||
7
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorTxtModCmpCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CTxtMoC" ),
|
|
||||||
ITEM_COLOR(MOD_TEXT_FR_VISIBLE),
|
|
||||||
LIGHTGRAY
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorTxtModCuCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CTxtMoS" ),
|
|
||||||
ITEM_COLOR(MOD_TEXT_BK_VISIBLE),
|
|
||||||
BLUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR VisibleTxtModCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CTxtVis" ),
|
|
||||||
ITEM_COLOR(MOD_TEXT_INVISIBLE),
|
|
||||||
DARKGRAY
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT TexteModDimVCfg
|
|
||||||
(
|
|
||||||
wxT( "TxtModV" ),
|
|
||||||
&ModuleTextSize.y,
|
|
||||||
500,
|
|
||||||
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT TexteModDimHCfg
|
|
||||||
(
|
|
||||||
wxT( "TxtModH" ),
|
|
||||||
&ModuleTextSize.x,
|
|
||||||
500,
|
|
||||||
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT TexteModWidthCfg
|
|
||||||
(
|
|
||||||
wxT( "TxtModW" ),
|
|
||||||
&ModuleTextWidth,
|
|
||||||
100,
|
|
||||||
1, TEXTS_MAX_WIDTH
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorAncreModCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CAncreM" ),
|
|
||||||
ITEM_COLOR(ANCHOR_VISIBLE),
|
|
||||||
BLUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorPadCuCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CoPadCu" ),
|
|
||||||
ITEM_COLOR(PAD_BK_VISIBLE),
|
|
||||||
GREEN
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorPadCmpCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CoPadCm" ),
|
|
||||||
ITEM_COLOR(PAD_FR_VISIBLE),
|
|
||||||
RED
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorViaThroughCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CoViaTh" ),
|
|
||||||
ITEM_COLOR(VIA_THROUGH_VISIBLE),
|
|
||||||
LIGHTGRAY
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorViaBlindBuriedCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CoViaBu" ),
|
|
||||||
ITEM_COLOR(VIA_BBLIND_VISIBLE),
|
|
||||||
BROWN
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorViaMicroViaCfg // Buried Via Color
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CoViaMi" ),
|
|
||||||
ITEM_COLOR(VIA_MICROVIA_VISIBLE),
|
|
||||||
CYAN
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_SETCOLOR ColorCheveluCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "CoRatsN" ),
|
|
||||||
ITEM_COLOR(RATSNEST_VISIBLE),
|
|
||||||
WHITE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT HPGLpenNumCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "HPGLnum" ),
|
|
||||||
&g_pcb_plot_options.HPGL_Pen_Num,
|
|
||||||
1,
|
|
||||||
1, 16
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils)
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "HPGdiam" ),
|
|
||||||
&g_pcb_plot_options.HPGL_Pen_Diam,
|
|
||||||
15,
|
|
||||||
0, 100
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s)
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "HPGLSpd" ),
|
|
||||||
&g_pcb_plot_options.HPGL_Pen_Speed,
|
|
||||||
20,
|
|
||||||
0, 1000
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT HPGLrecouvrementCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "HPGLrec" ),
|
|
||||||
&g_pcb_plot_options.HPGL_Pen_Recouvrement,
|
|
||||||
2,
|
|
||||||
0, 0x100
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT VernisEpargneGardeCfg
|
|
||||||
(
|
|
||||||
wxT( "VEgarde" ),
|
|
||||||
&boardDesignSettings.m_SolderMaskMargin,
|
|
||||||
100,
|
|
||||||
0, 10000
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT DrawSegmLargeurCfg
|
|
||||||
(
|
|
||||||
wxT( "DrawLar" ),
|
|
||||||
&boardDesignSettings.m_DrawSegmentWidth,
|
|
||||||
120,
|
|
||||||
0, 0xFFFF
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT EdgeSegmLargeurCfg
|
|
||||||
(
|
|
||||||
wxT( "EdgeLar" ),
|
|
||||||
&boardDesignSettings.m_EdgeSegmentWidth,
|
|
||||||
120,
|
|
||||||
0, 0xFFFF
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT TexteSegmLargeurCfg
|
|
||||||
(
|
|
||||||
wxT( "TxtLar" ),
|
|
||||||
&boardDesignSettings.m_PcbTextWidth,
|
|
||||||
120,
|
|
||||||
0, 0xFFFF
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT ModuleSegmWidthCfg
|
|
||||||
(
|
|
||||||
wxT( "MSegLar" ),
|
|
||||||
&ModuleSegmentWidth,
|
|
||||||
120,
|
|
||||||
0, 0xFFFF
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT WTraitSerigraphiePlotCfg
|
|
||||||
(
|
|
||||||
wxT( "WpenSer" ),
|
|
||||||
&g_pcb_plot_options.PlotLine_Width,
|
|
||||||
10,
|
|
||||||
1, 10000
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT TimeOutCfg // Automatic backup duration time in
|
|
||||||
( // seconds.
|
|
||||||
INSETUP,
|
|
||||||
wxT( "TimeOut" ),
|
|
||||||
&g_TimeOut,
|
|
||||||
600,
|
|
||||||
0, 60000
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL DisplPolairCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "DPolair" ),
|
|
||||||
&DisplayOpt.DisplayPolarCood,
|
|
||||||
FALSE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_INT PrmMaxLinksShowed
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "MaxLnkS" ),
|
|
||||||
&g_MaxLinksShowed,
|
|
||||||
3,
|
|
||||||
0, 15
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL ShowModuleRatsnestCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "ShowMRa" ),
|
|
||||||
&g_Show_Module_Ratsnest,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
static PARAM_CFG_BOOL TwoSegmentTrackBuildCfg
|
|
||||||
(
|
|
||||||
INSETUP,
|
|
||||||
wxT( "TwoSegT" ),
|
|
||||||
&g_TwoSegmentTrackBuild,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* parameters in this list will be saved on request (when saving config).
|
|
||||||
*/
|
|
||||||
PARAM_CFG_BASE* ParamCfgList[] =
|
|
||||||
{
|
|
||||||
&UserLibDirBufCfg,
|
|
||||||
&LibNameBufCfg,
|
|
||||||
&PadDrillCfg,
|
|
||||||
&PadDimHCfg,
|
|
||||||
&PadDimVCfg,
|
|
||||||
&ViaShowHoleCfg,
|
|
||||||
&ShowNetNamesModeCfg,
|
|
||||||
&BoardThicknessCfg,
|
|
||||||
&RouteLayTopCfg,
|
|
||||||
&RouteLayBotCfg,
|
|
||||||
&Segm45Cfg,
|
|
||||||
&Raccord45Cfg,
|
|
||||||
&UnitCfg,
|
|
||||||
&SegmFillCfg,
|
|
||||||
&TrackDisplayClearanceCfg,
|
|
||||||
&PadFillCfg,
|
|
||||||
&ViaFillCfg,
|
|
||||||
&PadAfficheGardeCfg,
|
|
||||||
&PadShowNumCfg,
|
|
||||||
&AfficheContourModuleCfg,
|
|
||||||
&AfficheTexteModuleCfg,
|
|
||||||
&AffichePcbTextCfg,
|
|
||||||
&SegmPcb45Cfg,
|
|
||||||
&PcbTextDimVCfg,
|
|
||||||
&PcbTextDimHCfg,
|
|
||||||
&ColorLayer0Cfg,
|
|
||||||
&ColorLayer1Cfg,
|
|
||||||
&ColorLayer2Cfg,
|
|
||||||
&ColorLayer3Cfg,
|
|
||||||
&ColorLayer4Cfg,
|
|
||||||
&ColorLayer5Cfg,
|
|
||||||
&ColorLayer6Cfg,
|
|
||||||
&ColorLayer7Cfg,
|
|
||||||
&ColorLayer8Cfg,
|
|
||||||
&ColorLayer9Cfg,
|
|
||||||
&ColorLayer10Cfg,
|
|
||||||
&ColorLayer11Cfg,
|
|
||||||
&ColorLayer12Cfg,
|
|
||||||
&ColorLayer13Cfg,
|
|
||||||
&ColorLayer14Cfg,
|
|
||||||
&ColorLayer15Cfg,
|
|
||||||
&ColorLayer16Cfg,
|
|
||||||
&ColorLayer17Cfg,
|
|
||||||
&ColorLayer18Cfg,
|
|
||||||
&ColorLayer19Cfg,
|
|
||||||
&ColorLayer20Cfg,
|
|
||||||
&ColorLayer21Cfg,
|
|
||||||
&ColorLayer22Cfg,
|
|
||||||
&ColorLayer23Cfg,
|
|
||||||
&ColorLayer24Cfg,
|
|
||||||
&ColorLayer25Cfg,
|
|
||||||
&ColorLayer26Cfg,
|
|
||||||
&ColorLayer27Cfg,
|
|
||||||
&ColorLayer28Cfg,
|
|
||||||
&ColorLayer29Cfg,
|
|
||||||
&ColorLayer30Cfg,
|
|
||||||
&ColorLayer31Cfg,
|
|
||||||
&ColorTxtModCmpCfg,
|
|
||||||
&ColorTxtModCuCfg,
|
|
||||||
&VisibleTxtModCfg,
|
|
||||||
&TexteModDimVCfg,
|
|
||||||
&TexteModDimHCfg,
|
|
||||||
&TexteModWidthCfg,
|
|
||||||
&ColorAncreModCfg,
|
|
||||||
&ColorPadCuCfg,
|
|
||||||
&ColorPadCmpCfg,
|
|
||||||
&ColorViaThroughCfg,
|
|
||||||
&ColorViaBlindBuriedCfg,
|
|
||||||
&ColorViaMicroViaCfg,
|
|
||||||
&ColorCheveluCfg,
|
|
||||||
&HPGLpenNumCfg,
|
|
||||||
&HPGLdiamCfg,
|
|
||||||
&HPGLspeedCfg,
|
|
||||||
&HPGLrecouvrementCfg,
|
|
||||||
&VernisEpargneGardeCfg,
|
|
||||||
&DrawSegmLargeurCfg,
|
|
||||||
&EdgeSegmLargeurCfg,
|
|
||||||
&TexteSegmLargeurCfg,
|
|
||||||
&ModuleSegmWidthCfg,
|
|
||||||
&WTraitSerigraphiePlotCfg,
|
|
||||||
&TimeOutCfg,
|
|
||||||
&DisplPolairCfg,
|
|
||||||
&PrmMaxLinksShowed,
|
|
||||||
&ShowModuleRatsnestCfg,
|
|
||||||
&TwoSegmentTrackBuildCfg,
|
|
||||||
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event )
|
||||||
case ID_PCB_ADD_LINE_BUTT:
|
case ID_PCB_ADD_LINE_BUTT:
|
||||||
case ID_PCB_DIMENSION_BUTT:
|
case ID_PCB_DIMENSION_BUTT:
|
||||||
case ID_PCB_ADD_TEXT_BUTT:
|
case ID_PCB_ADD_TEXT_BUTT:
|
||||||
InstallPcbOptionsFrame( ID_PCB_DRAWINGS_WIDTHS_SETUP );
|
OnConfigurePcbOptions( event );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue