コード例 #1
0
        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);
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
ファイル: ConnectedSeekSlider.cs プロジェクト: knocte/banshee
        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 ();
            }
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
ファイル: ConnectedSeekSlider.cs プロジェクト: knocte/banshee
        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);
        }