KiCad PCB EDA Suite
panel_mouse_settings.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) 2020 Jon Evans <jon@craftyjon.com>
5  * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef KICAD_PANEL_MOUSE_SETTINGS_H
22 #define KICAD_PANEL_MOUSE_SETTINGS_H
23 
25 
26 
27 class COMMON_SETTINGS;
28 class PAGED_DIALOG;
29 
30 
32 {
33  int zoom;
34  int panh;
35  int panv;
36 };
37 
38 
40 {
41 public:
42  PANEL_MOUSE_SETTINGS( PAGED_DIALOG* aDialog, wxWindow* aParent );
43 
45 
46  void ResetPanel() override;
47 
48 protected:
49  bool TransferDataFromWindow() override;
50 
51  bool TransferDataToWindow() override;
52 
53  void OnScrollRadioButton( wxCommandEvent& event ) override;
54  void onMouseDefaults( wxCommandEvent& event ) override;
55  void onTrackpadDefaults( wxCommandEvent& event ) override;
56 
57 private:
58  void applySettingsToPanel( const COMMON_SETTINGS& aSettings );
59 
61 
63 
64  bool isScrollModSetValid( const SCROLL_MOD_SET& aSet );
65 
66 protected:
68 
69 private:
71 };
72 
73 
74 #endif
void applySettingsToPanel(const COMMON_SETTINGS &aSettings)
SCROLL_MOD_SET m_currentScrollMod
void onTrackpadDefaults(wxCommandEvent &event) override
bool TransferDataFromWindow() override
void ResetPanel() override
Reset the contents of this panel.
bool isScrollModSetValid(const SCROLL_MOD_SET &aSet)
SCROLL_MOD_SET getScrollModSet()
void onMouseDefaults(wxCommandEvent &event) override
PANEL_MOUSE_SETTINGS(PAGED_DIALOG *aDialog, wxWindow *aParent)
void OnScrollRadioButton(wxCommandEvent &event) override
bool TransferDataToWindow() override
Class PANEL_MOUSE_SETTINGS_BASE.