KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_lib_symbol_properties.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) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24
25#pragma once
26
27#include <memory>
28
29#include <fields_grid_table.h>
30#include <widgets/unit_binder.h>
32
33
35class LIB_SYMBOL;
36class LISTBOX_TRICKS;
38class WX_GRID;
39
40
42{
43public:
46
47protected:
48 bool TransferDataToWindow() override;
49 bool TransferDataFromWindow() override;
50
51 bool Validate() override;
52
53 void onPowerCheckBox( wxCommandEvent& aEvent ) override;
54 void OnText( wxCommandEvent& event ) override;
55 void OnCombobox( wxCommandEvent& event ) override;
56 void OnCheckBox( wxCommandEvent& event ) override;
57 void OnSpinCtrl( wxSpinEvent& event ) override;
58 void OnSpinCtrlText( wxCommandEvent& event ) override;
59
60private:
61 void OnAddField( wxCommandEvent& event ) override;
62 void OnDeleteField( wxCommandEvent& event ) override;
63 void OnMoveUp( wxCommandEvent& event ) override;
64 void OnMoveDown( wxCommandEvent& event ) override;
65 void OnSymbolNameKillFocus( wxFocusEvent& event ) override;
66 void OnSymbolNameText( wxCommandEvent& event ) override;
67 void OnAddFootprintFilter( wxCommandEvent& event ) override;
68 void OnEditFootprintFilter( wxCommandEvent& event ) override;
69 void OnSizeGrid( wxSizeEvent& event ) override;
70 void OnGridCellChanging( wxGridEvent& event );
71 void OnEditSpiceModel( wxCommandEvent& event ) override;
72 void OnUpdateUI( wxUpdateUIEvent& event ) override;
73 void OnCancelButtonClick( wxCommandEvent& event ) override;
74 void OnPageChanging( wxNotebookEvent& event ) override;
75 void OnFpFilterDClick( wxMouseEvent& event ) override;
76
77 void adjustGridColumns();
78 void syncControlStates( bool aIsAlias );
79
80public:
83
85 std::set<wxString> m_addedTemplateFields;
86
88
95
96 std::bitset<64> m_shownColumns;
97 wxSize m_size;
98
100
101private:
102 static int m_lastOpenedPage; // To remember the last notebook selection
103
104 enum class LAST_LAYOUT {
105 NONE,
106 ALIAS,
107 PARENT
108 };
109
111
112 std::unique_ptr<LISTBOX_TRICKS> m_fpFilterTricks;
113};
Class DIALOG_LIB_SYMBOL_PROPERTIES_BASE.
void OnSymbolNameKillFocus(wxFocusEvent &event) override
std::unique_ptr< LISTBOX_TRICKS > m_fpFilterTricks
void OnPageChanging(wxNotebookEvent &event) override
void OnSpinCtrlText(wxCommandEvent &event) override
void OnSizeGrid(wxSizeEvent &event) override
void OnUpdateUI(wxUpdateUIEvent &event) override
void OnCancelButtonClick(wxCommandEvent &event) override
void OnEditFootprintFilter(wxCommandEvent &event) override
void OnDeleteField(wxCommandEvent &event) override
void OnCombobox(wxCommandEvent &event) override
void OnFpFilterDClick(wxMouseEvent &event) override
void OnMoveUp(wxCommandEvent &event) override
void OnText(wxCommandEvent &event) override
void OnMoveDown(wxCommandEvent &event) override
void OnAddFootprintFilter(wxCommandEvent &event) override
void OnCheckBox(wxCommandEvent &event) override
void OnSymbolNameText(wxCommandEvent &event) override
void onPowerCheckBox(wxCommandEvent &aEvent) override
void OnAddField(wxCommandEvent &event) override
void OnEditSpiceModel(wxCommandEvent &event) override
void OnSpinCtrl(wxSpinEvent &event) override
Define a library symbol object.
Definition: lib_symbol.h:78
The symbol library editor main window.