Ejemplo n.º 1
0
 public ColorMapEdit(float domainMin, float domainMax, float knobWidth, float minVisualLength,
                     ColorMap <Vec3> colorMap, Reaction <ColorMap <Vec3> > changed)
     : base(VisualDirection.Horizontal, HAlign.Left, VAlign.Top, false, false,
            Enumerable.Empty <Control> ())
 {
     _bar = new ColorMapBar(domainMin, domainMax, knobWidth, minVisualLength, colorMap, changed,
                            React.By <int?> (ItemSelected));
     _picker = new ColorPicker(VisualDirection.Vertical, knobWidth, minVisualLength - (3f * knobWidth),
                               Color.Black, true, React.By <Color> (ColorChanged));
     Controls.AddRange(EnumerableExt.Enumerate <Control> (_bar, _picker)
                       .Select(c => new Tuple <Control, Reaction <Control> > (c, null)));
 }
Ejemplo n.º 2
0
        public ColorMapEdit(float domainMin, float domainMax, float knobWidth, float minVisualLength,
			ColorMap<Vec3> colorMap, Reaction<ColorMap<Vec3>> changed)
            : base(VisualDirection.Horizontal, HAlign.Left, VAlign.Top, false, false, 
				Enumerable.Empty<Control> ())
        {
            _bar = new ColorMapBar (domainMin, domainMax, knobWidth, minVisualLength, colorMap, changed,
                React.By<int?> (ItemSelected));
            _picker = new ColorPicker (VisualDirection.Vertical, knobWidth, minVisualLength - (3f * knobWidth),
                Color.Black, true, React.By<Color> (ColorChanged));
            Controls.AddRange (EnumerableExt.Enumerate<Control> (_bar, _picker)
                .Select (c => new Tuple<Control, Reaction<Control>> (c, null)));
        }