2009-10-30 17:58:15 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dialog_global_edit_tracks_and_vias.cpp
|
|
|
|
// Author: jean-pierre Charras
|
|
|
|
// Created: 30 oct 2009
|
|
|
|
// Licence: GPL
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
|
|
|
#include <confirm.h>
|
|
|
|
#include <pcbnew.h>
|
|
|
|
#include <wxPcbStruct.h>
|
|
|
|
#include <class_drawpanel.h>
|
2012-04-13 18:51:24 +00:00
|
|
|
#include <base_units.h>
|
2009-10-30 17:58:15 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <class_board.h>
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <dialog_global_edit_tracks_and_vias.h>
|
2009-10-30 17:58:15 +00:00
|
|
|
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2009-10-30 17:58:15 +00:00
|
|
|
/**
|
2009-11-13 17:08:05 +00:00
|
|
|
* DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS, derived from DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE_BASE
|
2009-10-30 17:58:15 +00:00
|
|
|
* @see dialog_global_edit_tracks_and_vias_base.h and dialog_global_edit_tracks_and_vias_base.cpp,
|
|
|
|
* automatically created by wxFormBuilder
|
|
|
|
*/
|
|
|
|
|
2011-03-01 19:26:17 +00:00
|
|
|
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT_FRAME* aParent,
|
|
|
|
int aNetcode ) :
|
2009-10-30 17:58:15 +00:00
|
|
|
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE( aParent )
|
|
|
|
{
|
|
|
|
m_Parent = aParent;
|
|
|
|
m_Netcode = aNetcode;
|
2009-11-12 14:55:33 +00:00
|
|
|
m_OptionID = 0;
|
2009-10-30 17:58:15 +00:00
|
|
|
MyInit();
|
|
|
|
GetSizer()->SetSizeHints( this );
|
2009-11-12 14:55:33 +00:00
|
|
|
Layout();
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************/
|
|
|
|
void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit()
|
|
|
|
/*************************************************/
|
|
|
|
{
|
|
|
|
SetFocus();
|
|
|
|
|
|
|
|
wxString msg;
|
|
|
|
|
|
|
|
// Display current setup for tracks and vias
|
|
|
|
BOARD* board = m_Parent->GetBoard();
|
2014-05-13 09:22:51 +00:00
|
|
|
BOARD_DESIGN_SETTINGS& dsnSettings = board->GetDesignSettings();
|
|
|
|
NETCLASSES& netclasses = dsnSettings.m_NetClasses;
|
2014-05-20 09:29:37 +00:00
|
|
|
NETCLASSPTR netclass = netclasses.GetDefault();
|
2014-05-13 09:22:51 +00:00
|
|
|
NETINFO_ITEM* net = board->FindNet( m_Netcode );
|
2013-01-09 18:52:44 +00:00
|
|
|
|
2009-10-30 17:58:15 +00:00
|
|
|
if( net )
|
|
|
|
{
|
|
|
|
m_CurrentNetName->SetLabel( net->GetNetname() );
|
2014-05-13 09:22:51 +00:00
|
|
|
m_CurrentNetclassName->SetLabel( dsnSettings.GetCurrentNetClassName() );
|
|
|
|
netclass = netclasses.Find( dsnSettings.GetCurrentNetClassName() );
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
|
2009-11-13 17:08:05 +00:00
|
|
|
/* Disable the option "copy current to net" if we have only default netclass values
|
|
|
|
* i.e. when m_TrackWidthSelector and m_ViaSizeSelector are set to 0
|
|
|
|
*/
|
2014-05-13 09:22:51 +00:00
|
|
|
if( !dsnSettings.GetTrackWidthIndex() && !dsnSettings.GetViaSizeIndex() )
|
2009-10-30 17:58:15 +00:00
|
|
|
{
|
2009-11-02 20:36:20 +00:00
|
|
|
m_Net2CurrValueButton->Enable( false );
|
2009-11-12 14:55:33 +00:00
|
|
|
m_OptionID = ID_NETCLASS_VALUES_TO_CURRENT_NET;
|
|
|
|
m_NetUseNetclassValueButton->SetValue(true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_OptionID = ID_CURRENT_VALUES_TO_CURRENT_NET;
|
|
|
|
m_Net2CurrValueButton->SetValue(true);
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Display current values, and current netclass values:
|
2009-11-13 17:08:05 +00:00
|
|
|
int value = netclass->GetTrackWidth(); // Display track width
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 0, 0, msg );
|
2013-01-09 18:52:44 +00:00
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
if( dsnSettings.GetTrackWidthIndex() )
|
2009-10-30 17:58:15 +00:00
|
|
|
{
|
2014-05-13 09:22:51 +00:00
|
|
|
value = dsnSettings.GetCurrentTrackWidth();
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
msg = _( "Default" );
|
2013-01-09 18:52:44 +00:00
|
|
|
|
2009-10-30 17:58:15 +00:00
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 1, 0, msg );
|
2009-11-02 20:36:20 +00:00
|
|
|
|
2009-11-13 17:08:05 +00:00
|
|
|
value = netclass->GetViaDiameter(); // Display via diameter
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 0, 1, msg );
|
2013-01-09 18:52:44 +00:00
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
if( dsnSettings.GetViaSizeIndex() )
|
2009-10-30 17:58:15 +00:00
|
|
|
{
|
2014-05-13 09:22:51 +00:00
|
|
|
value = dsnSettings.GetCurrentViaSize();
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
msg = _( "Default" );
|
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 1, 1, msg );
|
|
|
|
|
2009-11-13 17:08:05 +00:00
|
|
|
value = netclass->GetViaDrill(); // Display via drill
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 0, 2, msg );
|
2014-05-13 09:22:51 +00:00
|
|
|
value = dsnSettings.GetCurrentViaDrill();
|
2009-10-30 17:58:15 +00:00
|
|
|
if( value >= 0 )
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
else
|
|
|
|
msg = _( "Default" );
|
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 1, 2, msg );
|
|
|
|
|
2009-11-13 17:08:05 +00:00
|
|
|
value = netclass->GetuViaDiameter(); // Display micro via diameter
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 0, 3, msg );
|
|
|
|
#if 0 // Currently we use always the default netclass value
|
|
|
|
value = board->GetCurrentMicroViaSize();
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
#endif
|
|
|
|
msg = _( "Default" );
|
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 1, 3, msg );
|
|
|
|
|
2009-11-13 17:08:05 +00:00
|
|
|
value = netclass->GetuViaDrill(); // Display micro via drill
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 0, 4, msg );
|
|
|
|
#if 0 // Currently we use always the default netclass value
|
|
|
|
value = board->GetCurrentMicroViaDrill();
|
|
|
|
if( value >= 0 )
|
* KIWAY Milestone A): Make major modules into DLL/DSOs.
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
2014-03-20 00:42:08 +00:00
|
|
|
msg = StringFromValue( g_UserUnit, value, true );
|
2009-10-30 17:58:15 +00:00
|
|
|
else
|
|
|
|
#endif
|
|
|
|
msg = _( "Default" );
|
|
|
|
m_gridDisplayCurrentSettings->SetCellValue( 1, 4, msg );
|
|
|
|
|
2009-11-12 14:55:33 +00:00
|
|
|
// Set all cells Read Only
|
2009-10-30 17:58:15 +00:00
|
|
|
for( int ii = 0; ii < m_gridDisplayCurrentSettings->GetNumberRows(); ii++ )
|
|
|
|
{
|
|
|
|
for( int jj = 0; jj < m_gridDisplayCurrentSettings->GetNumberCols(); jj++ )
|
|
|
|
m_gridDisplayCurrentSettings->SetReadOnly( ii, jj, true );
|
|
|
|
}
|
2012-01-23 04:33:36 +00:00
|
|
|
|
2009-11-13 17:08:05 +00:00
|
|
|
// needs wxWidgets version >= 2.8.8:
|
|
|
|
m_gridDisplayCurrentSettings->SetRowLabelSize(wxGRID_AUTOSIZE);
|
2009-10-30 17:58:15 +00:00
|
|
|
|
2009-11-02 20:36:20 +00:00
|
|
|
m_gridDisplayCurrentSettings->Fit();
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************/
|
|
|
|
void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event )
|
|
|
|
/*******************************************************************/
|
|
|
|
{
|
|
|
|
bool change = false;
|
2009-11-02 20:36:20 +00:00
|
|
|
|
2009-11-12 14:55:33 +00:00
|
|
|
switch( m_OptionID )
|
2009-10-30 17:58:15 +00:00
|
|
|
{
|
2009-11-02 20:36:20 +00:00
|
|
|
case ID_CURRENT_VALUES_TO_CURRENT_NET:
|
|
|
|
if( !IsOK( this,
|
|
|
|
_( "Set current Net tracks and vias sizes and drill to the current values?" ) ) )
|
|
|
|
return;
|
|
|
|
{
|
|
|
|
wxBusyCursor dummy;
|
2009-10-30 17:58:15 +00:00
|
|
|
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, false );
|
2009-11-02 20:36:20 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_NETCLASS_VALUES_TO_CURRENT_NET:
|
|
|
|
if( !IsOK( this,
|
|
|
|
_(
|
|
|
|
"Set current Net tracks and vias sizes and drill to the Netclass default value?" ) ) )
|
|
|
|
return;
|
|
|
|
{
|
|
|
|
wxBusyCursor dummy;
|
2009-10-30 17:58:15 +00:00
|
|
|
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, true );
|
2009-11-02 20:36:20 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_ALL_TRACKS_VIAS:
|
|
|
|
if( !IsOK( this, _( "Set All Tracks and Vias to Netclass value" ) ) )
|
|
|
|
return;
|
|
|
|
{
|
|
|
|
wxBusyCursor dummy;
|
2009-10-30 17:58:15 +00:00
|
|
|
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, true );
|
2009-11-02 20:36:20 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_ALL_VIAS:
|
|
|
|
if( !IsOK( this, _( "Set All Via to Netclass value" ) ) )
|
|
|
|
return;
|
|
|
|
{
|
|
|
|
wxBusyCursor dummy;
|
2009-10-30 17:58:15 +00:00
|
|
|
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( false, true );
|
2009-11-02 20:36:20 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_ALL_TRACKS:
|
|
|
|
if( !IsOK( this, _( "Set All Track to Netclass value" ) ) )
|
|
|
|
return;
|
|
|
|
{
|
|
|
|
wxBusyCursor dummy;
|
2009-10-30 17:58:15 +00:00
|
|
|
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, false );
|
2009-11-02 20:36:20 +00:00
|
|
|
}
|
|
|
|
break;
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
EndModal( 1 );
|
2011-12-22 13:28:11 +00:00
|
|
|
|
2009-10-30 17:58:15 +00:00
|
|
|
if( change )
|
2011-12-22 13:28:11 +00:00
|
|
|
m_Parent->GetCanvas()->Refresh();
|
2009-10-30 17:58:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************
|
|
|
|
*event handler for wxID_CANCEL
|
|
|
|
******************************/
|
|
|
|
void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnCancelClick( wxCommandEvent& event )
|
|
|
|
{
|
|
|
|
EndModal( 0 );
|
|
|
|
}
|