[longomatch] Start using the new CamerasTimeLine widget.



commit e746053a0b86d0893247fe8f899929cb7aa8a059
Author: Julien Moutte <julien fluendo com>
Date:   Wed Mar 11 23:37:07 2015 +0100

    Start using the new CamerasTimeLine widget.
    
    Some more work required to implement the secondary media player and reflect adjustments to media file's 
offsets.

 LongoMatch.Drawing/Widgets/CamerasTimeline.cs      |    6 -
 LongoMatch.GUI/Gui/Component/ProjectPeriods.cs     |  155 +++++++++-----
 .../LongoMatch.Gui.Component.ProjectPeriods.cs     |  229 +++++++++++---------
 LongoMatch.GUI/gtk-gui/gui.stetic                  |  163 +++++++-------
 4 files changed, 308 insertions(+), 245 deletions(-)
---
diff --git a/LongoMatch.Drawing/Widgets/CamerasTimeline.cs b/LongoMatch.Drawing/Widgets/CamerasTimeline.cs
index e87c4b2..65c18de 100644
--- a/LongoMatch.Drawing/Widgets/CamerasTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/CamerasTimeline.cs
@@ -60,12 +60,6 @@ namespace LongoMatch.Drawing.Widgets
                        widget.ReDraw ();
                }
 
