mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
18 lines
852 B
C++
18 lines
852 B
C++
#include "CtrlProp.h"
|
|
#include <CtrlLib/CtrlLib.h>
|
|
|
|
//SliderCtrl
|
|
|
|
bool PropSetMin(SliderCtrl& o, const Value& v) { if(!IsNumber(v)) return false; o.MinMax(v, o.GetMax()); return true; }
|
|
bool PropGetMin(const SliderCtrl& o, Value& v) { v = o.GetMin(); return true; }
|
|
bool PropSetMax(SliderCtrl& o, const Value& v) { if(!IsNumber(v)) return false; o.MinMax(o.GetMin(), v); return true; }
|
|
bool PropGetMax(const SliderCtrl& o, Value& v) { v = o.GetMax(); return true; }
|
|
bool PropSetStep(SliderCtrl& o, const Value& v) { if(!IsNumber(v)) return false; o.Step(v); return true; }
|
|
bool PropGetStep(const SliderCtrl& o, Value& v) { v = o.GetStep(); return true; }
|
|
|
|
CTRL_PROPERTIES(SliderCtrl, Ctrl)
|
|
PROPERTY("min", PropSetMin, PropGetMin)
|
|
PROPERTY("max", PropSetMax, PropGetMax)
|
|
PROPERTY("step", PropSetStep, PropGetStep)
|
|
END_CTRL_PROPERTIES
|
|
|