7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Consolidate design rules UI.

Implement new Board Setup paged dialog which includes:
  Layers Setup
  Design Rules
  Solder Mask & Paste
  Text & Drawings

Moves line width and text properties to a layer-class-based
system.  Renames unlocked to upright (which also reverses the
logic).

New Edit Text and Graphic Properties dialog which replaces
Edit Footprint Text and adds layer-class-based editing and the
italic, upright and visibility properties.

Adds Import Settings functionality which allows settings to
be imported from another project at page granularity.

Also UNIT_BINDERizes the dialog and adds editing of pcb text.

Fixes: lp:1731952
* https://bugs.launchpad.net/kicad/+bug/1731952

Fixes: lp:1743464
* https://bugs.launchpad.net/kicad/+bug/1743464

Fixes: lp:1664761
* https://bugs.launchpad.net/kicad/+bug/1664761

Fixes: lp:1753362
* https://bugs.launchpad.net/kicad/+bug/1753362

Fixes: lp:1545427
* https://bugs.launchpad.net/kicad/+bug/1545427

Fixes: lp:1753775
* https://bugs.launchpad.net/kicad/+bug/1753775

Fixes: lp:1777692
* https://bugs.launchpad.net/kicad/+bug/1777692

Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670

Fixes: lp:1519601
* https://bugs.launchpad.net/kicad/+bug/1519601

(cherry picked from commit 3944a5e)
This commit is contained in:
Jeff Young 2018-04-28 16:22:25 +01:00
parent 5f3ee1e7ce
commit aab97c8385
131 changed files with 30932 additions and 31019 deletions
common
include
pcbnew
CMakeLists.txtboard_design_settings.cppclass_text_mod.cppclass_text_mod.h
dialogs
dialog_board_setup.cppdialog_board_setup.hdialog_design_rules.cppdialog_design_rules.hdialog_design_rules_aux_helper_class.hdialog_design_rules_base.cppdialog_design_rules_base.fbpdialog_design_rules_base.hdialog_drc.cppdialog_drc_base.cppdialog_drc_base.fbpdialog_drc_base.hdialog_edit_footprint_for_BoardEditor.cppdialog_edit_footprint_for_BoardEditor_base.cppdialog_edit_footprint_for_BoardEditor_base.fbpdialog_edit_footprint_for_fp_editor.cppdialog_global_edit_text_and_graphics.cppdialog_global_edit_text_and_graphics_base.cppdialog_global_edit_text_and_graphics_base.fbpdialog_global_edit_text_and_graphics_base.hdialog_global_edit_tracks_and_vias.cppdialog_global_edit_tracks_and_vias.hdialog_global_edit_tracks_and_vias_base.cppdialog_global_edit_tracks_and_vias_base.fbpdialog_global_edit_tracks_and_vias_base.hdialog_global_footprints_fields_edition.cppdialog_global_footprints_fields_edition_base.cppdialog_global_footprints_fields_edition_base.fbpdialog_global_footprints_fields_edition_base.hdialog_graphic_items_options.cppdialog_graphic_items_options.hdialog_graphic_items_options_base.cppdialog_graphic_items_options_base.hdialog_import_settings.cppdialog_import_settings.hdialog_import_settings_base.cppdialog_import_settings_base.fbpdialog_import_settings_base.hdialog_layers_setup_base.fbpdialog_mask_clearance.cppdialog_mask_clearance_base.cppdialog_mask_clearance_base.hdialog_netlist.cppdialog_text_properties.cpppanel_modedit_defaults.cpppanel_modedit_defaults.hpanel_modedit_defaults_base.cpppanel_modedit_defaults_base.fbppanel_modedit_defaults_base.hpanel_pcbnew_display_options_base.cpppanel_pcbnew_display_options_base.fbppanel_setup_feature_constraints.cpppanel_setup_feature_constraints.hpanel_setup_feature_constraints_base.cpppanel_setup_feature_constraints_base.fbppanel_setup_feature_constraints_base.hpanel_setup_layers.cpppanel_setup_layers.hpanel_setup_layers_base.cpppanel_setup_layers_base.fbppanel_setup_layers_base.hpanel_setup_mask_and_paste.cpppanel_setup_mask_and_paste.hpanel_setup_mask_and_paste_base.cpppanel_setup_mask_and_paste_base.fbppanel_setup_mask_and_paste_base.hpanel_setup_netclasses.cpppanel_setup_netclasses.hpanel_setup_netclasses_base.cpppanel_setup_netclasses_base.fbppanel_setup_netclasses_base.hpanel_setup_text_and_graphics.cpppanel_setup_text_and_graphics.hpanel_setup_text_and_graphics_base.cpppanel_setup_text_and_graphics_base.fbppanel_setup_text_and_graphics_base.h
dimension.cppdrc.cppeagle_plugin.cppedgemod.cppedit.cppedit_pcb_text.cppedit_track_width.cppeditedge.cppedtxtmod.cppfiles.cppfootprint_edit_frame.cppfootprint_edit_frame.hfootprint_editor_onclick.cppfootprint_editor_options.cppfootprint_editor_utils.cppfootprint_libraries_utils.cppinvoke_pcb_dialog.hkicad_plugin.cpplegacy_plugin.cppmenubar_footprint_editor.cppmenubar_pcb_editor.cppnetclass.cppnetclass.honrightclick.cpp
pcad2kicadpcb_plugin
pcb_edit_frame.cpppcb_edit_frame.hpcb_parser.cpppcbnew_config.cpppcbnew_id.h
router
target_edit.cpptext_mod_grid_table.cpptext_mod_grid_table.htool_onrightclick.cpptool_pcb_editor.cpptoolbars_update_user_interface.cpp
tools

View File