-               public TimerTimeline TimerTimeline {
-                       get {
-                               return PeriodsTimeline;
-                       }
-               }
-
                public TimerTimeline PeriodsTimeline {
                        get;
                        set;
diff --git a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
index 6c18524..a9ea78c 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
@@ -32,7 +32,8 @@ namespace LongoMatch.Gui.Component
        [System.ComponentModel.ToolboxItem(true)]
        public partial class ProjectPeriods : Gtk.Bin
        {
-               TimersTimeline timersTimeline;
+               CamerasLabels camerasLabels;
+               CamerasTimeline camerasTimeline;
                Timerule timerule;
                Time duration;
                Project project;
@@ -44,40 +45,62 @@ namespace LongoMatch.Gui.Component
                {
                        this.Build ();
 
-                       zoomoutimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-zoom-more", 20);
-                       zoominimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-zoom-less", 20);
-                       arrowimage1.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-down-arrow", 20);
-                       arrowimage2.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-down-arrow", 20);
-
-                       zoominbutton.Clicked += HandleZooomActivated;
-                       zoomoutbutton.Clicked += HandleZooomActivated;
-                       playerbin2.Tick += HandleTick;
-                       playerbin2.ShowControls = false;
-                       timerule = new Timerule (new WidgetWrapper (drawingarea1));
-                       timerule.ObjectsCanMove = false;
-                       timersTimeline = new TimersTimeline (new WidgetWrapper (drawingarea2));
-                       drawingarea1.HeightRequest = LongoMatch.Drawing.Constants.TIMERULE_HEIGHT;
-                       drawingarea2.HeightRequest = LongoMatch.Drawing.Constants.TIMER_HEIGHT;
-                       timersTimeline.TimeNodeChanged += HandleTimeNodeChanged;
-                       timersTimeline.ShowTimerMenuEvent += HandleShowTimerMenuEvent;
-                       scrolledwindow2.Hadjustment.ValueChanged += HandleValueChanged;
-                       synclabel.Markup = String.Format ("<b> {0} </b>",
-                                                         Catalog.GetString ("Synchronize the game periods"));
+                       zoomscale.CanFocus = false;
+                       zoomscale.Adjustment.Lower = 0;
+                       zoomscale.Adjustment.Upper = 12;
+                       zoomscale.ValueChanged += HandleZoomChanged;
+
+                       zoominimage.Pixbuf = LongoMatch.Gui.Helpers.Misc.LoadIcon ("longomatch-zoom-in", 14);
+                       zoomoutimage.Pixbuf = LongoMatch.Gui.Helpers.Misc.LoadIcon ("longomatch-zoom-out", 
14);
+
+                       // Synchronize the zoom widget height with scrolledwindow's scrollbar's.
+                       scrolledwindow2.HScrollbar.SizeAllocated += (object o, SizeAllocatedArgs args) => {
+                               int spacing = (int)scrolledwindow2.StyleGetProperty ("scrollbar-spacing");
+                               zoomhbox.HeightRequest = args.Allocation.Height + spacing;
+                       };
+
+                       main_cam_playerbin.Tick += HandleTick;
+                       main_cam_playerbin.ShowControls = false;
+                       //secondary_cam_playerbin.ShowControls = false;
+
+                       timerule = new Timerule (new WidgetWrapper (timerulearea)) { ObjectsCanMove = false };
+                       camerasTimeline = new CamerasTimeline (new WidgetWrapper (timelinearea));
+                       camerasLabels = new CamerasLabels (new WidgetWrapper (labelsarea));
+
+                       /* Links Label size to the container */
+                       labelsarea.SizeRequested += (o, args) => {
+                               labels_vbox.WidthRequest = args.Requisition.Width;
+                       };
+
+                       // Set some sane defaults
+                       labels_vbox.WidthRequest = StyleConf.TimelineLabelsWidth;
+                       // We need to aligne the timerule and the beginning of labels list
+                       timerulearea.HeightRequest = StyleConf.TimelineCameraHeight;
+
+                       camerasTimeline.TimeNodeChanged += HandleTimeNodeChanged;
+                       camerasTimeline.ShowTimerMenuEvent += HandleShowTimerMenuEvent;
+
+                       // Synchronize scrollbars with timerule and labels
+                       scrolledwindow2.Vadjustment.ValueChanged += HandleScrollEvent;
+                       scrolledwindow2.Hadjustment.ValueChanged += HandleScrollEvent;
+
                        LongoMatch.Gui.Helpers.Misc.SetFocus (this, false);
+
                        menu = new PeriodsMenu ();
                }
 
                protected override void OnDestroyed ()
                {
-                       playerbin2.Destroy ();
+                       main_cam_playerbin.Destroy ();
                        timerule.Dispose ();
-                       timersTimeline.Dispose ();
+                       camerasLabels.Dispose ();
+                       camerasTimeline.Dispose ();
                        base.OnDestroyed ();
                }
 
                public void Pause ()
                {
-                       playerbin2.Pause ();
+                       main_cam_playerbin.Pause ();
                }
 
                public void SaveChanges ()
@@ -105,7 +128,7 @@ namespace LongoMatch.Gui.Component
                                List<Period> periods;
                                MediaFile file;
                                
-                               playerbin2.ShowControls = false;
+                               main_cam_playerbin.ShowControls = false;
                                this.project = value;
                                gamePeriods = value.Dashboard.GamePeriods;
 
@@ -135,60 +158,90 @@ namespace LongoMatch.Gui.Component
                                        projectHasPeriods = true;
                                        periods = periodsDict.Values.ToList ();
                                }
-                               timersTimeline.LoadPeriods (periods, duration);
+
+                               MediaFileSet fileSet = project.Description.FileSet;
+
+                               camerasLabels.Load (fileSet);
+                               camerasTimeline.Load (periods, fileSet, duration);
+                               UpdateTimeLineSize (fileSet);
+
                                timerule.Duration = duration;
-                               SetZoom ();
-                               playerbin2.Open (value.Description.FileSet);
+                               zoomscale.Value = 6;
+
+                               // Open media file
+                               main_cam_playerbin.Open (value.Description.FileSet);
                        }
                }
 
-               void SetZoom ()
+               /// <summary>
+               /// Adjusts the VPaned position to accomodate up to 8 cameras
+               /// </summary>
+               /// <param name="fileSet">File set.</param>
+               void UpdateTimeLineSize (MediaFileSet fileSet)
                {
-                       if (duration != null) {
-                               double spp = (double)duration.TotalSeconds / drawingarea1.Allocation.Width;
-                               int secondsPerPixel = (int)Math.Ceiling (spp);
-                               timerule.SecondsPerPixel = secondsPerPixel;
-                               timersTimeline.SecondsPerPixel = secondsPerPixel;
-                       }
+                       // Number of media files plus period sync line
+                       int visibleItems = Math.Min (StyleConf.TimelineCameraMaxLines, 
project.Description.FileSet.Count + 1);
+                       int height = scrolledwindow2.HScrollbar.Requisition.Height * 2;
+                       height += visibleItems * StyleConf.TimelineCameraHeight;
+                       vpaned2.Position = vpaned2.Allocation.Height - height;
                }
 
