private void BuildSeekSlider(SeekSliderLayout layout) { seek_slider = new SeekSlider(); stream_position_label = new StreamPositionLabel(seek_slider); Box box; if (layout == SeekSliderLayout.Horizontal) { box = new HBox(); box.Spacing = 5; stream_position_label.FormatString = "<b>{0}</b>"; } else { box = new VBox(); } seek_slider.SetSizeRequest(125, -1); box.PackStart(seek_slider, true, true, 0); box.PackStart(stream_position_label, false, false, 0); box.ShowAll(); Add(box); }
public ConnectedSeekSlider(SeekSliderLayout layout) : base(0.5f, 0.5f, 1.0f, 0.0f) { RightPadding = 10; LeftPadding = 10; BuildSeekSlider(layout); ServiceManager.PlayerEngine.ConnectEvent(OnPlayerEvent, PlayerEvent.Iterate | PlayerEvent.Buffering | PlayerEvent.StartOfStream | PlayerEvent.StateChange); ServiceManager.PlayerEngine.TrackIntercept += OnTrackIntercept; SizeAllocated += delegate { QueueDraw(); }; seek_slider.SeekRequested += OnSeekRequested; // Initialize the display if we're paused since we won't get any // events or state change until something actually happens (BGO #536564) if (ServiceManager.PlayerEngine.CurrentState == PlayerState.Paused) { OnPlayerEngineTick(); } }
public ConnectedSeekSlider(SeekSliderLayout layout) : base(0.5f, 0.5f, 1.0f, 0.0f) { RightPadding = 10; LeftPadding = 10; BuildSeekSlider (layout); ServiceManager.PlayerEngine.ConnectEvent (OnPlayerEvent, PlayerEvent.Iterate | PlayerEvent.Buffering | PlayerEvent.StartOfStream | PlayerEvent.StateChange); ServiceManager.PlayerEngine.TrackIntercept += OnTrackIntercept; SizeAllocated += delegate { QueueDraw (); }; seek_slider.SeekRequested += OnSeekRequested; // Initialize the display if we're paused since we won't get any // events or state change until something actually happens (BGO #536564) if (ServiceManager.PlayerEngine.CurrentState == PlayerState.Paused) { OnPlayerEngineTick (); } }
private void BuildSeekSlider(SeekSliderLayout layout) { var hbox = new HBox() { Spacing = 2 }; seek_slider = new SeekSlider(); stream_position_label = new StreamPositionLabel(seek_slider); if (layout == SeekSliderLayout.Horizontal) { box = new HBox(); box.Spacing = 5; stream_position_label.FormatString = "<b>{0}</b>"; } else { box = new VBox(); } seek_slider.SetSizeRequest(175, -1); box.PackStart(seek_slider, false, false, 0); box.PackStart(stream_position_label, true, true, 0); hbox.PackStart(box, true, true, 0); grabber = new Hyena.Widgets.GrabHandle() { NoShowAll = true }; grabber.ControlWidthOf(seek_slider, 125, 1024, true); hbox.PackStart(grabber, true, true, 0); hbox.ShowAll(); Resizable = false; Add(hbox); }
private void BuildSeekSlider (SeekSliderLayout layout) { seek_slider = new SeekSlider (); stream_position_label = new StreamPositionLabel (seek_slider); if (layout == SeekSliderLayout.Horizontal) { box = new HBox (); box.Spacing = 5; stream_position_label.FormatString = "<b>{0}</b>"; } else { box = new VBox (); } seek_slider.SetSizeRequest (125, -1); box.PackStart (seek_slider, true, true, 0); box.PackStart (stream_position_label, false, false, 0); box.ShowAll (); Add (box); }
private void BuildSeekSlider(SeekSliderLayout layout) { var hbox = new HBox () { Spacing = 2 }; seek_slider = new SeekSlider (); stream_position_label = new StreamPositionLabel (seek_slider); if (layout == SeekSliderLayout.Horizontal) { box = new HBox (); box.Spacing = 5; stream_position_label.FormatString = "<b>{0}</b>"; } else { box = new VBox (); } seek_slider.SetSizeRequest (175, -1); box.PackStart (seek_slider, false, false, 0); box.PackStart (stream_position_label, true, true, 0); hbox.PackStart (box, true, true, 0); grabber = new Hyena.Widgets.GrabHandle () { NoShowAll = true }; grabber.ControlWidthOf (seek_slider, 125, 1024, true); hbox.PackStart (grabber, true, true, 0); hbox.ShowAll (); Resizable = false; Add (hbox); }