@ -135,19 +135,20 @@ void ConfigBaseWriteDouble( wxConfigBase* aConfig, const wxString& aKey, double
PARAM_CFG_BASE::PARAM_CFG_BASE( const wxString& ident, const paramcfg_id type,
const wxChar* group )
const wxChar* group, const wxString& legacy )
{
m_Ident = ident;
m_Type = type;
m_Group = group;
m_Setup = false;
m_Ident_legacy = legacy;
}
PARAM_CFG_INT::PARAM_CFG_INT( const wxString& ident, int* ptparam,
int default_val, int min, int max,
const wxChar* group ) :
PARAM_CFG_BASE( ident, PARAM_INT, group )
PARAM_CFG_INT::PARAM_CFG_INT( const wxString& ident, int* ptparam, int default_val,
int min, int max, const wxChar* group, const wxString& legacy ) :
PARAM_CFG_BASE( ident, PARAM_INT, group, legacy )
{
m_Pt_param = ptparam;
m_Default = default_val;
@ -156,16 +157,15 @@ PARAM_CFG_INT::PARAM_CFG_INT( const wxString& ident, int* ptparam,
}
PARAM_CFG_INT::PARAM_CFG_INT( bool Insetup, const wxString& ident, int* ptparam,
int default_val, int min, int max,
const wxChar* group ) :
PARAM_CFG_BASE( ident, PARAM_INT, group )
PARAM_CFG_INT::PARAM_CFG_INT( bool setup, const wxString& ident, int* ptparam, int default_val,
int min, int max, const wxChar* group, const wxString& legacy ) :
PARAM_CFG_BASE( ident, PARAM_INT, group, legacy )
{
m_Pt_param = ptparam;
m_Default = default_val;
m_Min = min;
m_Max = max;
m_Setup = Insetup;
m_Setup = setup;
}
@ -174,7 +174,10 @@ void PARAM_CFG_INT::ReadParam( wxConfigBase* aConfig ) const
if( !m_Pt_param || !aConfig )
return;
int itmp = aConfig->Read( m_Ident, m_Default );
int itmp = m_Default;
if( !aConfig->Read( m_Ident, &itmp ) && m_Ident_legacy != wxEmptyString )
aConfig->Read( m_Ident_legacy, &itmp );
if( (itmp < m_Min) || (itmp > m_Max) )
itmp = m_Default;
@ -193,20 +196,21 @@ void PARAM_CFG_INT::SaveParam( wxConfigBase* aConfig ) const
PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( const wxString& ident, int* ptparam,
int default_val, int min, int max,
const wxChar* group, double aBiu2cfgunit ) :
PARAM_CFG_INT( ident, ptparam, default_val, min, max, group )
int default_val, int min, int max,
const wxChar* group, double aBiu2cfgunit,
const wxString& legacy_ident ) :
PARAM_CFG_INT( ident, ptparam, default_val, min, max, group, legacy_ident )
{
m_Type = PARAM_INT_WITH_SCALE;
m_BIU_to_cfgunit = aBiu2cfgunit;
}
PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( bool Insetup,
const wxString& ident, int* ptparam,
int default_val, int min, int max,
const wxChar* group, double aBiu2cfgunit ) :
PARAM_CFG_INT( Insetup, ident, ptparam, default_val, min, max, group )
PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( bool setup, const wxString& ident, int* ptparam,
int default_val, int min, int max,
const wxChar* group, double aBiu2cfgunit,
const wxString& legacy_ident ) :
PARAM_CFG_INT( setup, ident, ptparam, default_val, min, max, group, legacy_ident )
{
m_Type = PARAM_INT_WITH_SCALE;
m_BIU_to_cfgunit = aBiu2cfgunit;
@ -219,7 +223,8 @@ void PARAM_CFG_INT_WITH_SCALE::ReadParam( wxConfigBase* aConfig ) const
return;
double dtmp = (double) m_Default * m_BIU_to_cfgunit;
aConfig->Read( m_Ident, &dtmp );
if( !aConfig->Read( m_Ident, &dtmp ) && m_Ident_legacy != wxEmptyString )
aConfig->Read( m_Ident_legacy, &dtmp );
int itmp = KiROUND( dtmp / m_BIU_to_cfgunit );

View File

@ -802,7 +802,7 @@ LSEQ LSET::UIOrder() const
PCB_LAYER_ID ToLAYER_ID( int aLayer )
{
wxASSERT( unsigned( aLayer ) < PCB_LAYER_ID_COUNT );
wxASSERT( aLayer < GAL_LAYER_ID_END );
return PCB_LAYER_ID( aLayer );
}

View File

@ -102,7 +102,6 @@ struct LANGUAGE_DESCR
*/
static LANGUAGE_DESCR s_Languages[] =
{
// Default language
{ wxLANGUAGE_DEFAULT, ID_LANGUAGE_DEFAULT, lang_def_xpm, _( "Default" ) },
{ wxLANGUAGE_ENGLISH, ID_LANGUAGE_ENGLISH, lang_en_xpm, wxT( "English" ), true },
{ wxLANGUAGE_FRENCH, ID_LANGUAGE_FRENCH, lang_fr_xpm, _( "French" ) },

View File

@ -89,7 +89,8 @@ void WX_GRID::ShowHideColumns( const wxString& shownColumns )
}
// An re-implementation of wxGrid::DrawColLabel which left-aligns the first column.
// An re-implementation of wxGrid::DrawColLabel which left-aligns the first column when
// there are no row labels.
void WX_GRID::DrawColLabel( wxDC& dc, int col )
{
if( GetColWidth( col ) <= 0 || m_colLabelHeight <= 0 )
@ -111,7 +112,7 @@ void WX_GRID::DrawColLabel( wxDC& dc, int col )
GetColLabelAlignment( &hAlign, &vAlign );
const int orient = GetColLabelTextOrientation();
if( col == 0 )
if( col == 0 && GetRowLabelSize() == 0 )
hAlign = wxALIGN_LEFT;
rend.DrawLabel( *this, dc, GetColLabelValue( col ), rect, hAlign, vAlign, orient );

View File

@ -30,29 +30,40 @@
#include <netclass.h>
#include <config_params.h>
// Some default values for the board editor and the fp editor (given in mm)
#define DEFAULT_TEXT_MODULE_SIZE 1.0
#define DEFAULT_GR_MODULE_THICKNESS 0.15 // given in mm
#define DEFAULT_SILK_LINE_WIDTH 0.12
#define DEFAULT_COPPER_LINE_WIDTH 0.20
#define DEFAULT_EDGE_WIDTH 0.05 // used for Edge.Cuts and CrtYds
#define DEFAULT_LINE_WIDTH 0.10
#define DEFAULT_SILK_TEXT_SIZE 1.0
#define DEFAULT_COPPER_TEXT_SIZE 1.5
#define DEFAULT_TEXT_SIZE 1.0
#define DEFAULT_SILK_TEXT_WIDTH 0.15
#define DEFAULT_COPPER_TEXT_WIDTH 0.30
#define DEFAULT_TEXT_WIDTH 0.15
// Board thickness, mainly for 3D view:
#define DEFAULT_BOARD_THICKNESS_MM 1.6
#define DEFAULT_BOARD_THICKNESS_MM 1.6
// Default values for some board items (given in mm)
#define DEFAULT_TEXT_PCB_SIZE 1.5
#define DEFAULT_TEXT_PCB_THICKNESS 0.3
#define DEFAULT_PCB_EDGE_THICKNESS 0.15
#define DEFAULT_GRAPHIC_THICKNESS 0.2
#define DEFAULT_PCB_EDGE_THICKNESS 0.15
#define DEFAULT_SOLDERMASK_CLEARANCE 0.2
#define DEFAULT_SOLDERMASK_MIN_WIDTH Millimeter2iu( 0.0 )
#define DEFAULT_SOLDERMASK_CLEARANCE 0.2
#define DEFAULT_SOLDERMASK_MIN_WIDTH 0.0
#define DEFAULT_SOLDERPASTE_CLEARANCE 0.0
#define DEFAULT_SOLDERPASTE_RATIO 0.0
#define DEFAULT_CUSTOMTRACKWIDTH 0.2
#define DEFAULT_TRACKMINWIDTH 0.2 // track width min value
#define DEFAULT_VIASMINSIZE 0.4 // vias (not micro vias) min diameter
#define DEFAULT_VIASMINDRILL 0.3 // vias (not micro vias) min drill diameter
#define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
#define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
#define DEFAULT_HOLETOHOLEMIN 0.25 // separation between drilled hole edges
#define DEFAULT_CUSTOMTRACKWIDTH 0.2
#define DEFAULT_CUSTOMDPAIRWIDTH 0.125
#define DEFAULT_CUSTOMDPAIRGAP 0.18
#define DEFAULT_CUSTOMDPAIRVIAGAP 0.18
#define DEFAULT_TRACKMINWIDTH 0.2 // track width min value
#define DEFAULT_VIASMINSIZE 0.4 // vias (not micro vias) min diameter
#define DEFAULT_VIASMINDRILL 0.3 // vias (not micro vias) min drill diameter
#define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
#define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
#define DEFAULT_HOLETOHOLEMIN 0.25 // separation between drilled hole edges
/**
* Struct VIA_DIMENSION
@ -91,6 +102,62 @@ struct VIA_DIMENSION
};
/**
* Struct DIFF_PAIR_DIMENSION
* is a small helper container to handle a stock of specific differential pairs each with
* unique track width, gap and via gap.
*/
struct DIFF_PAIR_DIMENSION
{
int m_Width; // <= 0 means use Netclass differential pair width
int m_Gap; // <= 0 means use Netclass differential pair gap
int m_ViaGap; // <= 0 means use Netclass differential pair via gap
DIFF_PAIR_DIMENSION()
{
m_Width = 0;
m_Gap = 0;
m_ViaGap = 0;
}
DIFF_PAIR_DIMENSION( int aWidth, int aGap, int aViaGap )
{
m_Width = aWidth;
m_Gap = aGap;
m_ViaGap = aViaGap;
}
bool operator==( const DIFF_PAIR_DIMENSION& aOther ) const
{
return ( m_Width == aOther.m_Width )
&& ( m_Gap == aOther.m_Gap )
&& ( m_ViaGap == aOther.m_ViaGap );
}
bool operator<( const DIFF_PAIR_DIMENSION& aOther ) const
{
if( m_Width != aOther.m_Width )
return m_Width < aOther.m_Width;
if( m_Gap != aOther.m_Gap )
return m_Gap < aOther.m_Gap;
return m_ViaGap < aOther.m_ViaGap;
}
};
enum
{
LAYER_CLASS_SILK = 0,
LAYER_CLASS_COPPER,
LAYER_CLASS_EDGES,
LAYER_CLASS_OTHERS,
LAYER_CLASS_COUNT
};
/**
* Class BOARD_DESIGN_SETTINGS
* contains design settings for a BOARD object.
@ -98,98 +165,97 @@ struct VIA_DIMENSION
class BOARD_DESIGN_SETTINGS
{
public:
// The first value is the current netclass via size
/// Vias size and drill list
std::vector<VIA_DIMENSION> m_ViasDimensionsList;
// Note: the first value in each dimensions list is the current netclass value
std::vector<int> m_TrackWidthList;
std::vector<VIA_DIMENSION> m_ViasDimensionsList;
std::vector<DIFF_PAIR_DIMENSION> m_DiffPairDimensionsList;
// The first value is the current netclass track width
/// Track width list
std::vector<int> m_TrackWidthList;
/// List of current netclasses. There is always the default netclass.
// List of netclasses. There is always the default netclass.
NETCLASSES m_NetClasses;
bool m_MicroViasAllowed; ///< true to allow micro vias
bool m_BlindBuriedViaAllowed; ///< true to allow blind/buried vias
VIATYPE_T m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA)
bool m_MicroViasAllowed; ///< true to allow micro vias
bool m_BlindBuriedViaAllowed; ///< true to allow blind/buried vias
VIATYPE_T m_CurrentViaType; ///< (VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA)
/// if true, when creating a new track starting on an existing track, use this track width
bool m_UseConnectedTrackWidth;
int m_DrawSegmentWidth; ///< current graphic line width (not EDGE layer)
int m_EdgeSegmentWidth; ///< current graphic line width (EDGE layer only)
int m_PcbTextWidth; ///< current Pcb (not module) Text width
wxSize m_PcbTextSize; ///< current Pcb (not module) Text size
int m_TrackMinWidth; ///< track min value for width ((min copper size value
int m_ViasMinSize; ///< vias (not micro vias) min diameter
int m_ViasMinDrill; ///< vias (not micro vias) min drill diameter
int m_MicroViasMinSize; ///< micro vias (not vias) min diameter
int m_MicroViasMinDrill; ///< micro vias (not vias) min drill diameter
bool m_RequireCourtyards; ///< require courtyard definitions in footprints
bool m_ProhibitOverlappingCourtyards; ///< check for overlapping courtyards in DRC
// if true, when creating a new track starting on an existing track, use this track width
bool m_UseConnectedTrackWidth;
int m_TrackMinWidth; ///< track min value for width ((min copper size value
int m_ViasMinSize; ///< vias (not micro vias) min diameter
int m_ViasMinDrill; ///< vias (not micro vias) min drill diameter
int m_MicroViasMinSize; ///< micro vias (not vias) min diameter
int m_MicroViasMinDrill; ///< micro vias (not vias) min drill diameter
// Global mask margins:
int m_SolderMaskMargin; ///< Solder mask margin
int m_SolderMaskMinWidth; ///< Solder mask min width
int m_SolderMaskMargin; ///< Solder mask margin
int m_SolderMaskMinWidth; ///< Solder mask min width
// 2 areas near than m_SolderMaskMinWidth
// are merged
int m_SolderPasteMargin; ///< Solder paste margin absolute value
double m_SolderPasteMarginRatio; ///< Solder pask margin ratio value of pad size
int m_SolderPasteMargin; ///< Solder paste margin absolute value
double m_SolderPasteMarginRatio; ///< Solder pask margin ratio value of pad size
///< The final margin is the sum of these 2 values
// Variables used in footprint edition (default value in item/footprint creation)
int m_ModuleSegmentWidth; ///< Default width for all graphic lines
// Note: the default layer is the active layer
wxSize m_ModuleTextSize; ///< Default footprint texts size
int m_ModuleTextWidth; ///< Default footprint texts thickness
int m_HoleToHoleMin; ///< Min width of peninsula between two drilled holes
wxString m_RefDefaultText; ///< Default ref text on fp creation
// Arrays of default values for the various layer classes.
int m_LineThickness[ LAYER_CLASS_COUNT ];
wxSize m_TextSize[ LAYER_CLASS_COUNT ];
int m_TextThickness[ LAYER_CLASS_COUNT ];
bool m_TextItalic[ LAYER_CLASS_COUNT ];
bool m_TextUpright[ LAYER_CLASS_COUNT ];
// Variables used in footprint edition (default value in item/footprint creation)
wxString m_RefDefaultText; ///< Default ref text on fp creation
// if empty, use footprint name as default
bool m_RefDefaultVisibility; ///< Default ref text visibility on fp creation
int m_RefDefaultlayer; ///< Default ref text layer on fp creation
bool m_RefDefaultVisibility; ///< Default ref text visibility on fp creation
int m_RefDefaultlayer; ///< Default ref text layer on fp creation
// should be a PCB_LAYER_ID, but use an int
// to save this param in config
wxString m_ValueDefaultText; ///< Default value text on fp creation
wxString m_ValueDefaultText; ///< Default value text on fp creation
// if empty, use footprint name as default
bool m_ValueDefaultVisibility; ///< Default value text visibility on fp creation
int m_ValueDefaultlayer; ///< Default value text layer on fp creation
bool m_ValueDefaultVisibility; ///< Default value text visibility on fp creation
int m_ValueDefaultlayer; ///< Default value text layer on fp creation
// should be a PCB_LAYER_ID, but use an int
// to save this param in config
// Miscellaneous
wxPoint m_AuxOrigin; ///< origin for plot exports
wxPoint m_GridOrigin; ///< origin for grid offsets
wxPoint m_AuxOrigin; ///< origin for plot exports
wxPoint m_GridOrigin; ///< origin for grid offsets
D_PAD m_Pad_Master; ///< A dummy pad to store all default parameters
D_PAD m_Pad_Master; ///< A dummy pad to store all default parameters
// when importing values or create a new pad
private:
/// Index for #m_ViasDimensionsList to select the current via size.
/// 0 is the index selection of the default value Netclass
unsigned m_viaSizeIndex;
// Indicies into the trackWidth, viaSizes and diffPairDimensions lists.
// The 0 index is always the current netclass value(s)
unsigned m_trackWidthIndex;
unsigned m_viaSizeIndex;
unsigned m_diffPairIndex;
// Index for m_TrackWidthList to select the value.
/// 0 is the index selection of the default value Netclass
unsigned m_trackWidthIndex;
///> Use custom values for track/via sizes (not specified in net class nor in the size lists).
bool m_useCustomTrackVia;
///> Custom track width (used after UseCustomTrackViaSize( true ) was called).
int m_customTrackWidth;
///> Custom via size (used after UseCustomTrackViaSize( true ) was called).
// Custom values for track/via sizes (specified via dialog instead of netclass or lists)
bool m_useCustomTrackVia;
int m_customTrackWidth;
VIA_DIMENSION m_customViaSize;
int m_copperLayerCount; ///< Number of copper layers for this design
// Custom values for differential pairs (specified via dialog instead of netclass/lists)
bool m_useCustomDiffPair;
DIFF_PAIR_DIMENSION m_customDiffPair;
LSET m_enabledLayers; ///< Bit-mask for layer enabling
LSET m_visibleLayers; ///< Bit-mask for layer visibility
int m_copperLayerCount; ///< Number of copper layers for this design
int m_visibleElements; ///< Bit-mask for element category visibility
int m_boardThickness; ///< Board thickness for 3D viewer
LSET m_enabledLayers; ///< Bit-mask for layer enabling
LSET m_visibleLayers; ///< Bit-mask for layer visibility
int m_visibleElements; ///< Bit-mask for element category visibility
int m_boardThickness; ///< Board thickness for 3D viewer
/// Current net class name used to display netclass info.
/// This is also the last used netclass after starting a track.
wxString m_currentNetClassName;
wxString m_currentNetClassName;
public:
BOARD_DESIGN_SETTINGS();
@ -415,11 +481,95 @@ public:
}
/**
* Function GetMinHoleSeparation
* @return The minimum distance between the edges of two holes or 0, which indicates that
* hole-to-hole separation should not be checked.
* Function GetDiffPairIndex
* @return the current diff pair dimension list index.
*/
int GetMinHoleSeparation() const;
inline unsigned GetDiffPairIndex() const { return m_diffPairIndex; }
/**
* Function SetDiffPairIndex
* @param aIndex is the diff pair dimensions list index to set.
*/
void SetDiffPairIndex( unsigned aIndex );
/**
* Function SetCustomDiffPairWidth
* Sets custom track width for differential pairs (i.e. not available in netclasses or
* preset list).
* @param aDrill is the new track wdith.
*/
inline void SetCustomDiffPairWidth( int aWidth )
{
m_customDiffPair.m_Width = aWidth;
}
/**
* Function GetCustomDiffPairWidth
* @return Current custom track width for differential pairs.
*/
inline int GetCustomDiffPairWidth()
{
return m_customDiffPair.m_Width;
}
/**
* Function SetCustomDiffPairGap
* Sets custom gap for differential pairs (i.e. not available in netclasses or preset
* list).
* @param aGap is the new gap.
*/
inline void SetCustomDiffPairGap( int aGap )
{
m_customDiffPair.m_Gap = aGap;
}
/**
* Function GetCustomDiffPairGap
* @return Current custom gap width for differential pairs.
*/
inline int GetCustomDiffPairGap()
{
return m_customDiffPair.m_Gap;
}
/**
* Function SetCustomDiffPairViaGap
* Sets custom via gap for differential pairs (i.e. not available in netclasses or
* preset list).
* @param aGap is the new gap. Specify 0 to use the DiffPairGap for vias as well.
*/
inline void SetCustomDiffPairViaGap( int aGap )
{
m_customDiffPair.m_ViaGap = aGap;
}
/**
* Function GetCustomDiffPairViaGap
* @return Current custom via gap width for differential pairs.
*/
inline int GetCustomDiffPairViaGap()
{
return m_customDiffPair.m_ViaGap > 0 ? m_customDiffPair.m_ViaGap : m_customDiffPair.m_Gap;
}
/**
* Function UseCustomDiffPairDimensions
* Enables/disables custom differential pair dimensions.
* @param aEnabled decides if custom settings should be used for new differential pairs.
*/
inline void UseCustomDiffPairDimensions( bool aEnabled )
{
m_useCustomDiffPair = aEnabled;
}
/**
* Function UseCustomDiffPairDimensions
* @return True if custom sizes of diff pairs are enabled, false otherwise.
*/
inline bool UseCustomDiffPairDimensions() const
{
return m_useCustomDiffPair;
}
/**
* Function SetMinHoleSeparation
@ -428,29 +578,17 @@ public:
*/
void SetMinHoleSeparation( int aDistance );
/**
* Function RequireCourtyardDefinitions
* @return True if footprints without courtyard definitions are considered DRC violations.
*/
bool RequireCourtyardDefinitions() const;
/**
* Function SetRequireCourtyardDefinitions
* @param aRequire Set to true to generate DRC violations from missing courtyards.
*/
void SetRequireCourtyardDefinitions( bool aRequire );
/**
* Function ProhibitOverlappingCourtyards
* @return True if overlapping courtyards are considered DRC violations.
*/
bool ProhibitOverlappingCourtyards() const;
/**
* Function SetProhibitOverlappingCourtyards
* @param aRequire Set to true to generate DRC violations from overlapping courtyards.
* @param aProhibit Set to true to generate DRC violations from overlapping courtyards.
*/
void SetProhibitOverlappingCourtyards( bool aRequire );
void SetProhibitOverlappingCourtyards( bool aProhibit );
/**
* Function GetVisibleLayers
@ -591,11 +729,34 @@ public:
* allow reading or writing of configuration file information directly into
* this object.
*/
void AppendConfigs( PARAM_CFG_ARRAY* aResult );
void AppendConfigs( BOARD* aBoard, PARAM_CFG_ARRAY* aResult );
inline int GetBoardThickness() const { return m_boardThickness; }
inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; }
/**
* Function GetLineThickness
* Returns the default graphic segment thickness from the layer class for the given layer.
*/
int GetLineThickness( PCB_LAYER_ID aLayer ) const;
/**
* Function GetTextSize
* Returns the default text size from the layer class for the given layer.
*/
wxSize GetTextSize( PCB_LAYER_ID aLayer ) const;
/**
* Function GetTextThickness
* Returns the default text thickness from the layer class for the given layer.
*/
int GetTextThickness( PCB_LAYER_ID aLayer ) const;
bool GetTextItalic( PCB_LAYER_ID aLayer ) const;
bool GetTextUpright( PCB_LAYER_ID aLayer ) const;
int GetLayerClass( PCB_LAYER_ID aLayer ) const;
private:
void formatNetClass( NETCLASS* aNetClass, OUTPUTFORMATTER* aFormatter, int aNestLevel,
int aControlBits ) const;

View File

@ -78,7 +78,12 @@ enum paramcfg_id {
PARAM_WXSTRING,
PARAM_FILENAME,
PARAM_COMMAND_ERASE,
PARAM_FIELDNAME_LIST
PARAM_FIELDNAME_LIST,
PARAM_LAYERS,
PARAM_TRACKWIDTHS,
PARAM_VIADIMENSIONS,
PARAM_DIFFPAIRDIMENSIONS,
PARAM_NETCLASSES
};
@ -99,9 +104,13 @@ public:
wxString m_Group; ///< Group name (this is like a path in the config data)
bool m_Setup; ///< Install or Project based parameter, true == install
// If the m_Ident keyword isn't found, fall back and read values from m_Ident_legacy.
// Note that values are always written to the current, non-legacy keyword.
wxString m_Ident_legacy;
public:
PARAM_CFG_BASE( const wxString& ident, const paramcfg_id type,
const wxChar* group = NULL );
PARAM_CFG_BASE( const wxString& ident, const paramcfg_id type, const wxChar* group = NULL,
const wxString& legacy_ident = wxEmptyString );
virtual ~PARAM_CFG_BASE() {}
/**
@ -132,16 +141,16 @@ public:
int m_Default; ///< The default value of the parameter
public:
PARAM_CFG_INT( const wxString& ident, int* ptparam,
int default_val = 0,
int min = std::numeric_limits<int>::min(),
int max = std::numeric_limits<int>::max(),
const wxChar* group = NULL );
PARAM_CFG_INT( bool Insetup, const wxString& ident, int* ptparam,
int default_val = 0,
PARAM_CFG_INT( const wxString& ident, int* ptparam, int default_val = 0,
int min = std::numeric_limits<int>::min(),
int max = std::numeric_limits<int>::max(),
const wxChar* group = NULL );
const wxChar* group = nullptr,
const wxString& legacy_ident = wxEmptyString );
PARAM_CFG_INT( bool Insetup, const wxString& ident, int* ptparam, int default_val = 0,
int min = std::numeric_limits<int>::min(),
int max = std::numeric_limits<int>::max(),
const wxChar* group = nullptr,
const wxString& legacy_ident = wxEmptyString );
virtual void ReadParam( wxConfigBase* aConfig ) const override;
virtual void SaveParam( wxConfigBase* aConfig ) const override;
@ -157,21 +166,20 @@ public:
class PARAM_CFG_INT_WITH_SCALE : public PARAM_CFG_INT
{
public:
double m_BIU_to_cfgunit; ///< the factor to convert the saved value in internal value
double m_BIU_to_cfgunit; ///< the factor to convert the saved value in internal value
public:
PARAM_CFG_INT_WITH_SCALE( const wxString& ident, int* ptparam,
int default_val = 0,
int min = std::numeric_limits<int>::min(),
int max = std::numeric_limits<int>::max(),
const wxChar* group = NULL,
double aBiu2cfgunit = 1.0);
PARAM_CFG_INT_WITH_SCALE( bool Insetup, const wxString& ident, int* ptparam,
int default_val = 0,
int min = std::numeric_limits<int>::min(),
int max = std::numeric_limits<int>::max(),
const wxChar* group = NULL,
double aBiu2cfgunit = 1.0 );
PARAM_CFG_INT_WITH_SCALE( const wxString& ident, int* ptparam, int default_val = 0,
int min = std::numeric_limits<int>::min(),
int max = std::numeric_limits<int>::max(),
const wxChar* group = NULL, double aBiu2cfgunit = 1.0,
const wxString& legacy_ident = wxEmptyString );
PARAM_CFG_INT_WITH_SCALE( bool insetup, const wxString& ident, int* ptparam,
int default_val = 0,
int min = std::numeric_limits<int>::min(),
int max = std::numeric_limits<int>::max(),
const wxChar* group = NULL, double aBiu2cfgunit = 1.0,
const wxString& legacy_ident = wxEmptyString );
virtual void ReadParam( wxConfigBase* aConfig ) const override;
virtual void SaveParam( wxConfigBase* aConfig ) const override;

View File

@ -382,21 +382,7 @@ public:
*/
void ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC );
/**
* Function ResetModuleTextSizes
* resets text size and width of all module text fields of given field
* type to current settings in Preferences->Dimensions->Texts and Drawings.
* @param aFilter is a filter: footprint names must match this filter.
* an empty filter, or "*" do not filter anything.
* @param aRef = true to modify the reference of footprints.
* @param aValue = true to modify the value of footprints.
* @param aOthers = true to modify the other fields of footprints.
*/
void ResetModuleTextSizes( const wxString & aFilter, bool aRef,
bool aValue, bool aOthers );
void InstallPadOptionsFrame( D_PAD* pad );
void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC );
void AddPad( MODULE* Module, bool draw );

