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/button.h>
33#include <wx/stattext.h>
34#include <wx/spinctrl.h>
35
37
38enum class ZOOM_CORRECTION_UNITS : int
39{
43};
44
48class ZOOM_CORRECTION_CTRL : public wxPanel
49{
50public:
51 ZOOM_CORRECTION_CTRL( wxWindow* aParent, double& aValue, double aBaseValue );
52
53 void SetDisplayedValue( double aValue );
54 double GetValue() const;
55 int GetUnitsSelection() const;
56 bool TransferDataToWindow() override;
57 bool TransferDataFromWindow() override;
58
59private:
60 void unitsChanged( wxCommandEvent& aEvent );
61 void spinnerChanged( wxSpinEvent& aEvent );
62 void autoPressed( wxCommandEvent& aEvent );
63
65 double* m_value;
67 wxStaticText* m_label;
68 wxButton* m_autoButton;
69 wxSpinCtrl* m_spinner;
70 wxChoice* m_unitsChoice;
71};
72
73#endif
void spinnerChanged(wxSpinEvent &aEvent)
void unitsChanged(wxCommandEvent &aEvent)
ZOOM_CORRECTION_RULER * m_ruler
void autoPressed(wxCommandEvent &aEvent)
bool TransferDataToWindow() override
void SetDisplayedValue(double aValue)
ZOOM_CORRECTION_CTRL(wxWindow *aParent, double &aValue, double aBaseValue)
bool TransferDataFromWindow() override
@ INCH
Definition rs274x.cpp:62
ZOOM_CORRECTION_UNITS