KiCad PCB EDA Suite
Loading...
Searching...
No Matches
zoom_correction_ctrl.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 The KiCad Developers, see AUTHORS.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 * Inspired by the Inkscape preferences widget, which is
17 * Authors:
18 * Marco Scholten
19 * Bruno Dilly <[email protected]>
20 *
21 * Copyright (C) 2004, 2006, 2007 Authors
22 *
23 * Released under GNU GPL v2+
24 */
25
26
27#ifndef ZOOM_CORRECTION_CTRL__H_
28#define ZOOM_CORRECTION_CTRL__H_
29
30#include <wx/choice.h>
31#include <wx/panel.h>
32#include <wx/slider.h>
33#include <wx/spinctrl.h>
34
36
37enum class ZOOM_CORRECTION_UNITS : int
38{
42};
43
47class ZOOM_CORRECTION_CTRL : public wxPanel
48{
49public:
50 ZOOM_CORRECTION_CTRL( wxWindow* aParent, double& aValue );
51
52 void SetDisplayedValue( double aValue );
53 double GetValue() const;
54 int GetUnitsSelection() const;
55 bool TransferDataToWindow() override;
56 bool TransferDataFromWindow() override;
57
58private:
59 void sliderChanged( wxCommandEvent& aEvent );
60 void unitsChanged( wxCommandEvent& aEvent );
61 void spinnerChanged( wxSpinEvent& aEvent );
62
63 double* m_value;
65 wxSlider* m_slider;
66 wxSpinCtrl* m_spinner;
67 wxChoice* m_unitsChoice;
68};
69
70#endif
void sliderChanged(wxCommandEvent &aEvent)
void spinnerChanged(wxSpinEvent &aEvent)
void unitsChanged(wxCommandEvent &aEvent)
ZOOM_CORRECTION_RULER * m_ruler
bool TransferDataToWindow() override
ZOOM_CORRECTION_CTRL(wxWindow *aParent, double &aValue)
void SetDisplayedValue(double aValue)
bool TransferDataFromWindow() override
@ INCH
Definition rs274x.cpp:62
ZOOM_CORRECTION_UNITS