View File

@ -53,6 +53,7 @@ include_directories(
set( PCBNEW_DIALOGS
dialogs/dialog_block_options.cpp
dialogs/dialog_block_options_base.cpp
dialogs/dialog_board_setup.cpp
dialogs/dialog_cleaning_options.cpp
dialogs/dialog_cleaning_options_base.cpp
dialogs/dialog_copper_zones.cpp
@ -60,8 +61,6 @@ set( PCBNEW_DIALOGS
dialogs/dialog_create_array.cpp
dialogs/dialog_create_array_base.cpp
dialogs/dialog_drc.cpp
dialogs/dialog_design_rules.cpp
dialogs/dialog_design_rules_base.cpp
dialogs/dialog_drc_base.cpp
dialogs/dialog_edit_footprint_for_BoardEditor.cpp
dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp
@ -98,21 +97,17 @@ set( PCBNEW_DIALOGS
dialogs/dialog_global_deletion_base.cpp
dialogs/dialog_global_edit_tracks_and_vias.cpp
dialogs/dialog_global_edit_tracks_and_vias_base.cpp
dialogs/dialog_global_footprints_fields_edition.cpp
dialogs/dialog_global_footprints_fields_edition_base.cpp
dialogs/dialog_global_edit_text_and_graphics.cpp
dialogs/dialog_global_edit_text_and_graphics_base.cpp
dialogs/dialog_global_pads_edition.cpp
dialogs/dialog_global_pads_edition_base.cpp
dialogs/dialog_graphic_item_properties.cpp
dialogs/dialog_graphic_item_properties_base.cpp
dialogs/dialog_graphic_items_options.cpp
dialogs/dialog_graphic_items_options_base.cpp
dialogs/dialog_import_settings.cpp
dialogs/dialog_import_settings_base.cpp
dialogs/dialog_keepout_area_properties.cpp
dialogs/dialog_keepout_area_properties_base.cpp
dialogs/dialog_layer_selection_base.cpp
dialogs/dialog_layers_setup.cpp
dialogs/dialog_layers_setup_base.cpp
dialogs/dialog_mask_clearance.cpp
dialogs/dialog_mask_clearance_base.cpp
dialogs/dialog_move_exact.cpp
dialogs/dialog_move_exact_base.cpp
dialogs/dialog_netlist.cpp
@ -162,6 +157,16 @@ set( PCBNEW_DIALOGS
dialogs/panel_pcbnew_display_options_base.cpp
dialogs/panel_pcbnew_settings.cpp
dialogs/panel_pcbnew_settings_base.cpp
dialogs/panel_setup_mask_and_paste.cpp
dialogs/panel_setup_mask_and_paste_base.cpp
dialogs/panel_setup_feature_constraints.cpp
dialogs/panel_setup_feature_constraints_base.cpp
dialogs/panel_setup_layers.cpp
dialogs/panel_setup_layers_base.cpp
dialogs/panel_setup_netclasses.cpp
dialogs/panel_setup_netclasses_base.cpp
dialogs/panel_setup_text_and_graphics.cpp
dialogs/panel_setup_text_and_graphics_base.cpp
footprint_wizard.cpp
footprint_wizard_frame.cpp
footprint_wizard_frame_functions.cpp
@ -312,7 +317,6 @@ set( PCBNEW_CLASS_SRCS
tools/position_relative_tool.cpp
tools/selection.cpp
tools/selection_tool.cpp
tools/size_menu.cpp
tools/tool_event_utils.cpp
tools/tools_common.cpp
tools/zone_create_helper.cpp

View File

@ -28,24 +28,369 @@
#include <fctsys.h>
#include <common.h>
#include <class_board.h>
#include <layers_id_colors_and_visibility.h>
#include <kiface_i.h>
#include <pcbnew.h>
#include <board_design_settings.h>
#include <class_track.h>
#include <convert_to_biu.h>
#include <kiface_i.h>
#define TestMissingCourtyardKey wxT( "TestMissingCourtyard" )
#define TestFootprintCourtyardKey wxT( "TestFootprintCourtyard" )
#define MinHoleSeparationKey wxT( "MinHoleSeparation" )
#define CopperLayerCountKey wxT( "CopperLayerCount" )
#define BoardThicknessKey wxT( "BoardThickness" )
#define LayerKeyPrefix wxT( "Layer" )
#define LayerNameKey wxT( "Name" )
#define LayerTypeKey wxT( "Type" )
#define NetclassNameKey wxT( "Name" )
#define ClearanceKey wxT( "Clearance" )
#define TrackWidthKey wxT( "TrackWidth" )
#define ViaDiameterKey wxT( "ViaDiameter" )
#define ViaDrillKey wxT( "ViaDrill" )
#define uViaDiameterKey wxT( "uViaDiameter" )
#define uViaDrillKey wxT( "uViaDrill" )
#define dPairWidthKey wxT( "dPairWidth" )
#define dPairGapKey wxT( "dPairGap" )
#define dPairViaGapKey wxT( "dPairViaGap" )
//
// NOTE: layer configuration info is stored in both the BOARD and BOARD_DESIGN_SETTINGS so one
// of the two needs to read/write the config so we don't end up with order dependency issues.
//
class PARAM_CFG_LAYERS : public PARAM_CFG_BASE
{
protected:
BOARD* m_Pt_param; ///< Pointer to the parameter value
public:
PARAM_CFG_LAYERS( BOARD* ptparam, const wxChar* group = nullptr ) :
PARAM_CFG_BASE( wxEmptyString, PARAM_LAYERS, group )
{
m_Pt_param = ptparam;
}
void ReadParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
BOARD* board = m_Pt_param;
BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings();
wxString oldPath = aConfig->GetPath();
bds.SetCopperLayerCount( aConfig->Read( CopperLayerCountKey, 2 ) );
double thickness = aConfig->ReadDouble( BoardThicknessKey, DEFAULT_BOARD_THICKNESS_MM );
bds.SetBoardThickness( Millimeter2iu( thickness ) );
for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
{
PCB_LAYER_ID layer = *seq;
wxString layerName;
int layerType;
aConfig->SetPath( oldPath );
aConfig->SetPath( LayerKeyPrefix + board->GetStandardLayerName( layer ) );
if( aConfig->Read( LayerNameKey, &layerName ) )
board->SetLayerName( layer, layerName );
if( aConfig->Read( LayerTypeKey, &layerType ) )
board->SetLayerType( layer, (LAYER_T) layerType );
}
aConfig->SetPath( oldPath );
}
void SaveParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
BOARD* board = m_Pt_param;
BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings();
wxString oldPath = aConfig->GetPath();
wxString layerKeyPrefix = LayerKeyPrefix;
aConfig->Write( CopperLayerCountKey, board->GetCopperLayerCount() );
aConfig->Write( BoardThicknessKey, Iu2Millimeter( bds.GetBoardThickness() ) );
for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
{
PCB_LAYER_ID layer = *seq;
wxString stdName = board->GetStandardLayerName( layer );
wxString layerName = board->GetLayerName( layer );
LAYER_T layerType = board->GetLayerType( layer );
aConfig->SetPath( oldPath );
aConfig->SetPath( layerKeyPrefix + wxT( "." ) + stdName );
if( layerName == stdName && layerType == LT_SIGNAL )
{
aConfig->DeleteGroup( aConfig->GetPath() );
}
else
{
aConfig->Write( LayerNameKey, layerName );
aConfig->Write( LayerTypeKey, (int) layerType );
}
}
aConfig->SetPath( oldPath );
}
};
class PARAM_CFG_TRACKWIDTHS : public PARAM_CFG_BASE
{
protected:
std::vector<int>* m_Pt_param; ///< Pointer to the parameter value
public:
PARAM_CFG_TRACKWIDTHS( std::vector<int>* ptparam, const wxChar* group = nullptr ) :
PARAM_CFG_BASE( wxEmptyString, PARAM_TRACKWIDTHS, group )
{
m_Pt_param = ptparam;
}
void ReadParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
m_Pt_param->clear();
for( int index = 1; ; ++index )
{
wxString key = TrackWidthKey;
double width;
if( !aConfig->Read( key << index, &width ) )
break;
m_Pt_param->push_back( Millimeter2iu( width ) );
}
}
void SaveParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
for( size_t index = 1; index <= m_Pt_param->size(); ++index )
{
wxString key = TrackWidthKey;
aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ) ) );
}
}
};
class PARAM_CFG_VIADIMENSIONS : public PARAM_CFG_BASE
{
protected:
std::vector<VIA_DIMENSION>* m_Pt_param; ///< Pointer to the parameter value
public:
PARAM_CFG_VIADIMENSIONS( std::vector<VIA_DIMENSION>* ptparam, const wxChar* group = nullptr ) :
PARAM_CFG_BASE( wxEmptyString, PARAM_VIADIMENSIONS, group )
{
m_Pt_param = ptparam;
}
void ReadParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
m_Pt_param->clear();
for( int index = 1; ; ++index )
{
double diameter = 0.0, drill = 0.0;
wxString key = ViaDiameterKey;
if( !aConfig->Read( key << index, &diameter ) )
break;
key = ViaDrillKey;
drill = aConfig->ReadDouble( key << index, 0.0 );
m_Pt_param->emplace_back( VIA_DIMENSION( Millimeter2iu( diameter ),
Millimeter2iu( drill ) ) );
}
}
void SaveParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
for( size_t index = 1; index <= m_Pt_param->size(); ++index )
{
wxString key = ViaDiameterKey;
aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Diameter ) );
key = ViaDrillKey;
aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Drill ) );
}
}
};
class PARAM_CFG_DIFFPAIRDIMENSIONS : public PARAM_CFG_BASE
{
protected:
std::vector<DIFF_PAIR_DIMENSION>* m_Pt_param; ///< Pointer to the parameter value
public:
PARAM_CFG_DIFFPAIRDIMENSIONS( std::vector<DIFF_PAIR_DIMENSION>* ptparam,
const wxChar* group = nullptr ) :
PARAM_CFG_BASE( wxEmptyString, PARAM_DIFFPAIRDIMENSIONS, group )
{
m_Pt_param = ptparam;
}
void ReadParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
m_Pt_param->clear();
for( int index = 1; ; ++index )
{
double width, gap, viagap;
wxString key = dPairWidthKey;
if( !aConfig->Read( key << index, &width ) )
break;
key = dPairGapKey;
gap = aConfig->ReadDouble( key << index, 0.0 );
key = dPairViaGapKey;
viagap = aConfig->ReadDouble( key << index, 0.0 );
m_Pt_param->emplace_back( DIFF_PAIR_DIMENSION( Millimeter2iu( width ),
Millimeter2iu( gap ),
Millimeter2iu( viagap ) ) );
}
}
void SaveParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
for( size_t index = 1; index <= m_Pt_param->size(); ++index )
{
wxString key = dPairWidthKey;
aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Width ) );
key = dPairGapKey;
aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Gap ) );
key = dPairViaGapKey;
aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_ViaGap ) );
}
}
};
class PARAM_CFG_NETCLASSES : public PARAM_CFG_BASE
{
protected:
NETCLASSES* m_Pt_param; ///< Pointer to the parameter value
public:
PARAM_CFG_NETCLASSES( const wxChar* ident, NETCLASSES* ptparam,
const wxChar* group = nullptr ) :
PARAM_CFG_BASE( ident, PARAM_NETCLASSES, group )
{
m_Pt_param = ptparam;
}
void ReadParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
wxString oldPath = aConfig->GetPath();
m_Pt_param->Clear();
for( int index = 1; ; ++index )
{
wxString pathIndex = wxString() << index;
wxString netclassName;
aConfig->SetPath( oldPath );
aConfig->SetPath( m_Ident );
aConfig->SetPath( pathIndex );
if( !aConfig->Read( NetclassNameKey, &netclassName ) )
break;
NETCLASSPTR netclass = std::make_shared<NETCLASS>( netclassName );
#define READ_MM( aKey, aDefault ) Millimeter2iu( aConfig->ReadDouble( aKey, aDefault ) )
netclass->SetClearance( READ_MM( ClearanceKey, netclass->GetClearance() ) );
netclass->SetTrackWidth( READ_MM( TrackWidthKey, netclass->GetTrackWidth() ) );
netclass->SetViaDiameter( READ_MM( ViaDiameterKey, netclass->GetViaDiameter() ) );
netclass->SetViaDrill( READ_MM( ViaDrillKey, netclass->GetViaDrill() ) );
netclass->SetuViaDiameter( READ_MM( uViaDiameterKey, netclass->GetuViaDiameter() ) );
netclass->SetuViaDrill( READ_MM( uViaDrillKey, netclass->GetuViaDrill() ) );
netclass->SetDiffPairWidth( READ_MM( dPairWidthKey, netclass->GetDiffPairWidth() ) );
netclass->SetDiffPairGap( READ_MM( dPairGapKey, netclass->GetDiffPairGap() ) );
netclass->SetDiffPairViaGap( READ_MM( dPairViaGapKey, netclass->GetDiffPairViaGap() ) );
m_Pt_param->Add( netclass );
}
aConfig->SetPath( oldPath );
}
void SaveParam( wxConfigBase* aConfig ) const override
{
if( !m_Pt_param || !aConfig )
return;
wxString oldPath = aConfig->GetPath();
int index = 1;
for( NETCLASSES::const_iterator nc = m_Pt_param->begin(); nc != m_Pt_param->end(); ++nc )
{
wxString pathIndex = wxString() << index++;
NETCLASSPTR netclass = nc->second;
aConfig->SetPath( oldPath );
aConfig->SetPath( m_Ident );
aConfig->SetPath( pathIndex );
aConfig->Write( NetclassNameKey, netclass->GetName() );
#define WRITE_MM( aKey, aValue ) aConfig->Write( aKey, Iu2Millimeter( aValue ) )
WRITE_MM( ClearanceKey, netclass->GetClearance() );
WRITE_MM( TrackWidthKey, netclass->GetTrackWidth() );
WRITE_MM( ViaDiameterKey, netclass->GetViaDiameter() );
WRITE_MM( ViaDrillKey, netclass->GetViaDrill() );
WRITE_MM( uViaDiameterKey, netclass->GetuViaDiameter() );
WRITE_MM( uViaDrillKey, netclass->GetuViaDrill() );
WRITE_MM( dPairWidthKey, netclass->GetDiffPairWidth() );
WRITE_MM( dPairGapKey, netclass->GetDiffPairGap() );
WRITE_MM( dPairViaGapKey, netclass->GetDiffPairViaGap() );
}
aConfig->SetPath( oldPath );
}
};
BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
m_Pad_Master( NULL )
{
LSET all_set = LSET().set();
LSET all_set = LSET().set();
m_enabledLayers = all_set; // All layers enabled at first.
// SetCopperLayerCount() will adjust this.
@ -56,61 +401,79 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
SetCopperLayerCount( 2 ); // Default design is a double sided board
// via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA).
m_CurrentViaType = VIA_THROUGH;
// if true, when creating a new track starting on an existing track, use this track width
m_UseConnectedTrackWidth = false;
m_BlindBuriedViaAllowed = false; // true to allow blind/buried vias
m_MicroViasAllowed = false; // true to allow micro vias
m_BlindBuriedViaAllowed = false;
m_MicroViasAllowed = false;
m_DrawSegmentWidth = Millimeter2iu( DEFAULT_GRAPHIC_THICKNESS ); // current graphic line width (not EDGE layer)
m_LineThickness[ LAYER_CLASS_SILK ] = Millimeter2iu( DEFAULT_SILK_LINE_WIDTH );
m_TextSize[ LAYER_CLASS_SILK ] = wxSize( Millimeter2iu( DEFAULT_SILK_TEXT_SIZE ),
Millimeter2iu( DEFAULT_SILK_TEXT_SIZE ) );
m_TextThickness[ LAYER_CLASS_SILK ] = Millimeter2iu( DEFAULT_SILK_TEXT_WIDTH );
m_TextItalic[ LAYER_CLASS_SILK ] = false;
m_TextUpright[ LAYER_CLASS_SILK ] = true;
m_EdgeSegmentWidth = Millimeter2iu( DEFAULT_PCB_EDGE_THICKNESS ); // current graphic line width (EDGE layer only)
m_PcbTextWidth = Millimeter2iu( DEFAULT_TEXT_PCB_THICKNESS ); // current Pcb (not module) Text width
m_LineThickness[ LAYER_CLASS_COPPER ] = Millimeter2iu( DEFAULT_COPPER_LINE_WIDTH );
m_TextSize[ LAYER_CLASS_COPPER ] = wxSize( Millimeter2iu( DEFAULT_COPPER_TEXT_SIZE ),
Millimeter2iu( DEFAULT_COPPER_TEXT_SIZE ) );
m_TextThickness[ LAYER_CLASS_COPPER ] = Millimeter2iu( DEFAULT_COPPER_TEXT_WIDTH );
m_TextItalic[ LAYER_CLASS_COPPER ] = false;
m_TextUpright[ LAYER_CLASS_COPPER ] = true;
m_PcbTextSize = wxSize( Millimeter2iu( DEFAULT_TEXT_PCB_SIZE ),
Millimeter2iu( DEFAULT_TEXT_PCB_SIZE ) ); // current Pcb (not module) Text size
// Edges & Courtyards; text properties aren't used but better to have them holding
// reasonable values than not.
m_LineThickness[ LAYER_CLASS_EDGES ] = Millimeter2iu( DEFAULT_EDGE_WIDTH );
m_TextSize[ LAYER_CLASS_EDGES ] = wxSize( Millimeter2iu( DEFAULT_TEXT_SIZE ),
Millimeter2iu( DEFAULT_TEXT_SIZE ) );
m_TextThickness[ LAYER_CLASS_EDGES ] = Millimeter2iu( DEFAULT_TEXT_WIDTH );
m_TextItalic[ LAYER_CLASS_EDGES ] = false;
m_TextUpright[ LAYER_CLASS_EDGES ] = true;
m_LineThickness[ LAYER_CLASS_OTHERS ] = Millimeter2iu( DEFAULT_LINE_WIDTH );
m_TextSize[ LAYER_CLASS_OTHERS ] = wxSize( Millimeter2iu( DEFAULT_TEXT_SIZE ),
Millimeter2iu( DEFAULT_TEXT_SIZE ) );
m_TextThickness[ LAYER_CLASS_OTHERS ] = Millimeter2iu( DEFAULT_TEXT_WIDTH );
m_TextItalic[ LAYER_CLASS_OTHERS ] = false;
m_TextUpright[ LAYER_CLASS_OTHERS ] = true;
m_useCustomTrackVia = false;
m_customTrackWidth = Millimeter2iu( DEFAULT_CUSTOMTRACKWIDTH );
m_customViaSize.m_Diameter = Millimeter2iu( DEFAULT_VIASMINSIZE );
m_customViaSize.m_Drill = Millimeter2iu( DEFAULT_VIASMINDRILL );
m_TrackMinWidth = Millimeter2iu( DEFAULT_TRACKMINWIDTH ); // track min width
m_ViasMinSize = Millimeter2iu( DEFAULT_VIASMINSIZE ); // via (not uvia) min diam
m_ViasMinDrill = Millimeter2iu( DEFAULT_VIASMINDRILL ); // via (not uvia) min drill diam
m_MicroViasMinSize = Millimeter2iu( DEFAULT_MICROVIASMINSIZE );// uvia (not via) min diam
m_MicroViasMinDrill = Millimeter2iu( DEFAULT_MICROVIASMINDRILL );// uvia (not via) min drill diam
m_useCustomDiffPair = false;
m_customDiffPair.m_Width = Millimeter2iu( DEFAULT_CUSTOMDPAIRWIDTH );
m_customDiffPair.m_Gap = Millimeter2iu( DEFAULT_CUSTOMDPAIRGAP );
m_customDiffPair.m_ViaGap = Millimeter2iu( DEFAULT_CUSTOMDPAIRVIAGAP );
m_TrackMinWidth = Millimeter2iu( DEFAULT_TRACKMINWIDTH );
m_ViasMinSize = Millimeter2iu( DEFAULT_VIASMINSIZE );
m_ViasMinDrill = Millimeter2iu( DEFAULT_VIASMINDRILL );
m_MicroViasMinSize = Millimeter2iu( DEFAULT_MICROVIASMINSIZE );
m_MicroViasMinDrill = Millimeter2iu( DEFAULT_MICROVIASMINDRILL );
// Global mask margins:
m_SolderMaskMargin = Millimeter2iu( DEFAULT_SOLDERMASK_CLEARANCE ); // Solder mask margin
m_SolderMaskMinWidth = Millimeter2iu( DEFAULT_SOLDERMASK_MIN_WIDTH ); // Solder mask min width
m_SolderMaskMargin = Millimeter2iu( DEFAULT_SOLDERMASK_CLEARANCE );
m_SolderMaskMinWidth = Millimeter2iu( DEFAULT_SOLDERMASK_MIN_WIDTH );
m_SolderPasteMargin = 0; // Solder paste margin absolute value
m_SolderPasteMarginRatio = 0.0; // Solder pask margin ratio value of pad size
m_SolderPasteMarginRatio = 0.0; // Solder paste margin as a ratio of pad size
// The final margin is the sum of these 2 values
// Usually < 0 because the mask is smaller than pad
// Layer thickness for 3D viewer
m_boardThickness = Millimeter2iu( DEFAULT_BOARD_THICKNESS_MM );
m_viaSizeIndex = 0;
m_trackWidthIndex = 0;
m_diffPairIndex = 0;
// Default values for the footprint editor and fp creation
// (also covers footprints created on the fly by micor-waves tools)
m_ModuleTextSize = wxSize( Millimeter2iu( DEFAULT_TEXT_MODULE_SIZE ),
Millimeter2iu( DEFAULT_TEXT_MODULE_SIZE ) );
m_ModuleTextWidth = Millimeter2iu( DEFAULT_GR_MODULE_THICKNESS );
m_ModuleSegmentWidth = Millimeter2iu( DEFAULT_GR_MODULE_THICKNESS );
// These values will be overriden by config values after reading the config
// Default ref text on fp creation. if empty, use footprint name as default
// Default ref text on fp creation. If empty, use footprint name as default
m_RefDefaultText = wxT( "REF**" );
m_RefDefaultVisibility = true; // Default ref text visibility on fp creation
m_RefDefaultlayer = int( F_SilkS ); // Default ref text layer on fp creation
// Default value text on fp creation. if empty, use footprint name as default
m_RefDefaultVisibility = true;
m_RefDefaultlayer = int( F_SilkS );
// Default value text on fp creation. If empty, use footprint name as default
m_ValueDefaultText = wxEmptyString;
m_ValueDefaultVisibility = true;
m_ValueDefaultlayer = int( F_Fab );
@ -118,68 +481,159 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
// Add parameters to save in project config.
// values are saved in mm
void BOARD_DESIGN_SETTINGS::AppendConfigs( PARAM_CFG_ARRAY* aResult )
void BOARD_DESIGN_SETTINGS::AppendConfigs( BOARD* aBoard, PARAM_CFG_ARRAY* aResult )
{
m_Pad_Master.AppendConfigs( aResult );
aResult->push_back( new PARAM_CFG_LAYERS( aBoard ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PcbTextSizeV" ),
&m_PcbTextSize.y,
Millimeter2iu( DEFAULT_TEXT_PCB_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "AllowMicroVias" ),
&m_MicroViasAllowed, false ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PcbTextSizeH" ),
&m_PcbTextSize.x,
Millimeter2iu( DEFAULT_TEXT_PCB_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "AllowBlindVias" ),
&m_BlindBuriedViaAllowed, false ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PcbTextThickness" ),
&m_PcbTextWidth,
Millimeter2iu(DEFAULT_TEXT_PCB_THICKNESS ),
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "RequireCourtyardDefinitions" ),
&m_RequireCourtyards, false ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleTextSizeV" ),
&m_ModuleTextSize.y,
DEFAULT_TEXT_MODULE_SIZE, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "ProhibitOverlappingCourtyards" ),
&m_ProhibitOverlappingCourtyards, true ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleTextSizeH" ),
&m_ModuleTextSize.x,
DEFAULT_TEXT_MODULE_SIZE, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "MinTrackWidth" ),
&m_TrackMinWidth,
Millimeter2iu( DEFAULT_TRACKMINWIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 25.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleTextSizeThickness" ),
&m_ModuleTextWidth,
Millimeter2iu( DEFAULT_GR_MODULE_THICKNESS ), 1, TEXTS_MAX_WIDTH,
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "MinViaDiameter" ),
&m_ViasMinSize,
Millimeter2iu( DEFAULT_VIASMINSIZE ), Millimeter2iu( 0.01 ), Millimeter2iu( 25.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "MinViaDrill" ),
&m_ViasMinDrill,
Millimeter2iu( DEFAULT_VIASMINDRILL ), Millimeter2iu( 0.01 ), Millimeter2iu( 25.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "MinMicroViaDiameter" ),
&m_MicroViasMinSize,
Millimeter2iu( DEFAULT_MICROVIASMINSIZE ), Millimeter2iu( 0.01 ), Millimeter2iu( 10.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "MinMicroViaDrill" ),
&m_MicroViasMinDrill,
Millimeter2iu( DEFAULT_MICROVIASMINDRILL ), Millimeter2iu( 0.01 ), Millimeter2iu( 10.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "MinHoleToHole" ),
&m_HoleToHoleMin,
Millimeter2iu( DEFAULT_HOLETOHOLEMIN ), 0, Millimeter2iu( 10.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_TRACKWIDTHS( &m_TrackWidthList ) );
aResult->push_back( new PARAM_CFG_VIADIMENSIONS( &m_ViasDimensionsList ) );
aResult->push_back( new PARAM_CFG_DIFFPAIRDIMENSIONS( &m_DiffPairDimensionsList ) );
aResult->push_back( new PARAM_CFG_NETCLASSES( wxT( "Netclasses" ), &m_NetClasses ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SilkLineWidth" ),
&m_LineThickness[ LAYER_CLASS_SILK ],
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
nullptr, MM_PER_IU, wxT( "ModuleOutlineThickness" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SilkTextSizeV" ),
&m_TextSize[ LAYER_CLASS_SILK ].y,
Millimeter2iu( DEFAULT_SILK_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU, wxT( "ModuleTextSizeV" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SilkTextSizeH" ),
&m_TextSize[ LAYER_CLASS_SILK ].x,
Millimeter2iu( DEFAULT_SILK_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU, wxT( "ModuleTextSizeH" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SilkTextSizeThickness" ),
&m_TextThickness[ LAYER_CLASS_SILK ],
Millimeter2iu( DEFAULT_SILK_TEXT_WIDTH ), 1, TEXTS_MAX_WIDTH,
nullptr, MM_PER_IU, wxT( "ModuleTextSizeThickness" ) ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "SilkTextItalic" ),
&m_TextItalic[ LAYER_CLASS_SILK ], false ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "SilkTextUpright" ),
&m_TextUpright[ LAYER_CLASS_SILK ], true ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "CopperLineWidth" ),
&m_LineThickness[ LAYER_CLASS_COPPER ],
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
nullptr, MM_PER_IU, wxT( "DrawSegmentWidth" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "CopperTextSizeV" ),
&m_TextSize[ LAYER_CLASS_COPPER ].y,
Millimeter2iu( DEFAULT_COPPER_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU, wxT( "PcbTextSizeV" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "CopperTextSizeH" ),
&m_TextSize[ LAYER_CLASS_COPPER ].x,
Millimeter2iu( DEFAULT_COPPER_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU, wxT( "PcbTextSizeH" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "CopperTextThickness" ),
&m_TextThickness[ LAYER_CLASS_COPPER ],
Millimeter2iu( DEFAULT_COPPER_TEXT_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
nullptr, MM_PER_IU, wxT( "PcbTextThickness" ) ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "CopperTextItalic" ),
&m_TextItalic[ LAYER_CLASS_COPPER ], false ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "CopperTextUpright" ),
&m_TextUpright[ LAYER_CLASS_COPPER ], true ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "EdgesAndCourtyardsLineWidth" ),
&m_LineThickness[ LAYER_CLASS_EDGES ],
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
nullptr, MM_PER_IU, wxT( "BoardOutlineThickness" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "OthersLineWidth" ),
&m_LineThickness[ LAYER_CLASS_OTHERS ],
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
nullptr, MM_PER_IU, wxT( "ModuleOutlineThickness" ) ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "OthersTextSizeV" ),
&m_TextSize[ LAYER_CLASS_OTHERS ].x,
Millimeter2iu( DEFAULT_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "OthersTextSizeH" ),
&m_TextSize[ LAYER_CLASS_OTHERS ].y,
Millimeter2iu( DEFAULT_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "OthersTextSizeThickness" ),
&m_TextThickness[ LAYER_CLASS_OTHERS ],
Millimeter2iu( DEFAULT_TEXT_WIDTH ), 1, TEXTS_MAX_WIDTH,
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "OthersTextItalic" ),
&m_TextItalic[ LAYER_CLASS_OTHERS ], false ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "OthersTextUpright" ),
&m_TextUpright[ LAYER_CLASS_OTHERS ], true ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SolderMaskClearance" ),
&m_SolderMaskMargin,
Millimeter2iu( DEFAULT_SOLDERMASK_CLEARANCE ), 0, Millimeter2iu( 1.0 ),
NULL, MM_PER_IU ) );
&m_SolderMaskMargin,
Millimeter2iu( DEFAULT_SOLDERMASK_CLEARANCE ), Millimeter2iu( -1.0 ), Millimeter2iu( 1.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SolderMaskMinWidth" ),
&m_SolderMaskMinWidth,
Millimeter2iu( DEFAULT_SOLDERMASK_MIN_WIDTH ), 0, Millimeter2iu( 0.5 ),
NULL, MM_PER_IU ) );
&m_SolderMaskMinWidth,
Millimeter2iu( DEFAULT_SOLDERMASK_MIN_WIDTH ), 0, Millimeter2iu( 1.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "DrawSegmentWidth" ),
&m_DrawSegmentWidth,
Millimeter2iu( DEFAULT_GRAPHIC_THICKNESS ),
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SolderPasteClearance" ),
&m_SolderPasteMargin,
Millimeter2iu( DEFAULT_SOLDERPASTE_CLEARANCE ), Millimeter2iu( -1.0 ), Millimeter2iu( 1.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "BoardOutlineThickness" ),
&m_EdgeSegmentWidth,
Millimeter2iu( DEFAULT_PCB_EDGE_THICKNESS ),
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleOutlineThickness" ),
&m_ModuleSegmentWidth,
Millimeter2iu( DEFAULT_GR_MODULE_THICKNESS ),
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
NULL, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_DOUBLE( wxT( "SolderPasteRatio" ),
&m_SolderPasteMarginRatio,
DEFAULT_SOLDERPASTE_RATIO, 0, 10.0 ) );
}
@ -189,28 +643,39 @@ bool BOARD_DESIGN_SETTINGS::SetCurrentNetClass( const wxString& aNetClassName )
bool lists_sizes_modified = false;
// if not found (should not happen) use the default
if( netClass == NULL )
if( !netClass )
netClass = m_NetClasses.GetDefault();
m_currentNetClassName = netClass->GetName();
// Initialize others values:
if( m_ViasDimensionsList.size() == 0 )
{
VIA_DIMENSION viadim;
lists_sizes_modified = true;
m_ViasDimensionsList.push_back( viadim );
}
if( m_TrackWidthList.size() == 0 )
{
lists_sizes_modified = true;
m_TrackWidthList.push_back( 0 );
}
if( m_ViasDimensionsList.size() == 0 )
{
lists_sizes_modified = true;
m_ViasDimensionsList.emplace_back( VIA_DIMENSION() );
}
if( m_DiffPairDimensionsList.size() == 0 )
{
lists_sizes_modified = true;
m_DiffPairDimensionsList.emplace_back( DIFF_PAIR_DIMENSION() );
}
/* note the m_ViasDimensionsList[0] and m_TrackWidthList[0] values
* are always the Netclass values
*/
if( m_TrackWidthList[0] != netClass->GetTrackWidth() )
{
lists_sizes_modified = true;
m_TrackWidthList[0] = netClass->GetTrackWidth();
}
if( m_ViasDimensionsList[0].m_Diameter != netClass->GetViaDiameter() )
{
lists_sizes_modified = true;
@ -223,10 +688,22 @@ bool BOARD_DESIGN_SETTINGS::SetCurrentNetClass( const wxString& aNetClassName )
m_ViasDimensionsList[0].m_Drill = netClass->GetViaDrill();
}
if( m_TrackWidthList[0] != netClass->GetTrackWidth() )
if( m_DiffPairDimensionsList[0].m_Width != netClass->GetDiffPairWidth() )
{
lists_sizes_modified = true;
m_TrackWidthList[0] = netClass->GetTrackWidth();
m_DiffPairDimensionsList[0].m_Width = netClass->GetDiffPairWidth();
}
if( m_DiffPairDimensionsList[0].m_Gap != netClass->GetDiffPairGap() )
{
lists_sizes_modified = true;
m_DiffPairDimensionsList[0].m_Gap = netClass->GetDiffPairGap();
}
if( m_DiffPairDimensionsList[0].m_ViaGap != netClass->GetDiffPairViaGap() )
{
lists_sizes_modified = true;
m_DiffPairDimensionsList[0].m_ViaGap = netClass->GetDiffPairViaGap();
}
if( GetViaSizeIndex() >= m_ViasDimensionsList.size() )
@ -235,6 +712,9 @@ bool BOARD_DESIGN_SETTINGS::SetCurrentNetClass( const wxString& aNetClassName )
if( GetTrackWidthIndex() >= m_TrackWidthList.size() )
SetTrackWidthIndex( m_TrackWidthList.size() );
if( GetDiffPairIndex() >= m_DiffPairDimensionsList.size() )
SetDiffPairIndex( m_DiffPairDimensionsList.size() );
return lists_sizes_modified;
}
@ -287,11 +767,7 @@ int BOARD_DESIGN_SETTINGS::GetCurrentMicroViaDrill()
void BOARD_DESIGN_SETTINGS::SetViaSizeIndex( unsigned aIndex )
{
if( aIndex >= m_ViasDimensionsList.size() )
m_viaSizeIndex = m_ViasDimensionsList.size();
else
m_viaSizeIndex = aIndex;
m_viaSizeIndex = std::min( aIndex, (unsigned) m_ViasDimensionsList.size() );
m_useCustomTrackVia = false;
}
@ -311,76 +787,33 @@ int BOARD_DESIGN_SETTINGS::GetCurrentViaDrill() const
void BOARD_DESIGN_SETTINGS::SetTrackWidthIndex( unsigned aIndex )
{
if( aIndex >= m_TrackWidthList.size() )
m_trackWidthIndex = m_TrackWidthList.size();
else
m_trackWidthIndex = aIndex;
m_trackWidthIndex = std::min( aIndex, (unsigned) m_TrackWidthList.size() );
m_useCustomTrackVia = false;
}
int BOARD_DESIGN_SETTINGS::GetMinHoleSeparation() const
void BOARD_DESIGN_SETTINGS::SetDiffPairIndex( unsigned aIndex )
{
// 6.0 TODO: we need to decide where these go, but until then don't disturb the
// file format unnecessarily.
wxConfigBase* config = Kiface().KifaceSettings();
int value;
config->Read( MinHoleSeparationKey, &value, Millimeter2iu( DEFAULT_HOLETOHOLEMIN ) );
return value;
m_diffPairIndex = std::min( aIndex, (unsigned) 8 );
m_useCustomDiffPair = false;
}
void BOARD_DESIGN_SETTINGS::SetMinHoleSeparation( int aDistance )
{
// 6.0 TODO: we need to decide where these go, but until then don't disturb the
// file format unnecessarily.
wxConfigBase* config = Kiface().KifaceSettings();
config->Write( MinHoleSeparationKey, aDistance );
m_HoleToHoleMin = aDistance;
}
bool BOARD_DESIGN_SETTINGS::RequireCourtyardDefinitions() const
{
// 6.0 TODO: we need to decide where these go, but until then don't disturb the
// file format unnecessarily.
wxConfigBase* config = Kiface().KifaceSettings();
bool value;
config->Read( TestMissingCourtyardKey, &value, false );
return value;
}
void BOARD_DESIGN_SETTINGS::SetRequireCourtyardDefinitions( bool aRequire )
{
// 6.0 TODO: we need to decide where these go, but until then don't disturb the
// file format unnecessarily.
wxConfigBase* config = Kiface().KifaceSettings();
config->Write( TestMissingCourtyardKey, aRequire );
m_RequireCourtyards = aRequire;
}
bool BOARD_DESIGN_SETTINGS::ProhibitOverlappingCourtyards() const
void BOARD_DESIGN_SETTINGS::SetProhibitOverlappingCourtyards( bool aProhibit )
{
// 6.0 TODO: we need to decide where these go, but until then don't disturb the
// file format unnecessarily.
wxConfigBase* config = Kiface().KifaceSettings();
bool value;
config->Read( TestFootprintCourtyardKey, &value, false );
return value;
}
void BOARD_DESIGN_SETTINGS::SetProhibitOverlappingCourtyards( bool aRequire )
{
// 6.0 TODO: we need to decide where these go, but until then don't disturb the
// file format unnecessarily.
wxConfigBase* config = Kiface().KifaceSettings();
config->Write( TestFootprintCourtyardKey, aRequire );
m_ProhibitOverlappingCourtyards = aProhibit;
}
@ -393,10 +826,7 @@ void BOARD_DESIGN_SETTINGS::SetVisibleAlls()
void BOARD_DESIGN_SETTINGS::SetLayerVisibility( PCB_LAYER_ID aLayer, bool aNewState )
{
if( aNewState && IsLayerEnabled( aLayer ) )
m_visibleLayers.set( aLayer, true );
else
m_visibleLayers.set( aLayer, false );
m_visibleLayers.set( aLayer, aNewState && IsLayerEnabled( aLayer ));
}
@ -449,6 +879,51 @@ void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LSET aMask )
}
// Return the layer class index { silk, copper, edges & courtyards, others } of the
// given layer.
int BOARD_DESIGN_SETTINGS::GetLayerClass( PCB_LAYER_ID aLayer ) const
{
if( aLayer == F_SilkS || aLayer == B_SilkS )
return 0;
else if( IsCopperLayer( aLayer ) )
return 1;
else if( aLayer == Edge_Cuts || aLayer == F_CrtYd || aLayer == B_CrtYd )
return 2;
else
return 3;
}
int BOARD_DESIGN_SETTINGS::GetLineThickness( PCB_LAYER_ID aLayer ) const
{
return m_LineThickness[ GetLayerClass( aLayer ) ];
}
wxSize BOARD_DESIGN_SETTINGS::GetTextSize( PCB_LAYER_ID aLayer ) const
{
return m_TextSize[ GetLayerClass( aLayer ) ];
}
int BOARD_DESIGN_SETTINGS::GetTextThickness( PCB_LAYER_ID aLayer ) const
{
return m_TextThickness[ GetLayerClass( aLayer ) ];
}
bool BOARD_DESIGN_SETTINGS::GetTextItalic( PCB_LAYER_ID aLayer ) const
{
return m_TextItalic[ GetLayerClass( aLayer ) ];
}
bool BOARD_DESIGN_SETTINGS::GetTextUpright( PCB_LAYER_ID aLayer ) const
{
return m_TextUpright[ GetLayerClass( aLayer ) ];
}
#ifndef NDEBUG
struct list_size_check {
list_size_check()
@ -460,3 +935,5 @@ struct list_size_check {
};
static list_size_check check;
#endif

View File

@ -56,7 +56,7 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, TEXT_TYPE text_type ) :
MODULE* module = static_cast<MODULE*>( m_Parent );
m_Type = text_type;
m_unlocked = false;
m_keepUpright = true;
// Set text thickness to a default value
SetThickness( Millimeter2iu( 0.15 ) );
@ -341,11 +341,7 @@ double TEXTE_MODULE::GetDrawRotation() const
if( module )
rotation += module->GetOrientation();
if( m_unlocked )
{
NORMALIZE_ANGLE_POS( rotation );
}
else
if( m_keepUpright )
{
// Keep angle between -90 .. 90 deg. Otherwise the text is not easy to read
while( rotation > 900 )
@ -354,6 +350,10 @@ double TEXTE_MODULE::GetDrawRotation() const
while( rotation < -900 )
rotation += 1800;
}
else
{
NORMALIZE_ANGLE_POS( rotation );
}
return rotation;
}

