Minsky
slider.h
Go to the documentation of this file.
1 /*
2  @copyright Steve Keen 2012
3  @author Russell Standish
4  This file is part of Minsky.
5 
6  Minsky is free software: you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Minsky 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  You should have received a copy of the GNU General Public License
17  along with Minsky. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef SLIDER_H
21 #define SLIDER_H
22 namespace minsky
23 {
24  constexpr float sliderHandleRadius=3;
25 
28  struct Slider
29  {
30  bool sliderStepRel=false;
33  double sliderMin=std::numeric_limits<double>::max(),
35  bool enableSlider=true;
36 
38  double maxSliderSteps() const {
39  if (!isfinite(sliderStep) || sliderMax-sliderMin > 1.0e04*sliderStep) return (sliderMax-sliderMin)/1.0e04;
40  return sliderStep;
41  }
42  };
43 }
44 
45 #include "slider.cd"
46 #include "slider.xcd"
47 #endif
double sliderStep
Definition: slider.h:34
bool enableSlider
Definition: slider.h:35
constexpr float sliderHandleRadius
Definition: slider.h:24
double sliderMax
Definition: slider.h:34
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky&#39;s state cha...
Definition: constMap.h:22
data structure supporting sliders - shared between constant operations and variables ...
Definition: slider.h:28
bool sliderStepRel
Definition: slider.h:30
double maxSliderSteps() const
ensure there are at most 10000 steps between sliderMin and Max. see ticket 1255.
Definition: slider.h:38
double sliderMin
Definition: slider.h:33