KiCad PCB EDA Suite
dialog_edit_component_in_lib.cpp
Go to the documentation of this file.
1 
5 /*
6  * This program source code file is part of KiCad, a free EDA CAD application.
7  *
8  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, you may find one here:
22  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
23  * or you may search the http://www.gnu.org website for the version 2 license,
24  * or you may write to the Free Software Foundation, Inc.,
25  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26  */
27 
28 #include <fctsys.h>
29 #include <kiway.h>
30 #include <common.h>
31 #include <confirm.h>
32 #include <gestfich.h>
33 #include <pgm_base.h>
34 #include <dialog_text_entry.h>
35 
36 #include <general.h>
37 #include <lib_edit_frame.h>
38 #include <class_library.h>
39 #include <eeschema_id.h> // for MAX_UNIT_COUNT_PER_PACKAGE definition
40 #include <symbol_lib_table.h>
41 
43 
45 
48 {
49  m_Parent = aParent;
50  m_RecreateToolbar = false;
51 
52  initDlg();
53 
54  // Now all widgets have the size fixed, call FinishDialogSettings
56 }
57 
58 
60 {
61  m_lastOpenedPage = m_NoteBook->GetSelection( );
62 }
63 
64 /* Initialize state of check boxes and texts
65 */
67 {
68  m_AliasLocation = -1;
69 
70  LIB_PART* component = m_Parent->GetCurPart();
71 
72  if( component == NULL )
73  {
74  SetTitle( _( "Library Component Properties" ) );
75  return;
76  }
77 
78  wxString title, staticText;
79  bool isRoot = m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0;
80 
81  if( !isRoot )
82  {
83  title.Printf( _( "Properties for %s (alias of %s)" ),
85  GetChars( component->GetName() ) );
86 
87  staticText.Printf( _( "Alias List of %s" ), GetChars( component->GetName() ) );
88  m_staticTextAlias->SetLabelText( staticText );
89  }
90  else
91  title.Printf( _( "Properties for %s" ), GetChars( component->GetName() ) );
92 
93  SetTitle( title );
94  InitPanelDoc();
96 
97  // The component's alias list contains all names (including the root). The UI list
98  // contains only aliases, so exclude the root.
99  m_PartAliasListCtrl->Append( component->GetAliasNames( false ) );
100 
101  // Note: disabling the delete buttons gives us no opportunity to tell the user
102  // why they're disabled. Leave them enabled and bring up an error message instead.
103 
104  /* Read the Footprint Filter list */
105  m_FootprintFilterListBox->Append( component->GetFootprints() );
106 
107  if( component->GetFootprints().GetCount() == 0 )
108  {
109  m_ButtonDeleteAllFootprintFilter->Enable( false );
110  m_ButtonDeleteOneFootprintFilter->Enable( false );
111  m_buttonEditOneFootprintFilter->Enable( false );
112  }
113 
114  m_NoteBook->SetSelection( m_lastOpenedPage );
115 
116  m_stdSizerButtonOK->SetDefault();
117 }
118 
119 
121 {
122  EndModal( wxID_CANCEL );
123 }
124 
125 
127 {
128  LIB_ALIAS* alias;
129  LIB_PART* component = m_Parent->GetCurPart();
130 
131  if( component == NULL )
132  return;
133 
134  wxString aliasname = m_Parent->GetAliasName();
135 
136  if( aliasname.IsEmpty() )
137  return;
138 
139  alias = component->GetAlias( aliasname );
140 
141  if( alias != NULL )
142  {
143  m_DocCtrl->SetValue( alias->GetDescription() );
144  m_KeywordsCtrl->SetValue( alias->GetKeyWords() );
145  m_DocfileCtrl->SetValue( alias->GetDocFileName() );
146  }
147 }
148 
149 
150 /*
151  * create the basic panel for component properties editing
152  */
154 {
155  LIB_PART* component = m_Parent->GetCurPart();
156 
157  if( m_Parent->GetShowDeMorgan() )
158  m_AsConvertButt->SetValue( true );
159 
160  int maxUnits = MAX_UNIT_COUNT_PER_PACKAGE;
161  m_SelNumberOfUnits->SetRange (1, maxUnits );
162 
164  _( "Number of Units (max allowed %d)" ), maxUnits ) );
165 
166 
167  /* Default values for a new component. */
168  if( component == NULL )
169  {
170  m_ShowPinNumButt->SetValue( true );
171  m_ShowPinNameButt->SetValue( true );
172  m_PinsNameInsideButt->SetValue( true );
173  m_SelNumberOfUnits->SetValue( 1 );
174  m_SetSkew->SetValue( 40 );
175  m_OptionPower->SetValue( false );
176  m_OptionPartsLocked->SetValue( false );
177  return;
178  }
179 
180  m_ShowPinNumButt->SetValue( component->ShowPinNumbers() );
181  m_ShowPinNameButt->SetValue( component->ShowPinNames() );
182  m_PinsNameInsideButt->SetValue( component->GetPinNameOffset() != 0 );
183  m_SelNumberOfUnits->SetValue( component->GetUnitCount() );
184  m_SetSkew->SetValue( component->GetPinNameOffset() );
185  m_OptionPower->SetValue( component->IsPower() );
186  m_OptionPartsLocked->SetValue( component->UnitsLocked() && component->GetUnitCount() > 1 );
187 }
188 
189 
190 void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event )
191 {
192  /* Update the doc, keyword and doc filename strings */
193  LIB_ALIAS* alias;
194  LIB_PART* component = m_Parent->GetCurPart();
195 
196  if( component == NULL )
197  {
198  EndModal( wxID_CANCEL );
199  return;
200  }
201 
202  m_Parent->SaveCopyInUndoList( component );
203 
204  alias = component->GetAlias( m_Parent->GetAliasName() );
205 
206  wxCHECK_RET( alias != NULL,
207  wxT( "Alias \"" ) + m_Parent->GetAliasName() + wxT( "\" of symbol \"" ) +
208  component->GetName() + wxT( "\" does not exist." ) );
209 
210  alias->SetDescription( m_DocCtrl->GetValue() );
211  alias->SetKeyWords( m_KeywordsCtrl->GetValue() );
212  alias->SetDocFileName( m_DocfileCtrl->GetValue() );
213 
214  // The UI list contains only aliases (ie: not the root's name), while the component's
215  // alias list contains all names (including the root).
216  wxArrayString aliases = m_PartAliasListCtrl->GetStrings();
217  aliases.Add( component->GetName() );
218  component->SetAliases( aliases );
219 
220  int unitCount = m_SelNumberOfUnits->GetValue();
221  ChangeNbUnitsPerPackage( unitCount );
222 
223  if( m_AsConvertButt->GetValue() )
224  {
225  if( !m_Parent->GetShowDeMorgan() )
226  {
227  m_Parent->SetShowDeMorgan( true );
228  SetUnsetConvert();
229  }
230  }
231  else
232  {
233  if( m_Parent->GetShowDeMorgan() )
234  {
235  m_Parent->SetShowDeMorgan( false );
236  SetUnsetConvert();
237  }
238  }
239 
240  component->SetShowPinNumbers( m_ShowPinNumButt->GetValue() );
241  component->SetShowPinNames( m_ShowPinNameButt->GetValue() );
242 
243  if( m_PinsNameInsideButt->GetValue() == false )
244  component->SetPinNameOffset( 0 ); // pin text outside the body (name is on the pin)
245  else
246  {
247  component->SetPinNameOffset( m_SetSkew->GetValue() );
248  // Ensure component->m_TextInside != 0, because the meaning is "text outside".
249  if( component->GetPinNameOffset() == 0 )
250  component->SetPinNameOffset( 20 ); // give a reasonnable value
251  }
252 
253  if( m_OptionPower->GetValue() == true )
254  component->SetPower();
255  else
256  component->SetNormal();
257 
258  /* Set the option "Units locked".
259  * Obviously, cannot be true if there is only one part */
260  component->LockUnits( m_OptionPartsLocked->GetValue() );
261 
262  if( component->GetUnitCount() <= 1 )
263  component->LockUnits( false );
264 
265  /* Update the footprint filter list */
266  component->GetFootprints().Clear();
267  component->GetFootprints() = m_FootprintFilterListBox->GetStrings();
268 
269  EndModal( wxID_OK );
270 }
271 
272 
274 {
275  if( m_Parent == NULL )
276  return;
277 
278  LIB_ALIAS* parent_alias;
279  LIB_PART* component = m_Parent->GetCurPart();
280 
281  if( component == NULL )
282  return;
283 
284  // search for the main alias: this is the first alias in alias list
285  // something like the main component
286  parent_alias = component->GetAlias( 0 );
287 
288  if( parent_alias == NULL ) // Should never occur (bug)
289  return;
290 
291  m_DocCtrl->SetValue( parent_alias->GetDescription() );
292  m_DocfileCtrl->SetValue( parent_alias->GetDocFileName() );
293  m_KeywordsCtrl->SetValue( parent_alias->GetKeyWords() );
294 }
295 
296 
298 {
299  if( m_PartAliasListCtrl->GetCount() == 0 )
300  return;
301 
302  if( m_PartAliasListCtrl->FindString( m_Parent->GetAliasName() ) != wxNOT_FOUND )
303  {
304  DisplayErrorMessage( this, _( "Delete All can be done only when editing the main symbol." ) );
305  return;
306  }
307 
308  if( IsOK( this, _( "Remove all aliases from list?" ) ) )
309  m_PartAliasListCtrl->Clear();
310 }
311 
312 
314 {
315  int sel = m_PartAliasListCtrl->GetSelection();
316 
317  if( sel == wxNOT_FOUND )
318  return;
319 
320  wxString aliasname = m_PartAliasListCtrl->GetString( sel );
321 
322  if( aliasname.CmpNoCase( m_Parent->GetAliasName() ) == 0 )
323  {
324  wxString msg;
325  msg.Printf( _( "Current alias \"%s\" cannot be edited." ), GetChars( aliasname ) );
326  DisplayError( this, msg );
327  return;
328  }
329 
330  WX_TEXT_ENTRY_DIALOG dlg( this, _( "New Alias:" ), _( "Symbol alias:" ), aliasname );
331 
332  if( dlg.ShowModal() != wxID_OK )
333  return; // cancelled by user
334 
335  aliasname = LIB_ID::FixIllegalChars( dlg.GetValue(), LIB_ID::ID_SCH );
336 
337  if( checkNewAlias( aliasname ) )
338  m_PartAliasListCtrl->SetString( sel, aliasname );
339 }
340 
341 
343 {
344  wxString aliasname;
345 
346  WX_TEXT_ENTRY_DIALOG dlg( this, _( "New Alias:" ), _( "Symbol alias:" ), aliasname );
347 
348  if( dlg.ShowModal() != wxID_OK )
349  return; // cancelled by user
350 
351  aliasname = LIB_ID::FixIllegalChars( dlg.GetValue(), LIB_ID::ID_SCH );
352 
353  if( checkNewAlias( aliasname ) )
354  m_PartAliasListCtrl->Append( aliasname );
355 }
356 
357 
359 {
360  if( aliasname.IsEmpty() )
361  return false;
362 
363  if( m_PartAliasListCtrl->FindString( aliasname ) != wxNOT_FOUND )
364  {
365  wxString msg;
366  msg.Printf( _( "Alias \"%s\" already exists." ), GetChars( aliasname ) );
367  DisplayInfoMessage( this, msg );
368  return false;
369  }
370 
371  wxString library = m_Parent->GetCurLib();
372 
373  if( !library.empty() && Prj().SchSymbolLibTable()->LoadSymbol( library, aliasname ) != NULL )
374  {
375  wxString msg;
376  msg.Printf( _( "Symbol name \"%s\" already exists in library \"%s\"." ), aliasname, library );
377  DisplayErrorMessage( this, msg );
378  return false;
379  }
380 
381  return true;
382 }
383 
384 
386 {
387  int sel = m_PartAliasListCtrl->GetSelection();
388 
389  if( sel == wxNOT_FOUND )
390  return;
391 
392  wxString aliasname = m_PartAliasListCtrl->GetString( sel );
393 
394  if( aliasname.CmpNoCase( m_Parent->GetAliasName() ) == 0 )
395  {
396  wxString msg;
397  msg.Printf( _( "Current alias \"%s\" cannot be removed." ), GetChars( aliasname ) );
398  DisplayError( this, msg );
399  return;
400  }
401 
402  m_PartAliasListCtrl->Delete( sel );
403 }
404 
405 
406 /*
407  * Change the number of parts per package.
408  */
410 {
411  LIB_PART* part = m_Parent->GetCurPart();
412 
413  if( !part || part->GetUnitCount() == MaxUnit || MaxUnit < 1 )
414  return false;
415 
416  if( MaxUnit < part->GetUnitCount()
417  && !IsOK( this, _( "Delete extra parts from component?" ) ) )
418  return false;
419 
420  part->SetUnitCount( MaxUnit );
421  return true;
422 }
423 
424 
425 /*
426  * Set or clear the component alternate body style ( DeMorgan ).
427  */
429 {
430  LIB_PART* component = m_Parent->GetCurPart();
431 
432  if( component == NULL || ( m_Parent->GetShowDeMorgan() == component->HasConversion() ) )
433  return false;
434 
435  if( m_Parent->GetShowDeMorgan() )
436  {
437  if( !IsOK( this, _( "Add new pins for alternate body style ( DeMorgan ) to component?" ) ) )
438  return false;
439  }
440  else if( component->HasConversion() )
441  {
442  if( !IsOK( this, _( "Delete alternate body style (DeMorgan) draw items from component?" ) ) )
443  {
444  m_Parent->SetShowDeMorgan( true );
445  return false;
446  }
447  }
448 
449  component->SetConversion( m_Parent->GetShowDeMorgan() );
450  m_Parent->OnModify();
451 
452  return true;
453 }
454 
455 
457 {
458  PROJECT& prj = Prj();
459  SEARCH_STACK* search = prj.SchSearchS();
460 
461  wxString mask = wxT( "*" );
462  wxString docpath = prj.GetRString( PROJECT::DOC_PATH );
463 
464  if( !docpath )
465  docpath = search->LastVisitedPath( wxT( "doc" ) );
466 
467  wxString fullFileName = EDA_FILE_SELECTOR( _( "Doc Files" ),
468  docpath,
469  wxEmptyString,
470  wxEmptyString,
471  mask,
472  this,
473  wxFD_OPEN,
474  true );
475  if( fullFileName.IsEmpty() )
476  return;
477 
478  /* If the path is already in the library search paths
479  * list, just add the library name to the list. Otherwise, add
480  * the library name with the full or relative path.
481  * the relative path, when possible is preferable,
482  * because it preserve use of default libraries paths, when the path is a sub path of
483  * these default paths
484  */
485  wxFileName fn = fullFileName;
486 
487  prj.SetRString( PROJECT::DOC_PATH, fn.GetPath() );
488 
489  wxString filename = search->FilenameWithRelativePathInSearchList(
490  fullFileName, wxPathOnly( Prj().GetProjectFullName() ) );
491 
492  // Filenames are always stored in unix like mode, ie separator "\" is stored as "/"
493  // to ensure files are identical under unices and windows
494 #ifdef __WINDOWS__
495  filename.Replace( wxT( "\\" ), wxT( "/" ) );
496 #endif
497  m_DocfileCtrl->SetValue( filename );
498 }
499 
500 
502 {
503  if( IsOK( this, _( "OK to delete the footprint filter list ?" ) ) )
504  {
505  m_FootprintFilterListBox->Clear();
506  m_ButtonDeleteAllFootprintFilter->Enable( false );
507  m_ButtonDeleteOneFootprintFilter->Enable( false );
508  m_buttonEditOneFootprintFilter->Enable( false );
509  }
510 }
511 
512 
513 /* Add a new name to the footprint filter list box
514  * Obvioulsy, cannot be void
515  */
517 {
518  wxString Line;
519  LIB_PART* component = m_Parent->GetCurPart();
520 
521  if( component == NULL )
522  return;
523 
524  WX_TEXT_ENTRY_DIALOG dlg( this, _( "Add Footprint Filter" ), _( "Footprint Filter" ), Line );
525  if( dlg.ShowModal() != wxID_OK )
526  return; // cancelled by user
527 
528  Line = dlg.GetValue();
529  Line.Replace( wxT( " " ), wxT( "_" ) );
530 
531  if( Line.IsEmpty() )
532  return;
533 
534  /* test for an existing name: */
535  int index = m_FootprintFilterListBox->FindString( Line );
536 
537  if( index != wxNOT_FOUND )
538  {
539  wxString msg;
540 
541  msg.Printf( _( "Footprint filter \"%s\" is already defined." ), GetChars( Line ) );
542  DisplayError( this, msg );
543  return;
544  }
545 
546  m_FootprintFilterListBox->Append( Line );
547  m_ButtonDeleteAllFootprintFilter->Enable( true );
548  m_ButtonDeleteOneFootprintFilter->Enable( true );
549  m_buttonEditOneFootprintFilter->Enable( true );
550 }
551 
552 
554 {
555  LIB_PART* component = m_Parent->GetCurPart();
556  int ii = m_FootprintFilterListBox->GetSelection();
557 
558  if( ii == wxNOT_FOUND )
559  {
560  return;
561  }
562 
563  m_FootprintFilterListBox->Delete( ii );
564 
565  if( !component || ( m_FootprintFilterListBox->GetCount() == 0 ) )
566  {
567  m_ButtonDeleteAllFootprintFilter->Enable( false );
568  m_ButtonDeleteOneFootprintFilter->Enable( false );
569  m_buttonEditOneFootprintFilter->Enable( false );
570  }
571 }
572 
574 {
575  int idx = m_FootprintFilterListBox->GetSelection();
576 
577  if( idx < 0 )
578  return;
579 
580  wxString filter = m_FootprintFilterListBox->GetStringSelection();
581 
582  WX_TEXT_ENTRY_DIALOG dlg( this, wxEmptyString, _( "Edit footprint filter" ), filter );
583 
584  if( dlg.ShowModal() != wxID_OK )
585  return; // Aborted by user
586 
587  filter = dlg.GetValue();
588 
589  if( filter.IsEmpty() )
590  return; // do not accept blank filter.
591 
592  m_FootprintFilterListBox->SetString( idx, filter );
593 }
594 
595 
597 {
598  if( m_SelNumberOfUnits->GetValue() <= 1 )
599  m_OptionPartsLocked->Enable( false );
600  else
601  m_OptionPartsLocked->Enable( true );
602 }
bool UnitsLocked() const
Check whether part units are interchangeable.
Part library alias object definition.
void SetConversion(bool aSetConvert)
Set or clear the alternate body style (DeMorgan) for the part.
void SetPower()
DIALOG_EDIT_COMPONENT_IN_LIBRARY(LIB_EDIT_FRAME *parent)
Constructors.
Class PROJECT holds project specific data.
Definition: project.h:56
int GetPinNameOffset()
bool HasConversion() const
Test if part has more than one body conversion type (DeMorgan).
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.
bool IsPower() const
LIB_ALIAS * GetAlias(size_t aIndex)
This file is part of the common library.
void CopyDocFromRootToAlias(wxCommandEvent &event) override
void AddFootprintFilter(wxCommandEvent &event) override
void AddAliasOfPart(wxCommandEvent &event) override
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void OnUpdateInterchangeableUnits(wxUpdateUIEvent &event) override
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen...
#define MAX_UNIT_COUNT_PER_PACKAGE
The maximum number of units per package.
Definition: eeschema_id.h:48
static UTF8 FixIllegalChars(const UTF8 &aLibItemName, LIB_ID_TYPE aType)
Replace illegal LIB_ID item name characters with underscores &#39;_&#39;.
Definition: lib_id.cpp:374
Class SEARCH_STACK looks for files in a number of places.
Definition: search_stack.h:41
void DeleteAliasOfPart(wxCommandEvent &event) override
void SetDocFileName(const wxString &aDocFileName)
void SetShowDeMorgan(bool show)
void OnCancelClick(wxCommandEvent &event) override
void OnOkClick(wxCommandEvent &event) override
bool ShowPinNames()
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
bool ShowPinNumbers()
LIB_PART * GetCurPart() const
Return the current part being edited or NULL if none selected.
void SetUnitCount(int count)
Set the units per part count.
wxString GetDescription() const
wxString EDA_FILE_SELECTOR(const wxString &aTitle, const wxString &aPath, const wxString &aFileName, const wxString &aExtension, const wxString &aWildcard, wxWindow *aParent, int aStyle, const bool aKeepWorkingDirectory, const wxPoint &aPosition, wxString *aMruPath)
Function EDA_FILE_SELECTOR.
Definition: gestfich.cpp:82
Define a library symbol object.
void EditOneFootprintFilter(wxCommandEvent &event) override
wxString GetCurLib() const
The nickname of the current library being edited and empty string if none.
void EditAliasOfPart(wxCommandEvent &event) override
void DeleteAllFootprintFilter(wxCommandEvent &event) override
void SetDescription(const wxString &aDescription)
wxArrayString & GetFootprints()
void DeleteOneFootprintFilter(wxCommandEvent &event) override
VTBL_ENTRY void SetRString(RSTRING_T aStringId, const wxString &aString)
Function SetRString stores a "retained string", which is any session and project specific string iden...
Definition: project.cpp:171
int GetUnitCount() const
wxString GetDocFileName() const
void SetAliases(const wxArrayString &aAliasList)
const wxString & GetAliasName()
VTBL_ENTRY const wxString & GetRString(RSTRING_T aStringId)
Function GetRString returns a "retained string", which is any session and project specific string ide...
Definition: project.cpp:186
wxString GetValue()
The symbol library editor main window.
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
see class PGM_BASE
bool GetShowDeMorgan()
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
void SetShowPinNumbers(bool aShow)
Set or clear the pin number visibility flag.
void SetKeyWords(const wxString &aKeyWords)
const wxString LastVisitedPath(const wxString &aSubPathToSearch=wxEmptyString)
Function LastVisitedPath is a quirky function inherited from old code that seems to serve particular ...
void SaveCopyInUndoList(EDA_ITEM *ItemToCopy, UNDO_REDO_T undoType=UR_LIBEDIT)
Create a copy of the current component, and save it in the undo list.
wxArrayString GetAliasNames(bool aIncludeRoot=true) const
void DeleteAllAliasOfPart(wxCommandEvent &event) override
void BrowseAndSelectDocFile(wxCommandEvent &event) override
The common library.
Class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.
const wxString & GetName() const
Definition of class LIB_EDIT_FRAME.
Definition for part library class.
void SetShowPinNames(bool aShow)
Set or clear the pin name visibility flag.
void SetPinNameOffset(int aOffset)
Set the offset in mils of the pin name text from the pin symbol.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Function DisplayInfoMessage displays an informational message box with aMessage.
Definition: confirm.cpp:216
wxString GetKeyWords() const
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:185
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Function IsOK displays a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:233
wxString FilenameWithRelativePathInSearchList(const wxString &aFullFilename, const wxString &aBaseDir)
Function FilenameWithRelativePathInSearchList returns the shortest possible path which can be use lat...
void LockUnits(bool aLockUnits)
Set interchangeable the property for part units.
void SetNormal()