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
();
44
// hierarchy changes.
45
void
CleanHistory
();
46
48
int
ChangeSheet
(
const
TOOL_EVENT
& aEvent );
50
int
EnterSheet
(
const
TOOL_EVENT
& aEvent );
52
int
LeaveSheet
(
const
TOOL_EVENT
& aEvent );
54
int
Up
(
const
TOOL_EVENT
& aEvent );
56
int
Forward
(
const
TOOL_EVENT
& aEvent );
58
int
Back
(
const
TOOL_EVENT
& aEvent );
60
int
Previous
(
const
TOOL_EVENT
& aEvent );
62
int
Next
(
const
TOOL_EVENT
& aEvent );
63
64
void
HypertextCommand
(
const
wxString& aHref );
65
66
bool
CanGoBack
();
67
bool
CanGoForward
();
68
bool
CanGoUp
();
69
bool
CanGoPrevious
();
70
bool
CanGoNext
();
71
72
public
:
73
static
wxString
g_BackLink
;
74
75
private
:
77
void
setTransitions
()
override
;
79
void
pushToHistory
(
const
SCH_SHEET_PATH
& aPath );
81
void
changeSheet
(
const
SCH_SHEET_PATH
& aPath );
82
83
private
:
84
std::list<SCH_SHEET_PATH>
m_navHistory
;
85
std::list<SCH_SHEET_PATH>::iterator
m_navIndex
;
86
};
87
88
89
#endif
// SCH_NAVIGATE_TOOL_H
SCH_EDIT_FRAME
Schematic editor (Eeschema) main window.
Definition
sch_edit_frame.h:131
SCH_NAVIGATE_TOOL::~SCH_NAVIGATE_TOOL
~SCH_NAVIGATE_TOOL()
Reset navigation history. Must be done when schematic changes.
Definition
sch_navigate_tool.h:39
SCH_NAVIGATE_TOOL::ResetHistory
void ResetHistory()
Remove deleted pages from history. Must be done when schematic.
Definition
sch_navigate_tool.cpp:32
SCH_NAVIGATE_TOOL::CleanHistory
void CleanHistory()
Enter sheet provided in aEvent.
Definition
sch_navigate_tool.cpp:40
SCH_NAVIGATE_TOOL::Back
int Back(const TOOL_EVENT &aEvent)
Navigate to previous sheet by numeric sheet number.
Definition
sch_navigate_tool.cpp:138
SCH_NAVIGATE_TOOL::Previous
int Previous(const TOOL_EVENT &aEvent)
Navigate to next sheet by numeric sheet number.
Definition
sch_navigate_tool.cpp:159
SCH_NAVIGATE_TOOL::Next
int Next(const TOOL_EVENT &aEvent)
Definition
sch_navigate_tool.cpp:175
SCH_NAVIGATE_TOOL::m_navIndex
std::list< SCH_SHEET_PATH >::iterator m_navIndex
Definition
sch_navigate_tool.h:85
SCH_NAVIGATE_TOOL::changeSheet
void changeSheet(const SCH_SHEET_PATH &aPath)
Definition
sch_navigate_tool.cpp:306
SCH_NAVIGATE_TOOL::ChangeSheet
int ChangeSheet(const TOOL_EVENT &aEvent)
Enter selected sheet.
Definition
sch_navigate_tool.cpp:233
SCH_NAVIGATE_TOOL::Forward
int Forward(const TOOL_EVENT &aEvent)
Navigate back in sheet history.
Definition
sch_navigate_tool.cpp:117
SCH_NAVIGATE_TOOL::CanGoBack
bool CanGoBack()
Definition
sch_navigate_tool.cpp:191
SCH_NAVIGATE_TOOL::EnterSheet
int EnterSheet(const TOOL_EVENT &aEvent)
Return to parent sheet. Synonymous with Up.
Definition
sch_navigate_tool.cpp:244
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:73
SCH_NAVIGATE_TOOL::CanGoUp
bool CanGoUp()
Definition
sch_navigate_tool.cpp:203
SCH_NAVIGATE_TOOL::CanGoNext
bool CanGoNext()
Definition
sch_navigate_tool.cpp:223
SCH_NAVIGATE_TOOL::pushToHistory
void pushToHistory(const SCH_SHEET_PATH &aPath)
Change current sheet to aPath and handle history, zooming, etc.
Definition
sch_navigate_tool.cpp:294
SCH_NAVIGATE_TOOL::HypertextCommand
void HypertextCommand(const wxString &aHref)
Definition
sch_navigate_tool.cpp:74
SCH_NAVIGATE_TOOL::Up
int Up(const TOOL_EVENT &aEvent)
Navigate forward in sheet history.
Definition
sch_navigate_tool.cpp:109
SCH_NAVIGATE_TOOL::setTransitions
void setTransitions() override
< Set up handlers for various events.
Definition
sch_navigate_tool.cpp:279
SCH_NAVIGATE_TOOL::CanGoForward
bool CanGoForward()
Definition
sch_navigate_tool.cpp:197
SCH_NAVIGATE_TOOL::CanGoPrevious
bool CanGoPrevious()
Definition
sch_navigate_tool.cpp:217
SCH_NAVIGATE_TOOL::m_navHistory
std::list< SCH_SHEET_PATH > m_navHistory
Definition
sch_navigate_tool.h:84
SCH_NAVIGATE_TOOL::LeaveSheet
int LeaveSheet(const TOOL_EVENT &aEvent)
Navigate up in sheet hierarchy.
Definition
sch_navigate_tool.cpp:261
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:231
SCH_TOOL_BASE< SCH_EDIT_FRAME >::SCH_TOOL_BASE
SCH_TOOL_BASE(const std::string &aName)
Definition
sch_tool_base.h:54
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 Fri Jun 26 2026 00:05:36 for KiCad PCB EDA Suite by
1.13.2