KiCad PCB EDA Suite
Loading...
Searching...
No Matches
cvpcb_fpviewer_selection_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) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by the
8
* Free Software Foundation, either version 3 of the License, or (at your
9
* option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL_H_
21
#define CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL_H_
22
23
#include <
display_footprints_frame.h
>
24
25
#include <
tool/action_menu.h
>
26
#include <
tool/selection.h
>
27
#include <
tool/tool_interactive.h
>
28
#include <
tool/tool_menu.h
>
29
30
34
class
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL
:
public
TOOL_INTERACTIVE
35
{
36
public
:
37
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL
();
38
~CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL
() {}
39
41
bool
Init
()
override
;
42
44
void
Reset
(
RESET_REASON
aReason )
override
;
45
49
int
Main
(
const
TOOL_EVENT
& aEvent );
50
54
SELECTION
&
GetSelection
()
55
{
56
return
m_selection
;
57
}
58
59
void
clearSelection
() {}
60
66
int
UpdateMenu
(
const
TOOL_EVENT
& aEvent );
67
69
void
setTransitions
()
override
;
70
71
private
:
73
DISPLAY_FOOTPRINTS_FRAME
*
m_frame
;
74
76
SELECTION
m_selection
;
77
};
78
79
#endif
action_menu.h
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL
Selection tool for the footprint viewer in cvpcb.
Definition:
cvpcb_fpviewer_selection_tool.h:35
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL()
Definition:
cvpcb_fpviewer_selection_tool.cpp:29
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::m_frame
DISPLAY_FOOTPRINTS_FRAME * m_frame
Pointer to the parent frame.
Definition:
cvpcb_fpviewer_selection_tool.h:73
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::setTransitions
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
Definition:
cvpcb_fpviewer_selection_tool.cpp:98
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::~CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL
~CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL()
Definition:
cvpcb_fpviewer_selection_tool.h:38
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init
bool Init() override
Init() is called once upon a registration of the tool.
Definition:
cvpcb_fpviewer_selection_tool.cpp:36
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::m_selection
SELECTION m_selection
Current state of selection (not really used: no selection in display footprints frame).
Definition:
cvpcb_fpviewer_selection_tool.h:76
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::UpdateMenu
int UpdateMenu(const TOOL_EVENT &aEvent)
Update the menu to reflect the current tool states.
Definition:
cvpcb_fpviewer_selection_tool.cpp:83
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main
int Main(const TOOL_EVENT &aEvent)
The main loop.
Definition:
cvpcb_fpviewer_selection_tool.cpp:49
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::clearSelection
void clearSelection()
Definition:
cvpcb_fpviewer_selection_tool.h:59
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::GetSelection
SELECTION & GetSelection()
Selections aren't currently supported in the footprint viewer.
Definition:
cvpcb_fpviewer_selection_tool.h:54
DISPLAY_FOOTPRINTS_FRAME
Display footprints.
Definition:
display_footprints_frame.h:45
SELECTION
Definition:
selection.h:39
TOOL_BASE::RESET_REASON
RESET_REASON
Determine the reason of reset for a tool.
Definition:
tool_base.h:78
TOOL_EVENT
Generic, UI-independent tool event.
Definition:
tool_event.h:167
TOOL_INTERACTIVE
Definition:
tool_interactive.h:57
display_footprints_frame.h
Reset
void Reset() override
selection.h
tool_interactive.h
tool_menu.h
src
cvpcb
tools
cvpcb_fpviewer_selection_tool.h
Generated on Thu Dec 26 2024 00:05:06 for KiCad PCB EDA Suite by
1.9.6