+               /// <summary>
+               /// Handles the tick from media player to update Current Time in timelines.
+               /// </summary>
+               /// <param name="currentTime">Current time.</param>
                void HandleTick (Time currentTime)
                {
                        timerule.CurrentTime = currentTime;
-                       timersTimeline.CurrentTime = currentTime;
-                       drawingarea1.QueueDraw ();
-                       drawingarea2.QueueDraw ();
+                       camerasTimeline.CurrentTime = currentTime;
+                       QueueDraw ();
                }
 
                void HandleTimeNodeChanged (TimeNode tNode, object val)
                {
                        Time time = val as Time;
-                       playerbin2.Pause ();
-                       playerbin2.Seek (time, false);
+                       main_cam_playerbin.Pause ();
+                       main_cam_playerbin.Seek (time, false);
+                       // FIXME: Reflect change in the MediaFile's offset.
                }
 
-               void HandleValueChanged (object sender, EventArgs e)
+               /// <summary>
+               /// Handles the scroll event from the scrolled window and synchronise the timelines labels 
and timerule with it.
+               /// </summary>
+               /// <param name="sender">Sender.</param>
+               /// <param name="args">Arguments.</param>
+               void HandleScrollEvent (object sender, System.EventArgs args)
                {
-                       timerule.Scroll = scrolledwindow2.Hadjustment.Value;
-                       drawingarea1.QueueDraw ();
+                       if (sender == scrolledwindow2.Vadjustment)
+                               camerasLabels.Scroll = scrolledwindow2.Vadjustment.Value;
+                       else if (sender == scrolledwindow2.Hadjustment) {
+                               timerule.Scroll = scrolledwindow2.Hadjustment.Value;
+                       }
+                       QueueDraw ();
                }
 
