KiCad PCB EDA Suite
Loading...
Searching...
No Matches
gerbview_inspection_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) 2017-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 GERBVIEW_INSPECTION_TOOL_H
21#define GERBVIEW_INSPECTION_TOOL_H
22
24#include <gerbview_frame.h>
25
26class TOOL_EVENT;
27
29{
30public:
33
35 bool Init() override;
36
38 void Reset( RESET_REASON aReason ) override;
39
41 int MeasureTool( const TOOL_EVENT& aEvent );
42
44 int ShowDCodes( const TOOL_EVENT& aEvent );
45
47 int ShowSource( const TOOL_EVENT& aEvent );
48
50 void setTransitions() override;
51
52private:
53 GERBVIEW_FRAME* m_frame; // Pointer to the parent frame.
54};
55
56#endif
bool Init() override
Init() is called once upon a registration of the tool.
int ShowSource(const TOOL_EVENT &aEvent)
Set up handlers for various events.
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int ShowDCodes(const TOOL_EVENT &aEvent)
Show the source for the gerber file.
int MeasureTool(const TOOL_EVENT &aEvent)
Show a list of the DCodes.
RESET_REASON
Determine the reason of reset for a tool.
Definition: tool_base.h:78
Generic, UI-independent tool event.
Definition: tool_event.h:167
void Reset() override