KiCad PCB EDA Suite
dialog_edit_component_in_schematic.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_SCHEMATIC_H_
26 #define _DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_H_
27 
29 
30 #include <fields_grid_table.h>
31 
32 
33 class SCH_EDIT_FRAME;
34 class LIB_PART;
35 
36 
44 {
45 public:
48 
50 
51 private:
54 
55  int m_width;
58  wxString m_shownColumns;
59 
61 
62  bool TransferDataToWindow() override;
63  bool TransferDataFromWindow() override;
64 
65  bool Validate() override;
66 
67  // event handlers
68  void UpdateFieldsFromLibrary( wxCommandEvent& event ) override;
69  void OnAddField( wxCommandEvent& event ) override;
70  void OnDeleteField( wxCommandEvent& event ) override;
71  void OnMoveUp( wxCommandEvent& event ) override;
72  void OnMoveDown( wxCommandEvent& event ) override;
73  void OnBrowseLibrary( wxCommandEvent& event ) override;
74  void OnEditSpiceModel( wxCommandEvent& event ) override;
75  void OnSizeGrid( wxSizeEvent& event ) override;
76  void OnGridCellChanging( wxGridEvent& event );
77  void OnUpdateUI( wxUpdateUIEvent& event ) override;
78  void OnCancelButtonClick( wxCommandEvent& event ) override;
79  void OnInitDlg( wxInitDialogEvent& event ) override;
80 
81  void AdjustGridColumns( int aWidth );
82 };
83 
84 #endif // _DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_H_
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC(SCH_EDIT_FRAME *aParent, SCH_COMPONENT *aComponent)
void UpdateFieldsFromLibrary(wxCommandEvent &event) override
void OnMoveDown(wxCommandEvent &event) override
void OnAddField(wxCommandEvent &event) override
void OnEditSpiceModel(wxCommandEvent &event) override
void OnInitDlg(wxInitDialogEvent &event) override
void OnCancelButtonClick(wxCommandEvent &event) override
Schematic editor (Eeschema) main window.
void OnBrowseLibrary(wxCommandEvent &event) override
Define a library symbol object.
void OnDeleteField(wxCommandEvent &event) override
Class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE.
Dialog used to edit SCH_COMPONENT objects in a schematic.
SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:99
void OnUpdateUI(wxUpdateUIEvent &event) override