KiCad PCB EDA Suite
dialog_edit_component_in_lib.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-2019 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_EDIT_COMPONENT_IN_LIB_H_
26 #define _DIALOG_EDIT_COMPONENT_IN_LIB_H_
27 
28 #include <fields_grid_table.h>
29 #include <widgets/unit_binder.h>
31 
32 
33 class LIB_EDIT_FRAME;
34 class LIB_PART;
35 class WX_GRID;
36 
37 
39 {
40  static int m_lastOpenedPage; // To remember the last notebook selection
41 
42  enum LAST_LAYOUT {
46  };
47 
49 
50 public:
53 
55 
57 
58  wxControl* m_delayedFocusCtrl;
64 
65  wxString m_shownColumns;
66  int m_width;
67 
68  bool TransferDataToWindow() override;
69  bool TransferDataFromWindow() override;
70 
71  bool Validate() override;
72 
73 public:
77 
78 private:
80 
81  void OnAddField( wxCommandEvent& event ) override;
82  void OnDeleteField( wxCommandEvent& event ) override;
83  void OnMoveUp( wxCommandEvent& event ) override;
84  void OnMoveDown( wxCommandEvent& event ) override;
85  void OnSymbolNameKillFocus( wxFocusEvent& event ) override;
86  void OnSymbolNameText( wxCommandEvent& event ) override;
87  void OnAddFootprintFilter( wxCommandEvent& event ) override;
88  void OnDeleteFootprintFilter( wxCommandEvent& event ) override;
89  void OnEditFootprintFilter( wxCommandEvent& event ) override;
90  void OnSizeGrid( wxSizeEvent& event ) override;
91  void OnGridCellChanging( wxGridEvent& event );
92  void OnEditSpiceModel( wxCommandEvent& event ) override;
93  void OnUpdateUI( wxUpdateUIEvent& event ) override;
94  void OnFilterDClick( wxMouseEvent& event ) override;
95  void OnCancelButtonClick( wxCommandEvent& event ) override;
96 
97  void adjustGridColumns( int aWidth );
98  void syncControlStates( bool aIsAlias );
99 };
100 
101 #endif // _DIALOG_EDIT_COMPONENT_IN_LIB_H_
void OnAddFootprintFilter(wxCommandEvent &event) override
void OnUpdateUI(wxUpdateUIEvent &event) override
void OnEditFootprintFilter(wxCommandEvent &event) override
void OnSizeGrid(wxSizeEvent &event) override
void OnSymbolNameText(wxCommandEvent &event) override
void OnCancelButtonClick(wxCommandEvent &event) override
void OnDeleteFootprintFilter(wxCommandEvent &event) override
void OnMoveUp(wxCommandEvent &event) override
DIALOG_EDIT_COMPONENT_IN_LIBRARY(LIB_EDIT_FRAME *parent, LIB_PART *aLibEntry)
Constructors.
void OnFilterDClick(wxMouseEvent &event) override
void OnDeleteField(wxCommandEvent &event) override
Define a library symbol object.
void OnSymbolNameKillFocus(wxFocusEvent &event) override
void OnMoveDown(wxCommandEvent &event) override
The symbol library editor main window.
Class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE.
void OnEditSpiceModel(wxCommandEvent &event) override
void OnAddField(wxCommandEvent &event) override
FIELDS_GRID_TABLE< LIB_FIELD > * m_fields