MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / FloatSlider

Method FloatSlider

Source/Slider.cpp:36–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include "Push2Control.h"
35
36FloatSlider::FloatSlider(IFloatSliderListener* owner, const char* label, int x, int y, int w, int h, float* var, float min, float max, int digits /* = -1 */)
37: mVar(var)
38, mWidth(w)
39, mHeight(h)
40, mMin(min)
41, mMax(max)
42, mModulatorMin(min)
43, mModulatorMax(max)
44, mShowDigits(digits)
45, mOwner(owner)
46{
47 assert(owner);
48 SetName(label);
49 SetPosition(x, y);
50 (dynamic_cast<IDrawableModule*>(owner))->AddUIControl(this);
51 SetParent(dynamic_cast<IClickable*>(owner));
52 mLastComputeCacheTime = new double[gBufferSize];
53 mLastComputeCacheValue = new float[gBufferSize];
54}
55
56FloatSlider::FloatSlider(IFloatSliderListener* owner, const char* label, IUIControl* anchor, AnchorDirection anchorDir, int w, int h, float* var, float min, float max, int digits /* = -1 */)
57: FloatSlider(owner, label, -1, -1, w, h, var, min, max, digits)

Callers

nothing calls this directly

Calls 1

AddUIControlMethod · 0.80

Tested by

no test coverage detected