-               void HandleZooomActivated (object sender, EventArgs e)
+               void HandleZoomChanged (object sender, EventArgs e)
                {
-                       if (sender == zoomoutbutton) {
-                               timerule.SecondsPerPixel ++;
-                               timersTimeline.SecondsPerPixel ++;
+                       double secondsPer100Pixels, value;
+
+                       value = Math.Round (zoomscale.Value);
+                       if (value == 0) {
+                               secondsPer100Pixels = 1;
+                       } else if (value <= 6) {
+                               secondsPer100Pixels = value * 10;
                        } else {
-                               timerule.SecondsPerPixel = Math.Max (1, timerule.SecondsPerPixel - 1);
-                               timersTimeline.SecondsPerPixel = Math.Max (1, timersTimeline.SecondsPerPixel 
- 1);
+                               secondsPer100Pixels = (value - 5) * 60;
                        }
-                       drawingarea1.QueueDraw ();
-                       drawingarea2.QueueDraw ();
+
+                       double secondsPerPixel = secondsPer100Pixels / 100;
+                       timerule.SecondsPerPixel = secondsPerPixel;
+                       camerasTimeline.SecondsPerPixel = secondsPerPixel;
+                       QueueDraw ();
                }
 
                void HandleShowTimerMenuEvent (Timer timer, Time time)
                {
-                       menu.ShowMenu (project, timer, time, timersTimeline.TimerTimeline);
+                       menu.ShowMenu (project, timer, time, camerasTimeline.PeriodsTimeline);
                }
        }
 }
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs
index ffe81bf..84d2748 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs
@@ -4,23 +4,37 @@ namespace LongoMatch.Gui.Component
 {
        public partial class ProjectPeriods
        {
+               private global::Gtk.VPaned vpaned2;
+               
                private global::Gtk.VBox vbox2;
-               private global::LongoMatch.Gui.PlayerBin playerbin2;
-               private global::Gtk.Alignment alignment1;
-               private global::Gtk.HBox hbox4;
-               private global::Gtk.Image arrowimage1;
-               private global::Gtk.Label synclabel;
-               private global::Gtk.Image arrowimage2;
+               
+               private global::Gtk.HBox playbins_hbox;
+               
+               private global::LongoMatch.Gui.PlayerBin main_cam_playerbin;
+               
                private global::Gtk.HBox hbox3;
-               private global::Gtk.VBox vbox6;
-               private global::Gtk.Button zoomoutbutton;
-               private global::Gtk.Image zoomoutimage;
-               private global::Gtk.Button zoominbutton;
+               
+               private global::Gtk.Alignment labels_alignment;
+               
+               private global::Gtk.VBox labels_vbox;
+               
+               private global::Gtk.DrawingArea labelsarea;
+               
+               private global::Gtk.HBox zoomhbox;
+               
                private global::Gtk.Image zoominimage;
+               
+               private global::Gtk.HScale zoomscale;
+               
+               private global::Gtk.Image zoomoutimage;
+               
                private global::Gtk.VBox vbox7;
-               private global::Gtk.DrawingArea drawingarea1;
+               
+               private global::Gtk.DrawingArea timerulearea;
+               
                private global::Gtk.ScrolledWindow scrolledwindow2;
-               private global::Gtk.DrawingArea drawingarea2;
+               
+               private global::Gtk.DrawingArea timelinearea;
 
                protected virtual void Build ()
                {
@@ -29,127 +43,128 @@ namespace LongoMatch.Gui.Component
                        global::Stetic.BinContainer.Attach (this);
                        this.Name = "LongoMatch.Gui.Component.ProjectPeriods";
                        // Container child 
LongoMatch.Gui.Component.ProjectPeriods.Gtk.Container+ContainerChild
+                       this.vpaned2 = new global::Gtk.VPaned ();
+                       this.vpaned2.CanFocus = true;
+                       this.vpaned2.Name = "vpaned2";
+                       this.vpaned2.Position = 400;
+                       // Container child vpaned2.Gtk.Paned+PanedChild
                        this.vbox2 = new global::Gtk.VBox ();
                        this.vbox2.Name = "vbox2";
                        // Container child vbox2.Gtk.Box+BoxChild
-                       this.playerbin2 = new global::LongoMatch.Gui.PlayerBin ();
-                       this.playerbin2.Events = ((global::Gdk.EventMask)(256));
-                       this.playerbin2.Name = "playerbin2";
-                       this.playerbin2.CloseAlwaysVisible = false;
-                       this.vbox2.Add (this.playerbin2);
-                       global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 
[this.playerbin2]));
+                       this.playbins_hbox = new global::Gtk.HBox ();
+                       this.playbins_hbox.Name = "playbins_hbox";
+                       this.playbins_hbox.Homogeneous = true;
+                       this.playbins_hbox.Spacing = 15;
+                       this.playbins_hbox.BorderWidth = ((uint)(15));
+                       // Container child playbins_hbox.Gtk.Box+BoxChild
+                       this.main_cam_playerbin = new global::LongoMatch.Gui.PlayerBin ();
+                       this.main_cam_playerbin.Events = ((global::Gdk.EventMask)(256));
+                       this.main_cam_playerbin.Name = "main_cam_playerbin";
+                       this.main_cam_playerbin.CloseAlwaysVisible = false;
+                       this.playbins_hbox.Add (this.main_cam_playerbin);
+                       global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.playbins_hbox 
[this.main_cam_playerbin]));
                        w1.Position = 0;
-                       // Container child vbox2.Gtk.Box+BoxChild
-                       this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 1F);
-                       this.alignment1.Name = "alignment1";
-                       // Container child alignment1.Gtk.Container+ContainerChild
-                       this.hbox4 = new global::Gtk.HBox ();
-                       this.hbox4.Name = "hbox4";
-                       this.hbox4.Spacing = 6;
-                       // Container child hbox4.Gtk.Box+BoxChild
-                       this.arrowimage1 = new global::Gtk.Image ();
-                       this.arrowimage1.Name = "arrowimage1";
-                       this.hbox4.Add (this.arrowimage1);
-                       global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox4 
[this.arrowimage1]));
+                       this.vbox2.Add (this.playbins_hbox);
+                       global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 
[this.playbins_hbox]));
                        w2.Position = 0;
