KiCad PCB EDA Suite
hierarch.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) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 2004-2019 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 
27 #ifndef HIERARCH_H
28 #define HIERARCH_H
29 
30 #include <dialog_shim.h>
31 #include <wx/imaglist.h>
32 #include <wx/treectrl.h>
33 
34 // The window name of the hierarchy navigator, used to find it
35 #define HIERARCHY_NAVIG_DLG_WNAME "hierarchy_navig_dlg"
36 
37 class SCH_EDIT_FRAME;
38 class SCH_SHEET_PATH;
39 
41 
45 class HIERARCHY_TREE : public wxTreeCtrl
46 {
47 private:
49  wxImageList* imageList;
50 
51 public:
53 
54  // Closes the dialog on escape key
55  void onChar( wxKeyEvent& event );
56 };
57 
59 {
60 private:
66 
67 public:
69 
71 
72  void OnCloseNav( wxCloseEvent& event );
73 
77  void UpdateHierarchyTree();
78 
79 private:
87  void buildHierarchyTree( SCH_SHEET_PATH* aList, wxTreeItemId* aPreviousmenu );
88 
93  void onSelectSheetPath( wxTreeEvent& event );
94 };
95 
96 #endif // HIERARCH_H
void onSelectSheetPath(wxTreeEvent &event)
Open the selected sheet and display the corresponding screen when a tree item is selected.
Definition: hierarch.cpp:205
wxImageList * imageList
Definition: hierarch.h:49
HIERARCHY_TREE * m_Tree
Definition: hierarch.h:64
Schematic editor (Eeschema) main window.
Handle hierarchy tree control.
Definition: hierarch.h:45
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
SCH_EDIT_FRAME * m_SchFrameEditor
Definition: hierarch.h:63
SCH_SHEET_PATH m_currSheet
Definition: hierarch.h:61
void UpdateHierarchyTree()
Update the hierarchical tree of the schematic.
Definition: hierarch.cpp:191
void onChar(wxKeyEvent &event)
Definition: hierarch.cpp:151
HIERARCHY_NAVIG_DLG(SCH_EDIT_FRAME *aParent)
Definition: hierarch.cpp:84
SCH_SHEET_PATH.
HIERARCHY_TREE(HIERARCHY_NAVIG_DLG *parent)
Definition: hierarch.cpp:67
void buildHierarchyTree(SCH_SHEET_PATH *aList, wxTreeItemId *aPreviousmenu)
Create the hierarchical tree of the schematic.
Definition: hierarch.cpp:160
SCH_SHEET_PATH m_list
Definition: hierarch.h:62
HIERARCHY_NAVIG_DLG * m_parent
Definition: hierarch.h:48
void OnCloseNav(wxCloseEvent &event)
Definition: hierarch.cpp:223