Added eeschema option for the default pin length
This commit is contained in:
parent
7dc8fc1f29
commit
73a8cd6180
|
@ -58,6 +58,9 @@ public:
|
|||
void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); }
|
||||
int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
|
||||
|
||||
void SetPinLength( int aLength ) { m_spinPinLength->SetValue( aLength ); }
|
||||
int GetPinLength( void ) { return m_spinPinLength->GetValue(); }
|
||||
|
||||
void SetTextSize( int text_size ) { m_spinTextSize->SetValue( text_size ); }
|
||||
int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||
// C++ code generated with wxFormBuilder (version Apr 10 2012)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -35,7 +35,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
bSizer3 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 10, 3, 0, 0 );
|
||||
fgSizer1 = new wxFlexGridSizer( 11, 3, 0, 0 );
|
||||
fgSizer1->AddGrowableCol( 0 );
|
||||
fgSizer1->AddGrowableCol( 1 );
|
||||
fgSizer1->AddGrowableCol( 2 );
|
||||
|
@ -89,6 +89,17 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
m_staticLineWidthUnits->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_staticText52 = new wxStaticText( m_panel1, wxID_ANY, _("Default pin length:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText52->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
|
||||
|
||||
m_spinPinLength = new wxSpinCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 50, 1000, 100 );
|
||||
fgSizer1->Add( m_spinPinLength, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticPinLengthUnits = new wxStaticText( m_panel1, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticPinLengthUnits->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticPinLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
|
||||
|
||||
m_staticText7 = new wxStaticText( m_panel1, wxID_ANY, _("Default text &size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText7->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText7, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
@ -236,7 +247,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName1 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName1->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName1, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticText161 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 2"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -244,7 +254,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName2 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName2->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName2, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticText17 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 3"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -252,7 +261,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName3 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName3->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName3, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticText18 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 4"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -260,7 +268,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName4 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName4->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName4, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticText19 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 5"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -268,7 +275,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName5 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName5->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName5, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticText20 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 6"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -276,7 +282,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText20, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName6 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName6->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName6, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticText21 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 7"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -284,7 +289,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName7 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName7->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName7, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticText22 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 8"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -292,7 +296,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
fgSizer2->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 );
|
||||
|
||||
m_fieldName8 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldName8->SetMaxLength( 0 );
|
||||
fgSizer2->Add( m_fieldName8, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
<property name="name">fgSizer1</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">10</property>
|
||||
<property name="rows">11</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
|
@ -1231,6 +1231,259 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<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="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">Default pin length:</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_staticText52</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="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></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="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER|wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrl" expanded="1">
|
||||
<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="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="initial">100</property>
|
||||
<property name="max">1000</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">50</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_spinPinLength</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">wxSP_ARROW_KEYS|wxSP_WRAP</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></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="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<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="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">mils</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_staticPinLengthUnits</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="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></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">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||
// C++ code generated with wxFormBuilder (version Apr 10 2012)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -11,8 +11,6 @@
|
|||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class DIALOG_SHIM;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
|
@ -69,6 +67,9 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_staticText5;
|
||||
wxSpinCtrl* m_spinLineWidth;
|
||||
wxStaticText* m_staticLineWidthUnits;
|
||||
wxStaticText* m_staticText52;
|
||||
wxSpinCtrl* m_spinPinLength;
|
||||
wxStaticText* m_staticPinLengthUnits;
|
||||
wxStaticText* m_staticText7;
|
||||
wxSpinCtrl* m_spinTextSize;
|
||||
wxStaticText* m_staticTextSizeUnits;
|
||||
|
|
|
@ -84,7 +84,7 @@ int GetDefaultLineThickness()
|
|||
return s_drawDefaultLineThickness;
|
||||
}
|
||||
|
||||
void SetDefaultLineThickness( int aThickness)
|
||||
void SetDefaultLineThickness( int aThickness )
|
||||
{
|
||||
if( aThickness >=1 )
|
||||
s_drawDefaultLineThickness = aThickness;
|
||||
|
@ -92,6 +92,21 @@ void SetDefaultLineThickness( int aThickness)
|
|||
s_drawDefaultLineThickness = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Default pin length
|
||||
*/
|
||||
static int s_defaultPinLength;
|
||||
|
||||
int GetDefaultPinLength()
|
||||
{
|
||||
return s_defaultPinLength;
|
||||
}
|
||||
|
||||
void SetDefaultPinLength( int aLength )
|
||||
{
|
||||
s_defaultPinLength = aLength;
|
||||
}
|
||||
|
||||
EDA_COLOR_T GetLayerColor( LayerNumber aLayer )
|
||||
{
|
||||
return s_layerColor[aLayer];
|
||||
|
@ -269,6 +284,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
|
|||
dlg.SetGridSizes( grid_list, GetScreen()->GetGridId() );
|
||||
dlg.SetBusWidth( GetDefaultBusThickness() );
|
||||
dlg.SetLineWidth( GetDefaultLineThickness() );
|
||||
dlg.SetPinLength( GetDefaultPinLength() );
|
||||
dlg.SetTextSize( GetDefaultLabelSize() );
|
||||
dlg.SetRepeatHorizontal( g_RepeatStep.x );
|
||||
dlg.SetRepeatVertical( g_RepeatStep.y );
|
||||
|
@ -317,6 +333,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
|
|||
|
||||
SetDefaultBusThickness( dlg.GetBusWidth() );
|
||||
SetDefaultLineThickness( dlg.GetLineWidth() );
|
||||
SetDefaultPinLength( dlg.GetPinLength() );
|
||||
SetDefaultLabelSize( dlg.GetTextSize() );
|
||||
g_RepeatStep.x = dlg.GetRepeatHorizontal();
|
||||
g_RepeatStep.y = dlg.GetRepeatVertical();
|
||||
|
@ -477,6 +494,7 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
|
|||
|
||||
static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" );
|
||||
static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" );
|
||||
static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" );
|
||||
static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" );
|
||||
static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" );
|
||||
static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" );
|
||||
|
@ -602,6 +620,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
|||
|
||||
SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, 12l ) );
|
||||
SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, 6l ) );
|
||||
SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, 300l ) );
|
||||
aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false );
|
||||
aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true );
|
||||
|
||||
|
@ -691,6 +710,7 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
|||
|
||||
aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() );
|
||||
aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() );
|
||||
aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() );
|
||||
aCfg->Write( ShowHiddenPinsEntry, m_showAllPins );
|
||||
aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() );
|
||||
|
||||
|
|
|
@ -74,7 +74,13 @@ extern SCH_SHEET* g_RootSheet;
|
|||
* default thickness line value (i.e. = 0 ).
|
||||
*/
|
||||
int GetDefaultLineThickness();
|
||||
void SetDefaultLineThickness( int aThickness);
|
||||
void SetDefaultLineThickness( int aThickness );
|
||||
|
||||
/**
|
||||
* Default length for new pins in module editor
|
||||
*/
|
||||
int GetDefaultPinLength();
|
||||
void SetDefaultPinLength( int aLength );
|
||||
|
||||
/**
|
||||
* Default line thickness used to draw/plot busses.
|
||||
|
|
|
@ -185,7 +185,7 @@ const wxChar* MsgPinElectricType[] =
|
|||
LIB_PIN::LIB_PIN( LIB_COMPONENT* aParent ) :
|
||||
LIB_ITEM( LIB_PIN_T, aParent )
|
||||
{
|
||||
m_length = DEFAULT_PIN_LENGTH; // default Pin len
|
||||
m_length = GetDefaultPinLength(); // default Pin len
|
||||
m_orientation = PIN_RIGHT; // Pin orient: Up, Down, Left, Right
|
||||
m_shape = NONE; // Pin shape, bitwise.
|
||||
m_type = PIN_UNSPECIFIED; // electrical type of pin
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
|
||||
#define TARGET_PIN_RADIUS 12 // Circle diameter drawn at the active end of pins
|
||||
#define DEFAULT_PIN_LENGTH 300 // Default Length of a pin when it is created.
|
||||
|
||||
// pins: special symbols sizes
|
||||
#define INVERT_PIN_RADIUS 30 // Radius of inverted pin circle.
|
||||
|
|
|
@ -59,13 +59,22 @@ static wxPoint PinPreviousPos;
|
|||
static int LastPinType = PIN_INPUT;
|
||||
static int LastPinOrient = PIN_RIGHT;
|
||||
static int LastPinShape = NONE;
|
||||
static int LastPinLength = DEFAULT_PIN_LENGTH;
|
||||
static int LastPinNameSize = DEFAULT_TEXT_SIZE;
|
||||
static int LastPinNumSize = DEFAULT_TEXT_SIZE;
|
||||
static bool LastPinCommonConvert = false;
|
||||
static bool LastPinCommonUnit = false;
|
||||
static bool LastPinVisible = true;
|
||||
|
||||
// The -1 is a non-valid value to trigger delayed initialization
|
||||
static int LastPinLength = -1;
|
||||
|
||||
static int GetLastPinLength()
|
||||
{
|
||||
if( LastPinLength == -1 )
|
||||
LastPinLength = GetDefaultPinLength();
|
||||
|
||||
return LastPinLength;
|
||||
}
|
||||
|
||||
void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
|
||||
{
|
||||
|
@ -136,7 +145,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
|
|||
pin->SetNumber( dlg.GetPadName() );
|
||||
pin->SetNumberTextSize( LastPinNumSize );
|
||||
pin->SetOrientation( LastPinOrient );
|
||||
pin->SetLength( LastPinLength );
|
||||
pin->SetLength( GetLastPinLength() );
|
||||
pin->SetType( LastPinType );
|
||||
pin->SetShape( LastPinShape );
|
||||
pin->SetConversion( ( LastPinCommonConvert ) ? 0 : m_convert );
|
||||
|
@ -389,7 +398,7 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
|
|||
pin->SetFlags( IS_LINKED );
|
||||
|
||||
pin->Move( GetCrossHairPosition( true ) );
|
||||
pin->SetLength( LastPinLength );
|
||||
pin->SetLength( GetLastPinLength() );
|
||||
pin->SetOrientation( LastPinOrient );
|
||||
pin->SetType( LastPinType );
|
||||
pin->SetShape( LastPinShape );
|
||||
|
|
Loading…
Reference in New Issue