public static double GetSliderPosition(this Gtk.Scale scale)
        {
            int start, end;

            scale.GetSliderRange(out start, out end);
            return(start + ((end - start) / 2));
        }
Example #2
0
 public override Widget ConfigurationWidget()
 {
     scale = new HScale (-45, 45, 1);
     scale.Value = 0.0;
     scale.ValueChanged += HandleValueChanged;
     return scale;
 }
Example #3
0
 public Indicator(Method method, double offscalelow, double offscalehigh, Gtk.Label label, Gtk.VScale scale)
 {
     this.label = label;
     this.scale = scale;
     this.method = method;
     this.offscalehigh = offscalehigh;
     this.offscalelow = offscalelow;
 }
Example #4
0
		protected override Widget CreateControls ()
		{
			VBox box = new VBox ();
			box.Spacing = 12;
			box.BorderWidth = 12;
			scale = new HScale (-45, 45, 1);
			scale.Value = 0.0;
			scale.ValueChanged += HandleValueChanged;
			scale.WidthRequest = 250;
			box.PackStart (scale);
			HBox actions = new HBox ();
			actions.Spacing = 12;
			Button cancel = new Button ("Cancel");
			cancel.Clicked += HandleCancel;
			actions.PackStart (cancel);
			Button apply = new Button ("Apply");
			apply.Clicked += HandleApply;
			actions.PackStart (apply);
			box.PackStart (actions);
			return box;
		}
        public EqualizerBandScale(uint band, int median, int min, int max, string labelText)
        {
            this.band = band;

            label = new Label ();
            label.Markup = String.Format ("<small>{0}</small>", GLib.Markup.EscapeText (labelText));
            label.Xalign = 0.0f;
            label.Yalign = 1.0f;
            label.Angle = 90.0;

            // new Adjustment (value, lower, upper, step_incr, page_incr, page_size);
            scale = new VScale (new Adjustment (median, min, max, max / 10, max / 10, 1));
            scale.DrawValue = false;
            scale.Inverted = true;
            scale.ValueChanged += OnValueChanged;

            scale.Show ();
            label.Show ();

            PackStart (scale, false, false, 0);
            PackStart (label, false, false, 0);
        }
Example #6
0
 public override void Initialize()
 {
     Widget = (Gtk.Scale) CreateWidget ();
     Widget.DrawValue = false;
     Widget.Show ();
 }
		protected override Widget CreateControls ()
		{
			scale = new HScale (0, 1, 0.01);
			scale.ValueChanged += HandleValueChanged;
			scale.WidthRequest = 250;

			return scale;
		}