KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pl_editor_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 (C) 2019 CERN
5 * Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25
26#ifndef PL_EDITOR_CONTROL_H
27#define PL_EDITOR_CONTROL_H
28
30
31class PL_EDITOR_FRAME;
32
33
37class PL_EDITOR_CONTROL : public wxEvtHandler, public TOOL_INTERACTIVE
38{
39public:
41 TOOL_INTERACTIVE( "plEditor.EditorControl" ),
42 m_frame( nullptr )
43 { }
44
46
48 bool Init() override;
49
51 void Reset( RESET_REASON aReason ) override;
52
53 int New( const TOOL_EVENT& aEvent );
54 int Open( const TOOL_EVENT& aEvent );
55 int Save( const TOOL_EVENT& aEvent );
56 int SaveAs( const TOOL_EVENT& aEvent );
57 int PageSetup( const TOOL_EVENT& aEvent );
58 int Print( const TOOL_EVENT& aEvent );
59 int Plot( const TOOL_EVENT& aEvent );
60
61 int ShowInspector( const TOOL_EVENT& aEvent );
62 int TitleBlockDisplayMode( const TOOL_EVENT& aEvent );
63
68 int UpdateMessagePanel( const TOOL_EVENT& aEvent );
69
70private:
72 void setTransitions() override;
73
74private:
76
77};
78
79
80#endif // PL_EDITOR_CONTROL_H
Handle actions specific to the drawing sheet editor.
int PageSetup(const TOOL_EVENT &aEvent)
int SaveAs(const TOOL_EVENT &aEvent)
int TitleBlockDisplayMode(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
int New(const TOOL_EVENT &aEvent)
int UpdateMessagePanel(const TOOL_EVENT &aEvent)
Update the message panel and the Properties frame, after change (selection, move, edit ....
int Print(const TOOL_EVENT &aEvent)
int Save(const TOOL_EVENT &aEvent)
PL_EDITOR_FRAME * m_frame
int ShowInspector(const TOOL_EVENT &aEvent)
int Open(const TOOL_EVENT &aEvent)
int Plot(const TOOL_EVENT &aEvent)
void setTransitions() override
< Set up handlers for various events.
The main window used in the drawing sheet editor.
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