KiCad PCB EDA Suite
dialog_hotkeys_editor.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) 2004-2016 KiCad Developers, see CHANGELOG.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 3
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 
28 #ifndef __dialog_hotkeys_editor__
29 #define __dialog_hotkeys_editor__
30 
31 #include <hotkeys_basic.h>
32 #include <../common/dialogs/dialog_hotkeys_editor_base.h>
34 
41 {
42 protected:
44 
46 
47  bool TransferDataToWindow() override;
48  bool TransferDataFromWindow() override;
49 
51  {
52  return static_cast<EDA_BASE_FRAME*>( HOTKEYS_EDITOR_DIALOG_BASE::GetParent() );
53  }
54 
55 public:
57 
59 
60 private:
61 
68  void ResetClicked( wxCommandEvent& aEvent ) override;
69 
76  void DefaultsClicked( wxCommandEvent& aEvent ) override;
77 };
78 
86 void InstallHotkeyFrame( EDA_BASE_FRAME* aParent, EDA_HOTKEY_CONFIG* aHotkeys );
87 
88 #endif
Structure EDA_HOTKEY_CONFIG contains the information required to save hot key information to a config...
Definition: hotkeys_basic.h:87
void DefaultsClicked(wxCommandEvent &aEvent) override
Function DefaultsClicked Set the hotkeys to the default values (values after installation) ...
WIDGET_HOTKEY_LIST * m_hotkeyListCtrl
Class HOTKEYS_EDITOR_DIALOG_BASE.
Class HOTKEYS_EDITOR_DIALOG is the child class of HOTKEYS_EDITOR_DIALOG_BASE.
void ResetClicked(wxCommandEvent &aEvent) override
Function ResetClicked Reinit the hotkeys to the initial state (removes all pending changes) ...
void InstallHotkeyFrame(EDA_BASE_FRAME *aParent, EDA_HOTKEY_CONFIG *aHotkeys)
Function InstallHotkeyFrame Create a hotkey editor dialog window with the provided hotkey configurati...
struct EDA_HOTKEY_CONFIG * m_hotkeys
Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.
Definition: wxstruct.h:113
virtual EDA_BASE_FRAME * GetParent()
bool TransferDataFromWindow() override
Some functions to handle hotkeys in KiCad.
bool TransferDataToWindow() override
HOTKEYS_EDITOR_DIALOG(EDA_BASE_FRAME *aParent, EDA_HOTKEY_CONFIG *aHotkeys)