-                       w2.Expand = false;
-                       w2.Fill = false;
-                       // Container child hbox4.Gtk.Box+BoxChild
-                       this.synclabel = new global::Gtk.Label ();
-                       this.synclabel.WidthRequest = 300;
-                       this.synclabel.Name = "synclabel";
-                       this.synclabel.UseMarkup = true;
-                       this.hbox4.Add (this.synclabel);
-                       global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox4 
[this.synclabel]));
-                       w3.Position = 1;
-                       // Container child hbox4.Gtk.Box+BoxChild
-                       this.arrowimage2 = new global::Gtk.Image ();
-                       this.arrowimage2.Name = "arrowimage2";
-                       this.hbox4.Add (this.arrowimage2);
-                       global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox4 
[this.arrowimage2]));
-                       w4.Position = 2;
-                       w4.Expand = false;
-                       w4.Fill = false;
-                       this.alignment1.Add (this.hbox4);
-                       this.vbox2.Add (this.alignment1);
-                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 
[this.alignment1]));
-                       w6.Position = 1;
-                       w6.Expand = false;
-                       w6.Fill = false;
-                       w6.Padding = ((uint)(10));
-                       // Container child vbox2.Gtk.Box+BoxChild
+                       this.vpaned2.Add (this.vbox2);
+                       global::Gtk.Paned.PanedChild w3 = ((global::Gtk.Paned.PanedChild)(this.vpaned2 
[this.vbox2]));
+                       w3.Resize = false;
+                       // Container child vpaned2.Gtk.Paned+PanedChild
                        this.hbox3 = new global::Gtk.HBox ();
                        this.hbox3.Name = "hbox3";
-                       this.hbox3.Spacing = 6;
                        // Container child hbox3.Gtk.Box+BoxChild
-                       this.vbox6 = new global::Gtk.VBox ();
-                       this.vbox6.Name = "vbox6";
-                       this.vbox6.Spacing = 6;
-                       // Container child vbox6.Gtk.Box+BoxChild
-                       this.zoomoutbutton = new global::Gtk.Button ();
-                       this.zoomoutbutton.CanFocus = true;
-                       this.zoomoutbutton.Name = "zoomoutbutton";
-                       // Container child zoomoutbutton.Gtk.Container+ContainerChild
+                       this.labels_alignment = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+                       this.labels_alignment.Name = "labels_alignment";
+                       // Container child labels_alignment.Gtk.Container+ContainerChild
+                       this.labels_vbox = new global::Gtk.VBox ();
+                       this.labels_vbox.Name = "labels_vbox";
+                       this.labels_vbox.Spacing = 6;
+                       // Container child labels_vbox.Gtk.Box+BoxChild
+                       this.labelsarea = new global::Gtk.DrawingArea ();
+                       this.labelsarea.Name = "labelsarea";
+                       this.labels_vbox.Add (this.labelsarea);
+                       global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.labels_vbox 
[this.labelsarea]));
+                       w4.Position = 0;
+                       // Container child labels_vbox.Gtk.Box+BoxChild
+                       this.zoomhbox = new global::Gtk.HBox ();
+                       this.zoomhbox.Name = "zoomhbox";
+                       this.zoomhbox.Spacing = 6;
+                       // Container child zoomhbox.Gtk.Box+BoxChild
+                       this.zoominimage = new global::Gtk.Image ();
+                       this.zoominimage.WidthRequest = 14;
+                       this.zoominimage.HeightRequest = 8;
+                       this.zoominimage.Name = "zoominimage";
+                       this.zoomhbox.Add (this.zoominimage);
+                       global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.zoomhbox 
[this.zoominimage]));
+                       w5.Position = 0;
+                       w5.Expand = false;
+                       w5.Fill = false;
+                       // Container child zoomhbox.Gtk.Box+BoxChild
+                       this.zoomscale = new global::Gtk.HScale (null);
+                       this.zoomscale.CanFocus = true;
+                       this.zoomscale.Name = "zoomscale";
+                       this.zoomscale.Inverted = true;
+                       this.zoomscale.Adjustment.Upper = 100;
+                       this.zoomscale.Adjustment.PageIncrement = 10;
+                       this.zoomscale.Adjustment.StepIncrement = 1;
+                       this.zoomscale.DrawValue = false;
+                       this.zoomscale.Digits = 0;
+                       this.zoomscale.ValuePos = ((global::Gtk.PositionType)(2));
+                       this.zoomhbox.Add (this.zoomscale);
+                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.zoomhbox 
[this.zoomscale]));
+                       w6.Position = 1;
+                       // Container child zoomhbox.Gtk.Box+BoxChild
                        this.zoomoutimage = new global::Gtk.Image ();
