KiCad PCB EDA Suite
getpart.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) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
31 #include <algorithm>
32 #include <fctsys.h>
33 #include <pgm_base.h>
34 #include <kiway.h>
35 #include <gr_basic.h>
36 #include <class_drawpanel.h>
37 #include <confirm.h>
38 #include <schframe.h>
39 #include <kicad_device_context.h>
40 #include <msgpanel.h>
41 
42 #include <general.h>
43 #include <class_library.h>
44 #include <sch_component.h>
45 #include <libeditframe.h>
46 #include <viewlib_frame.h>
47 #include <eeschema_id.h>
48 #include <symbol_lib_table.h>
49 
51 #include <cmp_tree_model_adapter.h>
52 #include <dialog_get_component.h>
53 
54 
56  const SCHLIB_FILTER* aFilter,
57  const LIB_ID& aPreselectedLibId,
58  int aUnit, int aConvert )
59 {
60  // Close any open non-modal Lib browser, and open a new one, in "modal" mode:
61  LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, false );
62 
63  if( viewlibFrame )
64  viewlibFrame->Destroy();
65 
66  viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER_MODAL, true, this );
67 
68  if( aFilter )
69  viewlibFrame->SetFilter( aFilter );
70 
71  if( aPreselectedLibId.IsValid() )
72  {
73  viewlibFrame->SetSelectedLibrary( aPreselectedLibId.GetLibNickname() );
74  viewlibFrame->SetSelectedComponent( aPreselectedLibId.GetLibItemName() );
75  }
76 
77  viewlibFrame->SetUnitAndConvert( aUnit, aConvert );
78 
79  viewlibFrame->Refresh();
80 
82 
83  wxString symbol = sel.LibId.Format();
84 
85  if( viewlibFrame->ShowModal( &symbol, this ) )
86  {
87  LIB_ID id;
88 
89  if( id.Parse( symbol ) == -1 )
90  sel.LibId = id;
91 
92  sel.Unit = viewlibFrame->GetUnit();
93  sel.Convert = viewlibFrame->GetConvert();
94  }
95 
96  viewlibFrame->Destroy();
97 
98  return sel;
99 }
100 
101 
103  const SCHLIB_FILTER* aFilter,
104  std::vector<COMPONENT_SELECTION>& aHistoryList,
105  bool aUseLibBrowser,
106  int aUnit,
107  int aConvert,
108  const LIB_ID* aHighlight,
109  bool aAllowFields )
110 {
111  wxString dialogTitle;
112  SYMBOL_LIB_TABLE* libs = Prj().SchSymbolLibTable();
113 
114  auto adapter( CMP_TREE_MODEL_ADAPTER::Create( libs ) );
115  bool loaded = false;
116 
117  if( aFilter )
118  {
119  const wxArrayString& liblist = aFilter->GetAllowedLibList();
120 
121  for( unsigned ii = 0; ii < liblist.GetCount(); ii++ )
122  {
123  if( libs->HasLibrary( liblist[ii] ) )
124  {
125  loaded = true;
126  adapter->AddLibrary( liblist[ii] );
127  }
128  }
129 
130  if( aFilter->GetFilterPowerParts() )
131  adapter->SetFilter( CMP_TREE_MODEL_ADAPTER::CMP_FILTER_POWER );
132 
133  }
134 
135  if( !aHistoryList.empty() )
136  {
137  std::vector< LIB_ALIAS* > history_list;
138 
139  for( auto const& i : aHistoryList )
140  {
141  LIB_ALIAS* alias = GetLibAlias( i.LibId );
142 
143  if( alias )
144  history_list.push_back( alias );
145  }
146 
147  adapter->AddAliasList( "-- " + _( "History" ) + " --", history_list );
148  adapter->SetPreselectNode( aHistoryList[0].LibId, aHistoryList[0].Unit );
149  }
150 
151  const std::vector< wxString > libNicknames = libs->GetLogicalLibs();
152 
153  if( !loaded )
154  {
155  adapter->AddLibrariesWithProgress( libNicknames, this );
156  }
157 
158  if( aHighlight && aHighlight->IsValid() )
159  adapter->SetPreselectNode( *aHighlight, /* aUnit */ 0 );
160 
161  dialogTitle.Printf( _( "Choose Symbol (%d items loaded)" ), adapter->GetComponentsCount() );
162  DIALOG_CHOOSE_COMPONENT dlg( this, dialogTitle, adapter, aConvert, aAllowFields );
163 
164  if( dlg.ShowQuasiModal() == wxID_CANCEL )
165  return COMPONENT_SELECTION();
166 
168  LIB_ID id;
169 
170  if( dlg.IsExternalBrowserSelected() ) // User requested component browser.
171  {
172  sel = SelectComponentFromLibBrowser( aFilter, id, sel.Unit, sel.Convert );
173  id = sel.LibId;
174  }
175  else
176  id = dlg.GetSelectedLibId( &sel.Unit );
177 
178  if( !id.IsValid() ) // Dialog closed by OK button,
179  // or the selection by lib browser was requested,
180  // but no symbol selected
181  return COMPONENT_SELECTION();
182 
183  if( sel.Unit == 0 )
184  sel.Unit = 1;
185 
186  sel.Fields = dlg.GetFields();
187  sel.LibId = id;
188 
189  if( sel.LibId.IsValid() )
190  {
191  aHistoryList.erase(
192  std::remove_if(
193  aHistoryList.begin(),
194  aHistoryList.end(),
195  [ &sel ]( COMPONENT_SELECTION const& i ){ return i.LibId == sel.LibId; } ),
196  aHistoryList.end() );
197 
198  aHistoryList.insert( aHistoryList.begin(), sel );
199  }
200 
201  return sel;
202 }
203 
204 
206  const SCHLIB_FILTER* aFilter,
207  SCH_BASE_FRAME::HISTORY_LIST& aHistoryList,
208  bool aUseLibBrowser )
209 {
210  wxString msg;
211 
212  SetRepeatItem( NULL );
214 
215  auto sel = SelectComponentFromLibrary( aFilter, aHistoryList, aUseLibBrowser, 1, 1 );
216 
217  if( !sel.LibId.IsValid() )
218  {
219  m_canvas->SetIgnoreMouseEvents( false );
221  return NULL;
222  }
223 
224  m_canvas->SetIgnoreMouseEvents( false );
226 
227  wxString libsource; // the library name to use. If empty, load from any lib
228 
229  if( aFilter )
230  libsource = aFilter->GetLibSource();
231 
232  LIB_ID libId = sel.LibId;
233 
234  LIB_PART* part = GetLibPart( libId, true );
235 
236  if( !part )
237  return NULL;
238 
239  SCH_COMPONENT* component = new SCH_COMPONENT( *part, m_CurrentSheet, sel.Unit, sel.Convert,
240  GetCrossHairPosition(), true );
241 
242  // Set the m_ChipName value, from component name in lib, for aliases
243  // Note if part is found, and if name is an alias of a component,
244  // alias exists because its root component was found
245  component->SetLibId( libId );
246 
247  // Be sure the link to the corresponding LIB_PART is OK:
248  component->Resolve( *Prj().SchSymbolLibTable() );
249 
250  // Set any fields that have been modified
251  for( auto const& i : sel.Fields )
252  {
253  auto field = component->GetField( i.first );
254 
255  if( field )
256  field->SetText( i.second );
257  }
258 
259  // Set the component value that can differ from component name in lib, for aliases
260  component->GetField( VALUE )->SetText( sel.LibId.GetLibItemName() );
261 
262  // If there is no field defined in the component, copy one over from the library
263  // ( from the .dcm file )
264  // This way the Datasheet field will not be empty and can be changed from the schematic
265  if( component->GetField( DATASHEET )->GetText().IsEmpty() )
266  {
267  LIB_ALIAS* entry = GetLibAlias( component->GetLibId(), true, true );
268 
269  if( entry && !!entry->GetDocFileName() )
270  component->GetField( DATASHEET )->SetText( entry->GetDocFileName() );
271  }
272 
273  MSG_PANEL_ITEMS items;
274 
275  component->SetCurrentSheetPath( &GetCurrentSheet() );
276  component->GetMsgPanelInfo( items );
277 
278  SetMsgPanel( items );
279  component->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
280  component->SetFlags( IS_NEW );
281 
282  if( m_autoplaceFields )
283  component->AutoplaceFields( /* aScreen */ NULL, /* aManual */ false );
284 
285  PrepareMoveItem( (SCH_ITEM*) component, aDC );
286 
287  return component;
288 }
289 
290 
292 {
293  SCH_SCREEN* screen = GetScreen();
294  SCH_ITEM* item = screen->GetCurItem();
295 
296  wxCHECK_RET( item != NULL && item->Type() == SCH_COMPONENT_T,
297  wxT( "Cannot change orientation of invalid schematic item." ) );
298 
299  SCH_COMPONENT* component = (SCH_COMPONENT*) item;
300 
302 
303  if( component->GetFlags() == 0 )
304  {
306  GetScreen()->SetCurItem( NULL );
307  }
308 
310 
311  component->SetOrientation( aOrientation );
312 
313  m_canvas->CrossHairOn( &dc );
314 
315  if( GetScreen()->TestDanglingEnds() )
316  m_canvas->Refresh();
317 
318  OnModify();
319 }
320 
321 
322 void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
323 {
324  SCH_SCREEN* screen = GetScreen();
325  SCH_ITEM* item = screen->GetCurItem();
326 
327  wxCHECK_RET( item != NULL && item->Type() == SCH_COMPONENT_T,
328  wxT( "Cannot select unit of invalid schematic item." ) );
329 
331 
333 
334  SCH_COMPONENT* component = (SCH_COMPONENT*) item;
335 
336  int unit = aEvent.GetId() + 1 - ID_POPUP_SCH_SELECT_UNIT1;
337 
338  LIB_PART* part = GetLibPart( component->GetLibId() );
339 
340  if( !part )
341  return;
342 
343  int unitCount = part->GetUnitCount();
344 
345  wxCHECK_RET( (unit >= 1) && (unit <= unitCount),
346  wxString::Format( wxT( "Cannot select unit %d from component " ), unit ) +
347  part->GetName() );
348 
349  if( unitCount <= 1 || component->GetUnit() == unit )
350  return;
351 
352  if( unit > unitCount )
353  unit = unitCount;
354 
355  STATUS_FLAGS flags = component->GetFlags();
356 
357  if( !flags ) // No command in progress: save in undo list
358  SaveCopyInUndoList( component, UR_CHANGED );
359 
360  if( flags )
361  component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
362  else
363  component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode );
364 
365  /* Update the unit number. */
366  component->SetUnitSelection( m_CurrentSheet, unit );
367  component->SetUnit( unit );
368  component->ClearFlags();
369  component->SetFlags( flags ); // Restore m_Flag modified by SetUnit()
370 
371  if( m_autoplaceFields )
372  component->AutoAutoplaceFields( GetScreen() );
373 
374  if( screen->TestDanglingEnds() )
375  m_canvas->Refresh();
376 
377  OnModify();
378 }
379 
380 
381 void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* aComponent, wxDC* DC )
382 {
383  if( !aComponent )
384  return;
385 
386  LIB_ID id = aComponent->GetLibId();
387  LIB_PART* part = GetLibPart( id );
388 
389  if( part )
390  {
391  wxString msg;
392 
393  if( !part->HasConversion() )
394  {
395  msg.Printf( _( "No alternate body style found for symbol '%s' in library '%s'." ),
396  id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
397  DisplayError( this, msg );
398  return;
399  }
400 
401  STATUS_FLAGS flags = aComponent->GetFlags();
402 
403  if( aComponent->GetFlags() )
404  aComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
405  else
406  aComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
407 
408  aComponent->SetConvert( aComponent->GetConvert() + 1 );
409 
410  // ensure m_Convert = 0, 1 or 2
411  // 0 and 1 = shape 1 = not converted
412  // 2 = shape 2 = first converted shape
413  // > 2 is not used but could be used for more shapes
414  // like multiple shapes for a programmable component
415  // When m_Convert = val max, return to the first shape
416  if( aComponent->GetConvert() > 2 )
417  aComponent->SetConvert( 1 );
418 
419  // The alternate symbol may cause a change in the connection status so test the
420  // connections so the connection indicators are drawn correctly.
422  aComponent->ClearFlags();
423  aComponent->SetFlags( flags ); // Restore m_Flag (modified by SetConvert())
424 
425  /* Redraw the component in the new position. */
426  if( aComponent->IsMoving() )
427  aComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
428  else
429  aComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
430 
431  OnModify();
432  }
433 }
GR_DRAWMODE g_XorMode
Definition: gr_basic.cpp:51
bool IsValid() const
Definition: lib_id.h:155
void OrientComponent(COMPONENT_ORIENTATION_T aOrientation=CMP_NORMAL)
Rotate and mirror a component.
Definition: getpart.cpp:291
KICAD_T Type() const
Function Type()
Definition: base_struct.h:225
void GetMsgPanelInfo(std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
void SetFilter(const SCHLIB_FILTER *aFilter)
Set a filter to display only libraries and/or components which match the filter.
void AutoAutoplaceFields(SCH_SCREEN *aScreen)
Autoplace fields only if correct to do so automatically.
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:282
Part library alias object definition.
bool IsMoving() const
Definition: base_struct.h:245
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
name of datasheet
void Parse(void *yyp, int yymajor, ParseTOKENTYPE yyminorParseARG_PDECL)
void SetUnitAndConvert(int aUnit, int aConvert)
Set unit and convert, and set flag preventing them from automatically resetting to 1...
bool HasConversion() const
Test if part has more than one body conversion type (DeMorgan).
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL) override
Update the board display after modifying it bu a python script (note: it is automatically called by a...
Definition: draw_panel.cpp:325
This file is part of the common library.
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen* and ...
Definition: schframe.cpp:773
COMPONENT_SELECTION SelectComponentFromLibBrowser(const SCHLIB_FILTER *aFilter, const LIB_ID &aPreselectedLibid, int aUnit, int aConvert)
Function SelectComponentFromLibBrowser Calls the library viewer to select component to import into sc...
Definition: getpart.cpp:55
bool Resolve(PART_LIBS *aLibs)
Assigns the current LIB_PART from aLibs which this symbol is based on.
std::vector< COMPONENT_SELECTION > HISTORY_LIST
This file is part of the common libary.
LIB_PART * GetLibPart(const LIB_ID &aLibId, bool aUseCacheLib=false, bool aShowErrorMsg=false)
void SetUnitSelection(SCH_SHEET_PATH *aSheet, int aUnitSelection)
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
void MoveCursorToCrossHair()
Function MoveCursorToCrossHair warps the cursor to the current cross hair position.
Definition: draw_panel.cpp:347
void SetSelectedComponent(const wxString &aComponentName)
Set the selected component.
Symbol library viewer main window.
Definition: viewlib_frame.h:49
void PrepareMoveItem(SCH_ITEM *aItem, wxDC *aDC)
Start moving aItem using the mouse.
Definition: schedit.cpp:759
void SetRepeatItem(SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
Definition: schframe.cpp:471
static PTR Create(SYMBOL_LIB_TABLE *aLibs)
Factory function: create a model adapter in a reference-counting container.
void SetConvert(int aConvert)
#define IS_NEW
New item, just created.
Definition: base_struct.h:127
void SetCurrentSheetPath(const SCH_SHEET_PATH *aSheetPath)
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
Definition: schframe.cpp:532
Dialog class to select a component from the libraries.
int GetConvert() const
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
SCH_SHEET_PATH * m_CurrentSheet
which sheet we are presently working on.
Definition: schframe.h:121
void SetLibId(const LIB_ID &aName, PART_LIBS *aLibs=NULL)
std::vector< std::pair< int, wxString > > GetFields() const
Get a list of fields edited by the user.
VTBL_ENTRY KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, KIWAY_PLAYER *aParent=NULL)
Function Player returns the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:302
a helper to handle the real device context used in KiCad
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:280
SCH_FIELD * GetField(int aFieldNdx) const
Returns a field in this symbol.
bool IsExternalBrowserSelected() const
Function IsExternalBrowserSelected.
const wxArrayString & GetAllowedLibList() const
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Function SetMsgPanel clears the message panel and populates it with the contents of aList...
Definition: draw_frame.cpp:784
SCH_ITEM * GetCurItem() const
Return the currently selected SCH_ITEM, overriding BASE_SCREEN::GetCurItem().
int GetUnit(void)
const wxString & GetName() const
const UTF8 & GetLibItemName() const
Definition: lib_id.h:115
int ShowQuasiModal()
const wxString & GetText() const
Function GetText returns the string associated with the text object.
Definition: eda_text.h:130
SCH_SHEET_PATH & GetCurrentSheet()
Definition: schframe.cpp:577
void SaveCopyInUndoList(SCH_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, bool aAppend=false, const wxPoint &aTransformPoint=wxPoint(0, 0))
Create a copy of the current schematic item, and put it in the undo list.
Define a library symbol object.
void OnSelectUnit(wxCommandEvent &aEvent)
Definition: getpart.cpp:322
unsigned STATUS_FLAGS
Definition: base_struct.h:158
bool GetFilterPowerParts() const
void SetUnit(int aUnit)
Change the unit number to aUnit.
std::vector< std::pair< int, wxString > > Fields
int GetConvert(void)
bool m_autoplaceFields
automatically place component fields
Definition: schframe.h:155
int GetUnitCount() const
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:93
wxString GetDocFileName() const
#define GR_DEFAULT_DRAWMODE
Definition: general.h:70
Definition the SCH_COMPONENT class for Eeschema.
void CrossHairOn(wxDC *DC)
Definition: draw_panel.cpp:259
SCH_COMPONENT * Load_Component(wxDC *aDC, const SCHLIB_FILTER *aFilter, SCH_BASE_FRAME::HISTORY_LIST &aHistoryList, bool aUseLibBrowser)
Load a symbol library and places it on the current schematic.
Definition: getpart.cpp:205
see class PGM_BASE
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual)
Automatically orient all the fields in the component.
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
#define INSTALL_UNBUFFERED_DC(name, parent)
bool TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
Definition: sch_screen.cpp:879
void Draw(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
Function Draw Draw a schematic item.
void SetCurItem(SCH_ITEM *aItem)
Sets the currently selected object, m_CurrentItem.
void SetIgnoreMouseEvents(bool aIgnore)
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
const LIB_ID & GetLibId() const
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
Definition: msgpanel.h:102
UTF8 Format() const
Definition: lib_id.cpp:263
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:281
LIB_ID GetSelectedLibId(int *aUnit=nullptr) const
To be called after this dialog returns from ShowModal().
bool HasLibrary(const wxString &aNickname) const
Test for the existence of aNickname in the library table.
Definition for part library class.
const wxString & GetLibSource() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:98
Message panel definition file.
LIB_ALIAS * GetLibAlias(const LIB_ID &aLibId, bool aUseCacheLib=false, bool aShowErrorMsg=false)
Load symbol from symbol library table.
#define VALUE
COMPONENT_SELECTION SelectComponentFromLibrary(const SCHLIB_FILTER *aFilter, std::vector< COMPONENT_SELECTION > &aHistoryList, bool aUseLibBrowser, int aUnit, int aConvert, const LIB_ID *aHighlight=nullptr, bool aAllowFields=true)
Function SelectComponentFromLib Calls the library viewer to select component to import into schematic...
Definition: getpart.cpp:102
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
wxPoint GetCrossHairPosition(bool aInvertY=false) const
Function GetCrossHairPosition return the current cross hair position in logical (drawing) coordinates...
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
COMPONENT_ORIENTATION_T
enum used in RotationMiroir()
Definition: schframe.h:71
VTBL_ENTRY bool ShowModal(wxString *aResult=NULL, wxWindow *aResultantFocusWindow=NULL)
Function ShowModal puts up this wxFrame as if it were a modal dialog, with all other instantiated wxF...
Definition of class LIB_EDIT_FRAME.
COLOR4D g_GhostColor
Draw color for moving objects.
Definition: common.cpp:57
std::vector< wxString > GetLogicalLibs()
Return the logical library names, all of them that are pertinent to a look up done on this LIB_TABLE...
void SetSelectedLibrary(const wxString &aLibName)
Set the selected library in the library window.
virtual void SetText(const wxString &aText)
Definition: eda_text.h:141
void ConvertPart(SCH_COMPONENT *DrawComponent, wxDC *DC)
Definition: getpart.cpp:381