View File

@ -87,14 +87,14 @@ public:
void SetTextAngle( double aAngle );
bool IsUnlocked()
bool IsKeepUpright()
{
return m_unlocked;
return m_keepUpright;
}
void SetUnlocked( bool unlocked )
void SetKeepUpright( bool aKeepUpright )
{
m_unlocked = unlocked;
m_keepUpright = aKeepUpright;
}
/// Rotate text, in footprint editor
@ -243,7 +243,7 @@ private:
wxPoint m_Pos0; ///< text coordinates relative to the footprint anchor, orient 0.
///< text coordinate ref point is the text center
bool m_unlocked;
bool m_keepUpright;
};
#endif // TEXT_MODULE_H_

View File

@ -0,0 +1,87 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017-2018 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <pcb_edit_frame.h>
#include <panel_setup_layers.h>
#include <panel_setup_text_and_graphics.h>
#include <panel_setup_feature_constraints.h>
#include <panel_setup_netclasses.h>
#include <panel_setup_mask_and_paste.h>
#include <wildcards_and_files_ext.h>
#include <confirm.h>
#include <project.h>
#include <kiface_i.h>
#include "dialog_import_settings.h"
#include "dialog_board_setup.h"
DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
PAGED_DIALOG( aFrame, _( "Board Setup" ), _( "Import Settings..." ) ),
m_frame( aFrame )
{
m_layers = new PANEL_SETUP_LAYERS( this, aFrame );
m_textAndGraphics = new PANEL_SETUP_TEXT_AND_GRAPHICS( this, aFrame );
m_constraints = new PANEL_SETUP_FEATURE_CONSTRAINTS( this, aFrame );
m_netclasses = new PANEL_SETUP_NETCLASSES( this, aFrame, m_constraints );
m_maskAndPaste = new PANEL_SETUP_MASK_AND_PASTE( this, aFrame );
AddPage( m_layers, _( "Layers" ) );
AddSubPage( m_textAndGraphics, _( "Text & Graphics" ) );
AddPage( m_constraints, _( "Design Rules" ) );
AddSubPage( m_netclasses, _( "Net Classes" ) );
AddSubPage( m_maskAndPaste, _( "Solder Mask/Paste" ) );
}
// Run Import Settings... action
void DIALOG_BOARD_SETUP::OnAuxiliaryAction( wxCommandEvent& event )
{
DIALOG_IMPORT_SETTINGS importDlg( this, m_frame );
if( importDlg.ShowModal() == wxID_CANCEL )
return;
wxConfigBase* cfg = new wxFileConfig( wxEmptyString, wxEmptyString, importDlg.GetFilePath() );
// We do not want expansion of env var values when reading our project config file
cfg->SetExpandEnvVars( false );
cfg->SetPath( wxCONFIG_PATH_SEPARATOR );
BOARD* dummyBoard = new BOARD();
PARAM_CFG_ARRAY designSettingsConfig;
dummyBoard->GetDesignSettings().AppendConfigs( dummyBoard, &designSettingsConfig );
wxConfigLoadParams( cfg, designSettingsConfig, GROUP_PCB );
if( importDlg.m_LayersOpt->GetValue() )
m_layers->ImportSettingsFrom( dummyBoard );
if( importDlg.m_TextAndGraphicsOpt->GetValue() )
m_textAndGraphics->ImportSettingsFrom( dummyBoard );
if( importDlg.m_ConstraintsOpt->GetValue() )
m_constraints->ImportSettingsFrom( dummyBoard );
if( importDlg.m_NetclassesOpt->GetValue() )
m_netclasses->ImportSettingsFrom( dummyBoard );
if( importDlg.m_MaskAndPasteOpt->GetValue() )
m_maskAndPaste->ImportSettingsFrom( dummyBoard );
delete dummyBoard;
delete cfg;
}

