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-2017 Wayne Stambaugh <stambaughw@verizon.net>
6  * Copyright (C) 2004-2017 KiCad Developers, see change_log.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 PART_LIB;
43 class LIB_PART;
44 class LIB_ALIAS;
45 class LIB_FIELD;
47 
52 {
56  wxComboBox* m_partSelectBox;
57  wxComboBox* m_aliasSelectBox;
58 
61 
69 
78 
83 
86 
88  static int m_drawLineWidth;
89 
92  static wxString m_aliasName;
93 
94  // The unit number to edit and show
95  static int m_unit;
96 
97  // Show the normal shape ( m_convert <= 1 ) or the converted shape
98  // ( m_convert > 1 )
99  static int m_convert;
100 
101  // true to force DeMorgan/normal tools selection enabled.
102  // They are enabled when the loaded component has
103  // Graphic items for converted shape
104  // But under some circumstances (New component created)
105  // these tools must left enabled
106  static bool m_showDeMorgan;
107 
109  static int m_textSize;
110 
112  static double m_current_text_angle;
113 
116 
119 
121  static int m_defaultPinLength;
122 
125 
126  static wxSize m_clientSize;
127 
128  friend class DIALOG_LIB_EDIT_TEXT;
129 
130  LIB_ITEM* locateItem( const wxPoint& aPosition, const KICAD_T aFilterList[] );
131 
132 public:
133 
134  LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
135 
136  ~LIB_EDIT_FRAME();
137 
139  PART_LIB* GetCurLib();
140 
142  PART_LIB* SetCurLib( PART_LIB* aLib );
143 
149  LIB_PART* GetCurPart();
150 
156  void SetCurPart( LIB_PART* aPart );
157 
161 
165 
168  static int GetDefaultPinLength() { return m_defaultPinLength; }
169 
172  static void SetDefaultPinLength( int aLength ) { m_defaultPinLength = aLength; }
173 
178  int GetRepeatPinStep() const { return m_repeatPinStep; }
179 
185  void SetRepeatPinStep( int aStep) { m_repeatPinStep = aStep; }
186 
187 
188  void ReCreateMenuBar() override;
189 
195  static void EnsureActiveLibExists();
196 
197  void InstallConfigFrame( wxCommandEvent& event );
198  void OnPreferencesOptions( wxCommandEvent& event );
199  void Process_Config( wxCommandEvent& event );
200 
207  bool SynchronizePins();
208 
213  void OnPlotCurrentComponent( wxCommandEvent& event );
214  void Process_Special_Functions( wxCommandEvent& event );
215  void OnSelectTool( wxCommandEvent& aEvent );
216 
223  void OnImportPart( wxCommandEvent& event );
224 
230  void OnExportPart( wxCommandEvent& event );
231  void OnSelectAlias( wxCommandEvent& event );
232  void OnSelectPart( wxCommandEvent& event );
233 
237  void OnShowElectricalType( wxCommandEvent& event );
238 
252  void DeleteOnePart( wxCommandEvent& event );
253 
260  void CreateNewLibraryPart( wxCommandEvent& event );
261 
262  void OnCreateNewPartFromExisting( wxCommandEvent& event );
263  void OnEditComponentProperties( wxCommandEvent& event );
264  void InstallFieldsEditorDialog( wxCommandEvent& event );
265 
274  void LoadOneLibraryPart( wxCommandEvent& event );
275 
276  void OnViewEntryDoc( wxCommandEvent& event );
277  void OnCheckComponent( wxCommandEvent& event );
278  void OnSelectBodyStyle( wxCommandEvent& event );
279  void OnEditPin( wxCommandEvent& event );
280  void OnSelectItem( wxCommandEvent& aEvent );
281 
282  void OnOpenPinTable( wxCommandEvent& aEvent );
283 
284  void OnSaveCurrentPart( wxCommandEvent& aEvent );
285 
286  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
287  void OnUpdateEditingPart( wxUpdateUIEvent& event );
288  void OnUpdateNotEditingPart( wxUpdateUIEvent& event );
289  void OnUpdateUndo( wxUpdateUIEvent& event );
290  void OnUpdateRedo( wxUpdateUIEvent& event );
291  void OnUpdateSaveCurrentLib( wxUpdateUIEvent& event );
292  void OnUpdateViewDoc( wxUpdateUIEvent& event );
293  void OnUpdatePinByPin( wxUpdateUIEvent& event );
294  void OnUpdatePinTable( wxUpdateUIEvent& event );
295  void OnUpdatePartNumber( wxUpdateUIEvent& event );
296  void OnUpdateDeMorganNormal( wxUpdateUIEvent& event );
297  void OnUpdateDeMorganConvert( wxUpdateUIEvent& event );
298  void OnUpdateSelectAlias( wxUpdateUIEvent& event );
299  void OnUpdateElectricalType( wxUpdateUIEvent& aEvent );
300 
301  void UpdateAliasSelectList();
302  void UpdatePartSelectList();
303 
309  void DisplayLibInfos();
310 
321  void RedrawComponent( wxDC* aDC, wxPoint aOffset );
322 
329  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
330 
331  void OnCloseWindow( wxCloseEvent& Event );
332  void ReCreateHToolbar() override;
333  void ReCreateVToolbar() override;
334  void CreateOptionToolbar();
335  void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;
336  bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) override;
337  double BestZoom() override; // Returns the best zoom
338  void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) override;
339 
341  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
342 
343  bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
344 
345  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
346 
347  void LoadSettings( wxConfigBase* aCfg ) override;
348 
349  void SaveSettings( wxConfigBase* aCfg ) override;
350 
358  void CloseWindow( wxCommandEvent& event )
359  {
360  // Generate a wxCloseEvent
361  Close( false );
362  }
363 
369  void OnModify()
370  {
371  GetScreen()->SetModify();
372  }
373 
374  const wxString& GetAliasName() { return m_aliasName; }
375 
376  int GetUnit() { return m_unit; }
377 
378  void SetUnit( int unit )
379  {
380  wxASSERT( unit >= 1 );
381  m_unit = unit;
382  }
383 
384  int GetConvert() { return m_convert; }
385 
386  void SetConvert( int convert )
387  {
388  wxASSERT( convert >= 0 );
389  m_convert = convert;
390  }
391 
393 
394  void SetLastDrawItem( LIB_ITEM* drawItem )
395  {
396  m_lastDrawItem = drawItem;
397  }
398 
400 
401  void SetDrawItem( LIB_ITEM* drawItem );
402 
403  bool GetShowDeMorgan() { return m_showDeMorgan; }
404 
405  void SetShowDeMorgan( bool show ) { m_showDeMorgan = show; }
406 
408 
409  void SetShowElectricalType( bool aShow ) { m_showPinElectricalTypeName = aShow; }
410 
412 
418  void TempCopyComponent();
419 
425  void RestoreComponent();
426 
432 
437  void ClearTempCopyComponent();
438 
439  bool IsEditingDrawItem() { return m_drawItem && m_drawItem->InEditMode(); }
440 
441 private:
442 
449  virtual void OnActivate( wxActivateEvent& event ) override;
450 
451  // General:
452 
465  bool SaveOnePart( PART_LIB* aLib, bool aPromptUser = true );
466 
474  void SelectActiveLibrary( PART_LIB* aLibrary = NULL );
475 
483  void OnSaveActiveLibrary( wxCommandEvent& event );
484 
494  bool SaveActiveLibrary( bool newFile );
495 
502  bool LoadComponentFromCurrentLib( LIB_ALIAS* aLibEntry );
503 
512  bool LoadOneLibraryPartAux( LIB_ALIAS* aLibEntry, PART_LIB* aLibrary );
513 
518  void DisplayCmpDoc();
519 
524  void OnRotateItem( wxCommandEvent& aEvent );
525 
530  void OnOrient( wxCommandEvent& aEvent );
531 
537  void deleteItem( wxDC* aDC );
538 
539  // General editing
540 public:
547  void SaveCopyInUndoList( EDA_ITEM* ItemToCopy );
548 
549 private:
550  void GetComponentFromUndoList( wxCommandEvent& event );
551  void GetComponentFromRedoList( wxCommandEvent& event );
552 
553  // Editing pins
554  void CreatePin( wxDC* DC );
555  void StartMovePin( wxDC* DC );
556 
568  void CreateImagePins( LIB_PIN* aPin, int aUnit, int aConvert, bool aDeMorgan );
569 
577  void PlaceAnchor();
578 
579  // Editing graphic items
580  LIB_ITEM* CreateGraphicItem( LIB_PART* LibEntry, wxDC* DC );
581  void GraphicItemBeginDraw( wxDC* DC );
582  void StartMoveDrawSymbol( wxDC* DC );
583  void StartModifyDrawSymbol( wxDC* DC ); //<! Modify the item, adjust size etc.
584  void EndDrawGraphicItem( wxDC* DC );
585 
594  void LoadOneSymbol();
595 
603  void SaveOneSymbol();
604 
605  void EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem );
606  void EditSymbolText( wxDC* DC, LIB_ITEM* DrawItem );
607  LIB_ITEM* LocateItemUsingCursor( const wxPoint& aPosition,
608  const KICAD_T aFilterList[] = LIB_COLLECTOR::AllItems );
609  void EditField( LIB_FIELD* Field );
610 
611  void refreshSchematic();
612 
613 public:
622  bool LoadComponentAndSelectLib( LIB_ALIAS* aLibEntry, PART_LIB* aLibrary );
623 
624  /* Block commands: */
625 
631  virtual int BlockCommand( EDA_KEY aKey ) override;
632 
637  virtual void HandleBlockPlace( wxDC* DC ) override;
638 
645  virtual bool HandleBlockEnd( wxDC* DC ) override;
646 
652  void PlacePin();
653 
668  void GlobalSetPins( LIB_PIN* aMasterPin, int aId );
669 
670  // Automatic placement of pins
671  void RepeatPinItem( wxDC* DC, LIB_PIN* Pin );
672 
679  void CreatePNGorJPEGFile( const wxString& aFileName, bool aFmt_jpeg );
680 
689  virtual void PrintPage( wxDC* aDC, LSET aPrintMask,
690  bool aPrintMirrorMode, void* aData = NULL ) override;
691 
697  void SVG_PlotComponent( const wxString& aFullFileName );
698 
699  DECLARE_EVENT_TABLE()
700 };
701 
702 #endif // LIBEDITFRM_H_
void OnViewEntryDoc(wxCommandEvent &event)
void SVG_PlotComponent(const wxString &aFullFileName)
Function SVG_PlotComponent 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.
static void EnsureActiveLibExists()
Function EnsureActiveLibExists must be called after the libraries are reloaded (for instance after lo...
void SaveOneSymbol()
Function SaveOneSymbol saves the current component to a symbol file.
Definition: symbedit.cpp:142
static double m_current_text_angle
Current text angle setting.
Definition: libeditframe.h:112
Part library alias object definition.
void InstallConfigFrame(wxCommandEvent &event)
void StartMovePin(wxDC *DC)
Prepare the displacement of a pin.
Definition: pinedit.cpp:327
int GetRepeatPinStep() const
Definition: libeditframe.h:178
bool OnHotKey(wxDC *aDC, int aHotKey, const wxPoint &aPosition, EDA_ITEM *aItem=NULL) override
PART_LIB * GetCurLib()
The current library being edited, or NULL if none.
virtual int BlockCommand(EDA_KEY aKey) override
Function BlockCommand returns the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to the aKey...
LIB_ITEM * GetDrawItem()
Definition: libeditframe.h:399
static int m_convert
Definition: libeditframe.h:99
void OnExportPart(wxCommandEvent &event)
Function OnExportPart creates a new library and backup the current component in this library or expor...
Definition: lib_export.cpp:104
void RestoreComponent()
Function RestoreComponent Restore the current edited component from its temporary copy...
void SetConvert(int convert)
Definition: libeditframe.h:386
bool SaveActiveLibrary(bool newFile)
Function SaveActiveLibrary saves the changes to the current library.
Definition: libedit.cpp:302
static LIB_ITEM * m_drawItem
Definition: libeditframe.h:91
void ClearTempCopyComponent()
Function 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)
Function OnSaveActiveLibrary it the command event handler to save the changes to the current library...
Definition: libedit.cpp:291
void OnEditPin(wxCommandEvent &event)
Definition: pinedit.cpp:95
void SetRepeatPinStep(int aStep)
Sets the repeat step value for pins repeat command.
Definition: libeditframe.h:185
Class LIB_FIELD is used in symbol libraries.
Definition: lib_field.h:60
virtual void OnActivate(wxActivateEvent &event) override
Function OnActivate is 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:168
void OnUpdateUndo(wxUpdateUIEvent &event)
bool LoadOneLibraryPartAux(LIB_ALIAS *aLibEntry, PART_LIB *aLibrary)
Function LoadOneLibraryPartAux loads a copy of aLibEntry from aLibrary into memory.
Definition: libedit.cpp:192
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)
Function GlobalSetPins.
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()
Function OnModify Must be called after a schematic change in order to set the "modify" flag of the cu...
Definition: libeditframe.h:369
void OnSelectBodyStyle(wxCommandEvent &event)
void OnUpdateDeMorganNormal(wxUpdateUIEvent &event)
void LoadOneSymbol()
Function LoadOneSymbol read a component symbol file (*.sym ) and add graphic items to the current com...
Definition: symbedit.cpp:46
Schematic editor (Eeschema) main window.
Definition: schframe.h:117
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
void CloseWindow(wxCommandEvent &event)
Function CloseWindow triggers the wxCloseEvent, which is handled by the function given to EVT_CLOSE()...
Definition: libeditframe.h:358
void OnUpdateDeMorganConvert(wxUpdateUIEvent &event)
bool LoadComponentAndSelectLib(LIB_ALIAS *aLibEntry, PART_LIB *aLibrary)
Function LoadComponentAndSelectLib selects the current active library.
Definition: libedit.cpp:80
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
void UpdateAliasSelectList()
void SelectActiveLibrary(PART_LIB *aLibrary=NULL)
Function SelectActiveLibrary sets the current active library to aLibrary.
Definition: libedit.cpp:66
LIB_PART * m_my_part
a part I own, it is not in any library, but a copy could be.
Definition: libeditframe.h:53
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:90
virtual bool HandleBlockEnd(wxDC *DC) override
Function HandleBlockEnd performs a block end command.
void CreateImagePins(LIB_PIN *aPin, int aUnit, int aConvert, bool aDeMorgan)
Function CreateImagePins adds copies of aPin for aUnit in components with multiple parts and aConvert...
Definition: pinedit.cpp:491
Class LIB_ITEM is the base class for drawable items used by schematic library components.
Definition: lib_draw_item.h:77
void RepeatPinItem(wxDC *DC, LIB_PIN *Pin)
Definition: pinedit.cpp:607
void SetShowDeMorgan(bool show)
Definition: libeditframe.h:405
void OnOrient(wxCommandEvent &aEvent)
Function OnOrient Handles the ID_LIBEDIT_MIRROR_X and ID_LIBEDIT_MIRROR_Y events. ...
void DisplayLibInfos()
Function DisplayLibInfos updates the main window title bar with the current library name and read onl...
Definition: libedit.cpp:55
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:160
Class LSET is a set of PCB_LAYER_IDs.
void DeleteOnePart(wxCommandEvent &event)
Function DeleteOnePart is the command event handler to delete an entry from the current library...
Definition: libedit.cpp:505
FILL_T GetFillStyle()
Definition: libeditframe.h:411
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)
LIB_COLLECTOR m_collectedItems
Used for hit testing.
Definition: libeditframe.h:55
void LoadOneLibraryPart(wxCommandEvent &event)
Function LoadOneLibraryPart loads a library component from the currently selected library...
Definition: libedit.cpp:106
Definitions for the Eeschema program SCH_SCREEN class.
void OnUpdateSelectAlias(wxUpdateUIEvent &event)
void deleteItem(wxDC *aDC)
Function deleteItem 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:56
LIB_ITEM * locateItem(const wxPoint &aPosition, const KICAD_T aFilterList[])
void TempCopyComponent()
Function TempCopyComponent create a temporary copy of the current edited component Used to prepare an...
void GraphicItemBeginDraw(wxDC *DC)
Definition: symbdraw.cpp:241
Class LIB_PART defines a library part object.
void GetComponentFromRedoList(wxCommandEvent &event)
void OnPlotCurrentComponent(wxCommandEvent &event)
Function OnPlotCurrentComponent plot the current component 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:52
void SetLastDrawItem(LIB_ITEM *drawItem)
Definition: libeditframe.h:394
static int m_textPinNumDefaultSize
The default pin num text size setting.
Definition: libeditframe.h:115
static LIB_ITEM * m_lastDrawItem
Definition: libeditframe.h:90
void OnUpdatePinByPin(wxUpdateUIEvent &event)
static int m_textSize
The current text size setting.
Definition: libeditframe.h:109
virtual void PrintPage(wxDC *aDC, LSET aPrintMask, bool aPrintMirrorMode, void *aData=NULL) override
Virtual function PrintPage used to 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:82
void OnShowElectricalType(wxCommandEvent &event)
From Option toolbar: option to show the electrical pin type name.
void InstallFieldsEditorDialog(wxCommandEvent &event)
bool SaveOnePart(PART_LIB *aLib, bool aPromptUser=true)
Function SaveOnePart saves the current LIB_PART into the provided PART_LIB.
Definition: libedit.cpp:697
void StartModifyDrawSymbol(wxDC *DC)
Definition: symbdraw.cpp:312
void CreateNewLibraryPart(wxCommandEvent &event)
Function CreateNewLibraryPart is the command event handler to create a new library component...
Definition: libedit.cpp:599
void CreatePin(wxDC *DC)
Definition: pinedit.cpp:424
void OnRotateItem(wxCommandEvent &aEvent)
Function OnRotateItem rotates the current item.
void Process_Special_Functions(wxCommandEvent &event)
void CreateOptionToolbar()
Definition: tool_lib.cpp:224
void DisplayCmpDoc()
Function DisplayCmpDoc displays the documentation of the selected component.
Definition: libedit.cpp:455
LIB_PART * GetTempCopyComponent()
Function GetTempCopyComponent.
Definition: libeditframe.h:431
void SetShowElectricalType(bool aShow)
Definition: libeditframe.h:409
static int m_textPinNameDefaultSize
The default pin name text size setting.
Definition: libeditframe.h:118
void EditSymbolText(wxDC *DC, LIB_ITEM *DrawItem)
void PlacePin()
Function 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:374
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
LIB_ITEM * LocateItemUsingCursor(const wxPoint &aPosition, const KICAD_T aFilterList[]=LIB_COLLECTOR::AllItems)
void OnSaveCurrentPart(wxCommandEvent &aEvent)
PART_LIB * SetCurLib(PART_LIB *aLib)
Sets the current library and return the old.
The component library editor main window.
Definition: libeditframe.h:51
LIB_ITEM * CreateGraphicItem(LIB_PART *LibEntry, wxDC *DC)
Definition: symbdraw.cpp:151
void ReCreateHToolbar() override
Definition: tool_lib.cpp:102
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:92
bool GetShowDeMorgan()
Definition: libeditframe.h:403
static int m_unit
Definition: libeditframe.h:95
static int GetPinNameDefaultSize()
Definition: libeditframe.h:164
void SetCurPart(LIB_PART *aPart)
Function SetCurPart takes ownership over aPart and notes that it is the one currently being edited...
void OnSelectAlias(wxCommandEvent &event)
void RedrawComponent(wxDC *aDC, wxPoint aOffset)
Function RedrawComponent Redraw the current component loaded in library editor Display reference like...
Definition: libedit.cpp:241
void OnUpdateNotEditingPart(wxUpdateUIEvent &event)
virtual void HandleBlockPlace(wxDC *DC) override
Function HandleBlockPlace handles the block place command.
LIB_ITEM * GetLastDrawItem()
Definition: libeditframe.h:392
static FILL_T m_drawFillStyle
The current draw or edit graphic item fill style.
Definition: libeditframe.h:85
void EndDrawGraphicItem(wxDC *DC)
Definition: symbdraw.cpp:339
void OnLeftDClick(wxDC *DC, const wxPoint &MousePos) override
LIB_PART * GetCurPart()
Function GetCurPart returns the current part being edited, or NULL if none selected.
static int m_defaultPinLength
Default pin length.
Definition: libeditframe.h:121
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:151
bool LoadComponentFromCurrentLib(LIB_ALIAS *aLibEntry)
Function LoadComponentFromCurrentLib loads a component from the current active library.
Definition: libedit.cpp:91
void CreatePNGorJPEGFile(const wxString &aFileName, bool aFmt_jpeg)
Function CreatePNGorJPEGFile creates an image (screenshot) of the current component in PNG or JPEG fo...
int m_repeatPinStep
Default repeat offset for pins in repeat place pin.
Definition: libeditframe.h:124
FILL_T
Enum FILL_T is the set of fill types used in plotting or drawing enclosed areas.
Definition: base_struct.h:56
bool SynchronizePins()
Function SycnronizePins.
void OnUpdateElectricalType(wxUpdateUIEvent &aEvent)
bool IsEditingDrawItem()
Definition: libeditframe.h:439
void EditField(LIB_FIELD *Field)
Definition: libfield.cpp:39
static int m_drawLineWidth
Default line width for drawing or editing graphic items.
Definition: libeditframe.h:88
bool m_drawSpecificConvert
Convert of the item currently being drawn.
Definition: libeditframe.h:60
void PlaceAnchor()
Function PlaceAnchor places an anchor reference coordinate for the current component.
Definition: symbedit.cpp:251
static bool m_showDeMorgan
Definition: libeditframe.h:106
static void SetDefaultPinLength(int aLength)
Set the default pin len.
Definition: libeditframe.h:172
bool m_drawSpecificUnit
Specify which component parts the current draw item applies to.
Definition: libeditframe.h:68
void RedrawActiveWindow(wxDC *DC, bool EraseBg) override
Function RedrawActiveWindow Redraw the current component loaded in library editor, an axes Display reference like in schematic (a reference U is shown U? or U?A) update status bar and info shown in the bottom of the window.
Definition: libedit.cpp:263
void OnSelectPart(wxCommandEvent &event)
void GetComponentFromUndoList(wxCommandEvent &event)
Class SCH_BASE_FRAME is a shim class between EDA_DRAW_FRAME and several derived classes: LIB_EDIT_FRA...
Class PART_LIB is used to load, save, search, and otherwise manipulate part library files...
bool m_editPinsPerPartOrConvert
Set to true to not synchronize pins at the same position when editing components with multiple parts ...
Definition: libeditframe.h:77
void UpdatePartSelectList()
void StartMoveDrawSymbol(wxDC *DC)
Definition: symbdraw.cpp:291
static wxSize m_clientSize
Definition: libeditframe.h:126
bool GetShowElectricalType()
Definition: libeditframe.h:407
wxComboBox * m_aliasSelectBox
a box to select the alias to edit (if any)
Definition: libeditframe.h:57
void SetUnit(int unit)
Definition: libeditframe.h:378
LIB_PART * m_tempCopyComponent
temp copy of a part during edit, I own it here.
Definition: libeditframe.h:54
void SaveCopyInUndoList(EDA_ITEM *ItemToCopy)
Function SaveCopyInUndoList.
void ReCreateVToolbar() override
Definition: tool_lib.cpp:53