KiCad PCB EDA Suite
panel_sym_lib_table.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) 2017 Wayne Stambaugh <stambaughw@gmail.com>
5  * Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef PANEL_SYM_LIB_TABLE_H
22 #define PANEL_SYM_LIB_TABLE_H
23 
26 
27 class SYMBOL_LIB_TABLE;
29 
30 
35 {
36 
37 public:
39  SYMBOL_LIB_TABLE* aGlobal, const wxString& aGlobalTablePath,
40  SYMBOL_LIB_TABLE* aProject, const wxString& aProjectTablePath,
41  const wxString& m_projectBasePath );
42  virtual ~PANEL_SYM_LIB_TABLE();
43 
44 private:
50  bool verifyTables();
51 
52  void pageChangedHandler( wxAuiNotebookEvent& event ) override;
53  void browseLibrariesHandler( wxCommandEvent& event ) override;
54  void appendRowHandler( wxCommandEvent& event ) override;
55  void deleteRowHandler( wxCommandEvent& event ) override;
56  void moveUpHandler( wxCommandEvent& event ) override;
57  void moveDownHandler( wxCommandEvent& event ) override;
58  void onSizeGrid( wxSizeEvent& event ) override;
59  void adjustPathSubsGridColumns( int aWidth );
60 
61  bool TransferDataFromWindow() override;
62 
66 
67  // Caller's tables are modified only on OK button and successful verification.
71 
73 
75 
77 
79 
81  static size_t m_pageNdx;
82  wxString m_lastBrowseDir;
83 };
84 
85 
86 void InvokeSchEditSymbolLibTable( KIWAY* aKiway, wxWindow *aParent );
87 
88 
89 #endif // PANEL_SYM_LIB_TABLE_H
void moveUpHandler(wxCommandEvent &event) override
void pageChangedHandler(wxAuiNotebookEvent &event) override
PANEL_SYM_LIB_TABLE(DIALOG_EDIT_LIBRARY_TABLES *aParent, SYMBOL_LIB_TABLE *aGlobal, const wxString &aGlobalTablePath, SYMBOL_LIB_TABLE *aProject, const wxString &aProjectTablePath, const wxString &m_projectBasePath)
WX_GRID * m_cur_grid
changed based on tab choice
SYMBOL_LIB_TABLE_GRID * cur_model() const
static size_t m_pageNdx
Remember the last notebook page selected during a session.
SYMBOL_LIB_TABLE_GRID * global_model() const
void adjustPathSubsGridColumns(int aWidth)
void populateEnvironReadOnlyTable()
Populate the readonly environment variable table with names and values by examining all the full_uri ...
Build a wxGridTableBase by wrapping an SYMBOL_LIB_TABLE object.
SYMBOL_LIB_TABLE * m_projectTable
bool TransferDataFromWindow() override
Class PANEL_SYM_LIB_TABLE_BASE.
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:258
Dialog to show and edit symbol library tables.
void deleteRowHandler(wxCommandEvent &event) override
void appendRowHandler(wxCommandEvent &event) override
DIALOG_EDIT_LIBRARY_TABLES * m_parent
wxString m_lastBrowseDir
last browsed directory
SYMBOL_LIB_TABLE_GRID * project_model() const
bool verifyTables()
Trim important fields, removes blank row entries, and checks for duplicates.
void onSizeGrid(wxSizeEvent &event) override
SYMBOL_LIB_TABLE * m_globalTable
void InvokeSchEditSymbolLibTable(KIWAY *aKiway, wxWindow *aParent)
void moveDownHandler(wxCommandEvent &event) override
void browseLibrariesHandler(wxCommandEvent &event) override