View File

@ -0,0 +1,53 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017-2018 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KICAD_DIALOG_BOARD_SETUP_H
#define KICAD_DIALOG_BOARD_SETUP_H
#include <widgets/paged_dialog.h>
class PCB_EDIT_FRAME;
class PANEL_SETUP_FEATURE_CONSTRAINTS;
class PANEL_SETUP_LAYERS;
class PANEL_SETUP_TEXT_AND_GRAPHICS;
class PANEL_SETUP_NETCLASSES;
class PANEL_SETUP_MASK_AND_PASTE;
class DIALOG_BOARD_SETUP : public PAGED_DIALOG
{
public:
DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame );
protected:
void OnAuxiliaryAction( wxCommandEvent& event ) override;
PCB_EDIT_FRAME* m_frame;
PANEL_SETUP_FEATURE_CONSTRAINTS* m_constraints;
PANEL_SETUP_LAYERS* m_layers;
PANEL_SETUP_TEXT_AND_GRAPHICS* m_textAndGraphics;
PANEL_SETUP_NETCLASSES* m_netclasses;
PANEL_SETUP_MASK_AND_PASTE* m_maskAndPaste;
};
#endif //KICAD_DIALOG_BOARD_SETUP_H

File diff suppressed because it is too large Load Diff

View File