+                       this.zoomoutimage.WidthRequest = 14;
+                       this.zoomoutimage.HeightRequest = 8;
                        this.zoomoutimage.Name = "zoomoutimage";
-                       this.zoomoutbutton.Add (this.zoomoutimage);
-                       this.zoomoutbutton.Label = null;
-                       this.vbox6.Add (this.zoomoutbutton);
-                       global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox6 
[this.zoomoutbutton]));
-                       w8.Position = 0;
+                       this.zoomhbox.Add (this.zoomoutimage);
+                       global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.zoomhbox 
[this.zoomoutimage]));
+                       w7.Position = 2;
+                       w7.Expand = false;
+                       w7.Fill = false;
+                       this.labels_vbox.Add (this.zoomhbox);
+                       global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.labels_vbox 
[this.zoomhbox]));
+                       w8.Position = 1;
                        w8.Expand = false;
                        w8.Fill = false;
-                       // Container child vbox6.Gtk.Box+BoxChild
-                       this.zoominbutton = new global::Gtk.Button ();
-                       this.zoominbutton.CanFocus = true;
-                       this.zoominbutton.Name = "zoominbutton";
-                       // Container child zoominbutton.Gtk.Container+ContainerChild
-                       this.zoominimage = new global::Gtk.Image ();
-                       this.zoominimage.Name = "zoominimage";
-                       this.zoominbutton.Add (this.zoominimage);
-                       this.zoominbutton.Label = null;
-                       this.vbox6.Add (this.zoominbutton);
-                       global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox6 
[this.zoominbutton]));
-                       w10.Position = 1;
+                       this.labels_alignment.Add (this.labels_vbox);
+                       this.hbox3.Add (this.labels_alignment);
+                       global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox3 
[this.labels_alignment]));
+                       w10.Position = 0;
                        w10.Expand = false;
-                       w10.Fill = false;
-                       this.hbox3.Add (this.vbox6);
-                       global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.vbox6]));
-                       w11.Position = 0;
-                       w11.Expand = false;
                        // Container child hbox3.Gtk.Box+BoxChild
                        this.vbox7 = new global::Gtk.VBox ();
                        this.vbox7.Name = "vbox7";
                        // Container child vbox7.Gtk.Box+BoxChild
-                       this.drawingarea1 = new global::Gtk.DrawingArea ();
-                       this.drawingarea1.Name = "drawingarea1";
-                       this.vbox7.Add (this.drawingarea1);
-                       global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox7 
[this.drawingarea1]));
-                       w12.Position = 0;
+                       this.timerulearea = new global::Gtk.DrawingArea ();
+                       this.timerulearea.Name = "timerulearea";
+                       this.vbox7.Add (this.timerulearea);
+                       global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox7 
[this.timerulearea]));
+                       w11.Position = 0;
+                       w11.Expand = false;
                        // Container child vbox7.Gtk.Box+BoxChild
                        this.scrolledwindow2 = new global::Gtk.ScrolledWindow ();
                        this.scrolledwindow2.HeightRequest = 50;
                        this.scrolledwindow2.CanFocus = true;
                        this.scrolledwindow2.Name = "scrolledwindow2";
                        // Container child scrolledwindow2.Gtk.Container+ContainerChild
-                       global::Gtk.Viewport w13 = new global::Gtk.Viewport ();
-                       w13.ShadowType = ((global::Gtk.ShadowType)(0));
+                       global::Gtk.Viewport w12 = new global::Gtk.Viewport ();
+                       w12.ShadowType = ((global::Gtk.ShadowType)(0));
                        // Container child GtkViewport.Gtk.Container+ContainerChild
-                       this.drawingarea2 = new global::Gtk.DrawingArea ();
-                       this.drawingarea2.Name = "drawingarea2";
-                       w13.Add (this.drawingarea2);
-                       this.scrolledwindow2.Add (w13);
+                       this.timelinearea = new global::Gtk.DrawingArea ();
+                       this.timelinearea.Name = "timelinearea";
+                       w12.Add (this.timelinearea);
+                       this.scrolledwindow2.Add (w12);
                        this.vbox7.Add (this.scrolledwindow2);
