2014-10-27 14:14:39 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2023-05-10 17:13:52 +00:00
|
|
|
* Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2014-10-27 14:14:39 +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
|
|
|
|
*/
|
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
#ifndef KICAD_DIALOG_SUITE_OPTIONS_H
|
|
|
|
#define KICAD_DIALOG_SUITE_OPTIONS_H
|
2008-12-21 16:54:27 +00:00
|
|
|
|
2022-08-21 12:39:55 +00:00
|
|
|
#include <dialogs/panel_common_settings_base.h>
|
2009-10-30 17:58:15 +00:00
|
|
|
|
2009-02-24 22:41:30 +00:00
|
|
|
|
2020-07-21 23:13:43 +00:00
|
|
|
class COMMON_SETTINGS;
|
2018-05-14 17:34:18 +00:00
|
|
|
class DIALOG_SHIM;
|
2021-09-16 22:45:28 +00:00
|
|
|
class STEPPED_SLIDER;
|
2018-05-14 17:34:18 +00:00
|
|
|
|
2009-02-24 22:41:30 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
class PANEL_COMMON_SETTINGS : public PANEL_COMMON_SETTINGS_BASE
|
|
|
|
{
|
2008-12-21 16:54:27 +00:00
|
|
|
public:
|
2023-05-10 17:13:52 +00:00
|
|
|
PANEL_COMMON_SETTINGS( wxWindow* aParent );
|
2019-07-25 16:48:11 +00:00
|
|
|
~PANEL_COMMON_SETTINGS() override;
|
2018-02-16 16:57:18 +00:00
|
|
|
|
2020-07-21 23:13:43 +00:00
|
|
|
void ResetPanel() override;
|
|
|
|
|
2018-02-16 16:57:18 +00:00
|
|
|
protected:
|
2018-05-14 17:34:18 +00:00
|
|
|
bool TransferDataFromWindow() override;
|
|
|
|
bool TransferDataToWindow() override;
|
|
|
|
|
2020-07-21 23:13:43 +00:00
|
|
|
void applySettingsToPanel( COMMON_SETTINGS& aSettings );
|
|
|
|
|
2021-09-16 22:45:28 +00:00
|
|
|
void OnScaleSlider( wxScrollEvent& aEvent );
|
|
|
|
void OnIconScaleAuto( wxCommandEvent& aEvent );
|
2018-05-14 17:34:18 +00:00
|
|
|
void OnTextEditorClick( wxCommandEvent& event ) override;
|
|
|
|
void OnPDFViewerClick( wxCommandEvent& event ) override;
|
2021-12-30 16:36:01 +00:00
|
|
|
void OnRadioButtonPdfViewer( wxCommandEvent& event ) override;
|
2019-03-22 21:15:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Event fired when the canvas scale field is modified
|
|
|
|
*/
|
2019-07-25 16:48:11 +00:00
|
|
|
void OnCanvasScaleChange( wxCommandEvent& aEvent );
|
2019-03-22 21:15:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Event fired when the canvas auto-scale option is changed
|
|
|
|
*/
|
|
|
|
void OnCanvasScaleAuto( wxCommandEvent& aEvent ) override;
|
2018-02-16 16:57:18 +00:00
|
|
|
|
2021-12-30 16:36:01 +00:00
|
|
|
private:
|
|
|
|
void setPdfViewerPathState();
|
|
|
|
|
2021-09-16 22:45:28 +00:00
|
|
|
protected:
|
|
|
|
wxStaticText* m_iconScaleLabel;
|
|
|
|
STEPPED_SLIDER* m_iconScaleSlider;
|
|
|
|
wxCheckBox* m_iconScaleAuto;
|
2011-09-26 20:32:56 +00:00
|
|
|
|
2021-09-16 22:45:28 +00:00
|
|
|
int m_last_scale; ///< saved icon scale when Auto selected
|
2008-12-21 16:54:27 +00:00
|
|
|
};
|
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
#endif //KICAD_DIALOG_SUITE_OPTIONS_H
|