@ -1,179 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2009 Jean-Pierre Charras, jean-pierre.charras@gpisa-lab.inpg.fr
* Copyright (C) 2009 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2009-2015 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file dialog_design_rules.h
*/
#ifndef __dialog_design_rules_h_
#define __dialog_design_rules_h_
#include <../class_board.h>
#include <widgets/unit_binder.h>
#include <dialog_design_rules_base.h>
#include <float.h>
#include <wx/valnum.h>
class PCB_EDIT_FRAME;
class BOARD_DESIGN_SETTINGS;
// helper struct to handle a net and its netclass in dialog design rule editor
struct NETCUP
{
NETCUP( const wxString& aNet, const wxString& aClass )
{
net = aNet;
clazz = aClass;
}
wxString net; ///< a net name
wxString clazz; ///< a class name
};
typedef std::vector<NETCUP> NETCUPS;
typedef std::vector<NETCUP*> PNETCUPS;
class DIALOG_DESIGN_RULES : public DIALOG_DESIGN_RULES_BASE
{
private:
static const wxString wildCard; // The name of a fictitious netclass
// which includes all NETs
static int s_LastTabSelection; // Which tab user had open last
PCB_EDIT_FRAME* m_Parent;
BOARD* m_Pcb;
BOARD_DESIGN_SETTINGS* m_BrdSettings;
int* m_originalColWidths;
wxString m_gridErrorMsg;
wxGrid* m_gridErrorGrid;
int m_gridErrorRow;
int m_gridErrorCol;
bool m_netclassesDirty; // Indicates the netclass drop-down
// menus need rebuilding
UNIT_BINDER m_trackMinWidth;
UNIT_BINDER m_viaMinDiameter;
UNIT_BINDER m_viaMinDrill;
UNIT_BINDER m_microViaMinDiameter;
UNIT_BINDER m_microViaMinDrill;
wxFloatingPointValidator< double > m_validator; // Floating point validator
/**
* A two column table which gets filled once and never loses any elements, so it is
* basically constant, except that the NETCUP::clazz member can change for any
* given row a NET is moved in and out of a class. class reflects the respective
* NET's current net class.
*/
NETCUPS m_AllNets;
// List of values to "customize" some tracks and vias
std::vector <VIA_DIMENSION> m_ViasDimensionsList;
std::vector <int> m_TracksWidthList;
private:
void OnNetClassesNameLeftClick( wxGridEvent& event ) override { event.Skip(); }
void OnNetClassesNameRightClick( wxGridEvent& event ) override { event.Skip(); }
void OnAddNetclassClick( wxCommandEvent& event ) override;
void OnRemoveNetclassClick( wxCommandEvent& event ) override;
void CheckAllowMicroVias();
void OnAllowMicroVias( wxCommandEvent& event ) override;
void OnSizeNetclassGrid( wxSizeEvent& event ) override;
void OnUpdateUI( wxUpdateUIEvent &event ) override;
void OnNetclassGridCellChanging( wxGridEvent& event );
void OnMoveUpSelectedNetClass( wxCommandEvent& event ) override;
void OnMoveDownSelectedNetClass( wxCommandEvent& event ) override;
void OnLeftCBSelection( wxCommandEvent& event ) override;
void OnRightCBSelection( wxCommandEvent& event ) override;
void OnRightToLeftCopyButton( wxCommandEvent& event ) override;
void OnLeftToRightCopyButton( wxCommandEvent& event ) override;
void OnNotebookPageChanged( wxNotebookEvent& event ) override;
void OnLeftSelectAllButton( wxCommandEvent& event ) override;
void OnRightSelectAllButton( wxCommandEvent& event ) override;
bool validateNetclassName( int aRow, wxString aName, bool focusFirst = true );
bool validateData();
void transferNetclassesToWindow();
void transferGlobalRulesToWindow();
void rebuildNetclassDropdowns();
/* Populates the lists of sizes (Tracks width list and Vias diameters & drill list) */
void InitDimensionsLists();
void CopyNetclassesToBoard();
void CopyGlobalRulesToBoard();
void CopyDimensionsListsToBoard( );
void SetRoutableLayerStatus();
/**
* Function FillListBoxWithNetNames
* populates aListCtrl with net names and class names from m_AllNets in a two column display.
*/
void FillListBoxWithNetNames( NETS_LIST_CTRL* aListCtrl, const wxString& aNetClass );
/**
* Function swapNetClass
* replaces one net class name with another in the master list, m_AllNets.
*/
void swapNetClass( const wxString& oldClass, const wxString& newClass )
{
for( NETCUPS::iterator i = m_AllNets.begin(); i!=m_AllNets.end(); ++i )
{
if( i->clazz == oldClass )
i->clazz = newClass;
}
}
void makePointers( PNETCUPS* aList, const wxString& aNetClassName );
void setNetClass( const wxString& aNetName, const wxString& aClassName );
void moveSelectedItems( NETS_LIST_CTRL* src, const wxString& newClassName );
void setGridError( wxGrid* aGrid, const wxString& aMsg, int aRow, int aCol );
void AdjustNetclassGridColumns( int aWidth );
public:
DIALOG_DESIGN_RULES( PCB_EDIT_FRAME* parent );
~DIALOG_DESIGN_RULES( );
virtual bool TransferDataToWindow() override;
virtual bool TransferDataFromWindow() override;
};
#endif //__dialog_design_rules_h_

