KiCad PCB EDA Suite
libeditframe.h
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 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 #ifndef LIBEDITFRM_H_
32 #define LIBEDITFRM_H_
33 
34 #include <sch_base_frame.h>
35 #include <class_sch_screen.h>
36 
37 #include <lib_draw_item.h>
38 #include <lib_collectors.h>
39 
40 
41 class SCH_EDIT_FRAME;
42 class LIB_PART;
43 class LIB_ALIAS;
44 class LIB_FIELD;
46 class LIB_ID;
47 
48 
53 {
57  wxComboBox* m_partSelectBox;
58  wxComboBox* m_aliasSelectBox;
59 
62 
70 
79 
84 
87 
89  static int m_drawLineWidth;
90 
93  static wxString m_aliasName;
94 
95  // The unit number to edit and show
96  static int m_unit;
97 
98  // Show the normal shape ( m_convert <= 1 ) or the converted shape
99  // ( m_convert > 1 )
100  static int m_convert;
101 
102  // true to force DeMorgan/normal tools selection enabled.
103  // They are enabled when the loaded component has
104  // Graphic items for converted shape
105  // But under some circumstances (New component created)
106  // these tools must left enabled
107  static bool m_showDeMorgan;
108 
110  static int m_textSize;
111 
113  static double m_current_text_angle;
114 
117 
120 
122  static int m_defaultPinLength;
123 
126 
127  static wxSize m_clientSize;
128 
129  friend class DIALOG_LIB_EDIT_TEXT;
130 
131  LIB_ITEM* locateItem( const wxPoint& aPosition, const KICAD_T aFilterList[] );
132 
133 public:
134 
135  LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
136 
137  ~LIB_EDIT_FRAME();
138 
140  wxString GetCurLib();
141 
143  wxString SetCurLib( const wxString& aLibNickname );
144 
150  LIB_PART* GetCurPart();
151 
155  void SetCurPart( LIB_PART* aPart );
156 
160 
164 
167  static int GetDefaultPinLength() { return m_defaultPinLength; }
168 
171  static void SetDefaultPinLength( int aLength ) { m_defaultPinLength = aLength; }
172 
177  int GetRepeatPinStep() const { return m_repeatPinStep; }
178 
184  void SetRepeatPinStep( int aStep) { m_repeatPinStep = aStep; }
185 
186 
187  void ReCreateMenuBar() override;
188 
189  void InstallConfigFrame( wxCommandEvent& event );
190  void OnPreferencesOptions( wxCommandEvent& event );
191  void Process_Config( wxCommandEvent& event );
192 
198  bool SynchronizePins();
199 
203  void OnPlotCurrentComponent( wxCommandEvent& event );
204  void Process_Special_Functions( wxCommandEvent& event );
205  void OnSelectTool( wxCommandEvent& aEvent );
206 
213  void OnImportPart( wxCommandEvent& event );
214 
220  void OnExportPart( wxCommandEvent& event );
221  void OnSelectAlias( wxCommandEvent& event );
222  void OnSelectPart( wxCommandEvent& event );
223 
227  void OnShowElectricalType( wxCommandEvent& event );
228 
241  void DeleteOnePart( wxCommandEvent& event );
242 
248  void CreateNewLibraryPart( wxCommandEvent& event );
249 
250  void OnCreateNewPartFromExisting( wxCommandEvent& event );
251  void OnEditComponentProperties( wxCommandEvent& event );
252  void InstallFieldsEditorDialog( wxCommandEvent& event );
253 
261  void LoadOneLibraryPart( wxCommandEvent& event );
262 
263  void OnViewEntryDoc( wxCommandEvent& event );
264  void OnCheckComponent( wxCommandEvent& event );
265  void OnSelectBodyStyle( wxCommandEvent& event );
266  void OnEditPin( wxCommandEvent& event );
267  void OnSelectItem( wxCommandEvent& aEvent );
268 
269  void OnOpenPinTable( wxCommandEvent& aEvent );
270 
271  void OnSaveCurrentPart( wxCommandEvent& aEvent );
272 
273  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
274  void OnUpdateEditingPart( wxUpdateUIEvent& event );
275  void OnUpdateNotEditingPart( wxUpdateUIEvent& event );
276  void OnUpdateUndo( wxUpdateUIEvent& event );
277  void OnUpdateRedo( wxUpdateUIEvent& event );
278  void OnUpdateSaveCurrentLib( wxUpdateUIEvent& event );
279  void OnUpdateSaveCurrentLibAs( wxUpdateUIEvent& event );
280  void OnUpdateViewDoc( wxUpdateUIEvent& event );
281  void OnUpdatePinByPin( wxUpdateUIEvent& event );
282  void OnUpdatePinTable( wxUpdateUIEvent& event );
283  void OnUpdatePartNumber( wxUpdateUIEvent& event );
284  void OnUpdateDeMorganNormal( wxUpdateUIEvent& event );
285  void OnUpdateDeMorganConvert( wxUpdateUIEvent& event );
286  void OnUpdateSelectAlias( wxUpdateUIEvent& event );
287  void OnUpdateElectricalType( wxUpdateUIEvent& aEvent );
288 
289  void UpdateAliasSelectList();
290  void UpdatePartSelectList();
291 
296  void DisplayLibInfos();
297 
307  void RedrawComponent( wxDC* aDC, wxPoint aOffset );
308 
314  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
315 
316  void OnCloseWindow( wxCloseEvent& Event );
317  void ReCreateHToolbar() override;
318  void ReCreateVToolbar() override;
319  void CreateOptionToolbar();
320  void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;
321  bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) override;
322  double BestZoom() override; // Returns the best zoom
323  void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) override;
324 
326  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
327 
328  bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
329 
330  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
331 
332  void LoadSettings( wxConfigBase* aCfg ) override;
333 
334  void SaveSettings( wxConfigBase* aCfg ) override;
335 
342  void CloseWindow( wxCommandEvent& event )
343  {
344  // Generate a wxCloseEvent
345  Close( false );
346  }
347 
352  void OnModify()
353  {
354  GetScreen()->SetModify();
355  }
356 
357  const wxString& GetAliasName() { return m_aliasName; }
358 
359  int GetUnit() { return m_unit; }
360 
361  void SetUnit( int unit )
362  {
363  wxASSERT( unit >= 1 );
364  m_unit = unit;
365  }
366 
367  int GetConvert() { return m_convert; }
368 
369  void SetConvert( int convert )
370  {
371  wxASSERT( convert >= 0 );
372  m_convert = convert;
373  }
374 
376 
377  void SetLastDrawItem( LIB_ITEM* drawItem )
378  {
379  m_lastDrawItem = drawItem;
380  }
381 
383 
384  void SetDrawItem( LIB_ITEM* drawItem );
385 
386  bool GetShowDeMorgan() { return m_showDeMorgan; }
387 
388  void SetShowDeMorgan( bool show ) { m_showDeMorgan = show; }
389 
391 
392  void SetShowElectricalType( bool aShow ) { m_showPinElectricalTypeName = aShow; }
393 
395 
401  void TempCopyComponent();
402 
407  void RestoreComponent();
408 
413 
417  void ClearTempCopyComponent();
418 
419  bool IsEditingDrawItem() { return m_drawItem && m_drawItem->InEditMode(); }
420 
421 private:
422 
428  virtual void OnActivate( wxActivateEvent& event ) override;
429 
430  // General:
431 
438  void SelectActiveLibrary( const wxString& aLibrary = wxEmptyString );
439 
446  void OnSaveActiveLibrary( wxCommandEvent& event );
447 
456  bool SaveActiveLibrary( bool newFile );
457 
467  bool LoadComponentFromCurrentLib( const wxString& aAliasName, int aUnit = 0, int aConvert = 0 );
468 
477  bool LoadOneLibraryPartAux( LIB_ALIAS* aLibEntry, const wxString& aLibrary );
478 
482  void DisplayCmpDoc();
483 
487  void OnRotateItem( wxCommandEvent& aEvent );
488 
492  void OnOrient( wxCommandEvent& aEvent );
493 
499  void deleteItem( wxDC* aDC );
500 
501  // General editing
502 public:
509  void SaveCopyInUndoList( EDA_ITEM* ItemToCopy );
510 
511 private:
512  void GetComponentFromUndoList( wxCommandEvent& event );
513  void GetComponentFromRedoList( wxCommandEvent& event );
514 
515  // Editing pins
516  void CreatePin( wxDC* DC );
517  void StartMovePin( wxDC* DC );
518 
529  void CreateImagePins( LIB_PIN* aPin, int aUnit, int aConvert, bool aDeMorgan );
530 
537  void PlaceAnchor();
538 
539  // Editing graphic items
540  LIB_ITEM* CreateGraphicItem( LIB_PART* LibEntry, wxDC* DC );
541  void GraphicItemBeginDraw( wxDC* DC );
542  void StartMoveDrawSymbol( wxDC* DC );
543  void StartModifyDrawSymbol( wxDC* DC ); //<! Modify the item, adjust size etc.
544  void EndDrawGraphicItem( wxDC* DC );
545 
551  void LoadOneSymbol();
552 
559  void SaveOneSymbol();
560 
561  void EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem );
562  void EditSymbolText( wxDC* DC, LIB_ITEM* DrawItem );
563  LIB_ITEM* LocateItemUsingCursor( const wxPoint& aPosition,
564  const KICAD_T aFilterList[] = LIB_COLLECTOR::AllItems );
565  void EditField( LIB_FIELD* Field );
566 
567  void refreshSchematic();
568 
569 public:
576  bool LoadComponentAndSelectLib( const LIB_ID& aLibId );
577 
578  /* Block commands: */
579 
584  virtual int BlockCommand( EDA_KEY aKey ) override;
585 
589  virtual void HandleBlockPlace( wxDC* DC ) override;
590 
597  virtual bool HandleBlockEnd( wxDC* DC ) override;
598 
603  void PlacePin();
604 
618  void GlobalSetPins( LIB_PIN* aMasterPin, int aId );
619 
620  // Automatic placement of pins
621  void RepeatPinItem( wxDC* DC, LIB_PIN* Pin );
622 
628  void CreatePNGorJPEGFile( const wxString& aFileName, bool aFmt_jpeg );
629 
638  virtual void PrintPage( wxDC* aDC, LSET aPrintMask,
639  bool aPrintMirrorMode, void* aData = NULL ) override;
640 
646  void SVG_PlotComponent( const wxString& aFullFileName );
647 
648  DECLARE_EVENT_TABLE()
649 };
650 
651 #endif // LIBEDITFRM_H_
void OnViewEntryDoc(wxCommandEvent &event)
void SVG_PlotComponent(const wxString &aFullFileName)
Creates the SVG print file for the current edited component.
void OnCheckComponent(wxCommandEvent &event)
Definition: pinedit.cpp:695
void OnUpdateEditingPart(wxUpdateUIEvent &event)
void OnUpdatePartNumber(wxUpdateUIEvent &event)
Class LIB_COLLECTOR.
void SaveOneSymbol()
Saves the current symbol to a symbol file.
Definition: symbedit.cpp:142
static double m_current_text_angle
Current text angle setting.
Definition: libeditframe.h:113
Part library alias object definition.
void InstallConfigFrame(wxCommandEvent &event)
void StartMovePin(wxDC *DC)
Prepare the displacement of a pin.
Definition: pinedit.cpp:327
bool LoadComponentFromCurrentLib(const wxString &aAliasName, int aUnit=0, int aConvert=0)
Loads a symbol from the current active library, optionally setting the selected unit and convert...
Definition: libedit.cpp:102
int GetRepeatPinStep() const
Definition: libeditframe.h:177
bool OnHotKey(wxDC *aDC, int aHotKey, const wxPoint &aPosition, EDA_ITEM *aItem=NULL) override
virtual int BlockCommand(EDA_KEY aKey) override
Returns the block command (BLOCK_MOVE, BLOCK_DUPLICATE...) corresponding to the aKey (ALT...
LIB_ITEM * GetDrawItem()
Definition: libeditframe.h:382
static int m_convert
Definition: libeditframe.h:100
void OnExportPart(wxCommandEvent &event)
Function OnExportPart creates a new library and backup the current component in this library or expor...
Definition: lib_export.cpp:99
void RestoreComponent()
Restore the current edited component from its temporary copy.
void SetConvert(int convert)
Definition: libeditframe.h:369
bool SaveActiveLibrary(bool newFile)
Saves the changes to the current library.
Definition: libedit.cpp:291
static LIB_ITEM * m_drawItem
Definition: libeditframe.h:92
void ClearTempCopyComponent()
Delete temporary copy of the current component and clear pointer.
double BestZoom() override
Return the zoom level which displays the full page on screen.
void OnSaveActiveLibrary(wxCommandEvent &event)
The command event handler to save the changes to the current library.
Definition: libedit.cpp:285
void OnEditPin(wxCommandEvent &event)
Definition: pinedit.cpp:95
void SetRepeatPinStep(int aStep)
Sets the repeat step value for pins repeat command.
Definition: libeditframe.h:184
Class LIB_FIELD is used in symbol libraries.
Definition: lib_field.h:60
virtual void OnActivate(wxActivateEvent &event) override
Called when the frame is activated.
void OnCloseWindow(wxCloseEvent &Event)
void OnImportPart(wxCommandEvent &event)
Routine to read one part.
Definition: lib_export.cpp:47
static int GetDefaultPinLength()
Definition: libeditframe.h:167
void OnUpdateUndo(wxUpdateUIEvent &event)
void SelectActiveLibrary(const wxString &aLibrary=wxEmptyString)
Set the current active library to aLibrary.
Definition: libedit.cpp:77
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
void OnUpdateSaveCurrentLib(wxUpdateUIEvent &event)
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
void GlobalSetPins(LIB_PIN *aMasterPin, int aId)
Definition: pinedit.cpp:560
bool InEditMode() const
Return the draw item editing mode status.
void OnUpdateRedo(wxUpdateUIEvent &event)
void Process_Config(wxCommandEvent &event)
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen...
Definition: libeditframe.h:352
void OnSelectBodyStyle(wxCommandEvent &event)
void OnUpdateDeMorganNormal(wxUpdateUIEvent &event)
void LoadOneSymbol()
Read a component symbol file (*.sym ) and add graphic items to the current component.
Definition: symbedit.cpp:46
Schematic editor (Eeschema) main window.
Definition: schframe.h:118
bool GeneralControl(wxDC *aDC, const wxPoint &aPosition, EDA_KEY aHotKey=0) override
Function GeneralControl performs application specific control using aDC at aPosition in logical units...
bool OnRightClick(const wxPoint &MousePos, wxMenu *PopMenu) override
Class LIB_ID.
Definition: lib_id.h:56
void CloseWindow(wxCommandEvent &event)
Trigger the wxCloseEvent, which is handled by the function given to EVT_CLOSE() macro: ...
Definition: libeditframe.h:342
void OnUpdateDeMorganConvert(wxUpdateUIEvent &event)
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
void UpdateAliasSelectList()
LIB_PART * m_my_part
a part I own, it is not in any library, but a copy could be.
Definition: libeditframe.h:54
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
virtual bool HandleBlockEnd(wxDC *DC) override
Performs a block end command.
void CreateImagePins(LIB_PIN *aPin, int aUnit, int aConvert, bool aDeMorgan)
Adds copies of aPin for aUnit in components with multiple parts and aConvert for components that have...
Definition: pinedit.cpp:491
Class LIB_ITEM is the base class for drawable items used by schematic library components.
Definition: lib_draw_item.h:67
void RepeatPinItem(wxDC *DC, LIB_PIN *Pin)
Definition: pinedit.cpp:607
void SetShowDeMorgan(bool show)
Definition: libeditframe.h:388
void OnOrient(wxCommandEvent &aEvent)
Handles the ID_LIBEDIT_MIRROR_X and ID_LIBEDIT_MIRROR_Y events.
void DisplayLibInfos()
Updates the main window title bar with the current library name and read only status of the library...
Definition: libedit.cpp:56
void OnPreferencesOptions(wxCommandEvent &event)
static const KICAD_T AllItems[]
A scan list for all schematic items.
void OnEditComponentProperties(wxCommandEvent &event)
static int GetPinNumDefaultSize()
Definition: libeditframe.h:159
Class LSET is a set of PCB_LAYER_IDs.
void DeleteOnePart(wxCommandEvent &event)
Delete a symbol from the current library.
Definition: libedit.cpp:498
FILL_T GetFillStyle()
Definition: libeditframe.h:394
LIB_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
void ReCreateMenuBar() override
(Re)Create the menubar for the component editor frame
void SetDrawItem(LIB_ITEM *drawItem)
void OnUpdateSaveCurrentLibAs(wxUpdateUIEvent &event)
LIB_COLLECTOR m_collectedItems
Used for hit testing.
Definition: libeditframe.h:56
void LoadOneLibraryPart(wxCommandEvent &event)
Loads a symbol from the currently selected library.
Definition: libedit.cpp:143
Definitions for the Eeschema program SCH_SCREEN class.
void OnUpdateSelectAlias(wxUpdateUIEvent &event)
void deleteItem(wxDC *aDC)
Deletes the currently selected draw item.
void OnUpdateViewDoc(wxUpdateUIEvent &event)
void OnUpdatePinTable(wxUpdateUIEvent &event)
wxComboBox * m_partSelectBox
a Box to select a part to edit (if any)
Definition: libeditframe.h:57
LIB_ITEM * locateItem(const wxPoint &aPosition, const KICAD_T aFilterList[])
void TempCopyComponent()
Create a temporary copy of the current edited component.
void GraphicItemBeginDraw(wxDC *DC)
Definition: symbdraw.cpp:238
Class LIB_PART defines a library part object.
void GetComponentFromRedoList(wxCommandEvent &event)
void OnPlotCurrentComponent(wxCommandEvent &event)
Plot the current symbol in SVG or PNG format.
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:257
uint32_t EDA_KEY
Definition: common.h:51
void SetLastDrawItem(LIB_ITEM *drawItem)
Definition: libeditframe.h:377
static int m_textPinNumDefaultSize
The default pin num text size setting.
Definition: libeditframe.h:116
static LIB_ITEM * m_lastDrawItem
Definition: libeditframe.h:91
void OnUpdatePinByPin(wxUpdateUIEvent &event)
static int m_textSize
The current text size setting.
Definition: libeditframe.h:110
virtual void PrintPage(wxDC *aDC, LSET aPrintMask, bool aPrintMirrorMode, void *aData=NULL) override
Print a page.
void OnSelectTool(wxCommandEvent &aEvent)
bool m_showPinElectricalTypeName
the option to show the pin electrical name in the component editor
Definition: libeditframe.h:83
void OnShowElectricalType(wxCommandEvent &event)
From Option toolbar: option to show the electrical pin type name.
void InstallFieldsEditorDialog(wxCommandEvent &event)
void StartModifyDrawSymbol(wxDC *DC)
Definition: symbdraw.cpp:309
void CreateNewLibraryPart(wxCommandEvent &event)
Create a new library symbol.
Definition: libedit.cpp:597
void CreatePin(wxDC *DC)
Definition: pinedit.cpp:424
void OnRotateItem(wxCommandEvent &aEvent)
Rotates the current item.
void Process_Special_Functions(wxCommandEvent &event)
void CreateOptionToolbar()
Definition: tool_lib.cpp:224
void DisplayCmpDoc()
Display the documentation of the selected component.
Definition: libedit.cpp:449
LIB_PART * GetTempCopyComponent()
Definition: libeditframe.h:412
void SetShowElectricalType(bool aShow)
Definition: libeditframe.h:392
static int m_textPinNameDefaultSize
The default pin name text size setting.
Definition: libeditframe.h:119
void EditSymbolText(wxDC *DC, LIB_ITEM *DrawItem)
void PlacePin()
Place at cursor location the pin currently moved (i.e.
Definition: pinedit.cpp:241
void OnSelectItem(wxCommandEvent &aEvent)
void OnLeftClick(wxDC *DC, const wxPoint &MousePos) override
void OnOpenPinTable(wxCommandEvent &aEvent)
const wxString & GetAliasName()
Definition: libeditframe.h:357
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
LIB_ITEM * LocateItemUsingCursor(const wxPoint &aPosition, const KICAD_T aFilterList[]=LIB_COLLECTOR::AllItems)
void OnSaveCurrentPart(wxCommandEvent &aEvent)
The symbol library editor main window.
Definition: libeditframe.h:52
bool LoadOneLibraryPartAux(LIB_ALIAS *aLibEntry, const wxString &aLibrary)
Create a copy of aLibEntry into memory.
Definition: libedit.cpp:191
LIB_ITEM * CreateGraphicItem(LIB_PART *LibEntry, wxDC *DC)
Definition: symbdraw.cpp:148
void ReCreateHToolbar() override
Definition: tool_lib.cpp:99
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:57
void OnCreateNewPartFromExisting(wxCommandEvent &event)
static wxString m_aliasName
Definition: libeditframe.h:93
bool GetShowDeMorgan()
Definition: libeditframe.h:386
static int m_unit
Definition: libeditframe.h:96
static int GetPinNameDefaultSize()
Definition: libeditframe.h:163
void SetCurPart(LIB_PART *aPart)
Take ownership of aPart and notes that it is the one currently being edited.
void OnSelectAlias(wxCommandEvent &event)
void RedrawComponent(wxDC *aDC, wxPoint aOffset)
Redraw the current component loaded in library editor Display reference like in schematic (a referenc...
Definition: libedit.cpp:235
void OnUpdateNotEditingPart(wxUpdateUIEvent &event)
virtual void HandleBlockPlace(wxDC *DC) override
Handles the block place command.
LIB_ITEM * GetLastDrawItem()
Definition: libeditframe.h:375
static FILL_T m_drawFillStyle
The current draw or edit graphic item fill style.
Definition: libeditframe.h:86
void EndDrawGraphicItem(wxDC *DC)
Definition: symbdraw.cpp:336
void OnLeftDClick(wxDC *DC, const wxPoint &MousePos) override
LIB_PART * GetCurPart()
Return the current part being edited or NULL if none selected.
static int m_defaultPinLength
Default pin length.
Definition: libeditframe.h:122
void EditGraphicSymbol(wxDC *DC, LIB_ITEM *DrawItem)
Definition: symbdraw.cpp:58
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:165
void CreatePNGorJPEGFile(const wxString &aFileName, bool aFmt_jpeg)
Creates an image (screenshot) of the current component in PNG or JPEG format.
int m_repeatPinStep
Default repeat offset for pins in repeat place pin.
Definition: libeditframe.h:125
FILL_T
Enum FILL_T is the set of fill types used in plotting or drawing enclosed areas.
Definition: base_struct.h:70
void OnUpdateElectricalType(wxUpdateUIEvent &aEvent)
bool IsEditingDrawItem()
Definition: libeditframe.h:419
void EditField(LIB_FIELD *Field)
Definition: libfield.cpp:40
wxString SetCurLib(const wxString &aLibNickname)
Sets the current library nickname and returns the old library nickname.
static int m_drawLineWidth
Default line width for drawing or editing graphic items.
Definition: libeditframe.h:89
bool m_drawSpecificConvert
Convert of the item currently being drawn.
Definition: libeditframe.h:61
void PlaceAnchor()
Places an anchor reference coordinate for the current component.
Definition: symbedit.cpp:253
bool LoadComponentAndSelectLib(const LIB_ID &aLibId)
Selects the currently active library and loads the symbol from aLibId.
Definition: libedit.cpp:91
static bool m_showDeMorgan
Definition: libeditframe.h:107
static void SetDefaultPinLength(int aLength)
Set the default pin len.
Definition: libeditframe.h:171
wxString GetCurLib()
The nickname of the current library being edited and empty string if none.
bool m_drawSpecificUnit
Specify which component parts the current draw item applies to.
Definition: libeditframe.h:69
void RedrawActiveWindow(wxDC *DC, bool EraseBg) override
Redraw the current component loaded in library editor, an axes Display reference like in schematic (a...
Definition: libedit.cpp:257
void OnSelectPart(wxCommandEvent &event)
void GetComponentFromUndoList(wxCommandEvent &event)
A shim class between EDA_DRAW_FRAME and several derived classes: LIB_EDIT_FRAME, LIB_VIEW_FRAME, and SCH_EDIT_FRAME, and it brings in a common way of handling the provided virtual functions for the derived classes.
bool m_editPinsPerPartOrConvert
Set to true to not synchronize pins at the same position when editing components with multiple parts ...
Definition: libeditframe.h:78
void UpdatePartSelectList()
void StartMoveDrawSymbol(wxDC *DC)
Definition: symbdraw.cpp:288
static wxSize m_clientSize
Definition: libeditframe.h:127
bool GetShowElectricalType()
Definition: libeditframe.h:390
wxComboBox * m_aliasSelectBox
a box to select the alias to edit (if any)
Definition: libeditframe.h:58
void SetUnit(int unit)
Definition: libeditframe.h:361
LIB_PART * m_tempCopyComponent
temp copy of a part during edit, I own it here.
Definition: libeditframe.h:55
void SaveCopyInUndoList(EDA_ITEM *ItemToCopy)
Create a copy of the current component, and save it in the undo list.
void ReCreateVToolbar() override
Definition: tool_lib.cpp:53