kicad/include/tool/common_control.h

71 lines
2.1 KiB
C
Raw Normal View History

2019-06-09 21:57:23 +00:00
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
2020-12-27 00:41:04 +00:00
* Copyright (C) 2019-2020 KiCad Developers, see AUTHORS.txt for contributors.
2019-06-09 21:57:23 +00:00
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef COMMON_CONTROL_H
#define COMMON_CONTROL_H
#include <tool/tool_interactive.h>
class EDA_BASE_FRAME;
/**
2020-12-27 00:41:04 +00:00
* Handle actions that are shared between different applications
2019-06-09 21:57:23 +00:00
*/
class COMMON_CONTROL : public TOOL_INTERACTIVE
{
public:
COMMON_CONTROL() :
TOOL_INTERACTIVE( "common.SuiteControl" ),
m_frame( nullptr )
{ }
~COMMON_CONTROL() override { }
/// @copydoc TOOL_BASE::Reset()
void Reset( RESET_REASON aReason ) override;
int ConfigurePaths( const TOOL_EVENT& aEvent );
int ShowLibraryTable( const TOOL_EVENT& aEvent );
2020-12-27 00:41:04 +00:00
2019-06-09 21:57:23 +00:00
int ShowPlayer( const TOOL_EVENT& aEvent );
int ShowHelp( const TOOL_EVENT& aEvent );
int ListHotKeys( const TOOL_EVENT& aEvent );
int GetInvolved( const TOOL_EVENT& aEvent );
2021-04-08 17:21:44 +00:00
int Donate( const TOOL_EVENT& aEvent );
int ReportBug( const TOOL_EVENT& aEvent );
2019-06-09 21:57:23 +00:00
2020-12-27 00:41:04 +00:00
///< Sets up handlers for various events.
2019-06-09 21:57:23 +00:00
void setTransitions() override;
2020-12-27 00:41:04 +00:00
2019-06-09 21:57:23 +00:00
private:
2020-12-27 00:41:04 +00:00
///< Pointer to the currently used edit frame.
2019-06-09 21:57:23 +00:00
EDA_BASE_FRAME* m_frame;
static wxString m_bugReportUrl;
static wxString m_bugReportTemplate;
2019-06-09 21:57:23 +00:00
};
#endif