KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kicad_manager_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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef KICAD_MANAGER_CONTROL_H
22#define KICAD_MANAGER_CONTROL_H
23
25#include <mutex>
26
27
29
30
35{
36public:
39
41 void Reset( RESET_REASON aReason ) override;
42
43 int NewProject( const TOOL_EVENT& aEvent );
44 int NewFromRepository( const TOOL_EVENT& aEvent );
45 int NewJobsetFile( const TOOL_EVENT& aEvent );
46 int OpenProject( const TOOL_EVENT& aEvent );
47 int OpenDemoProject( const TOOL_EVENT& aEvent );
48 int OpenJobsetFile( const TOOL_EVENT& aEvent );
49 int CloseProject( const TOOL_EVENT& aEvent );
50 int SaveProjectAs( const TOOL_EVENT& aEvent );
51 int LoadProject( const TOOL_EVENT& aEvent );
52
53 int ArchiveProject( const TOOL_EVENT& aEvent );
54 int UnarchiveProject( const TOOL_EVENT& aEvent );
55 int ExploreProject( const TOOL_EVENT& aEvent );
56 int RestoreLocalHistory( const TOOL_EVENT& aEvent );
57 int ToggleLocalHistory( const TOOL_EVENT& aEvent );
58
63 int ViewDroppedViewers( const TOOL_EVENT& aEvent );
64
65 int Refresh( const TOOL_EVENT& aEvent );
66 int UpdateMenu( const TOOL_EVENT& aEvent );
67
68 int ShowPlayer( const TOOL_EVENT& aEvent );
69 int Execute( const TOOL_EVENT& aEvent );
70
71 int ShowDesignBlockLibTable( const TOOL_EVENT& aEvent );
72 int ShowPluginManager( const TOOL_EVENT& aEvent );
73
75 void setTransitions() override;
76
77 bool InShowPlayer() const { return m_inShowPlayer; }
78
79private:
80 int openProject( const wxString& aDefaultDir );
81
82 wxFileName newProjectDirectory( wxString* aFileName = nullptr, bool isRepo = false );
83
84private:
87};
88
89#endif
int OpenProject(const TOOL_EVENT &aEvent)
int NewJobsetFile(const TOOL_EVENT &aEvent)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int OpenDemoProject(const TOOL_EVENT &aEvent)
int CloseProject(const TOOL_EVENT &aEvent)
int ToggleLocalHistory(const TOOL_EVENT &aEvent)
int ArchiveProject(const TOOL_EVENT &aEvent)
bool m_inShowPlayer
Re-entrancy guard.
int SaveProjectAs(const TOOL_EVENT &aEvent)
int NewProject(const TOOL_EVENT &aEvent)
int RestoreLocalHistory(const TOOL_EVENT &aEvent)
int ShowDesignBlockLibTable(const TOOL_EVENT &aEvent)
int UnarchiveProject(const TOOL_EVENT &aEvent)
int ViewDroppedViewers(const TOOL_EVENT &aEvent)
Imports a non kicad project from a sch/pcb dropped file.
int ShowPluginManager(const TOOL_EVENT &aEvent)
Set up handlers for various events.
int UpdateMenu(const TOOL_EVENT &aEvent)
int OpenJobsetFile(const TOOL_EVENT &aEvent)
wxFileName newProjectDirectory(wxString *aFileName=nullptr, bool isRepo=false)
int NewFromRepository(const TOOL_EVENT &aEvent)
int LoadProject(const TOOL_EVENT &aEvent)
KICAD_MANAGER_FRAME * m_frame
Pointer to the currently used edit/draw frame.
int ExploreProject(const TOOL_EVENT &aEvent)
int ShowPlayer(const TOOL_EVENT &aEvent)
int Refresh(const TOOL_EVENT &aEvent)
int openProject(const wxString &aDefaultDir)
int Execute(const TOOL_EVENT &aEvent)
The main KiCad project manager frame.
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