KiCad PCB EDA Suite
eeschema_config.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2014-2017 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
28 #include <fctsys.h>
29 #include <pgm_base.h>
30 #include <kiface_i.h>
31 #include <class_drawpanel.h>
32 #include <confirm.h>
33 #include <gestfich.h>
34 #include <schframe.h>
35 #include <invoke_sch_dialog.h>
36 #include <common.h>
37 
38 #include <eeschema_id.h>
39 #include <general.h>
40 #include <libeditframe.h>
41 #include <eeschema_config.h>
42 #include <hotkeys.h>
43 #include <sch_sheet.h>
44 #include <class_libentry.h>
46 #include <class_library.h>
47 #include <symbol_lib_table.h>
48 
49 #include <dialog_hotkeys_editor.h>
50 
54 #include <dialog_erc.h>
55 
57 
58 #define FR_HISTORY_LIST_CNT 10
59 
60 
62 
64 {
65  return s_defaultBusThickness;
66 }
67 
68 
69 void SetDefaultBusThickness( int aThickness)
70 {
71  if( aThickness >= 1 )
72  s_defaultBusThickness = aThickness;
73  else
75 }
76 
77 
80 
82 {
83  return s_defaultTextSize;
84 }
85 
86 
87 void SetDefaultTextSize( int aTextSize )
88 {
89  s_defaultTextSize = aTextSize;
90 }
91 
92 
93 /*
94  * Default line (in Eeschema units) thickness used to draw/plot items having a
95  * default thickness line value (i.e. = 0 ).
96  */
98 
99 
101 {
103 }
104 
105 
106 void SetDefaultLineThickness( int aThickness )
107 {
108  if( aThickness >=1 )
109  s_drawDefaultLineThickness = aThickness;
110  else
112 }
113 
114 
115 // Color to draw selected items
117 {
118  return COLOR4D( BROWN );
119 }
120 
121 
122 // Color to draw items flagged invisible, in libedit (they are invisible
123 // in Eeschema
125 {
126  return COLOR4D( DARKGRAY );
127 }
128 
129 
130 void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
131 {
132  int id = event.GetId();
133 
134  switch( id )
135  {
136  // Hotkey IDs
139  break;
140 
143  break;
144 
147  break;
148 
150  // Display current hotkey list for LibEdit.
152  break;
153 
154  default:
155  DisplayError( this, wxT( "LIB_EDIT_FRAME::Process_Config error" ) );
156  }
157 }
158 
159 
160 void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event )
161 {
162  int id = event.GetId();
163  wxFileName fn;
164 
165  switch( id )
166  {
167  case ID_CONFIG_SAVE:
168  SaveProjectSettings( true );
169  break;
170 
171  case ID_CONFIG_READ:
172  {
173  fn = g_RootSheet->GetScreen()->GetFileName();
174  fn.SetExt( ProjectFileExtension );
175 
176  wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(),
177  fn.GetFullName(), ProjectFileWildcard(),
178  wxFD_OPEN | wxFD_FILE_MUST_EXIST );
179 
180  if( dlg.ShowModal() == wxID_CANCEL )
181  break;
182 
183  wxString chosen = dlg.GetPath();
184 
185  if( chosen == Prj().GetProjectFullName() )
186  LoadProjectFile();
187  else
188  {
189  // Read library list and library path list
190  Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH,
192  // Read schematic editor setup
193  Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH_EDITOR,
195  }
196  }
197  break;
198 
199  // Hotkey IDs
202  break;
203 
206  break;
207 
210  break;
211 
213  // Display current hotkey list for eeschema.
215  break;
216 
217  default:
218  DisplayError( this, wxT( "SCH_EDIT_FRAME::Process_Config error" ) );
219  }
220 }
221 
222 
223 void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
224 {
225  wxArrayString units;
226  GRIDS grid_list = GetScreen()->GetGrids();
227  bool saveProjectConfig = false;
228 
229  DIALOG_EESCHEMA_OPTIONS dlg( this );
230 
231  units.Add( GetUnitsLabel( INCHES ) );
232  units.Add( GetUnitsLabel( MILLIMETRES ) );
233 
234  dlg.SetUnits( units, g_UserUnit );
235  dlg.SetGridSizes( grid_list, GetScreen()->GetGridCmdId() );
240  dlg.SetRepeatVertical( GetRepeatStep().y );
245 
246  dlg.SetShowGrid( IsGridVisible() );
256  dlg.Layout();
257  dlg.Fit();
258  dlg.SetMinSize( dlg.GetSize() );
260 
261  if( dlg.ShowModal() == wxID_CANCEL )
262  return;
263 
265 
266  wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size;
267  m_LastGridSizeId = GetScreen()->SetGrid( gridsize );
268 
269  int sep, firstId;
270  dlg.GetRefIdSeparator( sep, firstId);
271 
272  if( sep != (int)LIB_PART::GetSubpartIdSeparator() ||
273  firstId != (int)LIB_PART::GetSubpartFirstId() )
274  {
275  LIB_PART::SetSubpartIdNotation( sep, firstId );
276  saveProjectConfig = true;
277  }
278 
281 
282  if( dlg.GetTextSize() != GetDefaultTextSize() )
283  {
285  saveProjectConfig = true;
286  }
287 
288  wxPoint step;
289  step.x = dlg.GetRepeatHorizontal();
290  step.y = dlg.GetRepeatVertical();
291  SetRepeatStep( step );
293 
305 
306  // Delete all template fieldnames and then restore them using the template field data from
307  // the options dialog
309  TEMPLATE_FIELDNAMES newFieldNames = dlg.GetTemplateFields();
310 
311  for( TEMPLATE_FIELDNAMES::iterator dlgfld = newFieldNames.begin();
312  dlgfld != newFieldNames.end(); ++dlgfld )
313  {
314  TEMPLATE_FIELDNAME fld = *dlgfld;
315  AddTemplateFieldName( fld );
316  }
317 
318  SaveSettings( config() ); // save values shared by eeschema applications.
319 
320  if( saveProjectConfig )
321  SaveProjectSettings( true );
322 
323  m_canvas->Refresh( true );
324 }
325 
326 
328 {
329  if( !m_projectFileParams.empty() )
330  return m_projectFileParams;
331 
332  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ),
334 
335  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "PlotDirectoryName" ),
336  &m_plotDirectoryName ) );
337 
338  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartIdSeparator" ),
340  0, 0, 126 ) );
341  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartFirstId" ),
343  'A', '1', 'z' ) );
344 
345  /* moved to library load/save specific code, in a specific section in .pro file
346  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ),
347  &m_userLibraryPath ) );
348  m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ),
349  &m_componentLibFiles,
350  GROUP_SCH_LIBS ) );
351  */
352 
353  m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetFmtName" ),
354  &m_netListFormat) );
355  m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SpiceAjustPassiveValues" ),
356  &m_spiceAjustPassiveValues, false ) );
357 
358  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ),
360  DEFAULT_SIZE_TEXT, 5, 1000 ) );
361 
362  m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "ERC_TestSimilarLabels" ),
364 
365  return m_projectFileParams;
366 }
367 
368 
370 {
371  // Read library list and library path list
372  bool isRead = Prj().ConfigLoad( Kiface().KifaceSearch(),
374 
375  // Read schematic editor setup
376  isRead = isRead && Prj().ConfigLoad( Kiface().KifaceSearch(),
378 
379  // Verify some values, because the config file can be edited by hand,
380  // and have bad values:
384 
385  // Load the page layout decr file, from the filename stored in
386  // BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file
387  // If empty, or not existing, the default descr is loaded
389  wxString pg_fullfilename = WORKSHEET_LAYOUT::MakeFullFileName(
391  Prj().GetProjectPath() );
392 
393  pglayout.SetPageLayout( pg_fullfilename );
394 
395  return isRead;
396 }
397 
398 
399 void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
400 {
401  PROJECT& prj = Prj();
402  wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); //ConfigFileName
403 
404  fn.SetExt( ProjectFileExtension );
405 
406  if( !IsWritable( fn ) )
407  return;
408 
409  if( aAskForSave )
410  {
411  wxFileDialog dlg( this, _( "Save Project File" ),
412  fn.GetPath(), fn.GetFullName(),
413  ProjectFileWildcard(), wxFD_SAVE );
414 
415  if( dlg.ShowModal() == wxID_CANCEL )
416  return;
417 
418  fn = dlg.GetPath();
419  }
420 
422 }
423 
426 
427 const wxChar RescueNeverShowEntry[] = wxT( "RescueNeverShow" );
428 const wxChar AutoplaceFieldsEntry[] = wxT( "AutoplaceFields" );
429 const wxChar AutoplaceJustifyEntry[] = wxT( "AutoplaceJustify" );
430 const wxChar AutoplaceAlignEntry[] = wxT( "AutoplaceAlign" );
431 static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" );
432 static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" );
433 static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" );
434 static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" );
435 static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" );
436 static const wxChar PreviewFramePositionYEntry[] = wxT( "PreviewFramePositionY" );
437 static const wxChar PreviewFrameWidthEntry[] = wxT( "PreviewFrameWidth" );
438 static const wxChar PreviewFrameHeightEntry[] = wxT( "PreviewFrameHeight" );
439 static const wxChar PrintDialogPositionXEntry[] = wxT( "PrintDialogPositionX" );
440 static const wxChar PrintDialogPositionYEntry[] = wxT( "PrintDialogPositionY" );
441 static const wxChar PrintDialogWidthEntry[] = wxT( "PrintDialogWidth" );
442 static const wxChar PrintDialogHeightEntry[] = wxT( "PrintDialogHeight" );
443 static const wxChar FindDialogPositionXEntry[] = wxT( "FindDialogPositionX" );
444 static const wxChar FindDialogPositionYEntry[] = wxT( "FindDialogPositionY" );
445 static const wxChar FindDialogWidthEntry[] = wxT( "FindDialogWidth" );
446 static const wxChar FindDialogHeightEntry[] = wxT( "FindDialogHeight" );
447 static const wxChar FindReplaceFlagsEntry[] = wxT( "LastFindReplaceFlags" );
448 static const wxChar FindStringEntry[] = wxT( "LastFindString" );
449 static const wxChar ReplaceStringEntry[] = wxT( "LastReplaceString" );
450 static const wxChar FindStringHistoryEntry[] = wxT( "FindStringHistoryList%d" );
451 static const wxChar ReplaceStringHistoryEntry[] = wxT( "ReplaceStringHistoryList%d" );
452 static const wxChar FieldNamesEntry[] = wxT( "FieldNames" );
453 static const wxChar SimulatorCommandEntry[] = wxT( "SimCmdLine" );
454 static const wxString ShowPageLimitsEntry = "ShowPageLimits";
455 static const wxString UnitsEntry = "Units";
456 static const wxString PrintMonochromeEntry = "PrintMonochrome";
457 static const wxString PrintSheetRefEntry = "PrintSheetReferenceAndTitleBlock";
458 static const wxString RepeatStepXEntry = "RepeatStepX";
459 static const wxString RepeatStepYEntry = "RepeatStepY";
460 static const wxString RepeatLabelIncrementEntry = "RepeatLabelIncrement";
461 
462 // Library editor wxConfig entry names.
463 static const wxChar defaultPinNumSizeEntry[] = wxT( "LibeditPinNumSize" );
464 static const wxChar defaultPinNameSizeEntry[] = wxT( "LibeditPinNameSize" );
465 static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" );
466 static const wxChar repeatLibLabelIncEntry[] = wxT( "LibeditRepeatLabelInc" );
467 static const wxChar pinRepeatStepEntry[] = wxT( "LibeditPinRepeatStep" );
468 static const wxChar repeatLibStepXEntry[] = wxT( "LibeditRepeatStepX" );
469 static const wxChar repeatLibStepYEntry[] = wxT( "LibeditRepeatStepY" );
470 static const wxChar showPinElectricalType[] = wxT( "LibeditShowPinElectricalType" );
471 
473 
475 {
476  if( !m_configSettings.empty() )
477  return m_configSettings;
478 
480  &m_showPageLimits, true ) );
481  m_configSettings.push_back( new PARAM_CFG_INT( true, UnitsEntry,
482  (int*)&g_UserUnit, MILLIMETRES ) );
483 
485  &m_printMonochrome, true ) );
486  m_configSettings.push_back( new PARAM_CFG_BOOL( true, PrintSheetRefEntry,
487  &m_printSheetReference, true ) );
488 
489  m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatStepXEntry,
490  &m_repeatStep.x,
493  REPEAT_OFFSET_MAX ) );
494  m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatStepYEntry,
495  &m_repeatStep.y,
498  REPEAT_OFFSET_MAX ) );
501  DEFAULT_REPEAT_LABEL_INC, -10, +10 ) );
502  return m_configSettings;
503 }
504 
505 
506 void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
507 {
509 
510  long tmp;
511 
513 
516 
519  aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false );
520  aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true );
521  aCfg->Read( AutoplaceFieldsEntry, &m_autoplaceFields, true );
522  aCfg->Read( AutoplaceJustifyEntry, &m_autoplaceJustify, true );
523  aCfg->Read( AutoplaceAlignEntry, &m_autoplaceAlign, false );
524 
525  // Load print preview window session settings.
526  aCfg->Read( PreviewFramePositionXEntry, &tmp, -1 );
527  m_previewPosition.x = (int) tmp;
528  aCfg->Read( PreviewFramePositionYEntry, &tmp, -1 );
529  m_previewPosition.y = (int) tmp;
530  aCfg->Read( PreviewFrameWidthEntry, &tmp, -1 );
531  m_previewSize.SetWidth( (int) tmp );
532  aCfg->Read( PreviewFrameHeightEntry, &tmp, -1 );
533  m_previewSize.SetHeight( (int) tmp );
534 
535  // Load print dialog session settings.
536  aCfg->Read( PrintDialogPositionXEntry, &tmp, -1 );
537  m_printDialogPosition.x = (int) tmp;
538  aCfg->Read( PrintDialogPositionYEntry, &tmp, -1 );
539  m_printDialogPosition.y = (int) tmp;
540  aCfg->Read( PrintDialogWidthEntry, &tmp, -1 );
541  m_printDialogSize.SetWidth( (int) tmp );
542  aCfg->Read( PrintDialogHeightEntry, &tmp, -1 );
543  m_printDialogSize.SetHeight( (int) tmp );
544 
545  // Load netlists options:
547 
548  // Load find dialog session setting.
549  aCfg->Read( FindDialogPositionXEntry, &tmp, -1 );
550  m_findDialogPosition.x = (int) tmp;
551  aCfg->Read( FindDialogPositionYEntry, &tmp, -1 );
552  m_findDialogPosition.y = (int) tmp;
553  aCfg->Read( FindDialogWidthEntry, &tmp, -1 );
554  m_findDialogSize.SetWidth( (int) tmp );
555  aCfg->Read( FindDialogHeightEntry, &tmp, -1 );
556  m_findDialogSize.SetHeight( (int) tmp );
557 
558  wxASSERT_MSG( m_findReplaceData,
559  wxT( "Find dialog data settings object not created. Bad programmer!" ) );
560 
561  aCfg->Read( FindReplaceFlagsEntry, &tmp, (long) wxFR_DOWN );
562  m_findReplaceData->SetFlags( (wxUint32) tmp & ~FR_REPLACE_ITEM_FOUND );
563  m_findReplaceData->SetFindString( aCfg->Read( FindStringEntry, wxEmptyString ) );
564  m_findReplaceData->SetReplaceString( aCfg->Read( ReplaceStringEntry, wxEmptyString ) );
565 
566  // Load the find and replace string history list.
567  for( int i = 0; i < FR_HISTORY_LIST_CNT; ++i )
568  {
569  wxString tmpHistory;
570  wxString entry;
571  entry.Printf( FindStringHistoryEntry, i );
572  tmpHistory = aCfg->Read( entry, wxEmptyString );
573 
574  if( !tmpHistory.IsEmpty() )
575  m_findStringHistoryList.Add( tmpHistory );
576 
577  entry.Printf( ReplaceStringHistoryEntry, i );
578  tmpHistory = aCfg->Read( entry, wxEmptyString );
579 
580  if( !tmpHistory.IsEmpty() )
581  m_replaceStringHistoryList.Add( tmpHistory );
582  }
583 
584  wxString templateFieldNames = aCfg->Read( FieldNamesEntry, wxEmptyString );
585 
586  if( !templateFieldNames.IsEmpty() )
587  {
588  TEMPLATE_FIELDNAMES_LEXER lexer( TO_UTF8( templateFieldNames ) );
589 
590  try
591  {
592  m_TemplateFieldNames.Parse( &lexer );
593  }
594  catch( const IO_ERROR& DBG( e ) )
595  {
596  // @todo show error msg
597  DBG( printf( "templatefieldnames parsing error: '%s'\n",
598  TO_UTF8( e.What() ) ); )
599  }
600  }
601 }
602 
603 
604 void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
605 {
607 
609 
610  aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() );
611  aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() );
612  aCfg->Write( ShowHiddenPinsEntry, m_showAllPins );
613  aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() );
614  aCfg->Write( AutoplaceFieldsEntry, m_autoplaceFields );
616  aCfg->Write( AutoplaceAlignEntry, m_autoplaceAlign );
617 
618  // Save print preview window session settings.
621  aCfg->Write( PreviewFrameWidthEntry, m_previewSize.GetWidth() );
622  aCfg->Write( PreviewFrameHeightEntry, m_previewSize.GetHeight() );
623 
624  // Save print dialog session settings.
627  aCfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() );
628  aCfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() );
629 
630  // Save netlists options:
632 
633  // Save find dialog session setting.
636  aCfg->Write( FindDialogWidthEntry, m_findDialogSize.GetWidth() );
637  aCfg->Write( FindDialogHeightEntry, m_findDialogSize.GetHeight() );
638  wxASSERT_MSG( m_findReplaceData,
639  wxT( "Find dialog data settings object not created. Bad programmer!" ) );
640  aCfg->Write( FindReplaceFlagsEntry,
641  (long) m_findReplaceData->GetFlags() & ~FR_REPLACE_ITEM_FOUND );
642  aCfg->Write( FindStringEntry, m_findReplaceData->GetFindString() );
643  aCfg->Write( ReplaceStringEntry, m_findReplaceData->GetReplaceString() );
644 
645  // Save the find and replace string history list.
646  unsigned i;
647  wxString tmpHistory;
648  wxString entry; // invoke constructor outside of any loops
649 
650  for( i = 0; i < m_findStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ )
651  {
652  entry.Printf( FindStringHistoryEntry, i );
653  aCfg->Write( entry, m_findStringHistoryList[ i ] );
654  }
655 
656  for( i = 0; i < m_replaceStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ )
657  {
658  entry.Printf( ReplaceStringHistoryEntry, i );
659  aCfg->Write( entry, m_replaceStringHistoryList[ i ] );
660  }
661 
662  // Save template fieldnames
663  STRING_FORMATTER sf;
664  m_TemplateFieldNames.Format( &sf, 0 );
665 
666  wxString record = FROM_UTF8( sf.GetString().c_str() );
667  record.Replace( wxT("\n"), wxT(""), true ); // strip all newlines
668  record.Replace( wxT(" "), wxT(" "), true ); // double space to single
669 
670  aCfg->Write( FieldNamesEntry, record );
671 }
672 
673 
674 void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
675 {
677 
680 
682  SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) );
683  m_textPinNumDefaultSize = aCfg->Read( defaultPinNumSizeEntry, DEFAULTPINNUMSIZE );
684  m_textPinNameDefaultSize = aCfg->Read( defaultPinNameSizeEntry, DEFAULTPINNAMESIZE );
686  SetRepeatPinStep( aCfg->Read( pinRepeatStepEntry, DEFAULT_REPEAT_OFFSET_PIN ) );
687  wxPoint step;
688  step.x = aCfg->Read( repeatLibStepXEntry, (long)DEFAULT_REPEAT_OFFSET_X );
689  step.y = aCfg->Read( repeatLibStepYEntry, (long)DEFAULT_REPEAT_OFFSET_Y );
690  SetRepeatStep( step );
691  m_showPinElectricalTypeName = aCfg->Read( showPinElectricalType, true );
692 }
693 
694 
695 void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
696 {
698 
699  aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() );
700  aCfg->Write( defaultPinNumSizeEntry, (long) GetPinNumDefaultSize() );
701  aCfg->Write( defaultPinNameSizeEntry, (long) GetPinNameDefaultSize() );
702  aCfg->Write( repeatLibLabelIncEntry, (long) GetRepeatDeltaLabel() );
703  aCfg->Write( pinRepeatStepEntry, (long) GetRepeatPinStep() );
704  aCfg->Write( repeatLibStepXEntry, (long) GetRepeatStep().x );
705  aCfg->Write( repeatLibStepYEntry, (long) GetRepeatStep().y );
706  aCfg->Write( showPinElectricalType, GetShowElectricalType() );
707 }
708 
709 
710 void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
711 {
712  wxArrayString units;
713  GRIDS grid_list = GetScreen()->GetGrids();
714 
715  DIALOG_LIBEDIT_OPTIONS dlg( this );
716 
717  dlg.SetGridSizes( grid_list, GetScreen()->GetGridCmdId() );
719  dlg.SetPinLength( GetDefaultPinLength() );
720  dlg.SetPinNumSize( m_textPinNumDefaultSize );
721  dlg.SetPinNameSize( m_textPinNameDefaultSize );
722 
723  dlg.SetShowGrid( IsGridVisible() );
724  dlg.SetShowElectricalType( GetShowElectricalType() );
725  dlg.Layout();
726  dlg.Fit();
727 
728  if( dlg.ShowModal() == wxID_CANCEL )
729  return;
730 
731  wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size;
732  m_LastGridSizeId = GetScreen()->SetGrid( gridsize );
733 
735  SetDefaultPinLength( dlg.GetPinLength() );
736  m_textPinNumDefaultSize = dlg.GetPinNumSize();
737  m_textPinNameDefaultSize = dlg.GetPinNameSize();
739  SetRepeatPinStep( dlg.GetPinRepeatStep() );
742  SetShowElectricalType( dlg.GetShowElectricalType() );
743 
744  SaveSettings( config() ); // save values shared by eeschema applications.
745 
746  m_canvas->Refresh( true );
747 }
748 
749 
750 SYMBOL_LIB_TABLE* PROJECT::SchSymbolLibTable()
751 {
752  // This is a lazy loading function, it loads the project specific table when
753  // that table is asked for, not before.
754  SYMBOL_LIB_TABLE* tbl = (SYMBOL_LIB_TABLE*) GetElem( ELEM_SYMBOL_LIB_TABLE );
755 
756  // its gotta be NULL or a SYMBOL_LIB_TABLE, or a bug.
757  wxASSERT( !tbl || dynamic_cast<SYMBOL_LIB_TABLE*>( tbl ) );
758 
759  if( !tbl )
760  {
761  // Stack the project specific SYMBOL_LIB_TABLE overlay on top of the global table.
762  // ~SYMBOL_LIB_TABLE() will not touch the fallback table, so multiple projects may
763  // stack this way, all using the same global fallback table.
765 
766  SetElem( ELEM_SYMBOL_LIB_TABLE, tbl );
767 
768  wxString prjPath;
769 
770  wxGetEnv( PROJECT_VAR_NAME, &prjPath );
771 
772  wxASSERT( !prjPath.empty() );
773 
774  wxFileName fn( prjPath, SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() );
775 
776  try
777  {
778  tbl->Load( fn.GetFullPath() );
779  }
780  catch( const IO_ERROR& ioe )
781  {
782  wxString msg;
783  msg.Printf( _( "An error occurred loading the symbol library table.\n\n%s" ),
784  ioe.What() );
785  DisplayError( NULL, msg );
786  }
787  }
788 
789  return tbl;
790 }
Definition of the SCH_SHEET class for Eeschema.
static int s_defaultTextSize
Default size for text (not only labels)
static const wxString & GetSymbolLibTableFileName()
static const wxChar PrintDialogWidthEntry[]
int m_repeatDeltaLabel
the increment value of labels like bus members when they are repeated
static SYMBOL_LIB_TABLE & GetGlobalLibTable()
A list of parameters type.
void SetEnableMousewheelPan(bool enable)
Function SetEnableMousewheelPan Sets the MousewheelPan setting in the dialog.
#define DEFAULTPINLENGTH
The default pin number size when creating pins(can be changed in preference menu) ...
Definition: general.h:62
int GetRepeatVertical(void)
Function GetRepeatVertical Returns the current RepeatVertical displacement value from the dialog...
VTBL_ENTRY void ConfigSave(const SEARCH_STACK &aSList, const wxString &aGroupName, const PARAM_CFG_ARRAY &aParams, const wxString &aFileName=wxEmptyString)
Function ConfigSave saves the current "project" parameters into the wxConfigBase* derivative...
Definition: project.cpp:318
static const wxString RepeatLabelIncrementEntry
static bool m_TestSimilarLabels
Definition: dialog_erc.h:51
void Process_Config(wxCommandEvent &event)
static const wxChar ReplaceStringHistoryEntry[]
#define DEFAULT_SIZE_TEXT
This is the "default-of-the-default" hardcoded text size; individual application define their own def...
Definition: eda_text.h:74
static const wxChar HorzVertLinesOnlyEntry[]
static int * SubpartFirstIdPtr()
return a reference to m_subpartFirstId, only for read/save setting functions
static const wxChar PrintDialogPositionXEntry[]
int GetRepeatHorizontal(void)
Function GetRepeatHorizontal Returns the current RepeatHorizontal displacement value from the dialog...
bool GetEnableMousewheelPan(void)
Function GetEnableMousewheelPan Return the MousewheelPan setting from the dialog. ...
Class PROJECT holds project specific data.
Definition: project.h:56
static wxString FROM_UTF8(const char *cstring)
function FROM_UTF8 converts a UTF8 encoded C string to a wxString for all wxWidgets build modes...
Definition: macros.h:53
static const wxChar ReplaceStringEntry[]
const wxChar AutoplaceFieldsEntry[]
Class TEMPLATE_FIELDNAMES_LEXER is an automatically generated class using the TokenList2DnsLexer.cmake technology, based on keywords provided by file: /home/kicad/workspace/kicad-doxygen/eeschema/template_fieldnames.keywords.
This file is part of the common library TODO brief description.
int AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName)
Insert or append a wanted symbol field name into the field names template.
Definition: schframe.h:305
PARAM_CFG_ARRAY m_projectFileParams
Definition: schframe.h:125
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL) override
Update the board display after modifying it bu a python script (note: it is automatically called by a...
Definition: draw_panel.cpp:325
void OnPreferencesOptions(wxCommandEvent &event)
void SetDefaultBusThickness(int aThickness)
bool GetEnableAutoPan() const
wxArrayString m_findStringHistoryList
Definition: schframe.h:138
This file is part of the common library.
void SetForceHVLines(bool aForceHVdirection)
Definition: schframe.h:237
bool GetForceHVLines() const
Definition: schframe.h:236
void SetEnableZoomNoCenter(bool aEnable)
Definition: draw_panel.cpp:664
static const wxChar repeatLibStepYEntry[]
#define DEFAULT_REPEAT_LABEL_INC
the default value (overwritten by the eeschema config)
Definition: general.h:49
void SetRepeatDeltaLabel(int aDelta)
Sets the repeat delta label value for repeat command.
static const wxString ShowPageLimitsEntry
void SetTemplateFields(const TEMPLATE_FIELDNAMES &aFields)
Function SetTemplateFields Set the template field data in the dialog.
const wxString ProjectFileExtension
void SetEnableHVBusOrientation(bool enable)
Function SetEnableHVBusOrientation Set the HVBusOrientation setting in the dialog.
wxPoint m_printDialogPosition
Definition: schframe.h:131
static const wxString RepeatStepYEntry
const wxPoint GetRepeatStep() const
wxString GetUnitsLabel(EDA_UNITS_T aUnit)
Get a human readable units string.
Definition: base_units.cpp:457
#define PROJECT_VAR_NAME
A variable name whose value holds the current project directory.
Definition: project.h:36
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
void ExportHotkeyConfigToFile(EDA_HOTKEY_CONFIG *aDescList, const wxString &aDefaultShortname)
Function ExportHotkeyConfigToFile Prompt the user for an old hotkey file to read, and read it...
const wxString & GetFileName() const
struct EDA_HOTKEY_CONFIG g_Libedit_Hokeys_Descr[]
static const wxChar defaultPinNumSizeEntry[]
wxPoint m_repeatStep
the increment value of the position of an item when it is repeated
PARAM_CFG_ARRAY & GetConfigurationSettings()
Return the Eeschema applications settings.
void SetPinLength(int aLength)
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
static const wxString PrintSheetRefEntry
const GRIDS & GetGrids() const
Function GetGrids().
const wxChar RescueNeverShowEntry[]
static int s_defaultBusThickness
wxFindReplaceData * m_findReplaceData
Definition: schframe.h:128
void Process_Config(wxCommandEvent &event)
static const wxChar PreviewFrameWidthEntry[]
void SetUnits(const wxArrayString &aUnits, int aSelect=0)
Function SetUnits Set the unit options.
Used by the search event handler to let the dialog know that a replaceable item has been found...
virtual wxConfigBase * config()
Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_F...
Definition: basicframe.cpp:380
void SetRepeatLabel(int increment)
Function SetRepeatLabel Sets the current RepeatLabel increment value in the dialog.
int GetUnitsSelection(void)
Function GetUnitsSelection Returns the currently selected grid size in the dialog.
#define DEFAULT_REPEAT_OFFSET_PIN
the default value (overwritten by the eeschema config)
Definition: general.h:50
int GetRepeatDeltaLabel() const
static const wxChar PreviewFramePositionYEntry[]
virtual void SetGridColor(COLOR4D aColor)
Function SetGridColor() , virtual.
Definition: draw_frame.h:503
bool IsWritable(const wxFileName &aFileName)
Function IsWritable checks if aFileName can be written.
Definition: basicframe.cpp:553
static const wxString UnitsEntry
bool m_autoplaceAlign
align autoplaced fields to the grid
Definition: schframe.h:157
TEMPLATES m_TemplateFieldNames
Definition: schframe.h:184
static const wxChar PreviewFramePositionXEntry[]
COLOR4D GetLayerColor(SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:167
bool GetShowHiddenPins(void)
Function GetShowHiddenPins Returns the current ShowHiddenPins value from the dialog.
void SetPinNumSize(int text_size)
SCH_SCREEN * GetScreen()
Definition: sch_sheet.h:279
static const wxChar FindDialogHeightEntry[]
static const wxChar repeatLibLabelIncEntry[]
COLOR4D GetInvisibleItemColor()
std::vector< GRID_TYPE > GRIDS
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
Definition: draw_frame.cpp:746
void GetRefIdSeparator(int &aSep, int &aFirstId)
Function GetRefIdSeparator Returns the current RefIdSeparator value from the dialog.
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
Configuration parameter - PARAM_CFG_FILENAME Class Same as PARAM_CFG_WXSTRING, but stores "\" as "/"...
virtual bool IsGridVisible() const
Function IsGridVisible() , virtual.
Definition: draw_frame.h:475
static WORKSHEET_LAYOUT & GetTheInstance()
static function: returns the instance of WORKSHEET_LAYOUT used in the application ...
void SetEnableAutoPan(bool enable)
Function SetEnableAutoPan Sets the AutoPan setting in the dialog.
void SaveProjectSettings(bool aAskForSave) override
Save changes to the project settings to the project (.pro) file.
static const wxChar FindDialogPositionYEntry[]
int GetLineWidth(void)
Function GetLineWidth Returns the current LineWidth value from the dialog.
void SetDefaultLineThickness(int aThickness)
void SetEnableZoomNoCenter(bool enable)
Function SetEnableZoomNoCenter Sets the current ZoomNoCenter value in the dialog. ...
void SetGridSizes(const GRIDS &grid_sizes, int grid_id)
static const wxChar FindReplaceFlagsEntry[]
PARAM_CFG_ARRAY & GetProjectFileParametersList()
Return the project file parameter list for Eeschema.
static wxString m_PageLayoutDescrFileName
the name of the page layout descr file, or emty to used the default pagelayout
void SetAutoSaveInterval(int aInterval)
Function SetAutoSaveInterval Sets the current AutoSaveInterval value in the dialog.
void OnPreferencesOptions(wxCommandEvent &event)
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
Definition: schframe.cpp:532
static const wxChar DefaultDrawLineWidthEntry[]
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
int GetRepeatLabel(void)
Function GetRepeatLabel Returns the current RepeatLabel increment value from the dialog.
void SetDefaultTextSize(int aTextSize)
void DisplayHotkeyList(EDA_BASE_FRAME *aFrame, struct EDA_HOTKEY_CONFIG *aDescList)
Function DisplayHotkeyList Displays the current hotkey list.
static int GetSubpartIdSeparator()
void DeleteAllTemplateFieldNames()
Remove all template field names.
Definition: schframe.h:331
bool m_forceHVLines
force H or V directions for wires, bus, line
Definition: schframe.h:153
static const wxString PrintMonochromeEntry
bool GetAutoplaceAlign()
Function Return the current AutoplaceAlign setting from the dialog.
std::vector< TEMPLATE_FIELDNAME > TEMPLATE_FIELDNAMES
static int s_drawDefaultLineThickness
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
static const wxString RepeatStepXEntry
static const wxChar FindStringHistoryEntry[]
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
int GetGridSelection(void)
Function GetGridSelection Returns the curent grid size selected in the dialog.
const wxChar AutoplaceAlignEntry[]
static int GetSubpartFirstId()
bool GetShowGrid(void)
Function GetShowGrid Returns the current ShowGrid value from the dialog.
Subclass of DIALOG_SCH_FIND_BASE, which is generated by wxFormBuilder.
Class LIB_ITEM definition.
Definition: common.h:145
bool GetEnableHVBusOrientation(void)
Function GetEnableHVBusOrientation Get the HVBusOrientation setting from the dialog.
Configuration parameter - Integer Class.
struct EDA_HOTKEY_CONFIG g_Eeschema_Hokeys_Descr[]
bool GetEnableZoomNoCenter() const
static const wxChar DefaultBusWidthEntry[]
The common library.
#define GROUP_SCH
Definition: config_params.h:44
wxSize m_printDialogSize
Definition: schframe.h:132
wxPoint m_findDialogPosition
Definition: schframe.h:136
void SetShowGrid(bool show)
Function SetShowGrid Sets the current ShowGrid value in the dialog.
Subclass of DIALOG_LIBEDIT_OPTIONS_BASE, which is generated by wxFormBuilder.
Configuration parameter - Boolean Class.
const TEMPLATE_FIELDNAMES & GetTemplateFieldNames()
Function GetTemplateFieldName returns a template fieldnames list for read only access.
bool LoadProjectFile()
Loads the KiCad project file (*.pro) settings specific to Eeschema.
wxArrayString m_replaceStringHistoryList
Definition: schframe.h:139
bool GetAutoplaceFields()
Function Return the current AutoplaceFields setting from the dialog.
void Format(OUTPUTFORMATTER *out, int nestLevel) const
Function Format serializes this object out as text into the given OUTPUTFORMATTER.
#define DEFAULT_REPEAT_OFFSET_Y
the default Y value (overwritten by the eeschema config)
Definition: general.h:47
const std::string & GetString()
Definition: richio.h:475
bool m_printMonochrome
Print monochrome instead of grey scale.
Definition: schframe.h:133
#define DEFAULTDRAWLINETHICKNESS
The default pin len value when creating pins(can be changed in preference menu)
Definition: general.h:59
int m_LastGridSizeId
Definition: draw_frame.h:78
void Load(const wxString &aFileName)
Load the library table using the path defined by aFileName aFallBackTable.
#define DEFAULTBUSTHICKNESS
The thickness to draw lines that thickness is set to 0 (default thickness) (can be changed in prefere...
Definition: general.h:55
Configuration parameter - wxString Class.
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
void Parse(TEMPLATE_FIELDNAMES_LEXER *in)
Function Parse fills this object from information in the input stream handled by TEMPLATE_FIELDNAMES_...
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
Definition: draw_frame.cpp:716
PARAM_CFG_ARRAY m_configSettings
Definition: schframe.h:126
void SetAutoplaceFields(bool enable)
Function Set the AutoplaceFields setting in the dialog.
bool m_autoplaceFields
automatically place component fields
Definition: schframe.h:155
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
WORKSHEET_LAYOUT handles the graphic items list to draw/plot the title block and other items (page re...
void SetShowElectricalType(bool show)
#define DEFAULT_REPEAT_OFFSET_X
the default X value (overwritten by the eeschema config)
Definition: general.h:46
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
wxString ProjectFileWildcard()
static const wxChar pinRepeatStepEntry[]
static const wxChar DefaultPinLengthEntry[]
bool m_showAllPins
Flag to indicate show hidden pins.
Definition: schframe.h:163
#define FR_HISTORY_LIST_CNT
Maximum number of find and replace strings.
void InstallHotkeyFrame(EDA_BASE_FRAME *aParent, EDA_HOTKEY_CONFIG *aHotkeys)
Function InstallHotkeyFrame Create a hotkey editor dialog window with the provided hotkey configurati...
bool m_printSheetReference
Definition: schframe.h:134
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:93
static const wxChar ShowHiddenPinsEntry[]
int GetBusWidth(void)
Function GetBusWidth Get the current bus width setting from the dialog.
Subclass of DIALOG_EESCHEMA_OPTIONS_BASE, which is generated by wxFormBuilder.
bool GetShowPageLimits(void)
Function Return the current ShowPageLimits setting from the dialog.
wxPoint m_previewPosition
Definition: schframe.h:129
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
void SetAutoSaveInterval(int aInterval)
Definition: basicframe.cpp:224
void SetShowHiddenPins(bool show)
Function SetShowHiddenPins Sets the current ShowHiddenPins value in the dialog.
void SetShowPageLimits(bool show)
Function Set the ShowPageLimits setting in the dialog.
void wxConfigSaveSetups(wxConfigBase *aCfg, const PARAM_CFG_ARRAY &aList)
Function wxConfigSaveSetups writes aList of PARAM_CFG_ARRAY elements to save configuration values to ...
wxSize m_previewSize
Definition: schframe.h:130
#define REPEAT_OFFSET_MAX
the max value of repeat offset value
Definition: general.h:48
wxSize m_findDialogSize
Definition: schframe.h:137
see class PGM_BASE
void SetBusWidth(int aWidth)
Function SetBusWidth Sets the bus width setting in the dialog.
wxString m_plotDirectoryName
The name of the destination directory to use when generating plot files.
Definition: schframe.h:166
bool GetEnableMousewheelPan() const
static void SetSubpartIdNotation(int aSep, int aFirstId)
Set the separator char between the subpart id and the reference 0 (no separator) or '...
static const wxChar PrintDialogHeightEntry[]
bool m_autoplaceJustify
allow autoplace to change justification
Definition: schframe.h:156
static const wxString MakeFullFileName(const wxString &aShortFileName, const wxString &aProjectPath)
Static function.
#define GROUP_SCH_EDITOR
Definition: config_params.h:45
static const wxChar repeatLibStepXEntry[]
void SetEnableMousewheelPan(bool aEnable)
Definition: draw_panel.cpp:647
static int * SubpartIdSeparatorPtr()
return a reference to m_subpartIdSeparator, only for read/save setting functions
static const wxChar defaultPinNameSizeEntry[]
The common library.
static const wxChar showPinElectricalType[]
bool m_showPageLimits
true to display the page limits
Definition: draw_frame.h:82
TEMPLATE_FIELDNAMES GetTemplateFields(void)
Function GetTemplateFields Get the dialog's template field data.
#define DEFAULTPINNAMESIZE
Definition: general.h:68
void SetRepeatHorizontal(int displacement)
Function SetRepeatHorizontal Sets the current RepeatHorizontal displacement value in the dialog...
wxString m_simulatorCommand
Command line used to call the circuit simulator (gnucap, spice, ...)
Definition: schframe.h:146
Struct TEMPLATE_FIELDNAME holds a name of a component's field, field value, and default visibility...
void SetDrawBgColor(COLOR4D aColor) override
void SetRepeatStep(const wxPoint &aStep)
Sets the repeat step value for repeat command.
wxString m_netListFormat
The name of the format to use when generating a net list.
Definition: schframe.h:169
bool GetEnableZoomNoCenter(void)
Function GetEnableZoomNoCenter Returns the current ZoomNoCenter value from the dialog.
COLOR4D GetItemSelectedColor()
classes and function to generate graphics to plt or draw titles blocks and frame references ...
virtual void SetGridVisibility(bool aVisible)
Function SetGridVisibility() , virtual It may be overloaded by derived classes.
Definition: draw_frame.h:485
#define DBG(x)
Definition: fctsys.h:33
void SetAutoplaceJustify(bool enable)
Function Set the AutoplaceJustify setting in the dialog.
VTBL_ENTRY bool ConfigLoad(const SEARCH_STACK &aSearchS, const wxString &aGroupName, const PARAM_CFG_ARRAY &aParams, const wxString &aForeignConfigFileName=wxEmptyString)
Function ConfigLoad reads a subset of parameters from the "project" file.
Definition: project.cpp:353
int GetTextSize(void)
Function GetTextSize Returns the current default TextSize value from the dialog.
static const wxChar FindDialogWidthEntry[]
void SetAutoplaceAlign(bool enable)
Function Set the AutoplaceAlign setting in the dialog.
void SetRefIdSeparator(wxChar aSep, wxChar aFirstId)
Function SetRefIdSeparator Sets the current RefIdSeparator value in the dialog.
Definition for part library class.
void SetTextSize(int text_size)
Function SetTextSize Sets the current default TextSize value in the dialog.
int GetAutoSaveInterval() const
Function GetAutoSaveInterval Returns the current AutoSaveInterval value from the dialog.
#define DEFAULTPINNUMSIZE
The default pin name size when creating pins(can be changed in preference menu)
Definition: general.h:65
static const wxChar FindDialogPositionXEntry[]
static const wxChar PreviewFrameHeightEntry[]
int SetGrid(const wxRealPoint &size)
set the current grid size m_Grid.
void ImportHotkeyConfigFromFile(EDA_HOTKEY_CONFIG *aDescList, const wxString &aDefaultShortname)
Function ImportHotkeyConfigFromFile Prompt the user for an old hotkey file to read, and read it.
void SetLineWidth(int aWidth)
Function SetLineWidth Sets the current LineWidth value in the dialog.
void SetGridSizes(const GRIDS &aGridSizes, int aGridId)
Function SetGridSizes Sets the available grid size choices aGridSizes and selectd the current option ...
Class STRING_FORMATTER implements OUTPUTFORMATTER to a memory buffer.
Definition: richio.h:445
bool GetAutoplaceJustify()
Function Return the current AutoplaceJustify setting from the dialog.
static const wxChar PrintDialogPositionYEntry[]
void SetRepeatVertical(int displacement)
Function SetRepeatVertical Sets the current RepeatVertical displacement value in the dialog...
void wxConfigLoadSetups(wxConfigBase *aCfg, const PARAM_CFG_ARRAY &aList)
Function wxConfigLoadSetups uses aList of PARAM_CFG_ARRAY elements to load configuration values from ...
void SetEnableAutoPan(bool aEnable)
Definition: draw_panel.cpp:655
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
bool m_spiceAjustPassiveValues
Use netcodes (net number) as net names when generating spice net lists.
Definition: schframe.h:172
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:47
int GetDefaultBusThickness()
Default line thickness used to draw/plot busses.
const wxChar AutoplaceJustifyEntry[]
void SetPinNameSize(int text_size)
static const wxChar FieldNamesEntry[]
bool GetEnableAutoPan(void)
Function GetEnableAutoPan Return the AutoPan setting from the dialog.
EDA_UNITS_T
Definition: common.h:144
Definition of class LIB_EDIT_FRAME.
int GetAutoSaveInterval() const
Definition: wxstruct.h:227
static const wxChar FindStringEntry[]
void SetPageLayout(const wxString &aFullFileName=wxEmptyString, bool Append=false)
Populates the list with a custom layout, or the default layout, if no custom layout available...
int GetDefaultTextSize()
Default size for text in general.
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
static const wxChar SimulatorCommandEntry[]
Definition: colors.h:62
struct EDA_HOTKEY_CONFIG g_Schematic_Hokeys_Descr[]