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-2016 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 
48 #include <dialog_hotkeys_editor.h>
49 
53 #include <dialog_erc.h>
54 
56 
57 #define FR_HISTORY_LIST_CNT 10
58 
59 
61 
63 {
64  return s_defaultBusThickness;
65 }
66 
67 
68 void SetDefaultBusThickness( int aThickness)
69 {
70  if( aThickness >= 1 )
71  s_defaultBusThickness = aThickness;
72  else
74 }
75 
76 
79 
81 {
82  return s_defaultTextSize;
83 }
84 
85 
86 void SetDefaultTextSize( int aTextSize )
87 {
88  s_defaultTextSize = aTextSize;
89 }
90 
91 
92 /*
93  * Default line (in Eeschema units) thickness used to draw/plot items having a
94  * default thickness line value (i.e. = 0 ).
95  */
97 
98 
100 {
102 }
103 
104 
105 void SetDefaultLineThickness( int aThickness )
106 {
107  if( aThickness >=1 )
108  s_drawDefaultLineThickness = aThickness;
109  else
111 }
112 
113 
114 // Color to draw selected items
116 {
117  return COLOR4D( BROWN );
118 }
119 
120 
121 // Color to draw items flagged invisible, in libedit (they are invisible
122 // in Eeschema
124 {
125  return COLOR4D( DARKGRAY );
126 }
127 
128 
129 void LIB_EDIT_FRAME::InstallConfigFrame( wxCommandEvent& event )
130 {
131  // Identical to SCH_EDIT_FRAME::InstallConfigFrame()
132 
133  PROJECT* prj = &Prj();
134  wxArrayString lib_names;
135  wxString lib_paths;
136 
137  try
138  {
139  PART_LIBS::LibNamesAndPaths( prj, false, &lib_paths, &lib_names );
140  }
141  catch( const IO_ERROR& DBG( ioe ) )
142  {
143  DBG(printf( "%s: %s\n", __func__, TO_UTF8( ioe.What() ) );)
144  return;
145  }
146 
147  if( InvokeEeschemaConfig( this, &lib_paths, &lib_names ) )
148  {
149  // save the [changed] settings.
150  PART_LIBS::LibNamesAndPaths( prj, true, &lib_paths, &lib_names );
151 
152  // Force a reload of the PART_LIBS
153  prj->SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL );
155 
156  // Update the schematic symbol library links.
157  SCH_SCREENS schematic;
158 
159  schematic.UpdateSymbolLinks();
160 
161  // There may be no parent window so use KIWAY message to refresh the schematic editor
162  // in case any symbols have changed.
163  Kiway().ExpressMail( FRAME_SCH, MAIL_SCH_REFRESH, std::string( "" ), this );
164  }
165 }
166 
167 
168 void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
169 {
170  int id = event.GetId();
171 
172  switch( id )
173  {
174  // Hotkey IDs
177  break;
178 
181  break;
182 
185  break;
186 
188  // Display current hotkey list for LibEdit.
190  break;
191 
192  default:
193  DisplayError( this, wxT( "LIB_EDIT_FRAME::Process_Config error" ) );
194  }
195 }
196 
197 
198 void SCH_EDIT_FRAME::InstallConfigFrame( wxCommandEvent& event )
199 {
200  // Identical to LIB_EDIT_FRAME::InstallConfigFrame()
201 
202  PROJECT* prj = &Prj();
203  wxArrayString lib_names;
204  wxString lib_paths;
205 
206  try
207  {
208  PART_LIBS::LibNamesAndPaths( prj, false, &lib_paths, &lib_names );
209  }
210  catch( const IO_ERROR& DBG( ioe ) )
211  {
212  DBG(printf( "%s: %s\n", __func__, TO_UTF8( ioe.What() ) );)
213  return;
214  }
215 
216  if( InvokeEeschemaConfig( this, &lib_paths, &lib_names ) )
217  {
218  // save the [changed] settings.
219  PART_LIBS::LibNamesAndPaths( prj, true, &lib_paths, &lib_names );
220 
221 #if defined(DEBUG)
222  printf( "%s: lib_names:\n", __func__ );
223  for( unsigned i=0; i<lib_names.size(); ++i )
224  {
225  printf( " %s\n", TO_UTF8( lib_names[i] ) );
226  }
227 
228  printf( "%s: lib_paths:'%s'\n", __func__, TO_UTF8( lib_paths ) );
229 #endif
230 
231  // Force a reload of the PART_LIBS
232  prj->SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL );
234 
235  // Update the schematic symbol library links.
236  SCH_SCREENS schematic;
237 
238  schematic.UpdateSymbolLinks();
239  GetCanvas()->Refresh();
240  }
241 }
242 
243 
244 void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event )
245 {
246  int id = event.GetId();
247  wxFileName fn;
248 
249  switch( id )
250  {
251  case ID_CONFIG_SAVE:
252  SaveProjectSettings( true );
253  break;
254 
255  case ID_CONFIG_READ:
256  {
257  fn = g_RootSheet->GetScreen()->GetFileName();
258  fn.SetExt( ProjectFileExtension );
259 
260  wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(),
261  fn.GetFullName(), ProjectFileWildcard,
262  wxFD_OPEN | wxFD_FILE_MUST_EXIST );
263 
264  if( dlg.ShowModal() == wxID_CANCEL )
265  break;
266 
267  wxString chosen = dlg.GetPath();
268 
269  if( chosen == Prj().GetProjectFullName() )
270  LoadProjectFile();
271  else
272  {
273  // Read library list and library path list
274  Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH, GetProjectFileParametersList() );
275  // Read schematic editor setup
277  }
278  }
279  break;
280 
281  // Hotkey IDs
284  break;
285 
288  break;
289 
292  break;
293 
295  // Display current hotkey list for eeschema.
297  break;
298 
299  default:
300  DisplayError( this, wxT( "SCH_EDIT_FRAME::Process_Config error" ) );
301  }
302 }
303 
304 
305 void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
306 {
307  wxArrayString units;
308  GRIDS grid_list = GetScreen()->GetGrids();
309  bool saveProjectConfig = false;
310 
311  DIALOG_EESCHEMA_OPTIONS dlg( this );
312 
313  units.Add( GetUnitsLabel( INCHES ) );
314  units.Add( GetUnitsLabel( MILLIMETRES ) );
315 
316  dlg.SetUnits( units, g_UserUnit );
317  dlg.SetGridSizes( grid_list, GetScreen()->GetGridCmdId() );
322  dlg.SetRepeatVertical( GetRepeatStep().y );
327 
328  dlg.SetShowGrid( IsGridVisible() );
338  dlg.Layout();
339  dlg.Fit();
340  dlg.SetMinSize( dlg.GetSize() );
342 
343  if( dlg.ShowModal() == wxID_CANCEL )
344  return;
345 
347 
348  wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size;
349  m_LastGridSizeId = GetScreen()->SetGrid( gridsize );
350 
351  int sep, firstId;
352  dlg.GetRefIdSeparator( sep, firstId);
353 
354  if( sep != (int)LIB_PART::GetSubpartIdSeparator() ||
355  firstId != (int)LIB_PART::GetSubpartFirstId() )
356  {
357  LIB_PART::SetSubpartIdNotation( sep, firstId );
358  saveProjectConfig = true;
359  }
360 
363 
364  if( dlg.GetTextSize() != GetDefaultTextSize() )
365  {
367  saveProjectConfig = true;
368  }
369 
370  wxPoint step;
371  step.x = dlg.GetRepeatHorizontal();
372  step.y = dlg.GetRepeatVertical();
373  SetRepeatStep( step );
375 
387 
388  // Delete all template fieldnames and then restore them using the template field data from
389  // the options dialog
391  TEMPLATE_FIELDNAMES newFieldNames = dlg.GetTemplateFields();
392 
393  for( TEMPLATE_FIELDNAMES::iterator dlgfld = newFieldNames.begin();
394  dlgfld != newFieldNames.end(); ++dlgfld )
395  {
396  TEMPLATE_FIELDNAME fld = *dlgfld;
397  AddTemplateFieldName( fld );
398  }
399 
400  SaveSettings( config() ); // save values shared by eeschema applications.
401 
402  if( saveProjectConfig )
403  SaveProjectSettings( true );
404 
405  m_canvas->Refresh( true );
406 }
407 
408 
410 {
411  if( !m_projectFileParams.empty() )
412  return m_projectFileParams;
413 
414  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ),
416 
417  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "PlotDirectoryName" ),
418  &m_plotDirectoryName ) );
419 
420  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartIdSeparator" ),
422  0, 0, 126 ) );
423  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartFirstId" ),
425  'A', '1', 'z' ) );
426 
427  /* moved to library load/save specific code, in a specific section in .pro file
428  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ),
429  &m_userLibraryPath ) );
430  m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ),
431  &m_componentLibFiles,
432  GROUP_SCH_LIBS ) );
433  */
434 
435  m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetFmtName" ),
436  &m_netListFormat) );
437  m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SpiceAjustPassiveValues" ),
438  &m_spiceAjustPassiveValues, false ) );
439 
440  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ),
442  DEFAULT_SIZE_TEXT, 5, 1000 ) );
443 
444  m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "ERC_TestSimilarLabels" ),
446 
447  return m_projectFileParams;
448 }
449 
450 
452 {
453  // Read library list and library path list
454  bool isRead = Prj().ConfigLoad( Kiface().KifaceSearch(),
456 
457  // Read schematic editor setup
458  isRead = isRead && Prj().ConfigLoad( Kiface().KifaceSearch(),
460 
461  // Verify some values, because the config file can be edited by hand,
462  // and have bad values:
466 
467  // Load the page layout decr file, from the filename stored in
468  // BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file
469  // If empty, or not existing, the default descr is loaded
471  wxString pg_fullfilename = WORKSHEET_LAYOUT::MakeFullFileName(
473  Prj().GetProjectPath() );
474 
475  pglayout.SetPageLayout( pg_fullfilename );
476 
477  return isRead;
478 }
479 
480 
481 void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
482 {
483  PROJECT& prj = Prj();
484  wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); //ConfigFileName
485 
486  fn.SetExt( ProjectFileExtension );
487 
488  if( !IsWritable( fn ) )
489  return;
490 
491  if( aAskForSave )
492  {
493  wxFileDialog dlg( this, _( "Save Project File" ),
494  fn.GetPath(), fn.GetFullName(),
495  ProjectFileWildcard, wxFD_SAVE );
496 
497  if( dlg.ShowModal() == wxID_CANCEL )
498  return;
499 
500  fn = dlg.GetPath();
501  }
502 
504 }
505 
508 
509 const wxChar RescueNeverShowEntry[] = wxT( "RescueNeverShow" );
510 const wxChar AutoplaceFieldsEntry[] = wxT( "AutoplaceFields" );
511 const wxChar AutoplaceJustifyEntry[] = wxT( "AutoplaceJustify" );
512 const wxChar AutoplaceAlignEntry[] = wxT( "AutoplaceAlign" );
513 static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" );
514 static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" );
515 static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" );
516 static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" );
517 static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" );
518 static const wxChar PreviewFramePositionYEntry[] = wxT( "PreviewFramePositionY" );
519 static const wxChar PreviewFrameWidthEntry[] = wxT( "PreviewFrameWidth" );
520 static const wxChar PreviewFrameHeightEntry[] = wxT( "PreviewFrameHeight" );
521 static const wxChar PrintDialogPositionXEntry[] = wxT( "PrintDialogPositionX" );
522 static const wxChar PrintDialogPositionYEntry[] = wxT( "PrintDialogPositionY" );
523 static const wxChar PrintDialogWidthEntry[] = wxT( "PrintDialogWidth" );
524 static const wxChar PrintDialogHeightEntry[] = wxT( "PrintDialogHeight" );
525 static const wxChar FindDialogPositionXEntry[] = wxT( "FindDialogPositionX" );
526 static const wxChar FindDialogPositionYEntry[] = wxT( "FindDialogPositionY" );
527 static const wxChar FindDialogWidthEntry[] = wxT( "FindDialogWidth" );
528 static const wxChar FindDialogHeightEntry[] = wxT( "FindDialogHeight" );
529 static const wxChar FindReplaceFlagsEntry[] = wxT( "LastFindReplaceFlags" );
530 static const wxChar FindStringEntry[] = wxT( "LastFindString" );
531 static const wxChar ReplaceStringEntry[] = wxT( "LastReplaceString" );
532 static const wxChar FindStringHistoryEntry[] = wxT( "FindStringHistoryList%d" );
533 static const wxChar ReplaceStringHistoryEntry[] = wxT( "ReplaceStringHistoryList%d" );
534 static const wxChar FieldNamesEntry[] = wxT( "FieldNames" );
535 static const wxChar SimulatorCommandEntry[] = wxT( "SimCmdLine" );
536 static const wxString ShowPageLimitsEntry = "ShowPageLimits";
537 static const wxString UnitsEntry = "Units";
538 static const wxString PrintMonochromeEntry = "PrintMonochrome";
539 static const wxString PrintSheetRefEntry = "PrintSheetReferenceAndTitleBlock";
540 static const wxString RepeatStepXEntry = "RepeatStepX";
541 static const wxString RepeatStepYEntry = "RepeatStepY";
542 static const wxString RepeatLabelIncrementEntry = "RepeatLabelIncrement";
543 
544 // Library editor wxConfig entry names.
545 static const wxChar lastLibExportPathEntry[] = wxT( "LastLibraryExportPath" );
546 static const wxChar lastLibImportPathEntry[] = wxT( "LastLibraryImportPath" );
547 static const wxChar defaultPinNumSizeEntry[] = wxT( "LibeditPinNumSize" );
548 static const wxChar defaultPinNameSizeEntry[] = wxT( "LibeditPinNameSize" );
549 static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" );
550 static const wxChar repeatLibLabelIncEntry[] = wxT( "LibeditRepeatLabelInc" );
551 static const wxChar pinRepeatStepEntry[] = wxT( "LibeditPinRepeatStep" );
552 static const wxChar repeatLibStepXEntry[] = wxT( "LibeditRepeatStepX" );
553 static const wxChar repeatLibStepYEntry[] = wxT( "LibeditRepeatStepY" );
554 static const wxChar showPinElectricalType[] = wxT( "LibeditShowPinElectricalType" );
555 
557 
559 {
560  if( !m_configSettings.empty() )
561  return m_configSettings;
562 
564  &m_showPageLimits, true ) );
565  m_configSettings.push_back( new PARAM_CFG_INT( true, UnitsEntry,
566  (int*)&g_UserUnit, MILLIMETRES ) );
567 
569  &m_printMonochrome, true ) );
570  m_configSettings.push_back( new PARAM_CFG_BOOL( true, PrintSheetRefEntry,
571  &m_printSheetReference, true ) );
572 
573  m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatStepXEntry,
574  &m_repeatStep.x,
577  REPEAT_OFFSET_MAX ) );
578  m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatStepYEntry,
579  &m_repeatStep.y,
582  REPEAT_OFFSET_MAX ) );
585  DEFAULT_REPEAT_LABEL_INC, -10, +10 ) );
586  return m_configSettings;
587 }
588 
589 
590 void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
591 {
593 
594  long tmp;
595 
597 
600 
603  aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false );
604  aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true );
605  aCfg->Read( AutoplaceFieldsEntry, &m_autoplaceFields, true );
606  aCfg->Read( AutoplaceJustifyEntry, &m_autoplaceJustify, true );
607  aCfg->Read( AutoplaceAlignEntry, &m_autoplaceAlign, false );
608 
609  // Load print preview window session settings.
610  aCfg->Read( PreviewFramePositionXEntry, &tmp, -1 );
611  m_previewPosition.x = (int) tmp;
612  aCfg->Read( PreviewFramePositionYEntry, &tmp, -1 );
613  m_previewPosition.y = (int) tmp;
614  aCfg->Read( PreviewFrameWidthEntry, &tmp, -1 );
615  m_previewSize.SetWidth( (int) tmp );
616  aCfg->Read( PreviewFrameHeightEntry, &tmp, -1 );
617  m_previewSize.SetHeight( (int) tmp );
618 
619  // Load print dialog session settings.
620  aCfg->Read( PrintDialogPositionXEntry, &tmp, -1 );
621  m_printDialogPosition.x = (int) tmp;
622  aCfg->Read( PrintDialogPositionYEntry, &tmp, -1 );
623  m_printDialogPosition.y = (int) tmp;
624  aCfg->Read( PrintDialogWidthEntry, &tmp, -1 );
625  m_printDialogSize.SetWidth( (int) tmp );
626  aCfg->Read( PrintDialogHeightEntry, &tmp, -1 );
627  m_printDialogSize.SetHeight( (int) tmp );
628 
629  // Load netlists options:
631 
632  // Load find dialog session setting.
633  aCfg->Read( FindDialogPositionXEntry, &tmp, -1 );
634  m_findDialogPosition.x = (int) tmp;
635  aCfg->Read( FindDialogPositionYEntry, &tmp, -1 );
636  m_findDialogPosition.y = (int) tmp;
637  aCfg->Read( FindDialogWidthEntry, &tmp, -1 );
638  m_findDialogSize.SetWidth( (int) tmp );
639  aCfg->Read( FindDialogHeightEntry, &tmp, -1 );
640  m_findDialogSize.SetHeight( (int) tmp );
641 
642  wxASSERT_MSG( m_findReplaceData,
643  wxT( "Find dialog data settings object not created. Bad programmer!" ) );
644 
645  aCfg->Read( FindReplaceFlagsEntry, &tmp, (long) wxFR_DOWN );
646  m_findReplaceData->SetFlags( (wxUint32) tmp & ~FR_REPLACE_ITEM_FOUND );
647  m_findReplaceData->SetFindString( aCfg->Read( FindStringEntry, wxEmptyString ) );
648  m_findReplaceData->SetReplaceString( aCfg->Read( ReplaceStringEntry, wxEmptyString ) );
649 
650  // Load the find and replace string history list.
651  for( int i = 0; i < FR_HISTORY_LIST_CNT; ++i )
652  {
653  wxString tmpHistory;
654  wxString entry;
655  entry.Printf( FindStringHistoryEntry, i );
656  tmpHistory = aCfg->Read( entry, wxEmptyString );
657 
658  if( !tmpHistory.IsEmpty() )
659  m_findStringHistoryList.Add( tmpHistory );
660 
661  entry.Printf( ReplaceStringHistoryEntry, i );
662  tmpHistory = aCfg->Read( entry, wxEmptyString );
663 
664  if( !tmpHistory.IsEmpty() )
665  m_replaceStringHistoryList.Add( tmpHistory );
666  }
667 
668  wxString templateFieldNames = aCfg->Read( FieldNamesEntry, wxEmptyString );
669 
670  if( !templateFieldNames.IsEmpty() )
671  {
672  TEMPLATE_FIELDNAMES_LEXER lexer( TO_UTF8( templateFieldNames ) );
673 
674  try
675  {
676  m_TemplateFieldNames.Parse( &lexer );
677  }
678  catch( const IO_ERROR& DBG( e ) )
679  {
680  // @todo show error msg
681  DBG( printf( "templatefieldnames parsing error: '%s'\n",
682  TO_UTF8( e.What() ) ); )
683  }
684  }
685 }
686 
687 
688 void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
689 {
691 
693 
694  aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() );
695  aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() );
696  aCfg->Write( ShowHiddenPinsEntry, m_showAllPins );
697  aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() );
698  aCfg->Write( AutoplaceFieldsEntry, m_autoplaceFields );
700  aCfg->Write( AutoplaceAlignEntry, m_autoplaceAlign );
701 
702  // Save print preview window session settings.
705  aCfg->Write( PreviewFrameWidthEntry, m_previewSize.GetWidth() );
706  aCfg->Write( PreviewFrameHeightEntry, m_previewSize.GetHeight() );
707 
708  // Save print dialog session settings.
711  aCfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() );
712  aCfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() );
713 
714  // Save netlists options:
716 
717  // Save find dialog session setting.
720  aCfg->Write( FindDialogWidthEntry, m_findDialogSize.GetWidth() );
721  aCfg->Write( FindDialogHeightEntry, m_findDialogSize.GetHeight() );
722  wxASSERT_MSG( m_findReplaceData,
723  wxT( "Find dialog data settings object not created. Bad programmer!" ) );
724  aCfg->Write( FindReplaceFlagsEntry,
725  (long) m_findReplaceData->GetFlags() & ~FR_REPLACE_ITEM_FOUND );
726  aCfg->Write( FindStringEntry, m_findReplaceData->GetFindString() );
727  aCfg->Write( ReplaceStringEntry, m_findReplaceData->GetReplaceString() );
728 
729  // Save the find and replace string history list.
730  unsigned i;
731  wxString tmpHistory;
732  wxString entry; // invoke constructor outside of any loops
733 
734  for( i = 0; i < m_findStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ )
735  {
736  entry.Printf( FindStringHistoryEntry, i );
737  aCfg->Write( entry, m_findStringHistoryList[ i ] );
738  }
739 
740  for( i = 0; i < m_replaceStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ )
741  {
742  entry.Printf( ReplaceStringHistoryEntry, i );
743  aCfg->Write( entry, m_replaceStringHistoryList[ i ] );
744  }
745 
746  // Save template fieldnames
747  STRING_FORMATTER sf;
748  m_TemplateFieldNames.Format( &sf, 0 );
749 
750  wxString record = FROM_UTF8( sf.GetString().c_str() );
751  record.Replace( wxT("\n"), wxT(""), true ); // strip all newlines
752  record.Replace( wxT(" "), wxT(" "), true ); // double space to single
753 
754  aCfg->Write( FieldNamesEntry, record );
755 }
756 
757 
758 void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
759 {
761 
764 
766  SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) );
767  m_textPinNumDefaultSize = aCfg->Read( defaultPinNumSizeEntry, DEFAULTPINNUMSIZE );
768  m_textPinNameDefaultSize = aCfg->Read( defaultPinNameSizeEntry, DEFAULTPINNAMESIZE );
770  SetRepeatPinStep( aCfg->Read( pinRepeatStepEntry, DEFAULT_REPEAT_OFFSET_PIN ) );
771  wxPoint step;
772  step.x = aCfg->Read( repeatLibStepXEntry, (long)DEFAULT_REPEAT_OFFSET_X );
773  step.y = aCfg->Read( repeatLibStepYEntry, (long)DEFAULT_REPEAT_OFFSET_Y );
774  SetRepeatStep( step );
775  m_showPinElectricalTypeName = aCfg->Read( showPinElectricalType, true );
776 }
777 
778 
779 void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
780 {
782 
783  aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() );
784  aCfg->Write( defaultPinNumSizeEntry, (long) GetPinNumDefaultSize() );
785  aCfg->Write( defaultPinNameSizeEntry, (long) GetPinNameDefaultSize() );
786  aCfg->Write( repeatLibLabelIncEntry, (long) GetRepeatDeltaLabel() );
787  aCfg->Write( pinRepeatStepEntry, (long) GetRepeatPinStep() );
788  aCfg->Write( repeatLibStepXEntry, (long) GetRepeatStep().x );
789  aCfg->Write( repeatLibStepYEntry, (long) GetRepeatStep().y );
790  aCfg->Write( showPinElectricalType, GetShowElectricalType() );
791 }
792 
793 
794 void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
795 {
796  wxArrayString units;
797  GRIDS grid_list = GetScreen()->GetGrids();
798 
799  DIALOG_LIBEDIT_OPTIONS dlg( this );
800 
801  dlg.SetGridSizes( grid_list, GetScreen()->GetGridCmdId() );
803  dlg.SetPinLength( GetDefaultPinLength() );
804  dlg.SetPinNumSize( m_textPinNumDefaultSize );
805  dlg.SetPinNameSize( m_textPinNameDefaultSize );
806 
807  dlg.SetShowGrid( IsGridVisible() );
808  dlg.SetShowElectricalType( GetShowElectricalType() );
809  dlg.Layout();
810  dlg.Fit();
811 
812  if( dlg.ShowModal() == wxID_CANCEL )
813  return;
814 
815  wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size;
816  m_LastGridSizeId = GetScreen()->SetGrid( gridsize );
817 
819  SetDefaultPinLength( dlg.GetPinLength() );
820  m_textPinNumDefaultSize = dlg.GetPinNumSize();
821  m_textPinNameDefaultSize = dlg.GetPinNameSize();
823  SetRepeatPinStep( dlg.GetPinRepeatStep() );
826  SetShowElectricalType( dlg.GetShowElectricalType() );
827 
828  SaveSettings( config() ); // save values shared by eeschema applications.
829 
830  m_canvas->Refresh( true );
831 }
832 
Definition of the SCH_SHEET class for Eeschema.
static int s_defaultTextSize
Default size for text (not only labels)
static const wxChar PrintDialogWidthEntry[]
int m_repeatDeltaLabel
the increment value of labels like bus members when they are repeated
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:61
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:307
static const wxString RepeatLabelIncrementEntry
static bool m_TestSimilarLabels
Definition: dialog_erc.h:51
void InstallConfigFrame(wxCommandEvent &event)
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[]
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
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...
static void LibNamesAndPaths(PROJECT *aProject, bool doSave, wxString *aPaths, wxArrayString *aNames=NULL)
Function LibNamesAndPaths either saves or loads the names of the currently configured part libraries ...
bool GetEnableMousewheelPan(void)
Function GetEnableMousewheelPan Return the MousewheelPan setting from the dialog. ...
Class PROJECT holds project specific data.
Definition: project.h:51
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)
Function AddTemplateFieldName inserts or appends a wanted symbol field name into the field names temp...
Definition: schframe.h:317
PARAM_CFG_ARRAY m_projectFileParams
Definition: schframe.h:124
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL) override
Definition: draw_panel.cpp:326
void OnPreferencesOptions(wxCommandEvent &event)
void SetDefaultBusThickness(int aThickness)
bool GetEnableAutoPan() const
wxArrayString m_findStringHistoryList
Definition: schframe.h:137
This file is part of the common library.
void SetForceHVLines(bool aForceHVdirection)
Definition: schframe.h:241
bool GetForceHVLines() const
Definition: schframe.h:240
void SetEnableZoomNoCenter(bool aEnable)
Definition: draw_panel.cpp:657
static const wxChar repeatLibStepYEntry[]
EDA_DRAW_PANEL * GetCanvas()
Definition: draw_frame.h:299
const wxString ProjectFileExtension
#define DEFAULT_REPEAT_LABEL_INC
the default value (overwritten by the eeschema config)
Definition: general.h:48
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.
void SetEnableHVBusOrientation(bool enable)
Function SetEnableHVBusOrientation Set the HVBusOrientation setting in the dialog.
wxPoint m_printDialogPosition
Definition: schframe.h:130
static const wxString RepeatStepYEntry
const wxPoint GetRepeatStep() const
wxString GetUnitsLabel(EDA_UNITS_T aUnit)
Get a human readable units string.
Definition: base_units.cpp:452
const wxString ProjectFileWildcard
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()
Function GetConfigurationSettings returns 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:127
void Process_Config(wxCommandEvent &event)
static const wxChar PreviewFrameWidthEntry[]
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:361
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:49
int GetRepeatDeltaLabel() const
static const wxChar PreviewFramePositionYEntry[]
virtual void SetGridColor(COLOR4D aColor)
Function SetGridColor() , virtual.
Definition: draw_frame.h:444
bool IsWritable(const wxFileName &aFileName)
Function IsWritable checks if aFileName can be written.
Definition: basicframe.cpp:532
static const wxString UnitsEntry
bool m_autoplaceAlign
align autoplaced fields to the grid
Definition: schframe.h:156
TEMPLATES m_TemplateFieldNames
Definition: schframe.h:183
static const wxChar PreviewFramePositionXEntry[]
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:286
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:713
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:416
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
Function SaveProjectSettings saves changes to the project settings to the project (...
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)
VTBL_ENTRY void SetElem(ELEM_T aIndex, _ELEM *aElem)
Definition: project.cpp:208
static const wxChar FindReplaceFlagsEntry[]
COLOR4D GetLayerColor(LAYERSCH_ID aLayer)
Definition: eeschema.cpp:166
PARAM_CFG_ARRAY & GetProjectFileParametersList()
Function GetProjectFileParametersList returns 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:520
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()
Function DeleteAllTemplateFieldNames removes all template field names.
Definition: schframe.h:346
bool m_forceHVLines
force H or V directions for wires, bus, line
Definition: schframe.h:152
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:54
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.
void UpdateSymbolLinks()
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:131
static const wxChar lastLibImportPathEntry[]
wxPoint m_findDialogPosition
Definition: schframe.h:135
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()
Function LoadProjectFile loads the KiCad project file (*.pro) settings specific to Eeschema...
wxArrayString m_replaceStringHistoryList
Definition: schframe.h:138
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:46
const std::string & GetString()
Definition: richio.h:475
bool m_printMonochrome
Print monochrome instead of grey scale.
Definition: schframe.h:132
#define DEFAULTDRAWLINETHICKNESS
The default pin len value when creating pins(can be changed in preference menu)
Definition: general.h:58
int m_LastGridSizeId
Definition: draw_frame.h:77
#define DEFAULTBUSTHICKNESS
The thickness to draw lines that thickness is set to 0 (default thickness) (can be changed in prefere...
Definition: general.h:54
The the schematic editor to refresh the display.
Definition: mail_type.h:47
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:686
static const wxChar lastLibExportPathEntry[]
PARAM_CFG_ARRAY m_configSettings
Definition: schframe.h:125
void SetAutoplaceFields(bool enable)
Function Set the AutoplaceFields setting in the dialog.
bool m_autoplaceFields
automatically place component fields
Definition: schframe.h:154
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:45
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
static const wxChar pinRepeatStepEntry[]
static const wxChar DefaultPinLengthEntry[]
bool m_showAllPins
Flag to indicate show hidden pins.
Definition: schframe.h:162
#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:133
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:92
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:128
void SetAutoSaveInterval(int aInterval)
Definition: basicframe.cpp:205
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:129
#define REPEAT_OFFSET_MAX
the max value of repeat offset value
Definition: general.h:47
wxSize m_findDialogSize
Definition: schframe.h:136
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:165
bool GetEnableMousewheelPan() const
VTBL_ENTRY void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, const std::string &aPayload, wxWindow *aSource=NULL)
Function ExpressMail send aPayload to aDestination from aSource.
Definition: kiway.cpp:387
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:155
static const wxString MakeFullFileName(const wxString &aShortFileName, const wxString &aProjectPath)
Static function.
bool InvokeEeschemaConfig(wxWindow *aParent, wxString *aCallersProjectSpecificLibPaths, wxArrayString *aCallersLibNames)
#define GROUP_SCH_EDITOR
Definition: config_params.h:45
static const wxChar repeatLibStepXEntry[]
void SetEnableMousewheelPan(bool aEnable)
Definition: draw_panel.cpp:648
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:81
TEMPLATE_FIELDNAMES GetTemplateFields(void)
Function GetTemplateFields Get the dialog's template field data.
#define DEFAULTPINNAMESIZE
Definition: general.h:67
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:145
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:168
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:426
#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:342
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:64
static const wxChar FindDialogPositionXEntry[]
static const wxChar PreviewFrameHeightEntry[]
int SetGrid(const wxRealPoint &size)
set the current grid size m_Grid.
void SetUnits(const wxArrayString &units, int aSelect=0)
Function SetUnits Set the unit options.
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)
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:69
bool m_spiceAjustPassiveValues
Use netcodes (net number) as net names when generating spice net lists.
Definition: schframe.h:171
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.
void InstallConfigFrame(wxCommandEvent &event)
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:214
Class SCH_SCREENS is a container class that holds multiple SCH_SCREENs in a hierarchy.
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[]