Exemplo n.º 1
0
        public ListView(Reaction<IVisualizable> itemClicked, 
			IEnumerable<IVisualizable> items)
        {
            Items = items;
            ItemClicked = itemClicked;
            _mouseRegions = new MouseRegions<IVisualizable> ();
        }
Exemplo n.º 2
0
 public Picker(int value, Reaction <int> selected, params string[] items)
 {
     Items         = items;
     Selected      = selected;
     _value        = value;
     _mouseRegions = new MouseRegions <int> ();
 }
Exemplo n.º 3
0
 public ListView(Reaction <IVisualizable> itemClicked,
                 IEnumerable <IVisualizable> items)
 {
     Items         = items;
     ItemClicked   = itemClicked;
     _mouseRegions = new MouseRegions <IVisualizable> ();
 }
Exemplo n.º 4
0
        public Container(VisualDirection direction, HAlign horizAlign,	VAlign vertAlign,  
			bool framed, bool wrapAround, IEnumerable<Tuple<Control, Reaction<Control>>> controls)
        {
            Direction = direction;
            HorizAlign = horizAlign;
            VertAlign = vertAlign;
            Framed = framed;
            WrapAround = wrapAround;
            Controls = new List<Tuple<Control, Reaction<Control>>> (controls);
            if (Controls.Select (TupleExt.Second).Any (r => r != null))
                _mouseRegions = new MouseRegions<Tuple<Control, Reaction<Control>>> ();
        }
Exemplo n.º 5
0
 public Container(VisualDirection direction, HAlign horizAlign, VAlign vertAlign,
                  bool framed, bool wrapAround, IEnumerable <Tuple <Control, Reaction <Control> > > controls)
 {
     Direction  = direction;
     HorizAlign = horizAlign;
     VertAlign  = vertAlign;
     Framed     = framed;
     WrapAround = wrapAround;
     Controls   = new List <Tuple <Control, Reaction <Control> > > (controls);
     if (Controls.Select(TupleExt.Second).Any(r => r != null))
     {
         _mouseRegions = new MouseRegions <Tuple <Control, Reaction <Control> > > ();
     }
 }
Exemplo n.º 6
0
        public ColorMapBar(float domainMin, float domainMax, float knobWidth, float minVisualLength,
			ColorMap<Vec3> colorMap, Reaction<ColorMap<Vec3>> changed, 
			Reaction<int?> itemSelected)
        {
            if (colorMap.Count > 0 && (colorMap.MinKey < domainMin || colorMap.MaxKey > domainMax))
                throw new ArgumentException ("Color map values out of min/max range.");
            DomainMin = domainMin;
            DomainMax = domainMax;
            BarSize = new SizeF (knobWidth, minVisualLength);
            ColorMap = colorMap;
            Changed = changed;
            ItemSelected = itemSelected;
            _mouseRegions = new MouseRegions<object> ();
        }
Exemplo n.º 7
0
 public ColorMapBar(float domainMin, float domainMax, float knobWidth, float minVisualLength,
                    ColorMap <Vec3> colorMap, Reaction <ColorMap <Vec3> > changed,
                    Reaction <int?> itemSelected)
 {
     if (colorMap.Count > 0 && (colorMap.MinKey < domainMin || colorMap.MaxKey > domainMax))
     {
         throw new ArgumentException("Color map values out of min/max range.");
     }
     DomainMin     = domainMin;
     DomainMax     = domainMax;
     BarSize       = new SizeF(knobWidth, minVisualLength);
     ColorMap      = colorMap;
     Changed       = changed;
     ItemSelected  = itemSelected;
     _mouseRegions = new MouseRegions <object> ();
 }