2009-11-18 12:52:19 +00:00
|
|
|
/****************************************/
|
|
|
|
/** pcbnew_config.cpp : configuration **/
|
|
|
|
/****************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "appl_wxstruct.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "common.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "class_drawpanel.h"
|
|
|
|
#include "confirm.h"
|
|
|
|
#include "gestfich.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "pcbnew.h"
|
2009-07-30 11:04:07 +00:00
|
|
|
#include "wxPcbStruct.h"
|
2009-10-28 11:48:47 +00:00
|
|
|
#include "class_board_design_settings.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "pcbplot.h"
|
2010-12-09 17:34:08 +00:00
|
|
|
#include "plot_common.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "worksheet.h"
|
2009-09-22 12:27:57 +00:00
|
|
|
#include "pcbnew_id.h"
|
2007-09-06 11:52:26 +00:00
|
|
|
#include "hotkeys.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "protos.h"
|
|
|
|
|
2009-10-30 17:58:15 +00:00
|
|
|
#include "dialog_mask_clearance.h"
|
|
|
|
#include "dialog_general_options.h"
|
|
|
|
|
2010-01-29 20:36:12 +00:00
|
|
|
#include "pcbnew_config.h"
|
2010-08-28 18:02:24 +00:00
|
|
|
#include "dialog_hotkeys_editor.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2008-02-19 00:35:45 +00:00
|
|
|
#define HOTKEY_FILENAME wxT( "pcbnew" )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2011-03-01 19:26:17 +00:00
|
|
|
void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2008-12-08 15:27:13 +00:00
|
|
|
int id = event.GetId();
|
2009-04-05 20:49:15 +00:00
|
|
|
wxFileName fn;
|
2008-02-19 00:35:45 +00:00
|
|
|
|
|
|
|
switch( id )
|
|
|
|
{
|
2010-01-27 20:07:50 +00:00
|
|
|
case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG:
|
2011-03-03 19:08:13 +00:00
|
|
|
m_show_layer_manager_tools = ! m_show_layer_manager_tools;
|
|
|
|
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
|
|
|
|
m_auimgr.Update();
|
|
|
|
|
|
|
|
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
|
|
|
|
m_show_layer_manager_tools ?
|
|
|
|
_("Hide &Layers Manager" ) : _("Show &Layers Manager" ));
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
2009-10-18 23:22:26 +00:00
|
|
|
case ID_PCB_LAYERS_SETUP:
|
2010-11-18 21:16:28 +00:00
|
|
|
InstallDialogLayerSetup();
|
2009-10-18 23:22:26 +00:00
|
|
|
break;
|
2009-09-17 17:48:40 +00:00
|
|
|
|
2009-11-18 12:52:19 +00:00
|
|
|
case ID_CONFIG_REQ:
|
2011-03-03 19:08:13 +00:00
|
|
|
InstallConfigFrame();
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
2009-10-30 17:58:15 +00:00
|
|
|
case ID_PCB_MASK_CLEARANCE:
|
|
|
|
{
|
|
|
|
DIALOG_PADS_MASK_CLEARANCE dlg( this );
|
|
|
|
dlg.ShowModal();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2011-04-04 18:05:55 +00:00
|
|
|
case wxID_PREFERENCES:
|
2009-10-30 17:58:15 +00:00
|
|
|
{
|
2009-12-19 19:24:49 +00:00
|
|
|
Dialog_GeneralOptions dlg( this );
|
2009-10-30 17:58:15 +00:00
|
|
|
dlg.ShowModal();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2008-02-19 00:35:45 +00:00
|
|
|
case ID_PCB_PAD_SETUP:
|
2009-12-19 19:24:49 +00:00
|
|
|
InstallPadOptionsFrame( NULL );
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_CONFIG_SAVE:
|
2010-04-23 14:46:00 +00:00
|
|
|
SaveProjectSettings();
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_CONFIG_READ:
|
2009-04-05 20:49:15 +00:00
|
|
|
{
|
2011-01-20 16:34:57 +00:00
|
|
|
fn = GetScreen()->GetFileName();
|
2009-04-05 20:49:15 +00:00
|
|
|
fn.SetExt( ProjectFileExtension );
|
|
|
|
|
|
|
|
wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(),
|
|
|
|
fn.GetFullName(), ProjectFileWildcard,
|
|
|
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR );
|
|
|
|
|
|
|
|
if( dlg.ShowModal() == wxID_CANCEL )
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
if( !wxFileExists( dlg.GetPath() ) )
|
2008-02-19 00:35:45 +00:00
|
|
|
{
|
|
|
|
wxString msg;
|
2009-10-13 09:00:46 +00:00
|
|
|
msg.Printf( _( "File %s not found" ), GetChars( dlg.GetPath() ) );
|
2009-04-05 20:49:15 +00:00
|
|
|
DisplayError( this, msg );
|
|
|
|
break;
|
2008-02-19 00:35:45 +00:00
|
|
|
}
|
|
|
|
|
2010-04-23 14:46:00 +00:00
|
|
|
LoadProjectSettings( dlg.GetPath() );
|
2009-04-05 20:49:15 +00:00
|
|
|
break;
|
|
|
|
}
|
2008-02-19 00:35:45 +00:00
|
|
|
|
2010-08-28 18:02:24 +00:00
|
|
|
/* Hotkey IDs */
|
|
|
|
case ID_PREFERENCES_HOTKEY_EXPORT_CONFIG:
|
2010-11-24 15:10:33 +00:00
|
|
|
ExportHotkeyConfigToFile( g_Board_Editor_Hokeys_Descr );
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
2010-08-28 18:02:24 +00:00
|
|
|
case ID_PREFERENCES_HOTKEY_IMPORT_CONFIG:
|
2010-11-24 15:10:33 +00:00
|
|
|
ImportHotkeyConfigFromFile( g_Board_Editor_Hokeys_Descr );
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
2010-08-28 18:02:24 +00:00
|
|
|
case ID_PREFERENCES_HOTKEY_SHOW_EDITOR:
|
2010-11-24 15:10:33 +00:00
|
|
|
InstallHotkeyFrame( this, g_Board_Editor_Hokeys_Descr );
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
|
2010-08-28 18:02:24 +00:00
|
|
|
// Display current hotkey list for eeschema.
|
2010-11-24 15:10:33 +00:00
|
|
|
DisplayHotkeyList( this, g_Board_Editor_Hokeys_Descr );
|
2008-02-19 00:35:45 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2011-03-03 19:08:13 +00:00
|
|
|
DisplayError( this, wxT( "PCB_EDIT_FRAME::Process_Config error" ) );
|
2008-02-19 00:35:45 +00:00
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-23 14:46:00 +00:00
|
|
|
/**
|
|
|
|
* Read the project configuration file settings.
|
|
|
|
*
|
|
|
|
* @param aProjectFileName = The project file name to load. If aProjectFileName
|
|
|
|
* is not found load the default project file kicad.pro
|
|
|
|
* and initialize setting to their default value.
|
|
|
|
* @return Always returns true.
|
2008-02-19 00:35:45 +00:00
|
|
|
*/
|
2011-03-01 19:26:17 +00:00
|
|
|
bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2010-04-23 14:46:00 +00:00
|
|
|
wxFileName fn = aProjectFileName;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
if( fn.GetExt() != ProjectFileExtension )
|
|
|
|
fn.SetExt( ProjectFileExtension );
|
|
|
|
|
2009-04-09 18:39:39 +00:00
|
|
|
wxGetApp().RemoveLibraryPath( g_UserLibDirBuffer );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-11-18 12:52:19 +00:00
|
|
|
/* Initialize default values. */
|
2008-02-19 00:35:45 +00:00
|
|
|
g_LibName_List.Clear();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2011-03-03 19:08:13 +00:00
|
|
|
wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-09 18:39:39 +00:00
|
|
|
/* User library path takes precedent over default library search paths. */
|
|
|
|
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-10-21 19:16:25 +00:00
|
|
|
/* Reset the items visibility flag when loading a new config
|
2009-10-10 01:25:53 +00:00
|
|
|
* Because it could creates SERIOUS mistakes for the user,
|
2010-01-30 14:46:26 +00:00
|
|
|
* if board items are not visible after loading a board...
|
|
|
|
* Grid and ratsnest can be left to their previous state
|
2009-10-10 01:25:53 +00:00
|
|
|
*/
|
2010-04-23 14:46:00 +00:00
|
|
|
bool showGrid = IsElementVisible( GRID_VISIBLE );
|
|
|
|
bool showRats = IsElementVisible( RATSNEST_VISIBLE );
|
|
|
|
SetVisibleAlls();
|
|
|
|
SetElementVisibility( GRID_VISIBLE, showGrid );
|
|
|
|
SetElementVisibility( RATSNEST_VISIBLE, showRats );
|
2011-03-03 19:08:13 +00:00
|
|
|
return true;
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 00:35:45 +00:00
|
|
|
|
2011-03-01 19:26:17 +00:00
|
|
|
void PCB_EDIT_FRAME::SaveProjectSettings()
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-04-05 20:49:15 +00:00
|
|
|
wxFileName fn;
|
|
|
|
|
2011-01-20 16:34:57 +00:00
|
|
|
fn = GetScreen()->GetFileName();
|
2009-04-05 20:49:15 +00:00
|
|
|
fn.SetExt( ProjectFileExtension );
|
|
|
|
|
2010-04-23 14:46:00 +00:00
|
|
|
wxFileDialog dlg( this, _( "Save Project File" ), fn.GetPath(), fn.GetFullName(),
|
|
|
|
ProjectFileWildcard, wxFD_SAVE | wxFD_CHANGE_DIR );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
if( dlg.ShowModal() == wxID_CANCEL )
|
2008-02-19 00:35:45 +00:00
|
|
|
return;
|
|
|
|
|
2010-04-23 14:46:00 +00:00
|
|
|
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, GetProjectFileParameters() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2011-03-01 19:26:17 +00:00
|
|
|
PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters()
|
2010-04-23 14:46:00 +00:00
|
|
|
{
|
|
|
|
if( !m_projectFileParams.empty() )
|
|
|
|
return m_projectFileParams;
|
|
|
|
|
2011-02-26 08:35:22 +00:00
|
|
|
m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ),&g_UserLibDirBuffer,
|
2010-04-23 14:46:00 +00:00
|
|
|
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_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 ) );
|
2010-07-20 18:11:34 +00:00
|
|
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtModV" ), &g_ModuleTextSize.y,
|
2010-04-23 14:46:00 +00:00
|
|
|
500, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
2010-07-20 18:11:34 +00:00
|
|
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtModH" ), &g_ModuleTextSize.x,
|
2010-04-23 14:46:00 +00:00
|
|
|
500, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
2010-07-20 18:11:34 +00:00
|
|
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtModW" ), &g_ModuleTextWidth,
|
2010-04-23 14:46:00 +00:00
|
|
|
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 ) );
|
2010-07-20 18:11:34 +00:00
|
|
|
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "MSegLar" ), &g_ModuleSegmentWidth,
|
2010-04-23 14:46:00 +00:00
|
|
|
120, 0, 0xFFFF ) );
|
2011-03-22 17:58:58 +00:00
|
|
|
m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ),
|
2010-04-23 14:46:00 +00:00
|
|
|
&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.
|
|
|
|
*/
|
2011-03-01 19:26:17 +00:00
|
|
|
PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
|
2010-04-23 14:46:00 +00:00
|
|
|
{
|
|
|
|
if( !m_configSettings.empty() )
|
|
|
|
return m_configSettings;
|
|
|
|
|
2011-03-03 19:08:13 +00:00
|
|
|
// Units used in dialogs and toolbars
|
|
|
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Units" ), (int*)&g_UserUnit, MILLIMETRES ) );
|
|
|
|
|
|
|
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayPolarCoords" ),
|
|
|
|
&DisplayOpt.DisplayPolarCood, false ) );
|
|
|
|
// Display options and modes:
|
|
|
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaHoleDisplayMode" ),
|
2010-04-23 14:46:00 +00:00
|
|
|
&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 ) );
|
2011-03-03 19:08:13 +00:00
|
|
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayTrackFilled" ),
|
|
|
|
&DisplayOpt.DisplayPcbTrackFill, true ) );
|
2010-04-23 14:46:00 +00:00
|
|
|
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" ),
|
2011-03-03 19:08:13 +00:00
|
|
|
&DisplayOpt.DisplayPadFill, true ) );
|
2010-04-23 14:46:00 +00:00
|
|
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ),
|
2011-03-03 19:08:13 +00:00
|
|
|
&DisplayOpt.DisplayViaFill, true ) );
|
2010-04-23 14:46:00 +00:00
|
|
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadAffG" ),
|
2011-03-03 19:08:13 +00:00
|
|
|
&DisplayOpt.DisplayPadIsol, true ) );
|
2010-04-23 14:46:00 +00:00
|
|
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadSNum" ),
|
2011-03-03 19:08:13 +00:00
|
|
|
&DisplayOpt.DisplayPadNum, true ) );
|
2010-04-23 14:46:00 +00:00
|
|
|
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 ) );
|
2011-03-03 19:08:13 +00:00
|
|
|
|
|
|
|
// Colors:
|
2010-04-23 14:46:00 +00:00
|
|
|
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 ) );
|
2011-03-03 19:08:13 +00:00
|
|
|
|
|
|
|
// Miscellaneous:
|
2010-04-23 14:46:00 +00:00
|
|
|
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut,
|
|
|
|
600, 0, 60000 ) );
|
|
|
|
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" ),
|
2011-03-03 19:08:13 +00:00
|
|
|
&g_Show_Module_Ratsnest, true ) );
|
2010-04-23 14:46:00 +00:00
|
|
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "TwoSegT" ),
|
2011-03-03 19:08:13 +00:00
|
|
|
&g_TwoSegmentTrackBuild, true ) );
|
|
|
|
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegmPcb45Only" ), &Segments_45_Only,
|
|
|
|
true ) );
|
2010-04-23 14:46:00 +00:00
|
|
|
return m_configSettings;
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|