KiCad PCB EDA Suite
Loading...
Searching...
No Matches
bitmap2cmp_control.cpp
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#include <kiway.h>
21#include <tool/tool_manager.h>
22#include <tool/actions.h>
23#include <bitmap2cmp_frame.h>
24#include <bitmap2cmp_control.h>
25
26
28{
30 return true;
31}
32
33
38
39
41{
42 m_frame->OnLoadFile();
43 return 0;
44}
45
46
static TOOL_ACTION open
Definition actions.h:53
int Open(const TOOL_EVENT &aEvent)
BITMAP2CMP_FRAME * m_frame
void setTransitions() override
< Set up handlers for various events.
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
bool Init() override
Init() is called once upon a registration of the tool.
T * getEditFrame() const
Return the application window object, casted to requested user type.
Definition tool_base.h:182
RESET_REASON
Determine the reason of reset for a tool.
Definition tool_base.h:74
@ MODEL_RELOAD
Model changes (the sheet for a schematic)
Definition tool_base.h:76
Generic, UI-independent tool event.
Definition tool_event.h:167
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
void Reset() override