KiCad PCB EDA Suite
Loading...
Searching...
No Matches
stepped_slider.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) 2018 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef STEPPED_SLIDER_H
21#define STEPPED_SLIDER_H
22
23#include <wx/slider.h>
24
28class STEPPED_SLIDER : public wxSlider
29{
30public:
32 wxWindow* aParent,
33 wxWindowID aId,
34 int aValue,
35 int aMinValue,
36 int aMaxValue,
37 const wxPoint& aPos = wxDefaultPosition,
38 const wxSize& aSize = wxDefaultSize,
39 long aStyle = wxSL_HORIZONTAL,
40 const wxValidator& aValidator = wxDefaultValidator,
41 const wxString& aName = wxSliderNameStr );
42
43 virtual ~STEPPED_SLIDER();
44
48 void SetStep( int aSize );
49
53 int GetStep() const;
54
55protected:
56 DECLARE_EVENT_TABLE()
57
58private:
59 int m_step;
60
61 void OnScroll( wxScrollEvent& aEvent );
62};
63
64
65#endif // STEPPED_SLIDER_H
Customized wxSlider with forced stepping.
int GetStep() const
Get the step size.
void OnScroll(wxScrollEvent &aEvent)
void SetStep(int aSize)
Set the step size.
virtual ~STEPPED_SLIDER()