KiCad PCB EDA Suite
Loading...
Searching...
No Matches
bitmap2cmp_control.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20
21#ifndef BITMAP2CMP_CONTROL_H
22#define BITMAP2CMP_CONTROL_H
23
25
27
28
32class BITMAP2CMP_CONTROL : public wxEvtHandler, public TOOL_INTERACTIVE
33{
34public:
36 TOOL_INTERACTIVE( "bitmap2cmp.Control" ),
37 m_frame( nullptr )
38 { }
39
40 virtual ~BITMAP2CMP_CONTROL() { }
41
43 bool Init() override;
44
46 void Reset( RESET_REASON aReason ) override;
47
48 int Open( const TOOL_EVENT& aEvent );
49 int Close( const TOOL_EVENT& aEvent );
50
51private:
53 void setTransitions() override;
54
55private:
57};
58
59
60#endif // BITMAP2CMP_CONTROL_H
int Close(const TOOL_EVENT &aEvent)
int Open(const TOOL_EVENT &aEvent)
BITMAP2CMP_FRAME * m_frame
void setTransitions() override
< Set up handlers for various events.
bool Init() override
Init() is called once upon a registration of the tool.
RESET_REASON
Determine the reason of reset for a tool.
Definition tool_base.h:74
Generic, UI-independent tool event.
Definition tool_event.h:167
TOOL_INTERACTIVE(TOOL_ID aId, const std::string &aName)
Create a tool with given id & name.
void Reset() override