View File

@ -1,78 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __dialog_design_rules_aux_helper_class_h_
#define __dialog_design_rules_aux_helper_class_h_
#include <wx/listctrl.h>
/**
* Class NETS_LIST_CTRL
* is a helper to display lists of nets and associated netclasses
* used in dialog design rules.
* It's needed because the 2 "wxListCtl"s used to display lists of nets
* uses the wxLC_VIRTUAL option. The method:
*
* virtual wxString OnGetItemText( long item, long column ) const
*
* must be overloaded.
*/
class NETS_LIST_CTRL: public wxListCtrl
{
public:
NETS_LIST_CTRL( wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxLC_ICON ):
wxListCtrl( parent, id, pos, size, style )
{
};
void ClearList()
{
SetItemCount( 0 );
m_Netnames.Clear();
m_Classnames.Clear();
}
/**
* Function OnGetItemText
* is an overloaded method needed by wxListCtrl with wxLC_VIRTUAL options
*/
virtual wxString OnGetItemText( long item, long column ) const override;
/**
* Function SetRowItems
* sets the net name and the net class name at @a aRow.
* @param aRow = row index (if aRow > number of stored row, empty rows will be created)
* @param aNetname = the string to display in row aRow, column 0
* @param aNetclassName = the string to display in row aRow, column 1
*/
void SetRowItems( unsigned aRow, const wxString& aNetname, const wxString& aNetclassName );
private:
wxArrayString m_Netnames; ///< column 0: nets
wxArrayString m_Classnames; ///< column 1: netclasses
};
#endif //__dialog_design_rules_aux_helper_class_h_

View File

@ -1,438 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_design_rules_aux_helper_class.h"
#include "dialog_design_rules_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxSize( -1,-1 ), wxSize( -1,-1 ) );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
m_DRnotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
m_panelNetClassesEditor = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bpanelNetClassesSizer;
bpanelNetClassesSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerUpper;
sbSizerUpper = new wxStaticBoxSizer( new wxStaticBox( m_panelNetClassesEditor, wxID_ANY, _("Net Classes") ), wxVERTICAL );
m_grid = new wxGrid( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSUNKEN_BORDER|wxTAB_TRAVERSAL|wxVSCROLL );
// Grid
m_grid->CreateGrid( 1, 9 );
m_grid->EnableEditing( true );
m_grid->EnableGridLines( true );
m_grid->EnableDragGridSize( false );
m_grid->SetMargins( 0, 0 );
// Columns
m_grid->SetColSize( 0, 120 );
m_grid->SetColSize( 1, 100 );
m_grid->SetColSize( 2, 100 );
m_grid->SetColSize( 3, 100 );
m_grid->SetColSize( 4, 100 );
m_grid->SetColSize( 5, 100 );
m_grid->SetColSize( 6, 100 );
m_grid->SetColSize( 7, 100 );
m_grid->SetColSize( 8, 100 );
m_grid->EnableDragColMove( false );
m_grid->EnableDragColSize( true );
m_grid->SetColLabelSize( 22 );
m_grid->SetColLabelValue( 0, _("Name") );
m_grid->SetColLabelValue( 1, _("Clearance") );
m_grid->SetColLabelValue( 2, _("Track Width") );
m_grid->SetColLabelValue( 3, _("Via Dia") );
m_grid->SetColLabelValue( 4, _("Via Drill") );
m_grid->SetColLabelValue( 5, _("uVia Dia") );
m_grid->SetColLabelValue( 6, _("uVia Drill") );
m_grid->SetColLabelValue( 7, _("Diff Pair Width") );
m_grid->SetColLabelValue( 8, _("Diff Pair Gap") );
m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Rows
m_grid->EnableDragRowSize( false );
m_grid->SetRowLabelSize( 0 );
m_grid->SetRowLabelValue( 0, _("Default") );
m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
// Label Appearance
// Cell Defaults
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_grid->SetToolTip( _("Net Class parameters") );
sbSizerUpper->Add( m_grid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* buttonBoxSizer;
buttonBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_addButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
m_addButton->SetMinSize( wxSize( 29,29 ) );
buttonBoxSizer->Add( m_addButton, 0, wxLEFT, 5 );
m_removeButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
m_removeButton->SetMinSize( wxSize( 29,29 ) );
buttonBoxSizer->Add( m_removeButton, 0, wxRIGHT, 10 );
m_moveUpButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
m_moveUpButton->SetMinSize( wxSize( 29,29 ) );
buttonBoxSizer->Add( m_moveUpButton, 0, wxLEFT, 5 );
m_moveDownButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
m_moveDownButton->SetMinSize( wxSize( 29,29 ) );
buttonBoxSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 );
sbSizerUpper->Add( buttonBoxSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 2 );
bpanelNetClassesSizer->Add( sbSizerUpper, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* sbSizerNetSelectMain;
sbSizerNetSelectMain = new wxStaticBoxSizer( new wxStaticBox( m_panelNetClassesEditor, wxID_ANY, _("Net Class Membership") ), wxHORIZONTAL );
wxBoxSizer* leftNetSelectBoxSizer;
leftNetSelectBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
m_leftClassChoice = new wxComboBox( m_panelNetClassesEditor, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
bSizer10->Add( m_leftClassChoice, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticline21 = new wxStaticLine( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
bSizer10->Add( m_staticline21, 0, wxEXPAND | wxALL, 5 );
m_buttonLeftSelAll = new wxButton( m_panelNetClassesEditor, wxID_ANY, _("Select All"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonLeftSelAll->SetToolTip( _("Select all nets in the left list") );
bSizer10->Add( m_buttonLeftSelAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
leftNetSelectBoxSizer->Add( bSizer10, 0, wxEXPAND, 5 );
m_leftListCtrl = new NETS_LIST_CTRL( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES|wxSUNKEN_BORDER );
leftNetSelectBoxSizer->Add( m_leftListCtrl, 1, wxALL|wxEXPAND, 5 );
sbSizerNetSelectMain->Add( leftNetSelectBoxSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bmiddleSizerNetSelect;
bmiddleSizerNetSelect = new wxBoxSizer( wxVERTICAL );
m_buttonRightToLeft = new wxButton( m_panelNetClassesEditor, ID_LEFT_TO_RIGHT_COPY, _("<<<"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRightToLeft->SetToolTip( _("Move the selected nets in the right list to the left list") );
bmiddleSizerNetSelect->Add( m_buttonRightToLeft, 0, wxALL, 5 );
m_buttonLeftToRight = new wxButton( m_panelNetClassesEditor, ID_RIGHT_TO_LEFT_COPY, _(">>>"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonLeftToRight->SetToolTip( _("Move the selected nets in the left list to the right list") );
bmiddleSizerNetSelect->Add( m_buttonLeftToRight, 0, wxALL, 5 );
sbSizerNetSelectMain->Add( bmiddleSizerNetSelect, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* rghtNetSelectBoxSizer;
rghtNetSelectBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer11;
bSizer11 = new wxBoxSizer( wxHORIZONTAL );
m_rightClassChoice = new wxComboBox( m_panelNetClassesEditor, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
bSizer11->Add( m_rightClassChoice, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticline3 = new wxStaticLine( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
bSizer11->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
m_buttonRightSelAll = new wxButton( m_panelNetClassesEditor, wxID_ANY, _("Select All"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRightSelAll->SetToolTip( _("Select all nets in the right list") );
bSizer11->Add( m_buttonRightSelAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
rghtNetSelectBoxSizer->Add( bSizer11, 0, wxEXPAND, 5 );
m_rightListCtrl = new NETS_LIST_CTRL( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES|wxSUNKEN_BORDER );
rghtNetSelectBoxSizer->Add( m_rightListCtrl, 1, wxALL|wxEXPAND, 5 );
sbSizerNetSelectMain->Add( rghtNetSelectBoxSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bpanelNetClassesSizer->Add( sbSizerNetSelectMain, 1, wxALL|wxEXPAND, 5 );
m_panelNetClassesEditor->SetSizer( bpanelNetClassesSizer );
m_panelNetClassesEditor->Layout();
bpanelNetClassesSizer->Fit( m_panelNetClassesEditor );
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), true );
m_panelGolbalDesignRules = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bpanelGlobRulesSizer;
bpanelGlobRulesSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbRoutingOptionSizer;
sbRoutingOptionSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Routing Options") ), wxVERTICAL );
wxFlexGridSizer* fgViaOptionsSize;
fgViaOptionsSize = new wxFlexGridSizer( 0, 3, 0, 0 );
fgViaOptionsSize->AddGrowableCol( 1 );
fgViaOptionsSize->SetFlexibleDirection( wxBOTH );
fgViaOptionsSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_TrackMinWidthTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum track width:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_TrackMinWidthTitle->Wrap( -1 );
fgViaOptionsSize->Add( m_TrackMinWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
m_SetTrackMinWidthCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgViaOptionsSize->Add( m_SetTrackMinWidthCtrl, 0, wxALIGN_LEFT|wxALIGN_TOP|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_TrackMinWidthUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_TrackMinWidthUnits->Wrap( -1 );
fgViaOptionsSize->Add( m_TrackMinWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
m_ViaMinTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum via diameter:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_ViaMinTitle->Wrap( -1 );
fgViaOptionsSize->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
m_SetViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgViaOptionsSize->Add( m_SetViasMinSizeCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_ViaMinUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_ViaMinUnits->Wrap( -1 );
fgViaOptionsSize->Add( m_ViaMinUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
m_ViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum via drill:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_ViaMinDrillTitle->Wrap( -1 );
fgViaOptionsSize->Add( m_ViaMinDrillTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
m_SetViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgViaOptionsSize->Add( m_SetViasMinDrillCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_ViaMinDrillUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_ViaMinDrillUnits->Wrap( -1 );
fgViaOptionsSize->Add( m_ViaMinDrillUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
m_OptAllowBlindBuriedVias = new wxCheckBox( m_panelGolbalDesignRules, wxID_ANY, _("Allow blind/buried vias"), wxDefaultPosition, wxDefaultSize, 0 );
fgViaOptionsSize->Add( m_OptAllowBlindBuriedVias, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
m_OptAllowMicroVias = new wxCheckBox( m_panelGolbalDesignRules, wxID_ANY, _("Allow micro vias (uVias)"), wxDefaultPosition, wxDefaultSize, 0 );
fgViaOptionsSize->Add( m_OptAllowMicroVias, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
m_MicroViaMinSizeTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum uVia diameter:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_MicroViaMinSizeTitle->Wrap( -1 );
fgViaOptionsSize->Add( m_MicroViaMinSizeTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 );
m_SetMicroViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetMicroViasMinSizeCtrl->Enable( false );
fgViaOptionsSize->Add( m_SetMicroViasMinSizeCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_MicroViaMinSizeUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_MicroViaMinSizeUnits->Wrap( -1 );
fgViaOptionsSize->Add( m_MicroViaMinSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
m_MicroViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum uVia drill:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_MicroViaMinDrillTitle->Wrap( -1 );
fgViaOptionsSize->Add( m_MicroViaMinDrillTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
m_SetMicroViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetMicroViasMinDrillCtrl->Enable( false );
fgViaOptionsSize->Add( m_SetMicroViasMinDrillCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_MicroViaMinDrillUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
m_MicroViaMinDrillUnits->Wrap( -1 );
fgViaOptionsSize->Add( m_MicroViaMinDrillUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
sbRoutingOptionSizer->Add( fgViaOptionsSize, 1, wxEXPAND, 5 );
bpanelGlobRulesSizer->Add( sbRoutingOptionSizer, 1, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbTracksListSizer;
sbTracksListSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Custom Track Widths") ), wxVERTICAL );
m_gridTrackWidthList = new wxGrid( m_panelGolbalDesignRules, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_gridTrackWidthList->CreateGrid( 8, 1 );
m_gridTrackWidthList->EnableEditing( true );
m_gridTrackWidthList->EnableGridLines( true );
m_gridTrackWidthList->EnableDragGridSize( false );
m_gridTrackWidthList->SetMargins( 0, 0 );
// Columns
m_gridTrackWidthList->SetColSize( 0, 110 );
m_gridTrackWidthList->EnableDragColMove( false );
m_gridTrackWidthList->EnableDragColSize( false );
m_gridTrackWidthList->SetColLabelSize( 22 );
m_gridTrackWidthList->SetColLabelValue( 0, _("Width") );
m_gridTrackWidthList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Rows
m_gridTrackWidthList->EnableDragRowSize( false );
m_gridTrackWidthList->SetRowLabelSize( 80 );
m_gridTrackWidthList->SetRowLabelValue( 0, _("Track 1") );
m_gridTrackWidthList->SetRowLabelValue( 1, _("Track 2") );
m_gridTrackWidthList->SetRowLabelValue( 2, _("Track 3") );
m_gridTrackWidthList->SetRowLabelValue( 3, _("Track 4") );
m_gridTrackWidthList->SetRowLabelValue( 4, _("Track 5") );
m_gridTrackWidthList->SetRowLabelValue( 5, _("Track 6") );
m_gridTrackWidthList->SetRowLabelValue( 6, _("Track 7") );
m_gridTrackWidthList->SetRowLabelValue( 7, _("Track 8") );
m_gridTrackWidthList->SetRowLabelValue( 8, _("Track 9") );
m_gridTrackWidthList->SetRowLabelValue( 9, _("Track 10") );
m_gridTrackWidthList->SetRowLabelValue( 10, _("Track 11") );
m_gridTrackWidthList->SetRowLabelValue( 11, _("Track 12") );
m_gridTrackWidthList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Label Appearance
// Cell Defaults
m_gridTrackWidthList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
sbTracksListSizer->Add( m_gridTrackWidthList, 0, wxALL|wxEXPAND, 5 );
bpanelGlobRulesSizer->Add( sbTracksListSizer, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sViaSizeBox;
sViaSizeBox = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Custom Via Sizes") ), wxVERTICAL );
m_gridViaSizeList = new wxGrid( m_panelGolbalDesignRules, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_gridViaSizeList->CreateGrid( 8, 2 );
m_gridViaSizeList->EnableEditing( true );
m_gridViaSizeList->EnableGridLines( true );
m_gridViaSizeList->EnableDragGridSize( false );
m_gridViaSizeList->SetMargins( 0, 0 );
// Columns
m_gridViaSizeList->SetColSize( 0, 110 );
m_gridViaSizeList->SetColSize( 1, 110 );
m_gridViaSizeList->EnableDragColMove( false );
m_gridViaSizeList->EnableDragColSize( false );
m_gridViaSizeList->SetColLabelSize( 22 );
m_gridViaSizeList->SetColLabelValue( 0, _("Diameter") );
m_gridViaSizeList->SetColLabelValue( 1, _("Drill") );
m_gridViaSizeList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Rows
m_gridViaSizeList->EnableDragRowSize( false );
m_gridViaSizeList->SetRowLabelSize( 80 );
m_gridViaSizeList->SetRowLabelValue( 0, _("Via 1") );
m_gridViaSizeList->SetRowLabelValue( 1, _("Via 2") );
m_gridViaSizeList->SetRowLabelValue( 2, _("Via 3") );
m_gridViaSizeList->SetRowLabelValue( 3, _("Via 4") );
m_gridViaSizeList->SetRowLabelValue( 4, _("Via 5") );
m_gridViaSizeList->SetRowLabelValue( 5, _("Via 6") );
m_gridViaSizeList->SetRowLabelValue( 6, _("Via 7") );
m_gridViaSizeList->SetRowLabelValue( 7, _("Via 8") );
m_gridViaSizeList->SetRowLabelValue( 8, _("Via 9") );
m_gridViaSizeList->SetRowLabelValue( 9, _("Via 10") );
m_gridViaSizeList->SetRowLabelValue( 10, _("Via 11") );
m_gridViaSizeList->SetRowLabelValue( 11, _("Via 12") );
m_gridViaSizeList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Label Appearance
// Cell Defaults
m_gridViaSizeList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
sViaSizeBox->Add( m_gridViaSizeList, 0, wxALL|wxEXPAND, 5 );
bpanelGlobRulesSizer->Add( sViaSizeBox, 0, wxALL|wxEXPAND, 5 );
m_panelGolbalDesignRules->SetSizer( bpanelGlobRulesSizer );
m_panelGolbalDesignRules->Layout();
bpanelGlobRulesSizer->Fit( m_panelGolbalDesignRules );
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), false );
bMainSizer->Add( m_DRnotebook, 1, wxALL|wxEXPAND, 5 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
// Connect Events
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_DESIGN_RULES_BASE::OnUpdateUI ) );
m_DRnotebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DESIGN_RULES_BASE::OnNotebookPageChanged ), NULL, this );
m_grid->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameLeftClick ), NULL, this );
m_grid->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameRightClick ), NULL, this );
m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_DESIGN_RULES_BASE::OnSizeNetclassGrid ), NULL, this );
m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAddNetclassClick ), NULL, this );
m_removeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRemoveNetclassClick ), NULL, this );
m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveUpSelectedNetClass ), NULL, this );
m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveDownSelectedNetClass ), NULL, this );
m_leftClassChoice->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftCBSelection ), NULL, this );
m_buttonLeftSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this );
m_buttonRightToLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightToLeftCopyButton ), NULL, this );
m_buttonLeftToRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftToRightCopyButton ), NULL, this );
m_rightClassChoice->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this );
m_buttonRightSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this );
m_OptAllowMicroVias->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAllowMicroVias ), NULL, this );
}
DIALOG_DESIGN_RULES_BASE::~DIALOG_DESIGN_RULES_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_DESIGN_RULES_BASE::OnUpdateUI ) );
m_DRnotebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DESIGN_RULES_BASE::OnNotebookPageChanged ), NULL, this );
m_grid->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameLeftClick ), NULL, this );
m_grid->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameRightClick ), NULL, this );
m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_DESIGN_RULES_BASE::OnSizeNetclassGrid ), NULL, this );
m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAddNetclassClick ), NULL, this );
m_removeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRemoveNetclassClick ), NULL, this );
m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveUpSelectedNetClass ), NULL, this );
m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveDownSelectedNetClass ), NULL, this );
m_leftClassChoice->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftCBSelection ), NULL, this );
m_buttonLeftSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this );
m_buttonRightToLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightToLeftCopyButton ), NULL, this );
m_buttonLeftToRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftToRightCopyButton ), NULL, this );
m_rightClassChoice->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this );
m_buttonRightSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this );
m_OptAllowMicroVias->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAllowMicroVias ), NULL, this );
}

