KiCad PCB EDA Suite
Loading...
Searching...
No Matches
symbol_editor_control.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) 2019 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21
22#pragma once
23
24#include <sch_base_frame.h>
25#include <tools/sch_tool_base.h>
26
28
32class SYMBOL_EDITOR_CONTROL : public wxEvtHandler, public SCH_TOOL_BASE<SCH_BASE_FRAME>
33{
34public:
36 SCH_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.SymbolLibraryControl" )
37 { }
38
40 bool Init() override;
41
42 int AddLibrary( const TOOL_EVENT& aEvent );
43 int AddSymbol( const TOOL_EVENT& aEvent );
44 int EditSymbol( const TOOL_EVENT& aEvent );
45 int EditLibrarySymbol( const TOOL_EVENT& aEvent );
46
47 int Save( const TOOL_EVENT& aEvt );
48 int Revert( const TOOL_EVENT& aEvent );
49
50 int CutCopyDelete( const TOOL_EVENT& aEvent );
51 int DuplicateSymbol( const TOOL_EVENT& aEvent );
52 int RenameSymbol( const TOOL_EVENT& newName );
53 int ExportSymbol( const TOOL_EVENT& aEvent );
54 int OpenDirectory( const TOOL_EVENT& aEvent );
55 int OpenWithTextEditor( const TOOL_EVENT& aEvent );
56 int ExportView( const TOOL_EVENT& aEvent );
57 int ExportSymbolAsSVG( const TOOL_EVENT& aEvent );
58 int AddSymbolToSchematic( const TOOL_EVENT& aEvent );
59
60 int FlattenSymbol( const TOOL_EVENT& aEvent );
61
62 int ShowElectricalTypes( const TOOL_EVENT& aEvent );
63 int ShowPinNumbers( const TOOL_EVENT& aEvent );
64 int ToggleProperties( const TOOL_EVENT& aEvent );
65 int ToggleSyncedPinsMode( const TOOL_EVENT& aEvent );
66
67 int ToggleHiddenPins( const TOOL_EVENT& aEvent );
68 int ToggleHiddenFields( const TOOL_EVENT& aEvent );
69 int TogglePinAltIcons( const TOOL_EVENT& aEvent );
70
71 int ChangeUnit( const TOOL_EVENT& aEvent );
72
73 int PreviousSymbol( const TOOL_EVENT& aEvent );
74 int NextSymbol( const TOOL_EVENT& aEvent );
75
76 int DdAddLibrary( const TOOL_EVENT& aEvent );
77
78 int ShowLibraryTable( const TOOL_EVENT& aEvent );
79
80 int NextTab( const TOOL_EVENT& aEvent );
81 int PrevTab( const TOOL_EVENT& aEvent );
82 int CloseTab( const TOOL_EVENT& aEvent );
83
85 int CompareLibraryWithFile( const TOOL_EVENT& aEvent );
86
87private:
89 void setTransitions() override;
90};
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
SCH_TOOL_BASE(const std::string &aName)
int PreviousSymbol(const TOOL_EVENT &aEvent)
int ToggleSyncedPinsMode(const TOOL_EVENT &aEvent)
int Save(const TOOL_EVENT &aEvt)
int PrevTab(const TOOL_EVENT &aEvent)
int EditSymbol(const TOOL_EVENT &aEvent)
int ExportView(const TOOL_EVENT &aEvent)
int ShowElectricalTypes(const TOOL_EVENT &aEvent)
int FlattenSymbol(const TOOL_EVENT &aEvent)
int OpenDirectory(const TOOL_EVENT &aEvent)
int RenameSymbol(const TOOL_EVENT &newName)
int DuplicateSymbol(const TOOL_EVENT &aEvent)
int ToggleHiddenPins(const TOOL_EVENT &aEvent)
int ShowLibraryTable(const TOOL_EVENT &aEvent)
int AddLibrary(const TOOL_EVENT &aEvent)
int AddSymbol(const TOOL_EVENT &aEvent)
int CloseTab(const TOOL_EVENT &aEvent)
int TogglePinAltIcons(const TOOL_EVENT &aEvent)
int ChangeUnit(const TOOL_EVENT &aEvent)
int Revert(const TOOL_EVENT &aEvent)
int ToggleHiddenFields(const TOOL_EVENT &aEvent)
int OpenWithTextEditor(const TOOL_EVENT &aEvent)
int ExportSymbol(const TOOL_EVENT &aEvent)
int NextTab(const TOOL_EVENT &aEvent)
int NextSymbol(const TOOL_EVENT &aEvent)
void setTransitions() override
< Set up handlers for various events.
int ToggleProperties(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
int EditLibrarySymbol(const TOOL_EVENT &aEvent)
int CompareLibraryWithFile(const TOOL_EVENT &aEvent)
Diff the currently-open symbol library against another .kicad_sym file.
int ExportSymbolAsSVG(const TOOL_EVENT &aEvent)
int ShowPinNumbers(const TOOL_EVENT &aEvent)
int DdAddLibrary(const TOOL_EVENT &aEvent)
int AddSymbolToSchematic(const TOOL_EVENT &aEvent)
int CutCopyDelete(const TOOL_EVENT &aEvent)
The symbol library editor main window.
Generic, UI-independent tool event.
Definition tool_event.h:167