-                       global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox7 
[this.scrolledwindow2]));
-                       w16.Position = 1;
+                       global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox7 
[this.scrolledwindow2]));
+                       w15.Position = 1;
                        this.hbox3.Add (this.vbox7);
-                       global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.vbox7]));
-                       w17.Position = 1;
-                       this.vbox2.Add (this.hbox3);
-                       global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox3]));
-                       w18.Position = 2;
-                       w18.Expand = false;
-                       this.Add (this.vbox2);
+                       global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.vbox7]));
+                       w16.Position = 1;
+                       this.vpaned2.Add (this.hbox3);
+                       this.Add (this.vpaned2);
                        if ((this.Child != null)) {
                                this.Child.ShowAll ();
                        }
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index e8eaf97..d2674d5 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -9656,118 +9656,123 @@ You can continue with the current capture, cancel it or save your project.
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ProjectPeriods" design-size="878 475">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ProjectPeriods" design-size="1639 475">
     <property name="MemberName" />
     <property name="Visible">False</property>
     <child>
-      <widget class="Gtk.VBox" id="vbox2">
+      <widget class="Gtk.VPaned" id="vpaned2">
         <property name="MemberName" />
+        <property name="CanFocus">True</property>
+        <property name="Position">400</property>
         <child>
-          <widget class="LongoMatch.Gui.PlayerBin" id="playerbin2">
-            <property name="MemberName" />
-            <property name="Events">ButtonPressMask</property>
-            <property name="CloseAlwaysVisible">False</property>
-          </widget>
-          <packing>
-            <property name="Position">0</property>
-            <property name="AutoSize">True</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="Gtk.Alignment" id="alignment1">
+          <widget class="Gtk.VBox" id="vbox2">
             <property name="MemberName" />
-            <property name="Xscale">0</property>
             <child>
-              <widget class="Gtk.HBox" id="hbox4">
+              <widget class="Gtk.HBox" id="playbins_hbox">
                 <property name="MemberName" />
-                <property name="Spacing">6</property>
+                <property name="Homogeneous">True</property>
+                <property name="Spacing">15</property>
+                <property name="BorderWidth">15</property>
                 <child>
-                  <widget class="Gtk.Image" id="arrowimage1">
+                  <widget class="LongoMatch.Gui.PlayerBin" id="main_cam_playerbin">
                     <property name="MemberName" />
+                    <property name="Events">ButtonPressMask</property>
+                    <property name="CloseAlwaysVisible">False</property>
                   </widget>
                   <packing>
                     <property name="Position">0</property>
-                    <property name="AutoSize">False</property>
-                    <property name="Expand">False</property>
-                    <property name="Fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="Gtk.Label" id="synclabel">
-                    <property name="MemberName" />
-                    <property name="WidthRequest">300</property>
-                    <property name="UseMarkup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="Position">1</property>
-                    <property name="AutoSize">False</property>
+                    <property name="AutoSize">True</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="Gtk.Image" id="arrowimage2">
-                    <property name="MemberName" />
-                  </widget>
-                  <packing>
-                    <property name="Position">2</property>
-                    <property name="AutoSize">False</property>
-                    <property name="Expand">False</property>
-                    <property name="Fill">False</property>
-                  </packing>
+                  <placeholder />
                 </child>
               </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">True</property>
+              </packing>
             </child>
           </widget>
           <packing>
-            <property name="Position">1</property>
-            <property name="AutoSize">True</property>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
-            <property name="Padding">10</property>
+            <property name="Resize">False</property>
           </packing>
         </child>
         <child>
           <widget class="Gtk.HBox" id="hbox3">
             <property name="MemberName" />
-            <property name="Spacing">6</property>
             <child>
-              <widget class="Gtk.VBox" id="vbox6">
+              <widget class="Gtk.Alignment" id="labels_alignment">
                 <property name="MemberName" />
-                <property name="Spacing">6</property>
                 <child>
-                  <widget class="Gtk.Button" id="zoomoutbutton">
+                  <widget class="Gtk.VBox" id="labels_vbox">
                     <property name="MemberName" />