File diff suppressed because it is too large Load Diff

View File

@ -1,125 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_DESIGN_RULES_BASE_H__
#define __DIALOG_DESIGN_RULES_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class NETS_LIST_CTRL;
#include "dialog_shim.h"
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/font.h>
#include <wx/grid.h>
#include <wx/gdicmn.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/combobox.h>
#include <wx/statline.h>
#include <wx/listctrl.h>
#include <wx/panel.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/valtext.h>
#include <wx/checkbox.h>
#include <wx/notebook.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_DESIGN_RULES_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_DESIGN_RULES_BASE : public DIALOG_SHIM
{
private:
protected:
enum
{
ID_LEFT_TO_RIGHT_COPY = 1000,
ID_RIGHT_TO_LEFT_COPY
};
wxNotebook* m_DRnotebook;
wxPanel* m_panelNetClassesEditor;
wxGrid* m_grid;
wxBitmapButton* m_addButton;
wxBitmapButton* m_removeButton;
wxBitmapButton* m_moveUpButton;
wxBitmapButton* m_moveDownButton;
wxComboBox* m_leftClassChoice;
wxStaticLine* m_staticline21;
wxButton* m_buttonLeftSelAll;
NETS_LIST_CTRL* m_leftListCtrl;
wxButton* m_buttonRightToLeft;
wxButton* m_buttonLeftToRight;
wxComboBox* m_rightClassChoice;
wxStaticLine* m_staticline3;
wxButton* m_buttonRightSelAll;
NETS_LIST_CTRL* m_rightListCtrl;
wxPanel* m_panelGolbalDesignRules;
wxStaticText* m_TrackMinWidthTitle;
wxTextCtrl* m_SetTrackMinWidthCtrl;
wxStaticText* m_TrackMinWidthUnits;
wxStaticText* m_ViaMinTitle;
wxTextCtrl* m_SetViasMinSizeCtrl;
wxStaticText* m_ViaMinUnits;
wxStaticText* m_ViaMinDrillTitle;
wxTextCtrl* m_SetViasMinDrillCtrl;
wxStaticText* m_ViaMinDrillUnits;
wxCheckBox* m_OptAllowBlindBuriedVias;
wxCheckBox* m_OptAllowMicroVias;
wxStaticText* m_MicroViaMinSizeTitle;
wxTextCtrl* m_SetMicroViasMinSizeCtrl;
wxStaticText* m_MicroViaMinSizeUnits;
wxStaticText* m_MicroViaMinDrillTitle;
wxTextCtrl* m_SetMicroViasMinDrillCtrl;
wxStaticText* m_MicroViaMinDrillUnits;
wxGrid* m_gridTrackWidthList;
wxGrid* m_gridViaSizeList;
wxStaticLine* m_staticline2;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnNotebookPageChanged( wxNotebookEvent& event ) { event.Skip(); }
virtual void OnNetClassesNameLeftClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnNetClassesNameRightClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnSizeNetclassGrid( wxSizeEvent& event ) { event.Skip(); }
virtual void OnAddNetclassClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveNetclassClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnMoveUpSelectedNetClass( wxCommandEvent& event ) { event.Skip(); }
virtual void OnMoveDownSelectedNetClass( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLeftCBSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLeftSelectAllButton( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRightToLeftCopyButton( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLeftToRightCopyButton( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRightCBSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRightSelectAllButton( wxCommandEvent& event ) { event.Skip(); }
virtual void OnAllowMicroVias( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DESIGN_RULES_BASE();
};
#endif //__DIALOG_DESIGN_RULES_BASE_H__

View File

@ -51,8 +51,6 @@
*/
// Keywords for read and write config
#define TestMissingCourtyardKey wxT( "TestMissingCourtyard" )
#define TestFootprintCourtyardKey wxT( "TestFootprintCourtyard" )
#define RefillZonesBeforeDrc wxT( "RefillZonesBeforeDrc" )
@ -131,8 +129,6 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* aEditorFra
DIALOG_DRC_CONTROL::~DIALOG_DRC_CONTROL()
{
m_config->Write( TestMissingCourtyardKey, m_cbCourtyardMissing->GetValue() );
m_config->Write( TestFootprintCourtyardKey, m_cbCourtyardOverlap->GetValue() );
m_config->Write( RefillZonesBeforeDrc, m_cbRefillZones->GetValue() );
// Disconnect events
@ -187,10 +183,6 @@ void DIALOG_DRC_CONTROL::InitValues()
// read options
bool value;
m_config->Read( TestMissingCourtyardKey, &value, false );
m_cbCourtyardMissing->SetValue( value );
m_config->Read( TestFootprintCourtyardKey, &value, false );
m_cbCourtyardOverlap->SetValue( value );
m_config->Read( RefillZonesBeforeDrc, &value, false );
m_cbRefillZones->SetValue( value );

View File

@ -103,12 +103,6 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
bSizerOptSettings->Add( m_cbReportAllTrackErrors, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbCourtyardOverlap = new wxCheckBox( this, wxID_ANY, _("Check footprint courtyard overlap"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerOptSettings->Add( m_cbCourtyardOverlap, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbCourtyardMissing = new wxCheckBox( this, wxID_ANY, _("Check courtyard missing in footprints"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerOptSettings->Add( m_cbCourtyardMissing, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerOptions->Add( bSizerOptSettings, 1, wxEXPAND, 5 );

View File

@ -1278,182 +1278,6 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Check footprint courtyard overlap</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_cbCourtyardOverlap</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Check courtyard missing in footprints</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_cbCourtyardMissing</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>

View File

@ -60,8 +60,6 @@ class DIALOG_DRC_CONTROL_BASE : public DIALOG_SHIM
wxStaticText* m_MicroViaMinUnit;
wxCheckBox* m_cbRefillZones;
wxCheckBox* m_cbReportAllTrackErrors;
wxCheckBox* m_cbCourtyardOverlap;
wxCheckBox* m_cbCourtyardMissing;
wxStaticText* m_messagesLabel;
wxTextCtrl* m_Messages;
wxCheckBox* m_CreateRptCtrl;

View File

@ -684,8 +684,10 @@ void DIALOG_FOOTPRINT_BOARD_EDITOR::OnAddField( wxCommandEvent& )
else
textMod.SetLayer( m_texts->at( m_texts->size() - 1 ).GetLayer() );
textMod.SetTextSize( dsnSettings.m_ModuleTextSize );
textMod.SetThickness( dsnSettings.m_ModuleTextWidth );
textMod.SetTextSize( dsnSettings.GetTextSize( textMod.GetLayer() ) );
textMod.SetThickness( dsnSettings.GetTextThickness( textMod.GetLayer() ) );
textMod.SetItalic( dsnSettings.GetTextItalic( textMod.GetLayer() ) );
textMod.SetKeepUpright( dsnSettings.GetTextUpright( textMod.GetLayer() ) );
m_texts->push_back( textMod );

View File

@ -43,8 +43,8 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
m_itemsGrid->SetColSize( 4, 90 );
m_itemsGrid->SetColSize( 5, 48 );
m_itemsGrid->SetColSize( 6, 112 );
m_itemsGrid->SetColSize( 7, 80 );
m_itemsGrid->SetColSize( 8, 48 );
m_itemsGrid->SetColSize( 7, 90 );
m_itemsGrid->SetColSize( 8, 90 );
m_itemsGrid->SetColSize( 9, 90 );
m_itemsGrid->SetColSize( 10, 90 );
m_itemsGrid->EnableDragColMove( false );
@ -58,7 +58,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
m_itemsGrid->SetColLabelValue( 5, _("Italic") );
m_itemsGrid->SetColLabelValue( 6, _("Layer") );
m_itemsGrid->SetColLabelValue( 7, _("Orientation") );
m_itemsGrid->SetColLabelValue( 8, _("Unconstrained") );
m_itemsGrid->SetColLabelValue( 8, _("Keep Upright") );
m_itemsGrid->SetColLabelValue( 9, _("X Offset") );
m_itemsGrid->SetColLabelValue( 10, _("Y Offset") );
m_itemsGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
@ -277,7 +277,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
wxStaticBoxSizer* sbSizerLocalProperties;
sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Clearances") ), wxVERTICAL );
m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set values to 0 to use netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set values to 0 to use Board Setup values."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo->Wrap( -1 );
m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );

Some files were not shown because too many files have changed in this diff Show More