KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_navigate_tool.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) 2019 CERN
5
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
*/
20
21
22
#ifndef SCH_NAVIGATE_TOOL_H
23
#define SCH_NAVIGATE_TOOL_H
24
25
#include <
sch_base_frame.h
>
26
#include <
tools/sch_tool_base.h
>
27
#include <
status_popup.h
>
28
29
class
SCH_EDIT_FRAME
;
30
34
class
SCH_NAVIGATE_TOOL
:
public
wxEvtHandler,
public
SCH_TOOL_BASE
<SCH_EDIT_FRAME>
35
{
36
public
:
37
SCH_NAVIGATE_TOOL
() :
SCH_TOOL_BASE
<
SCH_EDIT_FRAME
>(
"eeschema.NavigateTool"
) {}
38
39
~SCH_NAVIGATE_TOOL
() { }
40
42
void
ResetHistory
();
43
46
void
CleanHistory
();
47
49
int
ChangeSheet
(
const
TOOL_EVENT
& aEvent );
50
52
int
EnterSheet
(
const
TOOL_EVENT
& aEvent );
53
55
int
LeaveSheet
(
const
TOOL_EVENT
& aEvent );
56
58
int
Up
(
const
TOOL_EVENT
& aEvent );
59
61
int
Forward
(
const
TOOL_EVENT
& aEvent );
62
64
int
Back
(
const
TOOL_EVENT
& aEvent );
65
67
int
Previous
(
const
TOOL_EVENT
& aEvent );
68
70
int
Next
(
const
TOOL_EVENT
& aEvent );
71
72
void
HypertextCommand
(
const
wxString& aHref );
73
74
bool
CanGoBack
();
75
bool
CanGoForward
();
76
bool
CanGoUp
();
77
bool
CanGoPrevious
();
78
bool
CanGoNext
();
79
80
public
:
81
static
wxString
g_BackLink
;
82
83
private
:
85
void
setTransitions
()
override
;
86
88
void
pushToHistory
(
const
SCH_SHEET_PATH
& aPath );
89
91
void
changeSheet
(
const
SCH_SHEET_PATH
& aPath );
92
93
private
:
94
std::list<SCH_SHEET_PATH>
m_navHistory
;
95
std::list<SCH_SHEET_PATH>::iterator
m_navIndex
;
96
};
97
98
99
#endif
// SCH_NAVIGATE_TOOL_H
SCH_EDIT_FRAME
Schematic editor (Eeschema) main window.
Definition
sch_edit_frame.h:139
SCH_NAVIGATE_TOOL::~SCH_NAVIGATE_TOOL
~SCH_NAVIGATE_TOOL()
Definition
sch_navigate_tool.h:39
SCH_NAVIGATE_TOOL::ResetHistory
void ResetHistory()
Reset navigation history. Must be done when schematic changes.
Definition
sch_navigate_tool.cpp:35
SCH_NAVIGATE_TOOL::CleanHistory
void CleanHistory()
Remove deleted pages from history.
Definition
sch_navigate_tool.cpp:43
SCH_NAVIGATE_TOOL::Back
int Back(const TOOL_EVENT &aEvent)
Navigate back in sheet history.
Definition
sch_navigate_tool.cpp:141
SCH_NAVIGATE_TOOL::Previous
int Previous(const TOOL_EVENT &aEvent)
Navigate to previous sheet by numeric sheet number.
Definition
sch_navigate_tool.cpp:162
SCH_NAVIGATE_TOOL::Next
int Next(const TOOL_EVENT &aEvent)
Navigate to next sheet by numeric sheet number.
Definition
sch_navigate_tool.cpp:178
SCH_NAVIGATE_TOOL::m_navIndex
std::list< SCH_SHEET_PATH >::iterator m_navIndex
Definition
sch_navigate_tool.h:95
SCH_NAVIGATE_TOOL::changeSheet
void changeSheet(const SCH_SHEET_PATH &aPath)
Change current sheet to aPath and handle history, zooming, etc.
Definition
sch_navigate_tool.cpp:309
SCH_NAVIGATE_TOOL::ChangeSheet
int ChangeSheet(const TOOL_EVENT &aEvent)
Enter sheet provided in aEvent.
Definition
sch_navigate_tool.cpp:236
SCH_NAVIGATE_TOOL::Forward
int Forward(const TOOL_EVENT &aEvent)
Navigate forward in sheet history.
Definition
sch_navigate_tool.cpp:120
SCH_NAVIGATE_TOOL::CanGoBack
bool CanGoBack()
Definition
sch_navigate_tool.cpp:194
SCH_NAVIGATE_TOOL::EnterSheet
int EnterSheet(const TOOL_EVENT &aEvent)
Enter selected sheet.
Definition
sch_navigate_tool.cpp:247
SCH_NAVIGATE_TOOL::SCH_NAVIGATE_TOOL
SCH_NAVIGATE_TOOL()
Definition
sch_navigate_tool.h:37
SCH_NAVIGATE_TOOL::g_BackLink
static wxString g_BackLink
Definition
sch_navigate_tool.h:81
SCH_NAVIGATE_TOOL::CanGoUp
bool CanGoUp()
Definition
sch_navigate_tool.cpp:206
SCH_NAVIGATE_TOOL::CanGoNext
bool CanGoNext()
Definition
sch_navigate_tool.cpp:226
SCH_NAVIGATE_TOOL::pushToHistory
void pushToHistory(const SCH_SHEET_PATH &aPath)
Clear history after this nav index and pushes aPath to history.
Definition
sch_navigate_tool.cpp:297
SCH_NAVIGATE_TOOL::HypertextCommand
void HypertextCommand(const wxString &aHref)
Definition
sch_navigate_tool.cpp:77
SCH_NAVIGATE_TOOL::Up
int Up(const TOOL_EVENT &aEvent)
Navigate up in sheet hierarchy.
Definition
sch_navigate_tool.cpp:112
SCH_NAVIGATE_TOOL::setTransitions
void setTransitions() override
Set up handlers for various events.
Definition
sch_navigate_tool.cpp:282
SCH_NAVIGATE_TOOL::CanGoForward
bool CanGoForward()
Definition
sch_navigate_tool.cpp:200
SCH_NAVIGATE_TOOL::CanGoPrevious
bool CanGoPrevious()
Definition
sch_navigate_tool.cpp:220
SCH_NAVIGATE_TOOL::m_navHistory
std::list< SCH_SHEET_PATH > m_navHistory
Definition
sch_navigate_tool.h:94
SCH_NAVIGATE_TOOL::LeaveSheet
int LeaveSheet(const TOOL_EVENT &aEvent)
Return to parent sheet. Synonymous with Up.
Definition
sch_navigate_tool.cpp:264
SCH_SHEET_PATH
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Definition
sch_sheet_path.h:251
SCH_TOOL_BASE< SCH_EDIT_FRAME >::SCH_TOOL_BASE
SCH_TOOL_BASE(const std::string &aName)
Definition
sch_tool_base.cpp:44
TOOL_EVENT
Generic, UI-independent tool event.
Definition
tool_event.h:167
sch_base_frame.h
sch_tool_base.h
status_popup.h
src
eeschema
tools
sch_navigate_tool.h
Generated on Wed Oct 7 2026 00:05:58 for KiCad PCB EDA Suite by
1.13.2