Eeschema: add dialog libedit options and move options relative to libedit from eeschema options to this dialog.
Ensure some values initialized by the schematic editor and used by libedit are also initialized in libedit even if the schematic editor was not started. Remove useless commands (save/load project config) in libedit, because now they have no sense.
This commit is contained in:
commit
09870e9661
|
@ -158,7 +158,7 @@ void EDA_3D_FRAME::CreateMenuBar()
|
|||
|
||||
wxMenu * renderOptionsMenu = new wxMenu;
|
||||
AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_COLOR,
|
||||
_( "Render options" ), KiBitmap( tools_xpm ) );
|
||||
_( "Render Options" ), KiBitmap( tools_xpm ) );
|
||||
|
||||
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHADOWS,
|
||||
_( "Render Shadows" ),
|
||||
|
@ -180,7 +180,7 @@ void EDA_3D_FRAME::CreateMenuBar()
|
|||
KiBitmap( green_xpm ), wxITEM_CHECK );
|
||||
|
||||
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_MATERIAL,
|
||||
_( "Render Material properties" ),
|
||||
_( "Render Material Properties" ),
|
||||
KiBitmap( green_xpm ), wxITEM_CHECK );
|
||||
|
||||
prefsMenu->AppendSeparator();
|
||||
|
@ -224,10 +224,10 @@ void EDA_3D_FRAME::CreateMenuBar()
|
|||
prefsMenu->AppendSeparator();
|
||||
|
||||
AddMenuItem( prefsMenu, ID_MENU3D_SHOW_BOARD_BODY,
|
||||
_( "Show Board Body" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
||||
_( "Show Board Bod&y" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
||||
|
||||
AddMenuItem( prefsMenu, ID_MENU3D_USE_COPPER_THICKNESS,
|
||||
_( "Show Copper Thickness" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
||||
_( "Show Copper &Thickness" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
||||
|
||||
AddMenuItem( prefsMenu, ID_MENU3D_MODULE_ONOFF,
|
||||
_( "Show 3D F&ootprints" ), KiBitmap( shape_3d_xpm ), wxITEM_CHECK );
|
||||
|
@ -239,7 +239,7 @@ void EDA_3D_FRAME::CreateMenuBar()
|
|||
|
||||
wxMenu * layersMenu = new wxMenu;
|
||||
AddMenuItem( prefsMenu, layersMenu, ID_MENU3D_LAYERS,
|
||||
_( "Show Layers" ), KiBitmap( tools_xpm ) );
|
||||
_( "Show &Layers" ), KiBitmap( tools_xpm ) );
|
||||
|
||||
AddMenuItem( layersMenu, ID_MENU3D_ADHESIVE_ONOFF,
|
||||
_( "Show &Adhesive Layers" ), KiBitmap( tools_xpm ), wxITEM_CHECK );
|
||||
|
|
|
@ -48,6 +48,8 @@ set( EESCHEMA_DLGS
|
|||
dialogs/dialog_libedit_dimensions_base.cpp
|
||||
dialogs/dialog_lib_edit_draw_item.cpp
|
||||
dialogs/dialog_lib_edit_draw_item_base.cpp
|
||||
dialogs/dialog_libedit_options_base.cpp
|
||||
dialogs/dialog_libedit_options.cpp
|
||||
dialogs/dialog_lib_edit_pin.cpp
|
||||
dialogs/dialog_lib_edit_pin_base.cpp
|
||||
dialogs/dialog_lib_new_component.cpp
|
||||
|
|
|
@ -58,9 +58,6 @@ 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 Apr 10 2012)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// 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( 11, 3, 0, 0 );
|
||||
fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizer1->AddGrowableCol( 0 );
|
||||
fgSizer1->AddGrowableCol( 1 );
|
||||
fgSizer1->AddGrowableCol( 2 );
|
||||
|
@ -89,17 +89,6 @@ 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 );
|
||||
|
@ -247,6 +236,7 @@ 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 );
|
||||
|
@ -254,6 +244,7 @@ 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 );
|
||||
|
@ -261,6 +252,7 @@ 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 );
|
||||
|
@ -268,6 +260,7 @@ 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 );
|
||||
|
@ -275,6 +268,7 @@ 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 );
|
||||
|
@ -282,6 +276,7 @@ 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 );
|
||||
|
@ -289,6 +284,7 @@ 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 );
|
||||
|
@ -296,6 +292,7 @@ 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 );
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="11" />
|
||||
<FileVersion major="1" minor="13" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
|
@ -20,8 +20,10 @@
|
|||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_lua_events">1</property>
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -42,7 +44,7 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_EESCHEMA_OPTIONS_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">508,560</property>
|
||||
<property name="size">508,583</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Schematic Editor Options</property>
|
||||
|
@ -288,7 +290,7 @@
|
|||
<property name="name">fgSizer1</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">11</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
|
@ -892,6 +894,7 @@
|
|||
<event name="OnSize"></event>
|
||||
<event name="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1145,6 +1148,7 @@
|
|||
<event name="OnSize"></event>
|
||||
<event name="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1231,259 +1235,6 @@
|
|||
<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>
|
||||
|
@ -1651,6 +1402,7 @@
|
|||
<event name="OnSize"></event>
|
||||
<event name="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1904,6 +1656,7 @@
|
|||
<event name="OnSize"></event>
|
||||
<event name="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -2157,6 +1910,7 @@
|
|||
<event name="OnSize"></event>
|
||||
<event name="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -2410,6 +2164,7 @@
|
|||
<event name="OnSize"></event>
|
||||
<event name="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -2590,6 +2345,7 @@
|
|||
<event name="OnSize"></event>
|
||||
<event name="OnSpinCtrl"></event>
|
||||
<event name="OnSpinCtrlText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 10 2012)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -11,6 +11,8 @@
|
|||
#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>
|
||||
|
@ -67,9 +69,6 @@ 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;
|
||||
|
@ -124,7 +123,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 508,560 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 508,583 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_EESCHEMA_OPTIONS_BASE();
|
||||
|
||||
};
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2011 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file dialog_libedit_options.cpp
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <class_base_screen.h>
|
||||
|
||||
#include <dialog_libedit_options.h>
|
||||
|
||||
|
||||
DIALOG_LIBEDIT_OPTIONS::DIALOG_LIBEDIT_OPTIONS( wxWindow* parent ) :
|
||||
DIALOG_LIBEDIT_OPTIONS_BASE( parent )
|
||||
{
|
||||
m_sdbSizer1OK->SetDefault();
|
||||
}
|
||||
|
||||
void DIALOG_LIBEDIT_OPTIONS::SetGridSizes( const GRIDS& grid_sizes, int grid_id )
|
||||
{
|
||||
wxASSERT( grid_sizes.size() > 0 );
|
||||
|
||||
int select = wxNOT_FOUND;
|
||||
|
||||
for( size_t i = 0; i < grid_sizes.size(); i++ )
|
||||
{
|
||||
wxString tmp;
|
||||
tmp.Printf( wxT( "%0.1f" ), grid_sizes[i].m_Size.x );
|
||||
m_choiceGridSize->Append( tmp );
|
||||
|
||||
if( grid_sizes[i].m_Id == grid_id )
|
||||
select = (int) i;
|
||||
}
|
||||
|
||||
m_choiceGridSize->SetSelection( select );
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file dialog_libedit_options.h
|
||||
*
|
||||
* Subclass of DIALOG_LIBEDIT_OPTIONS_BASE, which is generated by wxFormBuilder.
|
||||
*/
|
||||
|
||||
#ifndef __DIALOG_LIBEDIT_OPTIONS__
|
||||
#define __DIALOG_LIBEDIT_OPTIONS__
|
||||
|
||||
#include <dialog_libedit_options_base.h>
|
||||
|
||||
class DIALOG_LIBEDIT_OPTIONS : public DIALOG_LIBEDIT_OPTIONS_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_LIBEDIT_OPTIONS( wxWindow* parent );
|
||||
|
||||
void SetGridSelection( int select ) { m_choiceGridSize->SetSelection( select ); }
|
||||
int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
|
||||
void SetGridSizes( const GRIDS& grid_sizes, int grid_id );
|
||||
|
||||
void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
|
||||
bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
|
||||
|
||||
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 SetPinNumSize( int text_size ) { m_spinPinNumSize->SetValue( text_size ); }
|
||||
int GetPinNumSize( void ) { return m_spinPinNumSize->GetValue(); }
|
||||
|
||||
void SetPinNameSize( int text_size ) { m_spinPinNameSize->SetValue( text_size ); }
|
||||
int GetPinNameSize( void ) { return m_spinPinNameSize->GetValue(); }
|
||||
};
|
||||
|
||||
#endif // __DIALOG_LIBEDIT_OPTIONS__
|
|
@ -0,0 +1,138 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_libedit_options_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_LIBEDIT_OPTIONS_BASE::DIALOG_LIBEDIT_OPTIONS_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( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
wxBoxSizer* mainSizer;
|
||||
mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bOptionsSizer;
|
||||
bOptionsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* p1mainSizer;
|
||||
p1mainSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer;
|
||||
fgSizer = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizer->AddGrowableCol( 0 );
|
||||
fgSizer->AddGrowableCol( 1 );
|
||||
fgSizer->AddGrowableCol( 2 );
|
||||
fgSizer->SetFlexibleDirection( wxHORIZONTAL );
|
||||
fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText3 = new wxStaticText( this, wxID_ANY, _("&Grid size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText3->Wrap( -1 );
|
||||
fgSizer->Add( m_staticText3, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
wxArrayString m_choiceGridSizeChoices;
|
||||
m_choiceGridSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceGridSizeChoices, 0 );
|
||||
m_choiceGridSize->SetSelection( 0 );
|
||||
fgSizer->Add( m_choiceGridSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 3 );
|
||||
|
||||
m_staticGridUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticGridUnits->Wrap( -1 );
|
||||
fgSizer->Add( m_staticGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Default &line width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText5->Wrap( -1 );
|
||||
fgSizer->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_spinLineWidth = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 100, 1 );
|
||||
fgSizer->Add( m_spinLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticLineWidthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticLineWidthUnits->Wrap( -1 );
|
||||
fgSizer->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_staticText52 = new wxStaticText( this, wxID_ANY, _("Default pin length:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText52->Wrap( -1 );
|
||||
fgSizer->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
|
||||
|
||||
m_spinPinLength = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 50, 1000, 200 );
|
||||
fgSizer->Add( m_spinPinLength, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticPinLengthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticPinLengthUnits->Wrap( -1 );
|
||||
fgSizer->Add( m_staticPinLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
|
||||
|
||||
m_staticText7 = new wxStaticText( this, wxID_ANY, _("Default pin num &size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText7->Wrap( -1 );
|
||||
fgSizer->Add( m_staticText7, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_spinPinNumSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 1000, 0 );
|
||||
fgSizer->Add( m_spinPinNumSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextSizeUnits->Wrap( -1 );
|
||||
fgSizer->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Default pin &name size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText9->Wrap( -1 );
|
||||
fgSizer->Add( m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_spinPinNameSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -5000, 5000, 0 );
|
||||
fgSizer->Add( m_spinPinNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticRepeatXUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticRepeatXUnits->Wrap( -1 );
|
||||
fgSizer->Add( m_staticRepeatXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
|
||||
bSizer3->Add( fgSizer, 0, wxALIGN_CENTER|wxEXPAND, 0 );
|
||||
|
||||
wxBoxSizer* bSizer2;
|
||||
bSizer2 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizer2->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
m_checkShowGrid = new wxCheckBox( this, wxID_ANY, _("Show gr&id"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer2->Add( m_checkShowGrid, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 3 );
|
||||
|
||||
|
||||
bSizer3->Add( bSizer2, 0, wxEXPAND, 0 );
|
||||
|
||||
|
||||
p1mainSizer->Add( bSizer3, 1, wxALL|wxEXPAND, 6 );
|
||||
|
||||
|
||||
bOptionsSizer->Add( p1mainSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bOptionsSizer->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 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();
|
||||
|
||||
bOptionsSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 6 );
|
||||
|
||||
|
||||
mainSizer->Add( bOptionsSizer, 1, wxEXPAND, 12 );
|
||||
|
||||
|
||||
this->SetSizer( mainSizer );
|
||||
this->Layout();
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
||||
DIALOG_LIBEDIT_OPTIONS_BASE::~DIALOG_LIBEDIT_OPTIONS_BASE()
|
||||
{
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,71 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_LIBEDIT_OPTIONS_BASE_H__
|
||||
#define __DIALOG_LIBEDIT_OPTIONS_BASE_H__
|
||||
|
||||
#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>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_LIBEDIT_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_LIBEDIT_OPTIONS_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText3;
|
||||
wxChoice* m_choiceGridSize;
|
||||
wxStaticText* m_staticGridUnits;
|
||||
wxStaticText* m_staticText5;
|
||||
wxSpinCtrl* m_spinLineWidth;
|
||||
wxStaticText* m_staticLineWidthUnits;
|
||||
wxStaticText* m_staticText52;
|
||||
wxSpinCtrl* m_spinPinLength;
|
||||
wxStaticText* m_staticPinLengthUnits;
|
||||
wxStaticText* m_staticText7;
|
||||
wxSpinCtrl* m_spinPinNumSize;
|
||||
wxStaticText* m_staticTextSizeUnits;
|
||||
wxStaticText* m_staticText9;
|
||||
wxSpinCtrl* m_spinPinNameSize;
|
||||
wxStaticText* m_staticRepeatXUnits;
|
||||
wxStaticLine* m_staticline3;
|
||||
wxCheckBox* m_checkShowGrid;
|
||||
wxStaticLine* m_staticline2;
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 492,244 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LIBEDIT_OPTIONS_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_LIBEDIT_OPTIONS_BASE_H__
|
|
@ -5,7 +5,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.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
|
||||
|
@ -48,17 +48,15 @@
|
|||
|
||||
#include <dialogs/dialog_color_config.h>
|
||||
#include <dialogs/dialog_eeschema_options.h>
|
||||
#include <dialogs/dialog_libedit_options.h>
|
||||
#include <dialogs/dialog_schematic_find.h>
|
||||
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
#define HOTKEY_FILENAME wxT( "eeschema" )
|
||||
|
||||
#define FR_HISTORY_LIST_CNT 10 ///< Maximum number of find and replace strings.
|
||||
|
||||
/// The width to draw busses that do not have a specific width
|
||||
static int s_defaultBusThickness;
|
||||
|
||||
static int s_defaultBusThickness = 15;
|
||||
|
||||
int GetDefaultBusThickness()
|
||||
{
|
||||
|
@ -76,7 +74,7 @@ void SetDefaultBusThickness( int aThickness)
|
|||
|
||||
|
||||
/// Default size for text (not only labels)
|
||||
static int s_defaultTextSize;
|
||||
static int s_defaultTextSize = DEFAULT_SIZE_TEXT;
|
||||
|
||||
int GetDefaultTextSize()
|
||||
{
|
||||
|
@ -112,24 +110,6 @@ void SetDefaultLineThickness( int aThickness )
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Default pin length
|
||||
*/
|
||||
static int s_defaultPinLength;
|
||||
|
||||
|
||||
int GetDefaultPinLength()
|
||||
{
|
||||
return s_defaultPinLength;
|
||||
}
|
||||
|
||||
|
||||
void SetDefaultPinLength( int aLength )
|
||||
{
|
||||
s_defaultPinLength = aLength;
|
||||
}
|
||||
|
||||
|
||||
// Color to draw selected items
|
||||
EDA_COLOR_T GetItemSelectedColor()
|
||||
{
|
||||
|
@ -188,39 +168,8 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
|||
int id = event.GetId();
|
||||
wxFileName fn;
|
||||
|
||||
SCH_EDIT_FRAME* schFrame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false );
|
||||
wxASSERT( schFrame );
|
||||
|
||||
switch( id )
|
||||
{
|
||||
case ID_CONFIG_SAVE:
|
||||
schFrame->SaveProjectSettings( true );
|
||||
break;
|
||||
|
||||
case ID_CONFIG_READ:
|
||||
{
|
||||
#if 0 // This is confusing. From the library parts editor, we trigger the loading
|
||||
// of configuration information into the schematic editor? Makes no more sense
|
||||
// than me storing my old newspapers in your garage.
|
||||
|
||||
fn = g_RootSheet->GetScreen()->GetFileName();
|
||||
fn.SetExt( ProjectFileExtension );
|
||||
|
||||
wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(),
|
||||
fn.GetFullName(), ProjectFileWildcard,
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
break;
|
||||
|
||||
wxString foreign_pro = dlg.GetPath();
|
||||
|
||||
Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH,
|
||||
GetProjectFileParametersList(), foreign_pro );
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
// Hotkey IDs
|
||||
case ID_PREFERENCES_HOTKEY_SHOW_EDITOR:
|
||||
InstallHotkeyFrame( this, s_Eeschema_Hokeys_Descr );
|
||||
|
@ -354,7 +303,7 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
|
||||
void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
|
||||
{
|
||||
wxArrayString units;
|
||||
GRIDS grid_list = GetScreen()->GetGrids();
|
||||
|
@ -368,7 +317,6 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
|
|||
dlg.SetGridSizes( grid_list, GetScreen()->GetGridId() );
|
||||
dlg.SetBusWidth( GetDefaultBusThickness() );
|
||||
dlg.SetLineWidth( GetDefaultLineThickness() );
|
||||
dlg.SetPinLength( GetDefaultPinLength() );
|
||||
dlg.SetTextSize( GetDefaultTextSize() );
|
||||
dlg.SetRepeatHorizontal( g_RepeatStep.x );
|
||||
dlg.SetRepeatVertical( g_RepeatStep.y );
|
||||
|
@ -417,7 +365,6 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
|
|||
|
||||
SetDefaultBusThickness( dlg.GetBusWidth() );
|
||||
SetDefaultLineThickness( dlg.GetLineWidth() );
|
||||
SetDefaultPinLength( dlg.GetPinLength() );
|
||||
SetDefaultTextSize( dlg.GetTextSize() );
|
||||
g_RepeatStep.x = dlg.GetRepeatHorizontal();
|
||||
g_RepeatStep.y = dlg.GetRepeatVertical();
|
||||
|
@ -453,6 +400,8 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
|
|||
}
|
||||
}
|
||||
|
||||
SaveSettings( config() ); // save values shared by eeschema applications.
|
||||
|
||||
m_canvas->Refresh( true );
|
||||
}
|
||||
|
||||
|
@ -472,7 +421,7 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList()
|
|||
LIB_PART::SubpartFirstIdPtr(),
|
||||
'A', '1', 'z' ) );
|
||||
|
||||
/* moved to library load/save specific code
|
||||
/* moved to library load/save specific code, in a specific section in .pro file
|
||||
m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ),
|
||||
&m_userLibraryPath ) );
|
||||
m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ),
|
||||
|
@ -560,7 +509,6 @@ 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" );
|
||||
|
@ -583,6 +531,14 @@ static const wxChar ReplaceStringHistoryEntry[] = wxT( "ReplaceStringHistoryLi
|
|||
static const wxChar FieldNamesEntry[] = wxT( "FieldNames" );
|
||||
static const wxChar SimulatorCommandEntry[] = wxT( "SimCmdLine" );
|
||||
|
||||
// Library editor wxConfig entry names.
|
||||
static const wxChar lastLibExportPathEntry[] = wxT( "LastLibraryExportPath" );
|
||||
static const wxChar lastLibImportPathEntry[] = wxT( "LastLibraryImportPath" );
|
||||
static const wxChar libeditdrawBgColorEntry[] = wxT( "LibeditBgColor" );
|
||||
static const wxChar defaultPinNumSizeEntry[] = wxT( "LibeditPinNumSize" );
|
||||
static const wxChar defaultPinNameSizeEntry[] = wxT( "LibeditPinNameSize" );
|
||||
static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" );
|
||||
|
||||
|
||||
PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings()
|
||||
{
|
||||
|
@ -616,9 +572,8 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
|||
|
||||
m_GridColor = GetLayerColor( LAYER_GRID );
|
||||
|
||||
SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, 12l ) );
|
||||
SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, 6l ) );
|
||||
SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, 300l ) );
|
||||
SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, DEFAULTBUSTHICKNESS ) );
|
||||
SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, DEFAULTDRAWLINETHICKNESS ) );
|
||||
aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false );
|
||||
aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true );
|
||||
|
||||
|
@ -709,7 +664,6 @@ 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() );
|
||||
|
||||
|
@ -770,3 +724,74 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
|||
|
||||
aCfg->Write( FieldNamesEntry, record );
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||
{
|
||||
EDA_DRAW_FRAME::LoadSettings( aCfg );
|
||||
|
||||
wxConfigPathChanger cpc( aCfg, m_configPath );
|
||||
|
||||
EDA_COLOR_T itmp = ColorByName( aCfg->Read( libeditdrawBgColorEntry, wxT("WHITE") ) );
|
||||
SetDrawBgColor( itmp );
|
||||
|
||||
wxString pro_dir = Prj().GetProjectFullName();
|
||||
|
||||
m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, pro_dir );
|
||||
m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, pro_dir );
|
||||
|
||||
SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, DEFAULTDRAWLINETHICKNESS ) );
|
||||
SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) );
|
||||
m_textPinNumDefaultSize = aCfg->Read( defaultPinNumSizeEntry, DEFAULTPINNUMSIZE );
|
||||
m_textPinNameDefaultSize = aCfg->Read( defaultPinNameSizeEntry, DEFAULTPINNAMESIZE );
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||
{
|
||||
EDA_DRAW_FRAME::SaveSettings( aCfg );
|
||||
|
||||
wxConfigPathChanger cpc( aCfg, m_configPath );
|
||||
|
||||
aCfg->Write( libeditdrawBgColorEntry, ColorGetName( GetDrawBgColor() ) );
|
||||
aCfg->Write( lastLibExportPathEntry, m_lastLibExportPath );
|
||||
aCfg->Write( lastLibImportPathEntry, m_lastLibImportPath );
|
||||
aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() );
|
||||
aCfg->Write( defaultPinNumSizeEntry, (long) m_textPinNumDefaultSize );
|
||||
aCfg->Write( defaultPinNameSizeEntry, (long) m_textPinNameDefaultSize );
|
||||
}
|
||||
|
||||
void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
|
||||
{
|
||||
wxArrayString units;
|
||||
GRIDS grid_list = GetScreen()->GetGrids();
|
||||
|
||||
DIALOG_LIBEDIT_OPTIONS dlg( this );
|
||||
|
||||
dlg.SetGridSizes( grid_list, GetScreen()->GetGridId() );
|
||||
dlg.SetLineWidth( GetDefaultLineThickness() );
|
||||
dlg.SetPinLength( GetDefaultPinLength() );
|
||||
dlg.SetPinNumSize( m_textPinNumDefaultSize );
|
||||
dlg.SetPinNameSize( m_textPinNameDefaultSize );
|
||||
|
||||
dlg.SetShowGrid( IsGridVisible() );
|
||||
dlg.Layout();
|
||||
dlg.Fit();
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size;
|
||||
m_LastGridSizeId = GetScreen()->SetGrid( gridsize );
|
||||
|
||||
SetDefaultLineThickness( dlg.GetLineWidth() );
|
||||
SetDefaultPinLength( dlg.GetPinLength() );
|
||||
m_textPinNumDefaultSize = dlg.GetPinNumSize();
|
||||
m_textPinNameDefaultSize = dlg.GetPinNameSize();
|
||||
SetGridVisibility( dlg.GetShowGrid() );
|
||||
|
||||
SaveSettings( config() ); // save values shared by eeschema applications.
|
||||
|
||||
m_canvas->Refresh( true );
|
||||
}
|
||||
|
||||
|
|
|
@ -3,9 +3,3 @@
|
|||
*/
|
||||
|
||||
#include <config_params.h>
|
||||
|
||||
|
||||
/* saving parameters option : */
|
||||
#define INSETUP true /* used when the parameter is saved in general config
|
||||
* if not used, the parameter is saved in the local
|
||||
* config (project config) */
|
||||
|
|
|
@ -16,6 +16,23 @@ class SCH_SHEET;
|
|||
#define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers
|
||||
#define DANGLING_SYMBOL_SIZE 12
|
||||
|
||||
///< The thickness to draw busses that do not have a specific width
|
||||
//</ (can be changed in preference menu)
|
||||
#define DEFAULTBUSTHICKNESS 12
|
||||
|
||||
///< The thickness to draw lines that thickness is set to 0 (default thickness)
|
||||
///< (can be changed in preference menu)
|
||||
#define DEFAULTDRAWLINETHICKNESS 6
|
||||
|
||||
///< The default pin len value when creating pins(can be changed in preference menu)
|
||||
#define DEFAULTPINLENGTH 200
|
||||
|
||||
///< The default pin len value when creating pins(can be changed in preference menu)
|
||||
#define DEFAULTPINNUMSIZE 50
|
||||
|
||||
///< The default pin len value when creating pins(can be changed in preference menu)
|
||||
#define DEFAULTPINNAMESIZE 50
|
||||
|
||||
#define GR_DEFAULT_DRAWMODE GR_COPY
|
||||
|
||||
// this enum is for color management
|
||||
|
@ -81,12 +98,6 @@ void SetDefaultLineThickness( int aThickness );
|
|||
int GetDefaultTextSize();
|
||||
void SetDefaultTextSize( int aSize );
|
||||
|
||||
/**
|
||||
* Default length for new pins in module editor
|
||||
*/
|
||||
int GetDefaultPinLength();
|
||||
void SetDefaultPinLength( int aLength );
|
||||
|
||||
/**
|
||||
* Default line thickness used to draw/plot busses.
|
||||
*/
|
||||
|
|
|
@ -202,14 +202,14 @@ static int ExternalPinDecoSize( const LIB_PIN &aPin )
|
|||
LIB_PIN::LIB_PIN( LIB_PART* aParent ) :
|
||||
LIB_ITEM( LIB_PIN_T, aParent )
|
||||
{
|
||||
m_length = GetDefaultPinLength(); // default Pin len
|
||||
m_length = LIB_EDIT_FRAME::GetDefaultPinLength();
|
||||
m_orientation = PIN_RIGHT; // Pin orient: Up, Down, Left, Right
|
||||
m_shape = NONE; // Pin shape, bitwise.
|
||||
m_type = PIN_UNSPECIFIED; // electrical type of pin
|
||||
m_attributes = 0; // bit 0 != 0: pin invisible
|
||||
m_number = 0; // pin number (i.e. 4 ASCII chars)
|
||||
m_numTextSize = GetDefaultTextSize(); // Default size for pin name and num
|
||||
m_nameTextSize = GetDefaultTextSize();
|
||||
m_numTextSize = LIB_EDIT_FRAME::GetPinNumDefaultSize();
|
||||
m_nameTextSize = LIB_EDIT_FRAME::GetPinNameDefaultSize();
|
||||
m_width = 0;
|
||||
m_typeName = _( "Pin" );
|
||||
}
|
||||
|
|
|
@ -58,12 +58,6 @@
|
|||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
|
||||
/* Library editor wxConfig entry names. */
|
||||
const wxString lastLibExportPathEntry( wxT( "LastLibraryExportPath" ) );
|
||||
const wxString lastLibImportPathEntry( wxT( "LastLibraryImportPath" ) );
|
||||
|
||||
|
||||
/* This method guarantees unique IDs for the library this run of Eeschema
|
||||
* which prevents ID conflicts and eliminates the need to recompile every
|
||||
* source file in the project when adding IDs to include/id.h. */
|
||||
|
@ -82,6 +76,12 @@ wxSize LIB_EDIT_FRAME:: m_clientSize = wxSize( -1, -1 );
|
|||
int LIB_EDIT_FRAME:: m_textSize = -1;
|
||||
int LIB_EDIT_FRAME:: m_textOrientation = TEXT_ORIENT_HORIZ;
|
||||
int LIB_EDIT_FRAME:: m_drawLineWidth = 0;
|
||||
|
||||
// these values are overridden when reading the config
|
||||
int LIB_EDIT_FRAME:: m_textPinNumDefaultSize = DEFAULTPINNUMSIZE;
|
||||
int LIB_EDIT_FRAME:: m_textPinNameDefaultSize = DEFAULTPINNAMESIZE;
|
||||
int LIB_EDIT_FRAME:: m_defaultPinLength = DEFAULTPINLENGTH;
|
||||
|
||||
FILL_T LIB_EDIT_FRAME:: m_drawFillStyle = NO_FILL;
|
||||
|
||||
|
||||
|
@ -131,9 +131,8 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
|
|||
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
|
||||
|
||||
EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig )
|
||||
EVT_MENU( wxID_PREFERENCES, LIB_EDIT_FRAME::OnPreferencesOptions )
|
||||
EVT_MENU( ID_CONFIG_REQ, LIB_EDIT_FRAME::InstallConfigFrame )
|
||||
EVT_MENU( ID_CONFIG_SAVE, LIB_EDIT_FRAME::Process_Config )
|
||||
EVT_MENU( ID_CONFIG_READ, LIB_EDIT_FRAME::Process_Config )
|
||||
EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::Process_Config )
|
||||
EVT_MENU( ID_LIBEDIT_DIMENSIONS, LIB_EDIT_FRAME::InstallDimensionsDialog )
|
||||
|
||||
|
@ -284,26 +283,6 @@ const wxChar* LIB_EDIT_FRAME::GetLibEditFrameName()
|
|||
return LIB_EDIT_FRAME_NAME;
|
||||
}
|
||||
|
||||
static const wxChar drawBgColorKey[] = wxT( "LibeditBgColor" );
|
||||
|
||||
void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||
{
|
||||
EDA_DRAW_FRAME::LoadSettings( aCfg );
|
||||
|
||||
wxConfigPathChanger cpc( aCfg, m_configPath );
|
||||
|
||||
EDA_COLOR_T itmp = ColorByName( aCfg->Read( drawBgColorKey, wxT("WHITE") ) );
|
||||
SetDrawBgColor( itmp );
|
||||
|
||||
wxString pro_dir = Prj().GetProjectFullName();
|
||||
|
||||
m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, pro_dir );
|
||||
m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, pro_dir );
|
||||
|
||||
m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, pro_dir );
|
||||
m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, pro_dir );
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::SetDrawItem( LIB_ITEM* drawItem )
|
||||
{
|
||||
|
@ -311,18 +290,6 @@ void LIB_EDIT_FRAME::SetDrawItem( LIB_ITEM* drawItem )
|
|||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||
{
|
||||
EDA_DRAW_FRAME::SaveSettings( aCfg );
|
||||
|
||||
wxConfigPathChanger cpc( aCfg, m_configPath );
|
||||
|
||||
aCfg->Write( drawBgColorKey, ColorGetName( GetDrawBgColor() ) );
|
||||
aCfg->Write( lastLibExportPathEntry, m_lastLibExportPath );
|
||||
aCfg->Write( lastLibImportPathEntry, m_lastLibImportPath );
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
||||
{
|
||||
if( GetScreen()->IsModify() )
|
||||
|
|
|
@ -101,7 +101,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME
|
|||
// They are enabled when the loaded component has
|
||||
// Graphic items for converted shape
|
||||
// But under some circumstances (New component created)
|
||||
// these tools must left enable
|
||||
// these tools must left enabled
|
||||
static bool m_showDeMorgan;
|
||||
|
||||
/// The current text size setting.
|
||||
|
@ -110,6 +110,15 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME
|
|||
/// Current text orientation setting.
|
||||
static int m_textOrientation;
|
||||
|
||||
/// The default pin num text size setting.
|
||||
static int m_textPinNumDefaultSize;
|
||||
|
||||
/// The default pin name text size setting.
|
||||
static int m_textPinNameDefaultSize;
|
||||
|
||||
/// Default pin length
|
||||
static int m_defaultPinLength;
|
||||
|
||||
static wxSize m_clientSize;
|
||||
|
||||
friend class DIALOG_LIB_EDIT_TEXT;
|
||||
|
@ -149,6 +158,23 @@ public:
|
|||
*/
|
||||
void SetCurPart( LIB_PART* aPart );
|
||||
|
||||
/** @return the default pin num text size.
|
||||
*/
|
||||
static int GetPinNumDefaultSize() { return m_textPinNumDefaultSize; }
|
||||
|
||||
/** @return The default pin name text size setting.
|
||||
*/
|
||||
static int GetPinNameDefaultSize() { return m_textPinNameDefaultSize; }
|
||||
|
||||
/** @return The default pin len setting.
|
||||
*/
|
||||
static int GetDefaultPinLength() { return m_defaultPinLength; }
|
||||
|
||||
/** Set the default pin len.
|
||||
*/
|
||||
static void SetDefaultPinLength( int aLength ) { m_defaultPinLength = aLength; }
|
||||
|
||||
|
||||
void ReCreateMenuBar();
|
||||
|
||||
/**
|
||||
|
@ -161,6 +187,7 @@ public:
|
|||
void InstallConfigFrame( wxCommandEvent& event );
|
||||
void InstallDimensionsDialog( wxCommandEvent& event );
|
||||
void OnColorConfig( wxCommandEvent& aEvent );
|
||||
void OnPreferencesOptions( wxCommandEvent& event );
|
||||
void Process_Config( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
|
|
|
@ -224,18 +224,25 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
|||
// Menu Preferences:
|
||||
wxMenu* preferencesMenu = new wxMenu;
|
||||
|
||||
// Library
|
||||
// Library list
|
||||
AddMenuItem( preferencesMenu,
|
||||
ID_CONFIG_REQ,
|
||||
_( "&Library" ),
|
||||
_( "Library preferences" ),
|
||||
_( "Set Active &Libraries" ),
|
||||
_( "Set active library list and library paths" ),
|
||||
KiBitmap( library_xpm ) );
|
||||
|
||||
// Default values and options
|
||||
AddMenuItem( preferencesMenu,
|
||||
wxID_PREFERENCES,
|
||||
_( "Component Editor &Options" ),
|
||||
_( "Set Component Editor default values and options" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
// Colors
|
||||
AddMenuItem( preferencesMenu,
|
||||
ID_COLORS_SETUP,
|
||||
_( "&Colors" ),
|
||||
_( "Color preferences" ),
|
||||
_( "Set &Colors Scheme" ),
|
||||
_( "Set color preferences" ),
|
||||
KiBitmap( palette_xpm ) );
|
||||
|
||||
// Language submenu
|
||||
|
@ -244,23 +251,6 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
|||
// Hotkey submenu
|
||||
AddHotkeyConfigMenu( preferencesMenu );
|
||||
|
||||
// Separator
|
||||
preferencesMenu->AppendSeparator();
|
||||
|
||||
// Save preferences
|
||||
AddMenuItem( preferencesMenu,
|
||||
ID_CONFIG_SAVE,
|
||||
_( "&Save preferences" ),
|
||||
_( "Save application preferences" ),
|
||||
KiBitmap( save_setup_xpm ) );
|
||||
|
||||
// Read preferences
|
||||
AddMenuItem( preferencesMenu,
|
||||
ID_CONFIG_READ,
|
||||
_( "&Read preferences" ),
|
||||
_( "Read application preferences" ),
|
||||
KiBitmap( read_setup_xpm ) );
|
||||
|
||||
// Menu Help:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ static int LastPinNumSize = -1;
|
|||
static int GetLastPinLength()
|
||||
{
|
||||
if( LastPinLength == -1 )
|
||||
LastPinLength = GetDefaultPinLength();
|
||||
LastPinLength = LIB_EDIT_FRAME::GetDefaultPinLength();
|
||||
|
||||
return LastPinLength;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ static int GetLastPinLength()
|
|||
static int GetLastPinNameSize()
|
||||
{
|
||||
if( LastPinNameSize == -1 )
|
||||
LastPinNameSize = GetDefaultTextSize();
|
||||
LastPinNameSize = LIB_EDIT_FRAME::GetPinNameDefaultSize();
|
||||
|
||||
return LastPinNameSize;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ static int GetLastPinNameSize()
|
|||
static int GetLastPinNumSize()
|
||||
{
|
||||
if( LastPinNumSize == -1 )
|
||||
LastPinNumSize = GetDefaultTextSize();
|
||||
LastPinNumSize = LIB_EDIT_FRAME::GetPinNumDefaultSize();
|
||||
|
||||
return LastPinNumSize;
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
|
|||
SCH_EDIT_FRAME::Process_Config )
|
||||
|
||||
EVT_MENU( ID_COLORS_SETUP, SCH_EDIT_FRAME::OnColorConfig )
|
||||
EVT_TOOL( wxID_PREFERENCES, SCH_EDIT_FRAME::OnSetOptions )
|
||||
EVT_TOOL( wxID_PREFERENCES, SCH_EDIT_FRAME::OnPreferencesOptions )
|
||||
|
||||
EVT_TOOL( ID_RUN_LIBRARY, SCH_EDIT_FRAME::OnOpenLibraryEditor )
|
||||
EVT_TOOL( ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP, SCH_EDIT_FRAME::OnOpenLibraryEditor )
|
||||
|
|
|
@ -801,7 +801,7 @@ private:
|
|||
void OnOpenPcbModuleEditor( wxCommandEvent& event );
|
||||
void OnOpenCvpcb( wxCommandEvent& event );
|
||||
void OnOpenLibraryEditor( wxCommandEvent& event );
|
||||
void OnSetOptions( wxCommandEvent& event );
|
||||
void OnPreferencesOptions( wxCommandEvent& event );
|
||||
void OnCancelCurrentCommand( wxCommandEvent& aEvent );
|
||||
|
||||
void OnSelectItem( wxCommandEvent& aEvent );
|
||||
|
|
|
@ -41,8 +41,6 @@
|
|||
|
||||
#define GROUP wxT("/pl_editor")
|
||||
|
||||
#define INSETUP true
|
||||
|
||||
|
||||
void PL_EDITOR_FRAME::Process_Config( wxCommandEvent& event )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue