KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
pcb_design_block_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, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24
25#ifndef PCB_DESIGN_BLOCK_CONTROL_H
26#define PCB_DESIGN_BLOCK_CONTROL_H
27
29
31class PCB_EDIT_FRAME;
32
37{
38public:
39 PCB_DESIGN_BLOCK_CONTROL() : DESIGN_BLOCK_CONTROL( "pcbnew.PcbDesignBlockControl" ) {}
41
43 bool Init() override;
44
45 int SaveBoardAsDesignBlock( const TOOL_EVENT& aEvent );
46 int SaveSelectionAsDesignBlock( const TOOL_EVENT& aEvent );
47
48 int SaveBoardToDesignBlock( const TOOL_EVENT& aEvent );
49 int SaveSelectionToDesignBlock( const TOOL_EVENT& aEvent );
50
51private:
54 void setTransitions() override;
55
57
59};
60
61
62#endif
Handle schematic design block actions in the schematic editor.
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
Handle design block actions in the PCB editor.
int SaveSelectionAsDesignBlock(const TOOL_EVENT &aEvent)
DESIGN_BLOCK_PANE * getDesignBlockPane() override
bool Init() override
Init() is called once upon a registration of the tool.
LIB_ID getSelectedLibId()
Set up handlers for various events.
int SaveBoardAsDesignBlock(const TOOL_EVENT &aEvent)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int SaveSelectionToDesignBlock(const TOOL_EVENT &aEvent)
int SaveBoardToDesignBlock(const TOOL_EVENT &aEvent)
The main frame for Pcbnew.
Generic, UI-independent tool event.
Definition: tool_event.h:168