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-2018 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 <sch_edit_frame.h>
35 #include <invoke_sch_dialog.h>
36 #include <common.h>
37 
38 #include <eeschema_id.h>
39 #include <general.h>
40 #include <lib_edit_frame.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, _( "Load 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,
191  GetProjectFileParametersList() );
192  // Read schematic editor setup
193  Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH_EDITOR,
194  GetProjectFileParametersList() );
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() );
247  dlg.SetShowHiddenPins( m_showAllPins );
251  dlg.SetEnableHVBusOrientation( GetForceHVLines() );
253  dlg.SetFootprintPreview( m_footprintPreview );
254  dlg.SetAutoplaceFields( m_autoplaceFields );
255  dlg.SetAutoplaceJustify( m_autoplaceJustify );
256  dlg.SetAutoplaceAlign( m_autoplaceAlign );
257  dlg.Layout();
258  dlg.Fit();
259  dlg.SetMinSize( dlg.GetSize() );
260  dlg.SetTemplateFields( m_TemplateFieldNames.GetTemplateFieldNames() );
261 
262  if( dlg.ShowModal() == wxID_CANCEL )
263  return;
264 
266 
267  wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size;
268  m_LastGridSizeId = GetScreen()->SetGrid( gridsize );
269 
270  int sep, firstId;
271  dlg.GetRefIdSeparator( sep, firstId);
272 
273  if( sep != (int)LIB_PART::GetSubpartIdSeparator() ||
274  firstId != (int)LIB_PART::GetSubpartFirstId() )
275  {
276  LIB_PART::SetSubpartIdNotation( sep, firstId );
277  saveProjectConfig = true;
278  }
279 
282 
283  if( dlg.GetTextSize() != GetDefaultTextSize() )
284  {
286  saveProjectConfig = true;
287  }
288 
289  wxPoint step;
290  step.x = dlg.GetRepeatHorizontal();
291  step.y = dlg.GetRepeatVertical();
292  SetRepeatStep( step );
294 
297  m_showAllPins = dlg.GetShowHiddenPins();
301  SetForceHVLines( dlg.GetEnableHVBusOrientation() );
303  m_autoplaceFields = dlg.GetAutoplaceFields();
304  m_autoplaceJustify = dlg.GetAutoplaceJustify();
305  m_autoplaceAlign = dlg.GetAutoplaceAlign();
306  m_footprintPreview = dlg.GetFootprintPreview();
307 
308  // Delete all template fieldnames and then restore them using the template field data from
309  // the options dialog
310  DeleteAllTemplateFieldNames();
311  TEMPLATE_FIELDNAMES newFieldNames = dlg.GetTemplateFields();
312 
313  for( TEMPLATE_FIELDNAMES::iterator dlgfld = newFieldNames.begin();
314  dlgfld != newFieldNames.end(); ++dlgfld )
315  {
316  TEMPLATE_FIELDNAME fld = *dlgfld;
317  AddTemplateFieldName( fld );
318  }
319 
320  SaveSettings( config() ); // save values shared by eeschema applications.
321 
322  if( saveProjectConfig )
323  SaveProjectSettings( true );
324 
325  m_canvas->Refresh( true );
326 }
327 
328 
330 {
331  if( !m_projectFileParams.empty() )
332  return m_projectFileParams;
333 
334  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ),
336 
337  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "PlotDirectoryName" ),
338  &m_plotDirectoryName ) );
339 
340  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartIdSeparator" ),
342  0, 0, 126 ) );
343  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "SubpartFirstId" ),
345  'A', '1', 'z' ) );
346 
347  /* moved to library load/save specific code, in a specific section in .pro file
348  m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ),
349  &m_userLibraryPath ) );
350  m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ),
351  &m_componentLibFiles,
352  GROUP_SCH_LIBS ) );
353  */
354 
355  m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "NetFmtName" ),
356  &m_netListFormat) );
357  m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SpiceAjustPassiveValues" ),
358  &m_spiceAjustPassiveValues, false ) );
359 
360  m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ),
362  DEFAULT_SIZE_TEXT, 5, 1000 ) );
363 
364  m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "ERC_TestSimilarLabels" ),
366 
367  return m_projectFileParams;
368 }
369 
370 
372 {
373  // Read library list and library path list
374  bool isRead = Prj().ConfigLoad( Kiface().KifaceSearch(),
375  GROUP_SCH, GetProjectFileParametersList() );
376 
377  // Read schematic editor setup
378  isRead = isRead && Prj().ConfigLoad( Kiface().KifaceSearch(),
379  GROUP_SCH_EDITOR, GetProjectFileParametersList() );
380 
381  // Verify some values, because the config file can be edited by hand,
382  // and have bad values:
386 
387  // Load the page layout decr file, from the filename stored in
388  // BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file
389  // If empty, or not existing, the default descr is loaded
391  wxString pg_fullfilename = WORKSHEET_LAYOUT::MakeFullFileName(
393  Prj().GetProjectPath() );
394 
395  pglayout.SetPageLayout( pg_fullfilename );
396 
397  return isRead;
398 }
399 
400 
401 void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
402 {
403  PROJECT& prj = Prj();
404  wxFileName fn = g_RootSheet->GetScreen()->GetFileName(); //ConfigFileName
405 
406  fn.SetExt( ProjectFileExtension );
407 
408  if( !IsWritable( fn ) )
409  return;
410 
411  if( aAskForSave )
412  {
413  wxFileDialog dlg( this, _( "Save Project File" ),
414  fn.GetPath(), fn.GetFullName(),
415  ProjectFileWildcard(), wxFD_SAVE );
416 
417  if( dlg.ShowModal() == wxID_CANCEL )
418  return;
419 
420  fn = dlg.GetPath();
421  }
422 
423  prj.ConfigSave( Kiface().KifaceSearch(), GROUP_SCH_EDITOR, GetProjectFileParametersList() );
424 }
425 
428 
429 const wxChar RescueNeverShowEntry[] = wxT( "RescueNeverShow" );
430 const wxChar AutoplaceFieldsEntry[] = wxT( "AutoplaceFields" );
431 const wxChar AutoplaceJustifyEntry[] = wxT( "AutoplaceJustify" );
432 const wxChar AutoplaceAlignEntry[] = wxT( "AutoplaceAlign" );
433 const wxChar SchIconScaleEntry[] = wxT( "SchIconScale" );
434 const wxChar LibIconScaleEntry[] = wxT( "LibIconScale" );
435 static const wxChar FootprintPreviewEntry[] = wxT( "FootprintPreview" );
436 static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" );
437 static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" );
438 static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" );
439 static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" );
440 static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" );
441 static const wxChar PreviewFramePositionYEntry[] = wxT( "PreviewFramePositionY" );
442 static const wxChar PreviewFrameWidthEntry[] = wxT( "PreviewFrameWidth" );
443 static const wxChar PreviewFrameHeightEntry[] = wxT( "PreviewFrameHeight" );
444 static const wxChar PrintDialogPositionXEntry[] = wxT( "PrintDialogPositionX" );
445 static const wxChar PrintDialogPositionYEntry[] = wxT( "PrintDialogPositionY" );
446 static const wxChar PrintDialogWidthEntry[] = wxT( "PrintDialogWidth" );
447 static const wxChar PrintDialogHeightEntry[] = wxT( "PrintDialogHeight" );
448 static const wxChar FindDialogPositionXEntry[] = wxT( "FindDialogPositionX" );
449 static const wxChar FindDialogPositionYEntry[] = wxT( "FindDialogPositionY" );
450 static const wxChar FindDialogWidthEntry[] = wxT( "FindDialogWidth" );
451 static const wxChar FindDialogHeightEntry[] = wxT( "FindDialogHeight" );
452 static const wxChar FindReplaceFlagsEntry[] = wxT( "LastFindReplaceFlags" );
453 static const wxChar FindStringEntry[] = wxT( "LastFindString" );
454 static const wxChar ReplaceStringEntry[] = wxT( "LastReplaceString" );
455 static const wxChar FindStringHistoryEntry[] = wxT( "FindStringHistoryList%d" );
456 static const wxChar ReplaceStringHistoryEntry[] = wxT( "ReplaceStringHistoryList%d" );
457 static const wxChar FieldNamesEntry[] = wxT( "FieldNames" );
458 static const wxChar SimulatorCommandEntry[] = wxT( "SimCmdLine" );
459 static const wxString ShowPageLimitsEntry = "ShowPageLimits";
460 static const wxString UnitsEntry = "Units";
461 static const wxString PrintMonochromeEntry = "PrintMonochrome";
462 static const wxString PrintSheetRefEntry = "PrintSheetReferenceAndTitleBlock";
463 static const wxString RepeatStepXEntry = "RepeatStepX";
464 static const wxString RepeatStepYEntry = "RepeatStepY";
465 static const wxString RepeatLabelIncrementEntry = "RepeatLabelIncrement";
466 
467 // Library editor wxConfig entry names.
468 static const wxChar defaultPinNumSizeEntry[] = wxT( "LibeditPinNumSize" );
469 static const wxChar defaultPinNameSizeEntry[] = wxT( "LibeditPinNameSize" );
470 static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" );
471 static const wxChar repeatLibLabelIncEntry[] = wxT( "LibeditRepeatLabelInc" );
472 static const wxChar pinRepeatStepEntry[] = wxT( "LibeditPinRepeatStep" );
473 static const wxChar repeatLibStepXEntry[] = wxT( "LibeditRepeatStepX" );
474 static const wxChar repeatLibStepYEntry[] = wxT( "LibeditRepeatStepY" );
475 static const wxChar showPinElectricalType[] = wxT( "LibeditShowPinElectricalType" );
476 
478 
480 {
481  if( !m_configSettings.empty() )
482  return m_configSettings;
483 
484  m_configSettings.push_back( new PARAM_CFG_BOOL( true, ShowPageLimitsEntry,
485  &m_showPageLimits, true ) );
486  m_configSettings.push_back( new PARAM_CFG_INT( true, UnitsEntry,
487  (int*)&g_UserUnit, MILLIMETRES ) );
488 
489  m_configSettings.push_back( new PARAM_CFG_BOOL( true, PrintMonochromeEntry,
490  &m_printMonochrome, true ) );
491  m_configSettings.push_back( new PARAM_CFG_BOOL( true, PrintSheetRefEntry,
492  &m_printSheetReference, true ) );
493 
494  m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatStepXEntry,
495  &m_repeatStep.x,
498  REPEAT_OFFSET_MAX ) );
499  m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatStepYEntry,
500  &m_repeatStep.y,
503  REPEAT_OFFSET_MAX ) );
504  m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatLabelIncrementEntry,
506  DEFAULT_REPEAT_LABEL_INC, -10, +10 ) );
507  return m_configSettings;
508 }
509 
510 
511 void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
512 {
514 
515  long tmp;
516 
518  wxConfigLoadSetups( aCfg, GetConfigurationSettings() );
519 
522 
525  aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false );
526  aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true );
527  aCfg->Read( AutoplaceFieldsEntry, &m_autoplaceFields, true );
528  aCfg->Read( AutoplaceJustifyEntry, &m_autoplaceJustify, true );
529  aCfg->Read( AutoplaceAlignEntry, &m_autoplaceAlign, false );
530  aCfg->Read( FootprintPreviewEntry, &m_footprintPreview, false );
531 
532  // Load print preview window session settings.
533  aCfg->Read( PreviewFramePositionXEntry, &tmp, -1 );
534  m_previewPosition.x = (int) tmp;
535  aCfg->Read( PreviewFramePositionYEntry, &tmp, -1 );
536  m_previewPosition.y = (int) tmp;
537  aCfg->Read( PreviewFrameWidthEntry, &tmp, -1 );
538  m_previewSize.SetWidth( (int) tmp );
539  aCfg->Read( PreviewFrameHeightEntry, &tmp, -1 );
540  m_previewSize.SetHeight( (int) tmp );
541 
542  // Load print dialog session settings.
543  aCfg->Read( PrintDialogPositionXEntry, &tmp, -1 );
544  m_printDialogPosition.x = (int) tmp;
545  aCfg->Read( PrintDialogPositionYEntry, &tmp, -1 );
546  m_printDialogPosition.y = (int) tmp;
547  aCfg->Read( PrintDialogWidthEntry, &tmp, -1 );
548  m_printDialogSize.SetWidth( (int) tmp );
549  aCfg->Read( PrintDialogHeightEntry, &tmp, -1 );
550  m_printDialogSize.SetHeight( (int) tmp );
551 
552  // Load netlists options:
553  aCfg->Read( SimulatorCommandEntry, &m_simulatorCommand );
554 
555  // Load find dialog session setting.
556  aCfg->Read( FindDialogPositionXEntry, &tmp, -1 );
557  m_findDialogPosition.x = (int) tmp;
558  aCfg->Read( FindDialogPositionYEntry, &tmp, -1 );
559  m_findDialogPosition.y = (int) tmp;
560  aCfg->Read( FindDialogWidthEntry, &tmp, -1 );
561  m_findDialogSize.SetWidth( (int) tmp );
562  aCfg->Read( FindDialogHeightEntry, &tmp, -1 );
563  m_findDialogSize.SetHeight( (int) tmp );
564 
565  wxASSERT_MSG( m_findReplaceData,
566  wxT( "Find dialog data settings object not created. Bad programmer!" ) );
567 
568  aCfg->Read( FindReplaceFlagsEntry, &tmp, (long) wxFR_DOWN );
569  m_findReplaceData->SetFlags( (wxUint32) tmp & ~FR_REPLACE_ITEM_FOUND );
570  m_findReplaceData->SetFindString( aCfg->Read( FindStringEntry, wxEmptyString ) );
571  m_findReplaceData->SetReplaceString( aCfg->Read( ReplaceStringEntry, wxEmptyString ) );
572 
573  // Load the find and replace string history list.
574  for( int i = 0; i < FR_HISTORY_LIST_CNT; ++i )
575  {
576  wxString tmpHistory;
577  wxString entry;
578  entry.Printf( FindStringHistoryEntry, i );
579  tmpHistory = aCfg->Read( entry, wxEmptyString );
580 
581  if( !tmpHistory.IsEmpty() )
582  m_findStringHistoryList.Add( tmpHistory );
583 
584  entry.Printf( ReplaceStringHistoryEntry, i );
585  tmpHistory = aCfg->Read( entry, wxEmptyString );
586 
587  if( !tmpHistory.IsEmpty() )
588  m_replaceStringHistoryList.Add( tmpHistory );
589  }
590 
591  wxString templateFieldNames = aCfg->Read( FieldNamesEntry, wxEmptyString );
592 
593  if( !templateFieldNames.IsEmpty() )
594  {
595  TEMPLATE_FIELDNAMES_LEXER lexer( TO_UTF8( templateFieldNames ) );
596 
597  try
598  {
599  m_TemplateFieldNames.Parse( &lexer );
600  }
601  catch( const IO_ERROR& DBG( e ) )
602  {
603  // @todo show error msg
604  DBG( printf( "templatefieldnames parsing error: '%s'\n",
605  TO_UTF8( e.What() ) ); )
606  }
607  }
608 }
609 
610 
611 void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
612 {
614 
615  wxConfigSaveSetups( aCfg, GetConfigurationSettings() );
616 
617  aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() );
618  aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() );
619  aCfg->Write( ShowHiddenPinsEntry, m_showAllPins );
620  aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() );
621  aCfg->Write( AutoplaceFieldsEntry, m_autoplaceFields );
622  aCfg->Write( AutoplaceJustifyEntry, m_autoplaceJustify );
623  aCfg->Write( AutoplaceAlignEntry, m_autoplaceAlign );
624  aCfg->Write( FootprintPreviewEntry, m_footprintPreview );
625 
626  // Save print preview window session settings.
627  aCfg->Write( PreviewFramePositionXEntry, m_previewPosition.x );
628  aCfg->Write( PreviewFramePositionYEntry, m_previewPosition.y );
629  aCfg->Write( PreviewFrameWidthEntry, m_previewSize.GetWidth() );
630  aCfg->Write( PreviewFrameHeightEntry, m_previewSize.GetHeight() );
631 
632  // Save print dialog session settings.
633  aCfg->Write( PrintDialogPositionXEntry, m_printDialogPosition.x );
634  aCfg->Write( PrintDialogPositionYEntry, m_printDialogPosition.y );
635  aCfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() );
636  aCfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() );
637 
638  // Save netlists options:
639  aCfg->Write( SimulatorCommandEntry, m_simulatorCommand );
640 
641  // Save find dialog session setting.
642  aCfg->Write( FindDialogPositionXEntry, m_findDialogPosition.x );
643  aCfg->Write( FindDialogPositionYEntry, m_findDialogPosition.y );
644  aCfg->Write( FindDialogWidthEntry, m_findDialogSize.GetWidth() );
645  aCfg->Write( FindDialogHeightEntry, m_findDialogSize.GetHeight() );
646  wxASSERT_MSG( m_findReplaceData,
647  wxT( "Find dialog data settings object not created. Bad programmer!" ) );
648  aCfg->Write( FindReplaceFlagsEntry,
649  (long) m_findReplaceData->GetFlags() & ~FR_REPLACE_ITEM_FOUND );
650  aCfg->Write( FindStringEntry, m_findReplaceData->GetFindString() );
651  aCfg->Write( ReplaceStringEntry, m_findReplaceData->GetReplaceString() );
652 
653  // Save the find and replace string history list.
654  unsigned i;
655  wxString tmpHistory;
656  wxString entry; // invoke constructor outside of any loops
657 
658  for( i = 0; i < m_findStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ )
659  {
660  entry.Printf( FindStringHistoryEntry, i );
661  aCfg->Write( entry, m_findStringHistoryList[ i ] );
662  }
663 
664  for( i = 0; i < m_replaceStringHistoryList.GetCount() && i < FR_HISTORY_LIST_CNT; i++ )
665  {
666  entry.Printf( ReplaceStringHistoryEntry, i );
667  aCfg->Write( entry, m_replaceStringHistoryList[ i ] );
668  }
669 
670  // Save template fieldnames
671  STRING_FORMATTER sf;
672  m_TemplateFieldNames.Format( &sf, 0 );
673 
674  wxString record = FROM_UTF8( sf.GetString().c_str() );
675  record.Replace( wxT("\n"), wxT(""), true ); // strip all newlines
676  record.Replace( wxT(" "), wxT(" "), true ); // double space to single
677 
678  aCfg->Write( FieldNamesEntry, record );
679 }
680 
681 
682 void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
683 {
685 
687 
690 
697  wxPoint step;
698  step.x = aCfg->Read( repeatLibStepXEntry, (long)DEFAULT_REPEAT_OFFSET_X );
699  step.y = aCfg->Read( repeatLibStepYEntry, (long)DEFAULT_REPEAT_OFFSET_Y );
700  SetRepeatStep( step );
702 }
703 
704 
705 void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
706 {
708 
709  aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() );
710  aCfg->Write( defaultPinNumSizeEntry, (long) GetPinNumDefaultSize() );
711  aCfg->Write( defaultPinNameSizeEntry, (long) GetPinNameDefaultSize() );
712  aCfg->Write( repeatLibLabelIncEntry, (long) GetRepeatDeltaLabel() );
713  aCfg->Write( pinRepeatStepEntry, (long) GetRepeatPinStep() );
714  aCfg->Write( repeatLibStepXEntry, (long) GetRepeatStep().x );
715  aCfg->Write( repeatLibStepYEntry, (long) GetRepeatStep().y );
717 }
718 
719 
720 void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
721 {
722  wxArrayString units;
723  GRIDS grid_list = GetScreen()->GetGrids();
724 
725  DIALOG_LIBEDIT_OPTIONS dlg( this );
726 
727  dlg.SetGridSizes( grid_list, GetScreen()->GetGridCmdId() );
732 
733  dlg.SetShowGrid( IsGridVisible() );
735  dlg.Layout();
736  dlg.Fit();
737 
738  if( dlg.ShowModal() == wxID_CANCEL )
739  return;
740 
741  wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size;
742  m_LastGridSizeId = GetScreen()->SetGrid( gridsize );
743 
753 
754  SaveSettings( config() ); // save values shared by eeschema applications.
755 
756  m_canvas->Refresh( true );
757 }
758 
759 
760 SYMBOL_LIB_TABLE* PROJECT::SchSymbolLibTable()
761 {
762  // This is a lazy loading function, it loads the project specific table when
763  // that table is asked for, not before.
764  SYMBOL_LIB_TABLE* tbl = (SYMBOL_LIB_TABLE*) GetElem( ELEM_SYMBOL_LIB_TABLE );
765 
766  // its gotta be NULL or a SYMBOL_LIB_TABLE, or a bug.
767  wxASSERT( !tbl || dynamic_cast<SYMBOL_LIB_TABLE*>( tbl ) );
768 
769  if( !tbl )
770  {
771  // Stack the project specific SYMBOL_LIB_TABLE overlay on top of the global table.
772  // ~SYMBOL_LIB_TABLE() will not touch the fallback table, so multiple projects may
773  // stack this way, all using the same global fallback table.
775 
776  SetElem( ELEM_SYMBOL_LIB_TABLE, tbl );
777 
778  wxString prjPath;
779 
780  wxGetEnv( PROJECT_VAR_NAME, &prjPath );
781 
782  wxASSERT( !prjPath.empty() );
783 
784  wxFileName fn( prjPath, SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() );
785 
786  try
787  {
788  tbl->Load( fn.GetFullPath() );
789  }
790  catch( const IO_ERROR& ioe )
791  {
792  wxString msg;
793  msg.Printf( _( "An error occurred loading the symbol library table \"%s\"." ),
794  fn.GetFullPath() );
795  DisplayErrorMessage( NULL, msg, ioe.What() );
796  }
797  }
798 
799  return tbl;
800 }
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 LIB_EDIT_FRAME_NAME
Definition: draw_frame.h:49
#define DEFAULT_SIZE_TEXT
This is the "default-of-the-default" hardcoded text size; individual application define their own def...
Definition: eda_text.h:72
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...
int GetRepeatPinStep() const
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[]
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Function DisplayErrorMessage displays an error message with aMessage.
Definition: confirm.cpp:199
This file is part of the common library TODO brief description.
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:338
void OnPreferencesOptions(wxCommandEvent &event)
void SetDefaultBusThickness(int aThickness)
bool GetEnableAutoPan() const
This file is part of the common library.
void SetEnableZoomNoCenter(bool aEnable)
Definition: draw_panel.cpp:685
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.
void SetFootprintPreview(bool show)
Function Set the FootprintPreview setting in the dialog.
static const wxString RepeatStepYEntry
void SetRepeatPinStep(int aStep)
Sets the repeat step value for pins repeat command.
const wxPoint GetRepeatStep() const
wxString GetUnitsLabel(EDA_UNITS_T aUnit)
Get a human readable units string.
Definition: base_units.cpp:458
#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
Definition: sch_screen.h:120
static int GetDefaultPinLength()
struct EDA_HOTKEY_CONFIG g_Libedit_Hokeys_Descr[]
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
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().
Definition: base_screen.h:472
const wxChar RescueNeverShowEntry[]
static int s_defaultBusThickness
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...
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:534
bool IsWritable(const wxFileName &aFileName)
Function IsWritable checks if aFileName can be written.
static const wxString UnitsEntry
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()
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
Definition: draw_frame.cpp:792
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:506
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.
const wxChar SchIconScaleEntry[]
static const wxChar FootprintPreviewEntry[]
void SetDefaultLineThickness(int aThickness)
#define SCH_EDIT_FRAME_NAME
Definition: draw_frame.h:50
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
Definition: base_screen.h:180
void SetAutoSaveInterval(int aInterval)
Function SetAutoSaveInterval Sets the current AutoSaveInterval value in the dialog.
void OnPreferencesOptions(wxCommandEvent &event)
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.
static int GetPinNumDefaultSize()
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()
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.
std::vector< GRID_TYPE > GRIDS
Definition: base_screen.h:69
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:146
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
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.
static int m_textPinNumDefaultSize
The default pin num text size setting.
Configuration parameter - Boolean Class.
bool LoadProjectFile()
Loads the KiCad project file (*.pro) settings specific to Eeschema.
bool GetAutoplaceFields()
Function Return the current AutoplaceFields setting from the dialog.
#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_showPinElectricalTypeName
the option to show the pin electrical name in the component editor
#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:91
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
const wxChar LibIconScaleEntry[]
Configuration parameter - wxString Class.
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
Definition: draw_frame.cpp:760
void SetAutoplaceFields(bool enable)
Function Set the AutoplaceFields setting in the dialog.
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
int ReadHotkeyConfig(const wxString &aAppname, struct EDA_HOTKEY_CONFIG *aDescList)
Function ReadHotkeyConfig Read configuration data and fill the current hotkey list with hotkeys...
void SetShowElectricalType(bool aShow)
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:57
virtual void SaveProjectSettings(bool aAskForSave)
Function SaveProjectSettings saves changes to the project settings to the project (...
wxString ProjectFileWildcard()
static int m_textPinNameDefaultSize
The default pin name text size setting.
static const wxChar pinRepeatStepEntry[]
static const wxChar DefaultPinLengthEntry[]
#define FR_HISTORY_LIST_CNT
Maximum number of find and replace strings.
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:106
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.
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
void SetAutoSaveInterval(int aInterval)
bool GetFootprintPreview(void)
Function Return the current FootprintPreview setting from the dialog.
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 ...
#define REPEAT_OFFSET_MAX
the max value of repeat offset value
Definition: general.h:48
see class PGM_BASE
void SetBusWidth(int aWidth)
Function SetBusWidth Sets the bus width setting in the dialog.
static int GetPinNameDefaultSize()
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 &#39;...
static const wxChar PrintDialogHeightEntry[]
static const wxString MakeFullFileName(const wxString &aShortFileName, const wxString &aProjectPath)
Static function.
#define GROUP_SCH_EDITOR
Definition: config_params.h:45
size_t i
Definition: json11.cpp:597
static const wxChar repeatLibStepXEntry[]
void SetEnableMousewheelPan(bool aEnable)
Definition: draw_panel.cpp:668
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[]
void InstallHotkeyFrame(EDA_BASE_FRAME *aParent, EDA_HOTKEY_CONFIG *aHotkeys, EDA_HOTKEY_CONFIG *aShowHotkeys)
Function InstallHotkeyFrame Create a hotkey editor dialog window with the provided hotkey configurati...
bool m_showPageLimits
true to display the page limits
Definition: draw_frame.h:95
TEMPLATE_FIELDNAMES GetTemplateFields(void)
Function GetTemplateFields Get the dialog&#39;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...
Struct TEMPLATE_FIELDNAME holds a name of a component&#39;s field, field value, and default visibility...
void SetDrawBgColor(COLOR4D aColor) override
Definition of class LIB_EDIT_FRAME.
void SetRepeatStep(const wxPoint &aStep)
Sets the repeat step value for repeat command.
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:516
#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 void SetDefaultPinLength(int aLength)
Set the default pin len.
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:676
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:185
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:145
int GetAutoSaveInterval() const
static const wxChar FindStringEntry[]
bool GetShowElectricalType()
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[]