-                    <property name="CanFocus">True</property>
-                    <property name="Type">Custom</property>
+                    <property name="Spacing">6</property>
                     <child>
-                      <widget class="Gtk.Image" id="zoomoutimage">
+                      <widget class="Gtk.DrawingArea" id="labelsarea">
                         <property name="MemberName" />
                       </widget>
+                      <packing>
+                        <property name="Position">0</property>
+                        <property name="AutoSize">True</property>
+                      </packing>
                     </child>
-                  </widget>
-                  <packing>
-                    <property name="Position">0</property>
-                    <property name="AutoSize">True</property>
-                    <property name="Expand">False</property>
-                    <property name="Fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="Gtk.Button" id="zoominbutton">
-                    <property name="MemberName" />
-                    <property name="CanFocus">True</property>
-                    <property name="Type">Custom</property>
                     <child>
-                      <widget class="Gtk.Image" id="zoominimage">
+                      <widget class="Gtk.HBox" id="zoomhbox">
                         <property name="MemberName" />
+                        <property name="Spacing">6</property>
+                        <child>
+                          <widget class="Gtk.Image" id="zoominimage">
+                            <property name="MemberName" />
+                            <property name="WidthRequest">14</property>
+                            <property name="HeightRequest">8</property>
+                          </widget>
+                          <packing>
+                            <property name="Position">0</property>
+                            <property name="AutoSize">True</property>
+                            <property name="Expand">False</property>
+                            <property name="Fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.HScale" id="zoomscale">
+                            <property name="MemberName" />
+                            <property name="CanFocus">True</property>
+                            <property name="Inverted">True</property>
+                            <property name="Upper">100</property>
+                            <property name="PageIncrement">10</property>
+                            <property name="StepIncrement">1</property>
+                            <property name="DrawValue">False</property>
+                            <property name="Digits">0</property>
+                            <property name="ValuePos">Top</property>
+                          </widget>
+                          <packing>
+                            <property name="Position">1</property>
+                            <property name="AutoSize">True</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Image" id="zoomoutimage">
+                            <property name="MemberName" />
+                            <property name="WidthRequest">14</property>
+                            <property name="HeightRequest">8</property>
+                          </widget>
+                          <packing>
+                            <property name="Position">2</property>
+                            <property name="AutoSize">True</property>
+                            <property name="Expand">False</property>
+                            <property name="Fill">False</property>
+                          </packing>
+                        </child>
                       </widget>
+                      <packing>
+                        <property name="Position">1</property>
+                        <property name="AutoSize">True</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
                     </child>
                   </widget>
-                  <packing>
-                    <property name="Position">1</property>
-                    <property name="AutoSize">True</property>
-                    <property name="Expand">False</property>
-                    <property name="Fill">False</property>
-                  </packing>
                 </child>
               </widget>
               <packing>
@@ -9780,12 +9785,13 @@ You can continue with the current capture, cancel it or save your project.
               <widget class="Gtk.VBox" id="vbox7">
                 <property name="MemberName" />
                 <child>
-                  <widget class="Gtk.DrawingArea" id="drawingarea1">
+                  <widget class="Gtk.DrawingArea" id="timerulearea">
                     <property name="MemberName" />
                   </widget>
                   <packing>
                     <property name="Position">0</property>
-                    <property name="AutoSize">True</property>
+                    <property name="AutoSize">False</property>
+                    <property name="Expand">False</property>
                   </packing>
                 </child>
                 <child>
@@ -9798,7 +9804,7 @@ You can continue with the current capture, cancel it or save your project.
                         <property name="MemberName" />
                         <property name="ShadowType">None</property>
                         <child>
-                          <widget class="Gtk.DrawingArea" id="drawingarea2">
+                          <widget class="Gtk.DrawingArea" id="timelinearea">
                             <property name="MemberName" />
                           </widget>
                         </child>
@@ -9817,11 +9823,6 @@ You can continue with the current capture, cancel it or save your project.
               </packing>
             </child>
           </widget>
-          <packing>
-            <property name="Position">2</property>
-            <property name="AutoSize">False</property>
-            <property name="Expand">False</property>
-          </packing>
         </child>
       </widget>
     </child>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]