KiCad PCB EDA Suite
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 #ifndef DIALOG_LIB_SYMBOL_PROPERTIES_H
26 #define DIALOG_LIB_SYMBOL_PROPERTIES_H
27 
28 #include <fields_grid_table.h>
29 #include <widgets/unit_binder.h>
31 
32 
33 class SYMBOL_EDIT_FRAME;
34 class LIB_SYMBOL;
35 class WX_GRID;
36 
37 
39 {
40 public:
43 
44 protected:
45  bool TransferDataToWindow() override;
46  bool TransferDataFromWindow() override;
47 
48  bool Validate() override;
49 
50  virtual void onPowerCheckBox( wxCommandEvent& aEvent ) override;
51 
52 private:
53  void OnAddField( wxCommandEvent& event ) override;
54  void OnDeleteField( wxCommandEvent& event ) override;
55  void OnMoveUp( wxCommandEvent& event ) override;
56  void OnMoveDown( wxCommandEvent& event ) override;
57  void OnSymbolNameKillFocus( wxFocusEvent& event ) override;
58  void OnSymbolNameText( wxCommandEvent& event ) override;
59  void OnAddFootprintFilter( wxCommandEvent& event ) override;
60  void OnDeleteFootprintFilter( wxCommandEvent& event ) override;
61  void OnEditFootprintFilter( wxCommandEvent& event ) override;
62  void OnSizeGrid( wxSizeEvent& event ) override;
63  void OnGridCellChanging( wxGridEvent& event );
64  void OnEditSpiceModel( wxCommandEvent& event ) override;
65  void OnUpdateUI( wxUpdateUIEvent& event ) override;
66  void OnFilterDClick( wxMouseEvent& event ) override;
67  void OnCancelButtonClick( wxCommandEvent& event ) override;
68 
69  void adjustGridColumns( int aWidth );
70  void syncControlStates( bool aIsAlias );
71 
72 public:
75 
77 
79 
80  wxControl* m_delayedFocusCtrl;
86 
87  wxString m_shownColumns;
88  int m_width;
89 
90 private:
91  static int m_lastOpenedPage; // To remember the last notebook selection
92 
93  enum LAST_LAYOUT {
97  };
98 
100 };
101 
102 #endif // DIALOG_LIB_SYMBOL_PROPERTIES_H
virtual void onPowerCheckBox(wxCommandEvent &aEvent) override
void OnEditSpiceModel(wxCommandEvent &event) override
Define a library symbol object.
Definition: lib_symbol.h:96
void OnMoveUp(wxCommandEvent &event) override
void OnCancelButtonClick(wxCommandEvent &event) override
void OnEditFootprintFilter(wxCommandEvent &event) override
void OnAddField(wxCommandEvent &event) override
void OnDeleteFootprintFilter(wxCommandEvent &event) override
void OnSizeGrid(wxSizeEvent &event) override
void OnUpdateUI(wxUpdateUIEvent &event) override
void OnSymbolNameText(wxCommandEvent &event) override
void OnMoveDown(wxCommandEvent &event) override
void OnDeleteField(wxCommandEvent &event) override
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields
Class DIALOG_LIB_SYMBOL_PROPERTIES_BASE.
void OnAddFootprintFilter(wxCommandEvent &event) override
void OnSymbolNameKillFocus(wxFocusEvent &event) override
DIALOG_LIB_SYMBOL_PROPERTIES(SYMBOL_EDIT_FRAME *parent, LIB_SYMBOL *aLibEntry)
The symbol library editor main window.
void OnFilterDClick(wxMouseEvent &event) override