[longomatch] Start replacing the old widgets, starting with the timeline
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Start replacing the old widgets, starting with the timeline
- Date: Mon, 7 Jul 2014 11:21:25 +0000 (UTC)
commit 5147d78d93765e4adcd800c6e1e1c6c06fb1d76c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed May 14 21:41:32 2014 +0200
Start replacing the old widgets, starting with the timeline
LongoMatch.Core/Config.cs | 1 +
LongoMatch.Core/Handlers/Handlers.cs | 4 +-
LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs | 6 +-
LongoMatch.Drawing/Canvas.cs | 64 +++
LongoMatch.Drawing/CanvasObject/CategoryLabel.cs | 60 ++
.../CanvasObject/CategoryTimeline.cs | 136 +++++
LongoMatch.Drawing/CanvasObject/PlayObject.cs | 121 +++++
LongoMatch.Drawing/Common.cs | 46 ++
LongoMatch.Drawing/LongoMatch.Drawing.mdp | 36 ++
LongoMatch.Drawing/Widgets/CategoriesLabels.cs | 74 +++
LongoMatch.Drawing/Widgets/PlaysTimeline.cs | 248 +++++++++
LongoMatch.Drawing/Widgets/Timerule.cs | 97 ++++
LongoMatch.Drawing/enums.cs | 24 +
LongoMatch.GUI/Gui/Base/TemplatesEditorBase.cs | 200 -------
LongoMatch.GUI/Gui/Base/TimeScaleBase.cs | 413 --------------
LongoMatch.GUI/Gui/Base/TimelineWidgetBase.cs | 201 -------
LongoMatch.GUI/Gui/Component/AnalysisComponent.cs | 101 +---
LongoMatch.GUI/Gui/Component/DrawingWidget.cs | 2 +
LongoMatch.GUI/Gui/Component/GameUnitTimeScale.cs | 85 ---
.../Gui/Component/GameUnitsTimelineWidget.cs | 120 ----
LongoMatch.GUI/Gui/Component/TimeLineWidget.cs | 152 ------
LongoMatch.GUI/Gui/Component/Timeline.cs | 204 +++++++
.../Gui/Component/TimelineLabelsWidget.cs | 141 -----
LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs | 1 -
LongoMatch.GUI/LongoMatch.GUI.mdp | 14 +-
.../LongoMatch.Gui.Base.TimelineWidgetBase.cs | 160 ------
.../LongoMatch.Gui.Component.AnalysisComponent.cs | 114 ++---
.../LongoMatch.Gui.Component.DrawingToolBox.cs | 1 +
.../gtk-gui/LongoMatch.Gui.Component.Timeline.cs | 151 ++++++
.../LongoMatch.Gui.Panel.ProjectsManagerPanel.cs | 1 +
.../gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs | 1 +
LongoMatch.GUI/gtk-gui/gui.stetic | 568 ++++++++++----------
LongoMatch.GUI/gtk-gui/objects.xml | 63 +--
LongoMatch.Multimedia/LongoMatch.Multimedia.mdp | 4 +-
LongoMatch.Services/LongoMatch.Services.mdp | 4 +-
LongoMatch.Services/Services/EventsManager.cs | 5 +-
LongoMatch.Services/Services/GameUnitsManager.cs | 1 -
LongoMatch.Services/Services/PlaylistManager.cs | 2 +-
LongoMatch.mds | 8 +
LongoMatch/LongoMatchGtk.mdp | 1 +
LongoMatch/Main.cs | 2 +
Tests/Tests.mdp | 2 +-
42 files changed, 1657 insertions(+), 1982 deletions(-)
---
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index c1b0567..5b7b2f7 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -34,6 +34,7 @@ namespace LongoMatch
/* State */
public static IGUIToolkit GUIToolkit;
public static IMultimediaToolkit MultimediaToolkit;
+ public static IDrawingToolkit DrawingToolkit;
public static ITeamTemplatesProvider TeamTemplatesProvider;
public static ICategoriesTemplatesProvider CategoriesTemplatesProvider;
public static IDataBaseManager DatabaseManager;
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index 27bb775..c7abdfd 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -40,7 +40,7 @@ namespace LongoMatch.Handlers
/* Signal cancellation of tag */
public delegate void NewTagCancelHandler(Category category);
/* A new play needs to be created at a defined frame */
- public delegate void NewTagAtFrameHandler(Category category,int frame);
+ public delegate void NewTagAtPosHandler(Category category, Time position);
//A play was edited
public delegate void TimeNodeChangedHandler(TimeNode tNode, object val);
/* A list of plays needs to be deleted */
@@ -159,5 +159,7 @@ namespace LongoMatch.Handlers
public delegate void AnalysisModeChangedHandler (VideoAnalysisMode mode);
public delegate void TagSubcategoriesChangedHandler (bool tagsubcategories);
+ public delegate void ShowTimelineMenuHandler (List<Play> plays, Category cat, Time time);
+
public delegate void BackEventHandle ();
}
diff --git a/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs
b/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs
index 0372497..15d7b74 100644
--- a/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs
@@ -29,11 +29,11 @@ namespace LongoMatch.Interfaces.GUI
{
/* Tags */
event NewTagHandler NewTagEvent;
+ event NewTagAtPosHandler NewTagAtPosEvent;
event NewTagStartHandler NewTagStartEvent;
event NewTagStopHandler NewTagStopEvent;
event NewTagCancelHandler NewTagCancelEvent;
event PlaySelectedHandler PlaySelectedEvent;
- event NewTagAtFrameHandler NewTagAtFrameEvent;
event TagPlayHandler TagPlayEvent;
event PlaysDeletedHandler PlaysDeletedEvent;
event TimeNodeChangedHandler TimeNodeChanged;
@@ -69,17 +69,15 @@ namespace LongoMatch.Interfaces.GUI
void UpdateSelectedPlay (Play play);
void UpdateCategories (Categories categories);
void DeletePlays (List<Play> plays);
- void UpdateGameUnits (GameUnitsList gameUnits);
bool Fullscreen {set;}
bool WidgetsVisible {set;}
- bool PlaylistVisible {set;}
VideoAnalysisMode AnalysisMode {set;}
IPlayerBin Player{get;}
ICapturerBin Capturer{get;}
- IPlaylistWidget Playlist{get;}
ITemplatesService TemplatesService{set;}
+ IPlaylistWidget Playlist {get;}
}
}
diff --git a/LongoMatch.Drawing/Canvas.cs b/LongoMatch.Drawing/Canvas.cs
new file mode 100644
index 0000000..1a25ecd
--- /dev/null
+++ b/LongoMatch.Drawing/Canvas.cs
@@ -0,0 +1,64 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using System.Collections.Generic;
+using LongoMatch.Interfaces.Drawing;
+using LongoMatch.Interfaces;
+using LongoMatch.Common;
+using LongoMatch.Interfaces.Drawing;
+
+namespace LongoMatch.Drawing
+{
+ public class Canvas
+ {
+ protected IDrawingToolkit tk;
+ protected IWidget widget;
+
+ public Canvas (IWidget widget)
+ {
+ this.widget = widget;
+ tk = Config.DrawingToolkit;
+ Objects = new List<ICanvasObject>();
+ widget.DrawEvent += HandleDraw;
+ }
+
+ public List<ICanvasObject> Objects {
+ get;
+ set;
+ }
+
+ public double Width {
+ get;
+ set;
+ }
+
+ public double Height {
+ get;
+ set;
+ }
+
+ protected virtual void HandleDraw (object context, Area area) {
+ tk.Context = context;
+ foreach (ICanvasObject o in Objects) {
+ o.Draw (tk, area);
+ }
+ tk.Context = null;
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/CanvasObject/CategoryLabel.cs
b/LongoMatch.Drawing/CanvasObject/CategoryLabel.cs
new file mode 100644
index 0000000..34d0bc6
--- /dev/null
+++ b/LongoMatch.Drawing/CanvasObject/CategoryLabel.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Store;
+using LongoMatch.Interfaces.Drawing;
+using LongoMatch.Interfaces;
+using LongoMatch.Common;
+
+namespace LongoMatch.Drawing.CanvasObject
+{
+ public class CategoryLabel: ICanvasObject
+ {
+ Category category;
+ double width, height;
+ Point offset;
+
+ public CategoryLabel (Category category, double width, double height,
+ Point offset)
+ {
+ this.category = category;
+ this.height = height;
+ this.width = width;
+ this.offset = offset;
+ }
+
+ public double Scroll {
+ get;
+ set;
+ }
+
+ public void Draw (IDrawingToolkit tk, Area area) {
+ double y = offset.Y - Scroll;
+ tk.Begin();
+ tk.FillColor = category.Color;
+ tk.StrokeColor = Common.TEXT_COLOR;
+ tk.DrawRoundedRectangle (new Point(0, y + 1), width, height - 1, 3);
+ tk.FillColor = Common.TEXT_COLOR;
+ tk.StrokeColor = Common.TEXT_COLOR;
+ tk.DrawText (new Point (0, y), width, height,
+ category.Name);
+ tk.End();
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/CanvasObject/CategoryTimeline.cs
b/LongoMatch.Drawing/CanvasObject/CategoryTimeline.cs
new file mode 100644
index 0000000..12a2378
--- /dev/null
+++ b/LongoMatch.Drawing/CanvasObject/CategoryTimeline.cs
@@ -0,0 +1,136 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using System.Collections.Generic;
+using LongoMatch.Store;
+using LongoMatch.Common;
+using LongoMatch.Interfaces;
+using LongoMatch.Interfaces.Drawing;
+using LongoMatch.Store.Drawables;
+
+namespace LongoMatch.Drawing.CanvasObject
+{
+ public class CategoryTimeline: ICanvasSelectableObject
+ {
+ Color background;
+ List<PlayObject> plays;
+ double secondsPerPixel;
+
+ public CategoryTimeline (List<Play> plays, double offsetY, Color background)
+ {
+ this.background = background;
+ this.plays = new List<PlayObject> ();
+ SecondsPerPixel = 0.1;
+ OffsetY = offsetY;
+ foreach (Play p in plays) {
+ AddPlay (p);
+ }
+ }
+
+ public double SecondsPerPixel {
+ set {
+ foreach (PlayObject po in plays) {
+ po.SecondsPerPixel = secondsPerPixel;
+ }
+ secondsPerPixel = value;
+ }
+ protected get {
+ return secondsPerPixel;
+ }
+ }
+
+ public double Width {
+ set;
+ protected get;
+ }
+
+ public double OffsetY {
+ set;
+ protected get;
+ }
+
+ public bool Selected {
+ get;
+ set;
+ }
+
+ public void AddPlay (Play play) {
+ PlayObject po = new PlayObject (play);
+ po.OffsetY = OffsetY;
+ po.SecondsPerPixel = SecondsPerPixel;
+ plays.Add (po);
+ }
+
+ public void RemovePlay (Play play) {
+ plays.RemoveAll (po => po.Play == play);
+ }
+
+ public void Draw (IDrawingToolkit tk, Area area) {
+ List<PlayObject> selected = new List<PlayObject>();
+ tk.Begin ();
+ tk.FillColor = background;
+ tk.StrokeColor = background;
+ tk.LineWidth = 1;
+ tk.DrawRectangle (new Point (0, OffsetY), Width,
+ Common.CATEGORY_HEIGHT);
+ foreach (PlayObject p in plays) {
+ if (p.Selected) {
+ selected.Add (p);
+ continue;
+ }
+ p.Draw (tk, area);
+ }
+ foreach (PlayObject p in selected) {
+ p.Draw (tk, area);
+ }
+ tk.End();
+ }
+
+ public Selection GetSelection (Point point, double precision) {
+ Selection selection = null;
+
+ if (point.Y >= OffsetY && point.Y < OffsetY + Common.CATEGORY_HEIGHT) {
+ foreach (PlayObject po in plays) {
+ Selection tmp;
+ tmp = po.GetSelection (point, precision);
+ if (tmp == null) {
+ continue;
+ }
+ if (tmp.Position != SelectionPosition.None) {
+ if (tmp.Accuracy == 0) {
+ selection = tmp;
+ break;
+ }
+ if (selection == null || tmp.Accuracy < selection.Accuracy) {
+ selection = tmp;
+ }
+ }
+ }
+ }
+ if (selection != null) {
+ (selection.Drawable as ICanvasSelectableObject).Selected = true;
+ }
+ return selection;
+ }
+
+ public void Move (Selection s, Point p, Point start) {
+ s.Drawable.Move (s, p, start);
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/CanvasObject/PlayObject.cs b/LongoMatch.Drawing/CanvasObject/PlayObject.cs
new file mode 100644
index 0000000..969e361
--- /dev/null
+++ b/LongoMatch.Drawing/CanvasObject/PlayObject.cs
@@ -0,0 +1,121 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Store;
+using LongoMatch.Interfaces.Drawing;
+using LongoMatch.Interfaces;
+using LongoMatch.Common;
+using LongoMatch.Store.Drawables;
+
+namespace LongoMatch.Drawing.CanvasObject
+{
+ public class PlayObject: ICanvasSelectableObject
+ {
+
+ public PlayObject (Play play)
+ {
+ Play = play;
+ }
+
+ public Play Play {
+ get;
+ set;
+ }
+
+ public double OffsetY {
+ get;
+ set;
+ }
+
+ public double SecondsPerPixel {
+ set;
+ protected get;
+ }
+
+ public bool Selected {
+ set;
+ get;
+ }
+
+ double StartX {
+ get {
+ return Common.TimeToPos (Play.Start, SecondsPerPixel);
+ }
+ }
+
+ double StopX {
+ get {
+ return Common.TimeToPos (Play.Stop, SecondsPerPixel);
+ }
+ }
+
+ double CenterX {
+ get {
+ return Common.TimeToPos (Play.Start + Play.Duration / 2,
+ SecondsPerPixel);
+ }
+ }
+
+ public void Draw (IDrawingToolkit tk, Area area) {
+ Color c = Play.Category.Color;
+ tk.Begin ();
+ tk.FillColor = new Color (c.R, c.G, c.B, (ushort) (0.8 * ushort.MaxValue));
+ if (Selected) {
+ tk.StrokeColor = Common.PLAY_OBJECT_SELECTED_COLOR;
+ } else {
+ tk.StrokeColor = Common.PLAY_OBJECT_UNSELECTED_COLOR;
+ }
+ tk.LineWidth = 2;
+ tk.DrawRoundedRectangle (new Point (StartX, OffsetY),
+ Common.TimeToPos (Play.Duration, SecondsPerPixel),
+ Common.CATEGORY_HEIGHT, 2);
+ tk.End ();
+ }
+
+ public Selection GetSelection (Point point, double precision) {
+ double accuracy;
+ if (point.Y >= OffsetY && point.Y < OffsetY + Common.CATEGORY_HEIGHT) {
+ if (Drawable.MatchAxis (point.X, StartX, precision, out accuracy)) {
+ return new Selection (this, SelectionPosition.Left, accuracy);
+ } else if (Drawable.MatchAxis (point.X, StopX, precision, out accuracy)) {
+ return new Selection (this, SelectionPosition.Right, accuracy);
+ } else if (point.X > StartX && point.X < StopX) {
+ return new Selection (this, SelectionPosition.All,
+ Math.Abs (CenterX - point.X));
+ }
+ }
+ return null;
+ }
+
+ public void Move (Selection sel, Point p, Point start) {
+ switch (sel.Position) {
+ case SelectionPosition.Left: {
+ if (p.X < StopX)
+ Play.Start = Common.PosToTime (p, SecondsPerPixel);
+ break;
+ }
+ case SelectionPosition.Right: {
+ if (p.X > StartX)
+ Play.Stop = Common.PosToTime (p, SecondsPerPixel);
+ break;
+ }
+ }
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/Common.cs b/LongoMatch.Drawing/Common.cs
new file mode 100644
index 0000000..176fa21
--- /dev/null
+++ b/LongoMatch.Drawing/Common.cs
@@ -0,0 +1,46 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Store;
+using LongoMatch.Common;
+
+namespace LongoMatch.Drawing
+{
+ public class Common
+ {
+ public const int CATEGORY_HEIGHT = 20;
+ public const int CATEGORY_WIDTH = 150;
+ public const int CATEGORY_H_SPACE = 5;
+ public const double TIMELINE_ACCURACY = 5;
+ public static Color TEXT_COLOR = Color.Black;
+ public static Color TIMELINE_LINE_COLOR = Color.Black;
+ public static Color TIMERULE_BACKGROUND = Color.White;
+ public static Color PLAY_OBJECT_SELECTED_COLOR = Color.Black;
+ public static Color PLAY_OBJECT_UNSELECTED_COLOR = Color.Grey;
+ public const int TIMELINE_LINE_WIDTH = 1;
+
+ public static double TimeToPos (Time time, double secondsPerPixel) {
+ return (double)time.MSeconds / 1000 / secondsPerPixel;
+ }
+
+ public static Time PosToTime (Point p, double secondsPerPixel) {
+ return new Time ((int) (p.X * 1000 * secondsPerPixel));
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/LongoMatch.Drawing.mdp b/LongoMatch.Drawing/LongoMatch.Drawing.mdp
new file mode 100644
index 0000000..2accd98
--- /dev/null
+++ b/LongoMatch.Drawing/LongoMatch.Drawing.mdp
@@ -0,0 +1,36 @@
+<Project name="LongoMatch.Drawing" fileversion="2.0" DefaultNamespace="LongoMatch.Drawing" language="C#"
targetFramework="4.0" ctype="DotNetProject">
+ <Configurations active="Release">
+ <Configuration name="Debug" ctype="DotNetProjectConfiguration">
+ <Output directory="bin/Debug" assembly="LongoMatch.Drawing" />
+ <Build debugmode="True" target="Library" />
+ <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" />
+ <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False"
generateoverflowchecks="False" definesymbols="DEBUG;" generatexmldocumentation="False"
ctype="CSharpCompilerParameters" />
+ </Configuration>
+ <Configuration name="Release" ctype="DotNetProjectConfiguration">
+ <Output directory="bin/Release" assembly="LongoMatch.Drawing" />
+ <Build debugmode="False" target="Library" />
+ <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" />
+ <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False"
generateoverflowchecks="False" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ </Configurations>
+ <Contents>
+ <File subtype="Directory" buildaction="Compile" name="CanvasObject" />
+ <File subtype="Code" buildaction="Compile" name="Canvas.cs" />
+ <File subtype="Code" buildaction="Compile" name="enums.cs" />
+ <File subtype="Directory" buildaction="Compile" name="CanvasObject" />
+ <File subtype="Directory" buildaction="Compile" name="Widgets" />
+ <File subtype="Code" buildaction="Compile" name="CanvasObject/CategoryLabel.cs" />
+ <File subtype="Code" buildaction="Compile" name="Widgets/Timerule.cs" />
+ <File subtype="Code" buildaction="Compile" name="Widgets/CategoriesLabels.cs" />
+ <File subtype="Code" buildaction="Compile" name="CanvasObject/PlayObject.cs" />
+ <File subtype="Code" buildaction="Compile" name="Common.cs" />
+ <File subtype="Code" buildaction="Compile" name="Widgets/PlaysTimeline.cs" />
+ <File subtype="Code" buildaction="Compile" name="CanvasObject/CategoryTimeline.cs" />
+ <File subtype="Directory" buildaction="Compile" name="Interfaces" />
+ </Contents>
+ <References>
+ <ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Project" localcopy="True" refto="LongoMatch.Core" />
+ <ProjectReference specificVersion="False" type="Gac" localcopy="False" refto="System.Core,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ </References>
+</Project>
\ No newline at end of file
diff --git a/LongoMatch.Drawing/Widgets/CategoriesLabels.cs b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
new file mode 100644
index 0000000..340e19d
--- /dev/null
+++ b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
@@ -0,0 +1,74 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Store;
+using LongoMatch.Interfaces.Drawing;
+using LongoMatch.Common;
+using LongoMatch.Drawing.CanvasObject;
+
+namespace LongoMatch.Drawing.Widgets
+{
+ public class CategoriesLabels: Canvas
+ {
+ Project project;
+
+ public CategoriesLabels (IWidget widget): base (widget)
+ {
+ }
+
+ public double Scroll {
+ set {
+ foreach (var o in Objects) {
+ CategoryLabel cl = o as CategoryLabel;
+ cl.Scroll = value;
+ }
+ }
+ }
+
+ public Project Project {
+ set {
+ Objects.Clear ();
+ project = value;
+ if (project != null)
+ FillCanvas ();
+ }
+ }
+
+ void FillCanvas () {
+ Point offset;
+
+ widget.Width = Common.CATEGORY_WIDTH;
+
+ offset = new Point (0, 0);
+
+ /* Start from bottom to top with categories */
+ foreach (Category cat in project.Categories) {
+ CategoryLabel l;
+ Point cOffset;
+
+ /* Add the category label */
+ cOffset = new Point (offset.X, offset.Y);
+ l = new CategoryLabel (cat, Common.CATEGORY_WIDTH,
+ Common.CATEGORY_HEIGHT, cOffset);
+ Objects.Add (l);
+ offset.Y += Common.CATEGORY_HEIGHT;
+ }
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
new file mode 100644
index 0000000..fc98b7c
--- /dev/null
+++ b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
@@ -0,0 +1,248 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using LongoMatch.Store;
+using LongoMatch.Drawing.CanvasObject;
+using LongoMatch.Common;
+using LongoMatch.Handlers;
+using LongoMatch.Interfaces.Drawing;
+using LongoMatch.Store.Drawables;
+
+namespace LongoMatch.Drawing.Widgets
+{
+ /* Widget schematic
+ *
+ * time |___|___|___|___|__|
+ * cat1 --- -- -
+ * cat2 -- ------- --
+ * cat3 ---- ----
+ */
+
+ public class PlaysTimeline: Canvas
+ {
+
+ public event TimeNodeChangedHandler TimeNodeChanged;
+ public event PlaySelectedHandler TimeNodeSelected;
+ public event ShowTimelineMenuHandler ShowMenu;
+
+ Project project;
+ double secondsPerPixel;
+ int duration;
+ uint lastTime;
+ bool moving;
+ List<Selection> selectionList;
+ Point start;
+ Dictionary<Category, CategoryTimeline> categories;
+
+ public PlaysTimeline (IWidget widget): base(widget)
+ {
+ categories = new Dictionary<Category, CategoryTimeline> ();
+ secondsPerPixel = 0.1;
+ widget.ButtonPressEvent += HandleButtonPressEvent;
+ widget.ButtonReleasedEvent += HandleButtonReleasedEvent;
+ widget.MotionEvent += HandleMotionEvent;
+ selectionList = new List<Selection> ();
+ }
+
+ public void LoadProject (Project project, PlaysFilter filter) {
+ this.project = project;
+ Objects.Clear();
+ categories.Clear();
+ duration = new Time ((int)project.Description.File.Length).Seconds;
+ widget.Height = project.Categories.Count * Common.CATEGORY_HEIGHT;
+ FillCanvas ();
+ filter.FilterUpdated += () => {
+ //Visible = filter.VisibleCategories.Contains (category);
+ //QueueDraw();
+ };
+ }
+
+ public Time CurrentTime {
+ set {
+ }
+ }
+
+ public double SecondsPerPixel {
+ set {
+ secondsPerPixel = value;
+ Update ();
+ }
+ get {
+ return secondsPerPixel;
+ }
+ }
+
+ public void AddPlay(Play play) {
+ categories[play.Category].AddPlay (play);
+ }
+
+ public void RemovePlays(List<Play> plays) {
+ foreach (Play p in plays) {
+ categories[p.Category].RemovePlay (p);
+ selectionList.RemoveAll (s => (s.Drawable as PlayObject).Play == p);
+ }
+ }
+
+ void Update () {
+ double width = duration / SecondsPerPixel;
+ widget.Width = width;
+ foreach (object o in Objects) {
+ CategoryTimeline tl = o as CategoryTimeline;
+ tl.Width = width;
+ tl.SecondsPerPixel = SecondsPerPixel;
+ }
+ }
+
+ void FillCanvas () {
+ for (int i=0; i<project.Categories.Count; i++) {
+ Category cat;
+ CategoryTimeline tl;
+ Color c;
+
+ if (i % 2 == 0) {
+ c = Color.White;
+ } else {
+ c = Color.Grey;
+ }
+
+ cat = project.Categories[i];
+ tl = new CategoryTimeline (project.PlaysInCategory (cat),
+ i * Common.CATEGORY_HEIGHT, c);
+ categories[cat] = tl;
+ Objects.Add (tl);
+ }
+ Update ();
+ }
+
+ void RedrawSelection (Selection sel)
+ {
+ PlayObject po = sel.Drawable as PlayObject;
+ widget.Redraw (categories[po.Play.Category]);
+ }
+
+ void ClearSelection () {
+ foreach (Selection sel in selectionList) {
+ PlayObject po = sel.Drawable as PlayObject;
+ po.Selected = false;
+ widget.Redraw (po);
+ }
+ selectionList.Clear ();
+ }
+
+ void UpdateSelection (Selection sel) {
+ PlayObject po = sel.Drawable as PlayObject;
+ Selection seldup = selectionList.FirstOrDefault (s => s.Drawable == sel.Drawable);
+
+ if (seldup != null) {
+ po.Selected = false;
+ selectionList.Remove (seldup);
+ } else {
+ po.Selected = true;
+ selectionList.Add (sel);
+ if (TimeNodeSelected != null) {
+ TimeNodeSelected (po.Play);
+ }
+ }
+ widget.Redraw (po);
+ }
+
+ void HandleLeftButton (Point coords, ButtonModifier modif) {
+ Selection sel = null;
+
+ foreach (CategoryTimeline tl in categories.Values) {
+ sel = tl.GetSelection (coords, Common.TIMELINE_ACCURACY);
+ if (sel != null) {
+ break;
+ }
+ }
+
+ if (modif == ButtonModifier.Control || modif == ButtonModifier.Shift) {
+ if (sel != null) {
+ UpdateSelection (sel);
+ }
+ } else {
+ ClearSelection ();
+ if (sel == null) {
+ return;
+ }
+ UpdateSelection (sel);
+ start = coords;
+ if (sel.Position != SelectionPosition.All) {
+ widget.SetCursor (CursorType.DoubleArrow);
+ moving = true;
+ }
+ }
+ }
+
+ void HandleRightButton (Point coords) {
+ List<Play> plays = selectionList.Select (p => (p.Drawable as
PlayObject).Play).ToList();
+
+ if (ShowMenu != null) {
+ ShowMenu (plays, null,
+ Common.PosToTime (coords, SecondsPerPixel));
+ }
+ }
+
+ void HandleMotionEvent (Point coords)
+ {
+ Selection sel;
+
+ if (!moving)
+ return;
+
+ sel = selectionList[0];
+ sel.Drawable.Move (sel, coords, start);
+ RedrawSelection (selectionList[0]);
+ if (TimeNodeChanged != null) {
+ Time time;
+ Play play = (sel.Drawable as PlayObject).Play;
+
+ if (sel.Position == SelectionPosition.Left) {
+ time = play.Start;
+ } else {
+ time = play.Stop;
+ }
+ TimeNodeChanged (play, time);
+ }
+ }
+
+ void HandleButtonReleasedEvent (Point coords, ButtonType type, ButtonModifier modifier)
+ {
+ if (type == ButtonType.Left) {
+ widget.SetCursor (CursorType.Arrow);
+ moving = false;
+ }
+ }
+
+ void HandleButtonPressEvent (Point coords, uint time, ButtonType type, ButtonModifier
modifier)
+ {
+ if (time - lastTime < 500) {
+ return;
+ }
+ if (type == ButtonType.Left) {
+ HandleLeftButton (coords, modifier);
+ } else if (type == ButtonType.Right) {
+ HandleRightButton (coords);
+ }
+ lastTime = time;
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/Widgets/Timerule.cs b/LongoMatch.Drawing/Widgets/Timerule.cs
new file mode 100644
index 0000000..91c5c70
--- /dev/null
+++ b/LongoMatch.Drawing/Widgets/Timerule.cs
@@ -0,0 +1,97 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Store;
+using LongoMatch.Common;
+using LongoMatch.Interfaces.Drawing;
+
+namespace LongoMatch.Drawing.Widgets
+{
+ public class Timerule:Canvas
+ {
+ const int BIG_LINE_HEIGHT = 15;
+ const int SMALL_LINE_HEIGHT = 5;
+ const int TEXT_WIDTH = 20;
+ const int TIME_SPACING = 100;
+
+ public Timerule (IWidget widget):base (widget)
+ {
+ SecondsPerPixel = 0.1;
+ }
+
+ public double Scroll {
+ set;
+ protected get;
+ }
+
+ public Time Duration {
+ set;
+ protected get;
+ }
+
+ public Time Position {
+ get;
+ set;
+ }
+
+ public double SecondsPerPixel {
+ set;
+ get;
+ }
+
+ protected override void HandleDraw (object context, Area area)
+ {
+ double height = widget.Height;
+ double width = widget.Width;
+
+ tk.Context = context;
+ tk.Begin ();
+ tk.FillColor = Common.TIMERULE_BACKGROUND;
+ tk.StrokeColor = Common.TIMERULE_BACKGROUND;
+ tk.DrawRectangle (new Point(0, 0), width, height);
+
+ tk.StrokeColor = Common.TIMELINE_LINE_COLOR;
+ tk.LineWidth = Common.TIMELINE_LINE_WIDTH;
+ tk.DrawLine (new Point (0, height), new Point (width, height));
+
+ /* Draw big lines each 10 * secondsPerPixel */
+ for(int i=0; i <= Duration.Seconds / SecondsPerPixel; i += TIME_SPACING) {
+ double pos = i - Scroll;
+ tk.DrawLine (new Point (pos, height),
+ new Point (pos, height - BIG_LINE_HEIGHT));
+ tk.DrawText (new Point (pos - TEXT_WIDTH/2, 0), TEXT_WIDTH, height -
BIG_LINE_HEIGHT - 4,
+ new Time {Seconds = (int) (i *
SecondsPerPixel)}.ToSecondsString());
+ }
+
+ /* Draw small lines each 1 * secondsPerPixel */
+ for(int i=0; i<= Duration.Seconds / SecondsPerPixel; i+= TIME_SPACING / 10) {
+ double pos;
+
+ if (i % TIME_SPACING == 0)
+ continue;
+
+ pos = i - Scroll;
+ tk.DrawLine (new Point (pos, height),
+ new Point (pos, height - SMALL_LINE_HEIGHT));
+ }
+ tk.End ();
+ tk.Context = null;
+ }
+ }
+}
+
diff --git a/LongoMatch.Drawing/enums.cs b/LongoMatch.Drawing/enums.cs
new file mode 100644
index 0000000..ce6760c
--- /dev/null
+++ b/LongoMatch.Drawing/enums.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+
+namespace LongoMatch.Drawing
+{
+
+}
+
diff --git a/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
b/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
index 63f300c..17c24ad 100644
--- a/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
+++ b/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
@@ -42,7 +42,7 @@ namespace LongoMatch.Gui.Component
public event NewTagStopHandler NewTagStopEvent;
public event NewTagCancelHandler NewTagCancelEvent;
public event PlaySelectedHandler PlaySelectedEvent;
- public event NewTagAtFrameHandler NewTagAtFrameEvent;
+ public event NewTagAtPosHandler NewTagAtPosEvent;
public event TagPlayHandler TagPlayEvent;
public event PlaysDeletedHandler PlaysDeletedEvent;
public event TimeNodeChangedHandler TimeNodeChanged;
@@ -72,10 +72,7 @@ namespace LongoMatch.Gui.Component
static Project openedProject;
ProjectType projectType;
TimeNode selectedTimeNode;
- TimeLineWidget timeline;
- bool gameUnitsActionVisible, detachedPlayer;
- GameUnitsTimelineWidget guTimeline;
- IGUIToolkit guiToolKit;
+ bool detachedPlayer;
Gtk.Window playerWindow;
VideoAnalysisMode analysisMode;
@@ -84,12 +81,6 @@ namespace LongoMatch.Gui.Component
this.Build ();
projectType = ProjectType.None;
- timeline = new TimeLineWidget();
- downbox.PackStart(timeline, true, true, 0);
-
- guTimeline = new GameUnitsTimelineWidget ();
- downbox.PackStart(guTimeline, true, true, 0);
-
playercapturer.Mode = PlayerCapturerBin.PlayerOperationMode.Player;
playercapturer.Tick += OnTick;
playercapturer.Detach += DetachPlayer;
@@ -121,7 +112,7 @@ namespace LongoMatch.Gui.Component
public IPlaylistWidget Playlist{
get {
- return playlist;
+ return null;
}
}
@@ -146,13 +137,6 @@ namespace LongoMatch.Gui.Component
timeline.Visible = value && AnalysisMode == VideoAnalysisMode.Timeline;
buttonswidget.Visible = value && (AnalysisMode ==
VideoAnalysisMode.ManualTagging ||
AnalysisMode ==
VideoAnalysisMode.PredefinedTagging);
- if (Config.UseGameUnits) {
- guTimeline.Visible = value && AnalysisMode ==
VideoAnalysisMode.GameUnits;
- gameunitstaggerwidget1.Visible = value && (
- AnalysisMode == VideoAnalysisMode.GameUnits ||
- AnalysisMode == VideoAnalysisMode.PredefinedTagging ||
- AnalysisMode == VideoAnalysisMode.ManualTagging);
- }
if(value) {
SetTagsBoxVisibility (false);
} else {
@@ -162,28 +146,17 @@ namespace LongoMatch.Gui.Component
}
}
- public bool PlaylistVisible {
- set {
- SetPlaylistVisibility (value);
- playsSelection.PlayListLoaded = value;
- }
- }
-
public VideoAnalysisMode AnalysisMode {
set {
buttonswidget.Visible = (value == VideoAnalysisMode.ManualTagging) ||
(value == VideoAnalysisMode.PredefinedTagging);
timeline.Visible = value == VideoAnalysisMode.Timeline;
- if (Config.UseGameUnits) {
- guTimeline.Visible = value == VideoAnalysisMode.GameUnits;
- gameunitstaggerwidget1.Visible = buttonswidget.Visible ||
guTimeline.Visible;
- }
if(value == VideoAnalysisMode.ManualTagging)
buttonswidget.Mode = TagMode.Free;
else if (value == VideoAnalysisMode.ManualTagging)
buttonswidget.Mode = TagMode.Predifined;
analysisMode = value;
-
+ timeline.Visible = true;
}
protected get {
return analysisMode;
@@ -214,17 +187,6 @@ namespace LongoMatch.Gui.Component
timeline.QueueDraw();
}
- public void UpdateGameUnits (GameUnitsList gameUnits) {
- gameUnitsActionVisible = gameUnits != null && gameUnits.Count > 0;
- //GameUnitsViewAction.Sensitive = gameUnitsActionVisible;
- if (gameUnits == null) {
- gameunitstaggerwidget1.Visible = false;
- return;
- }
- gameunitstaggerwidget1.Visible = true;
- gameunitstaggerwidget1.GameUnits = gameUnits;
- }
-
private void ConnectSignals() {
/* Adding Handlers for each event */
@@ -234,7 +196,7 @@ namespace LongoMatch.Gui.Component
buttonswidget.NewMarkStopEvent += EmitNewTagStop;
buttonswidget.NewMarkCancelEvent += EmitNewTagCancel;
- timeline.NewMarkEvent += EmitNewTagAtFrame;
+ timeline.NewTagAtPosEvent += EmitNewTagAtPos;
/* Connect TimeNodeChanged events */
timeline.TimeNodeChanged += EmitTimeNodeChanged;
@@ -255,10 +217,10 @@ namespace LongoMatch.Gui.Component
playsSelection.PlayCategoryChanged += EmitPlayCategoryChanged;
/* Connect playlist events */
- playlist.PlayListNodeSelected += EmitPlayListNodeSelected;
- playlist.NewPlaylistEvent += EmitNewPlaylist;
- playlist.OpenPlaylistEvent += EmitOpenPlaylist;
- playlist.SavePlaylistEvent += EmitSavePlaylist;
+// playlist.PlayListNodeSelected += EmitPlayListNodeSelected;
+// playlist.NewPlaylistEvent += EmitNewPlaylist;
+// playlist.OpenPlaylistEvent += EmitOpenPlaylist;
+// playlist.SavePlaylistEvent += EmitSavePlaylist;
/* Connect PlayListNodeAdded events */
playsSelection.PlayListNodeAdded += OnPlayListNodeAdded;
@@ -275,17 +237,9 @@ namespace LongoMatch.Gui.Component
playsSelection.SnapshotSeries += EmitSnapshotSeries;
timeline.SnapshotSeries += EmitSnapshotSeries;
- playlist.RenderPlaylistEvent += EmitRenderPlaylist;
playsSelection.RenderPlaylist += EmitRenderPlaylist;
timeline.RenderPlaylist += EmitRenderPlaylist;
- /* Game Units event */
- gameunitstaggerwidget1.GameUnitEvent += EmitGameUnitEvent;
- guTimeline.UnitAdded += EmitUnitAdded;;
- guTimeline.UnitDeleted += EmitUnitDeleted;
- guTimeline.UnitSelected += EmitUnitSelected;
- guTimeline.UnitChanged += EmitUnitChanged;
-
playercapturer.Error += OnMultimediaError;
playercapturer.SegmentClosedEvent += OnSegmentClosedEvent;
@@ -318,10 +272,6 @@ namespace LongoMatch.Gui.Component
if (openedProject != null) {
buttonswidget.Visible = true;
timeline.Visible = true;
- if (Config.UseGameUnits) {
- guTimeline.Visible = true;
- gameunitstaggerwidget1.Visible = true;
- }
}
} else {
Log.Debug("Attaching player again");
@@ -347,7 +297,6 @@ namespace LongoMatch.Gui.Component
if(projectType == ProjectType.FileProject) {
timeline.SetProject (project, filter);
- guTimeline.Project = project;
playercapturer.Mode = PlayerCapturerBin.PlayerOperationMode.Player;
} else {
isLive = true;
@@ -378,34 +327,19 @@ namespace LongoMatch.Gui.Component
ShowWidgets();
}
- void SetPlaylistVisibility (bool visible) {
- if (visible) {
- righthbox.Visible = true;
- playlist.Visible = true;
- } else {
- playlist.Visible = false;
- if (!tagsvbox.Visible)
- righthbox.Visible = false;
- }
- }
-
void SetTagsBoxVisibility (bool visible) {
if (visible) {
righthbox.Visible = true;
tagsvbox.Visible = true;
} else {
tagsvbox.Visible = false;
- if (!playlist.Visible)
- righthbox.Visible = false;
}
}
private void ResetGUI() {
- bool playlistVisible = playlist.Visible;
playercapturer.Mode = PlayerCapturerBin.PlayerOperationMode.Player;
ClearWidgets();
HideWidgets();
- SetPlaylistVisibility (playlistVisible);
SetTagsBoxVisibility (false);
selectedTimeNode = null;
if (detachedPlayer)
@@ -417,12 +351,8 @@ namespace LongoMatch.Gui.Component
if(analysisMode == VideoAnalysisMode.ManualTagging ||
analysisMode == VideoAnalysisMode.PredefinedTagging) {
buttonswidget.Show();
- gameunitstaggerwidget1.Show();
} else if (analysisMode == VideoAnalysisMode.Timeline) {
timeline.Show();
- } else if (analysisMode == VideoAnalysisMode.GameUnits) {
- gameunitstaggerwidget1.Show();
- guTimeline.Show();
}
}
@@ -431,8 +361,6 @@ namespace LongoMatch.Gui.Component
SetTagsBoxVisibility (false);
buttonswidget.Hide();
timeline.Hide();
- gameunitstaggerwidget1.Hide();
- guTimeline.Hide();
}
private void ClearWidgets() {
@@ -505,11 +433,8 @@ namespace LongoMatch.Gui.Component
double currentPosition)
{
if (currentTime.MSeconds != 0 && timeline != null && openedProject != null) {
- uint frame = (uint) (currentTime .MSeconds *
openedProject.Description.File.Fps / 1000);
- timeline.CurrentFrame = frame;
- guTimeline.CurrentFrame = frame;
+ timeline.CurrentTime = currentTime;
}
- gameunitstaggerwidget1.CurrentTime = currentTime;
}
protected virtual void OnMultimediaError(string message)
@@ -566,9 +491,9 @@ namespace LongoMatch.Gui.Component
SnapshotSeriesEvent (play);
}
- private void EmitNewTagAtFrame(Category category, int frame) {
- if (NewTagAtFrameEvent != null)
- NewTagAtFrameEvent(category, frame);
+ private void EmitNewTagAtPos(Category category, Time pos) {
+ if (NewTagAtPosEvent != null)
+ NewTagAtPosEvent(category, pos);
}
private void EmitNewTag(Category category) {
diff --git a/LongoMatch.GUI/Gui/Component/DrawingWidget.cs b/LongoMatch.GUI/Gui/Component/DrawingWidget.cs
index 57e8208..4df3266 100644
--- a/LongoMatch.GUI/Gui/Component/DrawingWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/DrawingWidget.cs
@@ -22,6 +22,8 @@ using Gtk;
using Cairo;
using LongoMatch.Common;
+using CursorType = Gdk.CursorType;
+
namespace LongoMatch.Gui.Component
{
diff --git a/LongoMatch.GUI/Gui/Component/Timeline.cs b/LongoMatch.GUI/Gui/Component/Timeline.cs
new file mode 100644
index 0000000..d65550a
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/Timeline.cs
@@ -0,0 +1,204 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Drawing.Widgets;
+using LongoMatch.Store;
+using LongoMatch.Handlers;
+using LongoMatch.Common;
+using System.Collections.Generic;
+using LongoMatch.Interfaces;
+using LongoMatch.Drawing.Cairo;
+using LongoMatch.Drawing;
+using Gtk;
+using Mono.Unix;
+
+namespace LongoMatch.Gui.Component
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class Timeline : Gtk.Bin
+ {
+ public event TimeNodeChangedHandler TimeNodeChanged;
+ public event PlaySelectedHandler TimeNodeSelected;
+ public event PlaysDeletedHandler TimeNodeDeleted;
+ public event NewTagAtPosHandler NewTagAtPosEvent;
+ public event PlayListNodeAddedHandler PlayListNodeAdded;
+ public event SnapshotSeriesHandler SnapshotSeries;
+ public event TagPlayHandler TagPlay;
+ public event RenderPlaylistHandler RenderPlaylist;
+
+ const int TIMERULE_HEIGHT = 30;
+
+ PlaysTimeline timeline;
+ Timerule timerule;
+ CategoriesLabels labels;
+ MediaFile projectFile;
+
+ public Timeline ()
+ {
+ this.Build ();
+ this.timerule = new Timerule (new WidgetWrapper (timerulearea));
+ this.timeline = new PlaysTimeline (new WidgetWrapper(timelinearea));
+ this.labels = new CategoriesLabels (new WidgetWrapper (labelsarea));
+ timerulearea.HeightRequest = TIMERULE_HEIGHT;
+ labelsarea.WidthRequest = LongoMatch.Drawing.Common.CATEGORY_WIDTH;
+ alignment1.HeightRequest = TIMERULE_HEIGHT;
+ scrolledwindow1.Vadjustment.ValueChanged += HandleScrollEvent;
+ scrolledwindow1.Hadjustment.ValueChanged += HandleScrollEvent;
+ }
+
+ public TimeNode SelectedTimeNode {
+ set {
+ }
+ }
+
+ public Time CurrentTime {
+ set {
+ timeline.CurrentTime = value;
+ }
+ }
+
+ public void SetProject (Project project, PlaysFilter filter) {
+ timeline.LoadProject (project, filter);
+ projectFile = project.Description.File;
+
+ if(project == null) {
+ return;
+ }
+
+ timerule.Duration = new Time ((int)project.Description.File.Length);
+ labels.Project = project;
+
+ timeline.TimeNodeChanged += HandleTimeNodeChanged;
+ timeline.TimeNodeSelected += HandleTimeNodeSelected;
+ timeline.ShowMenu += HandleShowMenu;
+ QueueDraw ();
+ }
+
+ public void AddPlay(Play play) {
+ timeline.AddPlay (play);
+ QueueDraw ();
+ }
+
+ public void RemovePlays(List<Play> plays) {
+ timeline.RemovePlays (plays);
+ QueueDraw ();
+ }
+
+ protected virtual void HandleScrollEvent(object sender, System.EventArgs args)
+ {
+ if(sender == scrolledwindow1.Vadjustment)
+ labels.Scroll = scrolledwindow1.Vadjustment.Value;
+ else if(sender == scrolledwindow1.Hadjustment)
+ timerule.Scroll = scrolledwindow1.Hadjustment.Value;
+ QueueDraw ();
+ }
+
+ void HandleShowMenu (List<Play> plays, Category cat, Time time)
+ {
+ Menu menu;
+ MenuItem newPlay, del, tag, addPLN, snapshot, render;
+
+ menu = new Menu();
+
+ newPlay = new MenuItem(Catalog.GetString("Add new play"));
+ menu.Append(newPlay);
+ newPlay.Activated += (sender, e) => {EmitNewPlay (cat, time);};
+
+ if (plays != null) {
+ if (plays.Count == 1) {
+ tag = new MenuItem(Catalog.GetString("Edit tags"));
+ snapshot = new MenuItem(Catalog.GetString("Export to PGN images"));
+ tag.Activated += (sender, e) => EmitTagPlay (plays[0]);
+ snapshot.Activated += (sender, e) => EmitSnapshotSeries (plays[0]);
+ menu.Add (tag);
+ menu.Add (snapshot);
+ }
+ if (plays.Count > 0 ) {
+ del = new MenuItem (String.Format ("{0} ({1})",
+ Catalog.GetString("Delete"), plays.Count));
+ del.Activated += (sender, e) => EmitDelete (plays);
+ menu.Add (del);
+ addPLN = new MenuItem (String.Format ("{0} ({1})",
+ Catalog.GetString("Add to playlist"),
plays.Count));
+ addPLN.Activated += (sender, e) => EmitAddToPlaylist (plays);
+ menu.Add (addPLN);
+ render = new MenuItem (String.Format ("{0} ({1})",
+ Catalog.GetString("Export to video file"),
plays.Count));
+ render.Activated += (sender, e) => EmitRenderPlaylist (plays);
+ menu.Add (render);
+ }
+ }
+ menu.ShowAll();
+ menu.Popup();
+ }
+
+ void EmitTagPlay (Play play)
+ {
+ if (TagPlay != null) {
+ TagPlay (play);
+ }
+ }
+
+ void EmitSnapshotSeries (Play play)
+ {
+ if (SnapshotSeries != null)
+ SnapshotSeries (play);
+ }
+
+ void EmitNewPlay (Category cat, Time time)
+ {
+ if (NewTagAtPosEvent != null)
+ NewTagAtPosEvent (cat, time);
+ }
+
+ void EmitDelete (List<Play> plays)
+ {
+ if (TimeNodeDeleted != null) {
+ TimeNodeDeleted (plays);
+ }
+ }
+
+ void EmitRenderPlaylist (List<Play> plays)
+ {
+ if (RenderPlaylist != null) {
+ PlayList pl = new PlayList();
+ foreach (Play p in plays) {
+ pl.Add (new PlayListPlay (p, projectFile, true));
+ }
+ RenderPlaylist (pl);
+ }
+ }
+
+ void EmitAddToPlaylist (List<Play> plays) {
+ if (PlayListNodeAdded != null) {
+ PlayListNodeAdded (plays);
+ }
+ }
+
+ void HandleTimeNodeChanged(TimeNode tn, object val) {
+ if(TimeNodeChanged != null)
+ TimeNodeChanged(tn,val);
+ }
+
+ void HandleTimeNodeSelected(Play tn) {
+ if(TimeNodeSelected != null)
+ TimeNodeSelected(tn);
+ }
+ }
+}
+
diff --git a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
index 10f4689..293dc1d 100644
--- a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
@@ -24,7 +24,6 @@ using Stetic;
using Image = LongoMatch.Common.Image;
using LongoMatch.Common;
-using LongoMatch.Gui.Base;
using LongoMatch.Gui.Dialog;
using LongoMatch.Interfaces;
using LongoMatch.Store;
diff --git a/LongoMatch.GUI/LongoMatch.GUI.mdp b/LongoMatch.GUI/LongoMatch.GUI.mdp
index 2286797..642c6d5 100644
--- a/LongoMatch.GUI/LongoMatch.GUI.mdp
+++ b/LongoMatch.GUI/LongoMatch.GUI.mdp
@@ -38,10 +38,7 @@
<File subtype="Code" buildaction="Compile" name="Gui/Component/PlayListWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/ProjectListWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/TreeView/CategoriesTreeView.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeLineWidget.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeScale.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Dialog/VideoEditionProperties.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeReferenceWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/CategoryProperties.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/PlaysListTreeWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/DrawingWidget.cs" />
@@ -76,7 +73,6 @@
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EndCaptureDialog.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/TreeView/ListTreeViewBase.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Component/TimelineLabelsWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/TreeView/SubCategoriesTreeView.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Dialog/SubCategoryTagsEditor.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.SubCategoryTagsEditor.cs"
/>
@@ -108,13 +104,7 @@
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.GameUnitWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/GameUnitsTagger.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.GameUnitsTagger.cs" />
- <File subtype="Directory" buildaction="Compile" name="Gui/Base" />
- <File subtype="Code" buildaction="Compile" name="Gui/Base/TimeScaleBase.cs" />
<File subtype="Directory" buildaction="Compile" name="Gui/Component" />
- <File subtype="Code" buildaction="Compile" name="Gui/Component/GameUnitTimeScale.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Base/TimelineWidgetBase.cs" />
- <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Base.TimelineWidgetBase.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Component/GameUnitsTimelineWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/GUIToolkit.cs" />
<File subtype="Directory" buildaction="Compile" name="." />
<File subtype="Directory" buildaction="Compile" name=".." />
@@ -196,6 +186,8 @@
<File subtype="Code" buildaction="Compile" name="Gui/Component/BackgroundWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Panel/PreferencesPanel.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Panel.PreferencesPanel.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/Timeline.cs" />
+ <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.Timeline.cs" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.12.0.0, Culture=neutral,
PublicKeyToken=35e10195dab3c99f" />
@@ -213,6 +205,8 @@
<ProjectReference type="Gac" localcopy="True" refto="System.Drawing, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
<ProjectReference type="Project" localcopy="True" refto="OxyPlotMono" />
<ProjectReference type="Project" localcopy="True" refto="LongoMatch.GUI.Helpers" />
+ <ProjectReference type="Project" localcopy="True" refto="LongoMatch.Drawing" />
+ <ProjectReference type="Project" localcopy="True" refto="LongoMatch.Drawing.Cairo" />
</References>
<LanguageParameters ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
</Project>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.AnalysisComponent.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.AnalysisComponent.cs
index 589e751..e831b6e 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.AnalysisComponent.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.AnalysisComponent.cs
@@ -4,16 +4,14 @@ namespace LongoMatch.Gui.Component
{
public partial class AnalysisComponent
{
+ private global::Gtk.VPaned vpaned1;
private global::Gtk.HPaned hpaned;
private global::Gtk.VBox leftbox;
private global::LongoMatch.Gui.Component.PlaysSelectionWidget playsSelection;
private global::Gtk.HPaned hpaned1;
private global::Gtk.VBox downbox;
private global::Gtk.HBox videowidgetsbox;
- private global::LongoMatch.Gui.Component.DrawingToolBox drawingtoolbox1;
private global::LongoMatch.Gui.PlayerCapturerBin playercapturer;
- private global::LongoMatch.Gui.Component.ButtonsWidget buttonswidget;
- private global::LongoMatch.Gui.Component.GameUnitsTagger gameunitstaggerwidget1;
private global::Gtk.HBox righthbox;
private global::Gtk.VBox tagsvbox;
private global::LongoMatch.Gui.Component.PlaysCoordinatesTagger postagger;
@@ -21,7 +19,9 @@ namespace LongoMatch.Gui.Component
private global::Gtk.Alignment GtkAlignment22;
private global::LongoMatch.Gui.Component.NotesWidget notes;
private global::Gtk.Label GtkLabel31;
- private global::LongoMatch.Gui.Component.PlayListWidget playlist;
+ private global::Gtk.HBox hbox7;
+ private global::LongoMatch.Gui.Component.ButtonsWidget buttonswidget;
+ private global::LongoMatch.Gui.Component.Timeline timeline;
protected virtual void Build ()
{
@@ -30,10 +30,15 @@ namespace LongoMatch.Gui.Component
global::Stetic.BinContainer.Attach (this);
this.Name = "LongoMatch.Gui.Component.AnalysisComponent";
// Container child
LongoMatch.Gui.Component.AnalysisComponent.Gtk.Container+ContainerChild
+ this.vpaned1 = new global::Gtk.VPaned ();
+ this.vpaned1.CanFocus = true;
+ this.vpaned1.Name = "vpaned1";
+ this.vpaned1.Position = 438;
+ // Container child vpaned1.Gtk.Paned+PanedChild
this.hpaned = new global::Gtk.HPaned ();
this.hpaned.CanFocus = true;
this.hpaned.Name = "hpaned";
- this.hpaned.Position = 233;
+ this.hpaned.Position = 290;
// Container child hpaned.Gtk.Paned+PanedChild
this.leftbox = new global::Gtk.VBox ();
this.leftbox.Name = "leftbox";
@@ -52,7 +57,7 @@ namespace LongoMatch.Gui.Component
this.hpaned1 = new global::Gtk.HPaned ();
this.hpaned1.CanFocus = true;
this.hpaned1.Name = "hpaned1";
- this.hpaned1.Position = 1160;
+ this.hpaned1.Position = 1015;
// Container child hpaned1.Gtk.Paned+PanedChild
this.downbox = new global::Gtk.VBox ();
this.downbox.Name = "downbox";
@@ -62,45 +67,20 @@ namespace LongoMatch.Gui.Component
this.videowidgetsbox.Name = "videowidgetsbox";
this.videowidgetsbox.Spacing = 6;
// Container child videowidgetsbox.Gtk.Box+BoxChild
- this.drawingtoolbox1 = new global::LongoMatch.Gui.Component.DrawingToolBox ();
- this.drawingtoolbox1.Events = ((global::Gdk.EventMask)(256));
- this.drawingtoolbox1.Name = "drawingtoolbox1";
- this.videowidgetsbox.Add (this.drawingtoolbox1);
- global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.videowidgetsbox
[this.drawingtoolbox1]));
- w3.Position = 0;
- w3.Expand = false;
- w3.Fill = false;
- // Container child videowidgetsbox.Gtk.Box+BoxChild
this.playercapturer = new global::LongoMatch.Gui.PlayerCapturerBin ();
this.playercapturer.Events = ((global::Gdk.EventMask)(256));
this.playercapturer.Name = "playercapturer";
this.playercapturer.Detached = false;
this.videowidgetsbox.Add (this.playercapturer);
- global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.videowidgetsbox
[this.playercapturer]));
- w4.Position = 1;
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.videowidgetsbox
[this.playercapturer]));
+ w3.Position = 0;
this.downbox.Add (this.videowidgetsbox);
- global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.downbox
[this.videowidgetsbox]));
- w5.Position = 0;
- // Container child downbox.Gtk.Box+BoxChild
- this.buttonswidget = new global::LongoMatch.Gui.Component.ButtonsWidget ();
- this.buttonswidget.Events = ((global::Gdk.EventMask)(256));
- this.buttonswidget.Name = "buttonswidget";
- this.downbox.Add (this.buttonswidget);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.downbox
[this.buttonswidget]));
- w6.Position = 1;
- w6.Expand = false;
- // Container child downbox.Gtk.Box+BoxChild
- this.gameunitstaggerwidget1 = new global::LongoMatch.Gui.Component.GameUnitsTagger ();
- this.gameunitstaggerwidget1.Events = ((global::Gdk.EventMask)(256));
- this.gameunitstaggerwidget1.Name = "gameunitstaggerwidget1";
- this.downbox.Add (this.gameunitstaggerwidget1);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.downbox
[this.gameunitstaggerwidget1]));
- w7.Position = 2;
- w7.Expand = false;
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.downbox
[this.videowidgetsbox]));
+ w4.Position = 0;
this.hpaned1.Add (this.downbox);
- global::Gtk.Paned.PanedChild w8 = ((global::Gtk.Paned.PanedChild)(this.hpaned1
[this.downbox]));
- w8.Resize = false;
- w8.Shrink = false;
+ global::Gtk.Paned.PanedChild w5 = ((global::Gtk.Paned.PanedChild)(this.hpaned1
[this.downbox]));
+ w5.Resize = false;
+ w5.Shrink = false;
// Container child hpaned1.Gtk.Paned+PanedChild
this.righthbox = new global::Gtk.HBox ();
this.righthbox.WidthRequest = 100;
@@ -116,8 +96,8 @@ namespace LongoMatch.Gui.Component
this.postagger.Events = ((global::Gdk.EventMask)(256));
this.postagger.Name = "postagger";
this.tagsvbox.Add (this.postagger);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.tagsvbox
[this.postagger]));
- w9.Position = 0;
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.tagsvbox
[this.postagger]));
+ w6.Position = 0;
// Container child tagsvbox.Gtk.Box+BoxChild
this.notesframe = new global::Gtk.Frame ();
this.notesframe.Name = "notesframe";
@@ -138,36 +118,48 @@ namespace LongoMatch.Gui.Component
this.GtkLabel31.UseMarkup = true;
this.notesframe.LabelWidget = this.GtkLabel31;
this.tagsvbox.Add (this.notesframe);
- global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.tagsvbox
[this.notesframe]));
- w12.Position = 1;
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.tagsvbox
[this.notesframe]));
+ w9.Position = 1;
this.righthbox.Add (this.tagsvbox);
- global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.righthbox
[this.tagsvbox]));
- w13.Position = 0;
- // Container child righthbox.Gtk.Box+BoxChild
- this.playlist = new global::LongoMatch.Gui.Component.PlayListWidget ();
- this.playlist.WidthRequest = 100;
- this.playlist.Events = ((global::Gdk.EventMask)(256));
- this.playlist.Name = "playlist";
- this.righthbox.Add (this.playlist);
- global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.righthbox
[this.playlist]));
- w14.Position = 1;
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.righthbox
[this.tagsvbox]));
+ w10.Position = 0;
this.hpaned1.Add (this.righthbox);
- global::Gtk.Paned.PanedChild w15 = ((global::Gtk.Paned.PanedChild)(this.hpaned1
[this.righthbox]));
- w15.Resize = false;
- w15.Shrink = false;
+ global::Gtk.Paned.PanedChild w11 = ((global::Gtk.Paned.PanedChild)(this.hpaned1
[this.righthbox]));
+ w11.Resize = false;
+ w11.Shrink = false;
this.hpaned.Add (this.hpaned1);
- global::Gtk.Paned.PanedChild w16 = ((global::Gtk.Paned.PanedChild)(this.hpaned
[this.hpaned1]));
- w16.Shrink = false;
- this.Add (this.hpaned);
+ global::Gtk.Paned.PanedChild w12 = ((global::Gtk.Paned.PanedChild)(this.hpaned
[this.hpaned1]));
+ w12.Shrink = false;
+ this.vpaned1.Add (this.hpaned);
+ global::Gtk.Paned.PanedChild w13 = ((global::Gtk.Paned.PanedChild)(this.vpaned1
[this.hpaned]));
+ w13.Resize = false;
+ // Container child vpaned1.Gtk.Paned+PanedChild
+ this.hbox7 = new global::Gtk.HBox ();
+ this.hbox7.Name = "hbox7";
+ this.hbox7.Spacing = 6;
+ // Container child hbox7.Gtk.Box+BoxChild
+ this.buttonswidget = new global::LongoMatch.Gui.Component.ButtonsWidget ();
+ this.buttonswidget.Events = ((global::Gdk.EventMask)(256));
+ this.buttonswidget.Name = "buttonswidget";
+ this.hbox7.Add (this.buttonswidget);
+ global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox7
[this.buttonswidget]));
+ w14.Position = 0;
+ // Container child hbox7.Gtk.Box+BoxChild
+ this.timeline = new global::LongoMatch.Gui.Component.Timeline ();
+ this.timeline.Events = ((global::Gdk.EventMask)(256));
+ this.timeline.Name = "timeline";
+ this.hbox7.Add (this.timeline);
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox7
[this.timeline]));
+ w15.Position = 1;
+ this.vpaned1.Add (this.hbox7);
+ this.Add (this.vpaned1);
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.leftbox.Hide ();
- this.drawingtoolbox1.Hide ();
- this.buttonswidget.Hide ();
this.tagsvbox.Hide ();
- this.playlist.Hide ();
this.righthbox.Hide ();
+ this.buttonswidget.Hide ();
this.Hide ();
}
}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
index 8feb7f2..54bfdc5 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
@@ -58,6 +58,7 @@ namespace LongoMatch.Gui.Component
this.circlebutton = new global::Gtk.RadioButton ("");
this.circlebutton.CanFocus = true;
this.circlebutton.Name = "circlebutton";
+ this.circlebutton.Active = true;
this.circlebutton.DrawIndicator = false;
this.circlebutton.UseUnderline = true;
this.circlebutton.Group = new global::GLib.SList (global::System.IntPtr.Zero);
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
new file mode 100644
index 0000000..7ecae55
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
@@ -0,0 +1,151 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component
+{
+ public partial class Timeline
+ {
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.VBox vbox2;
+ private global::Gtk.VButtonBox vbuttonbox1;
+ private global::Gtk.Button button7;
+ private global::Gtk.Button button6;
+ private global::Gtk.Button button8;
+ private global::Gtk.Button button9;
+ private global::Gtk.VBox vbox4;
+ private global::Gtk.Alignment alignment1;
+ private global::Gtk.DrawingArea labelsarea;
+ private global::Gtk.VBox vbox1;
+ private global::Gtk.DrawingArea timerulearea;
+ private global::Gtk.ScrolledWindow scrolledwindow1;
+ private global::Gtk.DrawingArea timelinearea;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.Timeline
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.Timeline";
+ // Container child LongoMatch.Gui.Component.Timeline.Gtk.Container+ContainerChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.vbox2 = new global::Gtk.VBox ();
+ this.vbox2.Name = "vbox2";
+ this.vbox2.Spacing = 6;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.vbuttonbox1 = new global::Gtk.VButtonBox ();
+ this.vbuttonbox1.Name = "vbuttonbox1";
+ // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
+ this.button7 = new global::Gtk.Button ();
+ this.button7.CanFocus = true;
+ this.button7.Name = "button7";
+ this.button7.UseUnderline = true;
+ this.button7.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.vbuttonbox1.Add (this.button7);
+ global::Gtk.ButtonBox.ButtonBoxChild w1 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.button7]));
+ w1.Expand = false;
+ w1.Fill = false;
+ // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
+ this.button6 = new global::Gtk.Button ();
+ this.button6.CanFocus = true;
+ this.button6.Name = "button6";
+ this.button6.UseUnderline = true;
+ this.button6.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.vbuttonbox1.Add (this.button6);
+ global::Gtk.ButtonBox.ButtonBoxChild w2 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.button6]));
+ w2.Position = 1;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
+ this.button8 = new global::Gtk.Button ();
+ this.button8.CanFocus = true;
+ this.button8.Name = "button8";
+ this.button8.UseUnderline = true;
+ this.button8.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.vbuttonbox1.Add (this.button8);
+ global::Gtk.ButtonBox.ButtonBoxChild w3 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.button8]));
+ w3.Position = 2;
+ w3.Expand = false;
+ w3.Fill = false;
+ // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
+ this.button9 = new global::Gtk.Button ();
+ this.button9.CanFocus = true;
+ this.button9.Name = "button9";
+ this.button9.UseUnderline = true;
+ this.button9.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.vbuttonbox1.Add (this.button9);
+ global::Gtk.ButtonBox.ButtonBoxChild w4 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.button9]));
+ w4.Position = 3;
+ w4.Expand = false;
+ w4.Fill = false;
+ this.vbox2.Add (this.vbuttonbox1);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2
[this.vbuttonbox1]));
+ w5.Position = 2;
+ this.hbox1.Add (this.vbox2);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
+ w6.Position = 0;
+ w6.Expand = false;
+ w6.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.vbox4 = new global::Gtk.VBox ();
+ this.vbox4.Name = "vbox4";
+ this.vbox4.Spacing = 6;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.alignment1.Name = "alignment1";
+ this.vbox4.Add (this.alignment1);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox4
[this.alignment1]));
+ w7.Position = 0;
+ w7.Expand = false;
+ w7.Fill = false;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.labelsarea = new global::Gtk.DrawingArea ();
+ this.labelsarea.Name = "labelsarea";
+ this.vbox4.Add (this.labelsarea);
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox4
[this.labelsarea]));
+ w8.Position = 1;
+ this.hbox1.Add (this.vbox4);
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4]));
+ w9.Position = 1;
+ w9.Expand = false;
+ w9.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.vbox1 = new global::Gtk.VBox ();
+ this.vbox1.Name = "vbox1";
+ this.vbox1.Spacing = 6;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.timerulearea = new global::Gtk.DrawingArea ();
+ this.timerulearea.Name = "timerulearea";
+ this.vbox1.Add (this.timerulearea);
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox1
[this.timerulearea]));
+ w10.Position = 0;
+ w10.Expand = false;
+ w10.Fill = false;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
+ this.scrolledwindow1.CanFocus = true;
+ this.scrolledwindow1.Name = "scrolledwindow1";
+ this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child scrolledwindow1.Gtk.Container+ContainerChild
+ global::Gtk.Viewport w11 = new global::Gtk.Viewport ();
+ w11.ShadowType = ((global::Gtk.ShadowType)(0));
+ // Container child GtkViewport.Gtk.Container+ContainerChild
+ this.timelinearea = new global::Gtk.DrawingArea ();
+ this.timelinearea.Name = "timelinearea";
+ w11.Add (this.timelinearea);
+ this.scrolledwindow1.Add (w11);
+ this.vbox1.Add (this.scrolledwindow1);
+ global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox1
[this.scrolledwindow1]));
+ w14.Position = 1;
+ this.hbox1.Add (this.vbox1);
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox1]));
+ w15.Position = 2;
+ this.Add (this.hbox1);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
index a392384..4169e1e 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
@@ -463,6 +463,7 @@ namespace LongoMatch.Gui.Panel
w61.Position = 0;
// Container child rbox.Gtk.Box+BoxChild
this.hbuttonbox1 = new global::Gtk.HButtonBox ();
+ this.hbuttonbox1.Name = "hbuttonbox1";
// Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
this.savebutton = new global::Gtk.Button ();
this.savebutton.Sensitive = false;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
index 4419a43..e101721 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
@@ -48,6 +48,7 @@ namespace LongoMatch.Gui.Panel
w2.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hbuttonbox1 = new global::Gtk.HButtonBox ();
+ this.hbuttonbox1.Name = "hbuttonbox1";
this.hbuttonbox1.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(1));
// Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
this.newbutton = new global::Gtk.Button ();
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 8a124f9..a276388 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -9,7 +9,9 @@
<widget-library name="../../bin/LongoMatch.Multimedia.dll" />
<widget-library name="../../bin/LongoMatch.dll" />
<widget-library name="../../bin/LongoMatch.GUI.Helpers.dll" />
+ <widget-library name="../../LongoMatch.Drawing/bin/Debug/LongoMatch.Drawing.dll" />
<widget-library name="../../bin/LongoMatch.Gui.dll" internal="true" />
+ <widget-library name="../../LongoMatch.Drawing.Cairo/bin/Debug/LongoMatch.Drawing.Cairo.dll" />
</import>
<widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ProjectListWidget" design-size="572 300">
<property name="MemberName" />
@@ -2636,6 +2638,7 @@ Hotkeys with a single key are also allowed with Ctrl+key.</property>
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes" />
+ <property name="Active">True</property>
<property name="DrawIndicator">False</property>
<property name="HasLabel">False</property>
<property name="UseUnderline">True</property>
@@ -4427,173 +4430,6 @@ Defining <b> Game Units </b> will help you during the analysis to in
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Base.TimelineWidgetBase" design-size="687 300">
- <property name="MemberName" />
- <property name="Visible">False</property>
- <child>
- <widget class="Gtk.VBox" id="vbox3">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.HSeparator" id="hseparator1">
- <property name="MemberName" />
- </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.HBox" id="hbox3">
- <property name="MemberName" />
- <child>
- <widget class="Gtk.VBox" id="leftbox">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.HBox" id="toolsbox">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Button" id="fitbutton">
- <property name="MemberName" />
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:gtk-zoom-fit Button</property>
- <property name="Label" translatable="yes" />
- <property name="UseUnderline">True</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="UpdatePolicy">Discontinuous</property>
- <property name="Lower">1</property>
- <property name="Upper">100</property>
- <property name="PageIncrement">10</property>
- <property name="StepIncrement">1</property>
- <property name="Value">1</property>
- <property name="DrawValue">True</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>
- </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.Alignment" id="categoriesalignment1">
- <property name="MemberName" />
- <child>
- <widget class="Gtk.HBox" id="categoriesbox">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <placeholder />
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </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.VSeparator" id="vseparator1">
- <property name="MemberName" />
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.VBox" id="vbox2">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.VBox" id="timescalebox">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <placeholder />
- </child>
- </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.ScrolledWindow" id="GtkScrolledWindow">
- <property name="MemberName" />
- <property name="ShadowType">In</property>
- <child>
- <widget class="Gtk.Viewport" id="GtkViewport">
- <property name="MemberName" />
- <property name="ShadowType">None</property>
- <child>
- <widget class="Gtk.VBox" id="timelinebox">
- <property name="MemberName" />
- <property name="ShowScrollbars">True</property>
- <child>
- <placeholder />
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">2</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
<widget class="Gtk.Bin" id="LongoMatch.Gui.Component.PlayersTagger" design-size="331 191">
<property name="MemberName" />
<property name="Visible">False</property>
@@ -6634,187 +6470,176 @@ Defining <b> Game Units </b> will help you during the analysis to in
<property name="MemberName" />
<property name="Visible">False</property>
<child>
- <widget class="Gtk.HPaned" id="hpaned">
+ <widget class="Gtk.VPaned" id="vpaned1">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="Position">233</property>
+ <property name="Position">438</property>
<child>
- <widget class="Gtk.VBox" id="leftbox">
- <property name="MemberName" />
- <property name="Visible">False</property>
- <property name="Spacing">6</property>
- <child>
- <widget class="LongoMatch.Gui.Component.PlaysSelectionWidget" id="playsSelection">
- <property name="MemberName" />
- <property name="Events">ButtonPressMask</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Resize">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HPaned" id="hpaned1">
+ <widget class="Gtk.HPaned" id="hpaned">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="Position">1160</property>
+ <property name="Position">290</property>
<child>
- <widget class="Gtk.VBox" id="downbox">
+ <widget class="Gtk.VBox" id="leftbox">
<property name="MemberName" />
+ <property name="Visible">False</property>
<property name="Spacing">6</property>
<child>
- <widget class="Gtk.HBox" id="videowidgetsbox">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="LongoMatch.Gui.Component.DrawingToolBox" id="drawingtoolbox1">
- <property name="MemberName" />
- <property name="Visible">False</property>
- <property name="Events">ButtonPressMask</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="LongoMatch.Gui.PlayerCapturerBin" id="playercapturer">
- <property name="MemberName" />
- <property name="Events">ButtonPressMask</property>
- <property name="Detached">False</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- <child>
- <widget class="LongoMatch.Gui.Component.ButtonsWidget" id="buttonswidget">
+ <widget class="LongoMatch.Gui.Component.PlaysSelectionWidget" id="playsSelection">
<property name="MemberName" />
- <property name="Visible">False</property>
<property name="Events">ButtonPressMask</property>
</widget>
<packing>
- <property name="Position">1</property>
- <property name="AutoSize">False</property>
- <property name="Expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="LongoMatch.Gui.Component.GameUnitsTagger" id="gameunitstaggerwidget1">
- <property name="MemberName" />
- <property name="Events">ButtonPressMask</property>
- </widget>
- <packing>
- <property name="Position">2</property>
- <property name="AutoSize">False</property>
- <property name="Expand">False</property>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
</packing>
</child>
</widget>
<packing>
<property name="Resize">False</property>
- <property name="Shrink">False</property>
</packing>
</child>
<child>
- <widget class="Gtk.HBox" id="righthbox">
+ <widget class="Gtk.HPaned" id="hpaned1">
<property name="MemberName" />
- <property name="WidthRequest">100</property>
- <property name="Visible">False</property>
- <property name="Spacing">6</property>
+ <property name="CanFocus">True</property>
+ <property name="Position">1015</property>
<child>
- <widget class="Gtk.VBox" id="tagsvbox">
+ <widget class="Gtk.VBox" id="downbox">
<property name="MemberName" />
- <property name="WidthRequest">100</property>
- <property name="Visible">False</property>
<property name="Spacing">6</property>
<child>
- <widget class="LongoMatch.Gui.Component.PlaysCoordinatesTagger" id="postagger">
+ <widget class="Gtk.HBox" id="videowidgetsbox">
<property name="MemberName" />
- <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="LongoMatch.Gui.PlayerCapturerBin" id="playercapturer">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Detached">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="Position">0</property>
- <property name="AutoSize">True</property>
+ <property name="AutoSize">False</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ <property name="Shrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="righthbox">
+ <property name="MemberName" />
+ <property name="WidthRequest">100</property>
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
<child>
- <widget class="Gtk.Frame" id="notesframe">
+ <widget class="Gtk.VBox" id="tagsvbox">
<property name="MemberName" />
- <property name="ShadowType">None</property>
+ <property name="WidthRequest">100</property>
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
<child>
- <widget class="Gtk.Alignment" id="GtkAlignment22">
+ <widget class="LongoMatch.Gui.Component.PlaysCoordinatesTagger" id="postagger">
<property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="Yalign">0</property>
- <property name="LeftPadding">12</property>
- <child>
- <widget class="LongoMatch.Gui.Component.NotesWidget" id="notes">
- <property name="MemberName" />
- <property name="Events">ButtonPressMask</property>
- </widget>
- </child>
+ <property name="Events">ButtonPressMask</property>
</widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
</child>
<child>
- <widget class="Gtk.Label" id="GtkLabel31">
+ <widget class="Gtk.Frame" id="notesframe">
<property name="MemberName" />
- <property name="LabelProp" translatable="yes"><b>Notes</b></property>
- <property name="UseMarkup">True</property>
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment22">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="LongoMatch.Gui.Component.NotesWidget" id="notes">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel31">
+ <property name="MemberName" />
+ <property name="LabelProp"
translatable="yes"><b>Notes</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
</packing>
</child>
</widget>
<packing>
- <property name="Position">1</property>
+ <property name="Position">0</property>
<property name="AutoSize">False</property>
</packing>
</child>
</widget>
<packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- <child>
- <widget class="LongoMatch.Gui.Component.PlayListWidget" id="playlist">
- <property name="MemberName" />
- <property name="WidthRequest">100</property>
- <property name="Visible">False</property>
- <property name="Events">ButtonPressMask</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">False</property>
+ <property name="Resize">False</property>
+ <property name="Shrink">False</property>
</packing>
</child>
</widget>
<packing>
- <property name="Resize">False</property>
<property name="Shrink">False</property>
</packing>
</child>
</widget>
<packing>
- <property name="Shrink">False</property>
+ <property name="Resize">False</property>
</packing>
</child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="LongoMatch.Gui.Component.ButtonsWidget" id="buttonswidget">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.Timeline" id="timeline">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
</widget>
</child>
</widget>
@@ -10273,4 +10098,175 @@ Defining <b> Game Units </b> will help you during the analysis to in
</widget>
</child>
</widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.Timeline" design-size="671 350">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.VButtonBox" id="vbuttonbox1">
+ <property name="MemberName" />
+ <property name="Size">4</property>
+ <child>
+ <widget class="Gtk.Button" id="button7">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button6">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button8">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button9">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</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.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </child>
+ </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.DrawingArea" id="labelsarea">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.DrawingArea" id="timerulearea">
+ <property name="MemberName" />
+ </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.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.DrawingArea" id="timelinearea">
+ <property name="MemberName" />
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</stetic-interface>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index ee9b5fc..a57d4c8 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -107,32 +107,6 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.TimeScale" palette-category="General" allow-children="false"
base-type="Gtk.DrawingArea">
- <itemgroups />
- <signals>
- <itemgroup label="TimeScale Signals">
- <signal name="NewMarkAtFrameEvent" />
- <signal name="TimeNodeChanged" />
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeDeleted" />
- <signal name="PlayListNodeAdded" />
- <signal name="SnapshotSeries" />
- <signal name="TagPlay" />
- <signal name="RenderPlaylist" />
- </itemgroup>
- </signals>
- </object>
- <object type="LongoMatch.Gui.Component.TimeReferenceWidget" palette-category="General"
allow-children="false" base-type="Gtk.DrawingArea">
- <itemgroups>
- <itemgroup label="TimeReferenceWidget Properties">
- <property name="CurrentFrame" />
- <property name="FrameRate" />
- <property name="Scroll" />
- <property name="PixelRatio" />
- </itemgroup>
- </itemgroups>
- <signals />
- </object>
<object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
@@ -235,26 +209,6 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Base.TimeScaleBase" palette-category="General" allow-children="false"
base-type="Gtk.DrawingArea">
- <itemgroups>
- <itemgroup label="TimeScaleBase Properties">
- <property name="PixelRatio" />
- <property name="CurrentFrame" />
- </itemgroup>
- </itemgroups>
- <signals />
- </object>
- <object type="LongoMatch.Gui.Component.GameUnitTimeScale" palette-category="General"
allow-children="false" base-type="Gtk.DrawingArea">
- <itemgroups />
- <signals>
- <itemgroup label="GameUnitTimeScale Signals">
- <signal name="UnitChanged" />
- <signal name="UnitSelected" />
- <signal name="UnitDeleted" />
- <signal name="UnitAdded" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.PlayersTagger" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals />
@@ -344,7 +298,6 @@
<signal name="NewTagStopEvent" />
<signal name="NewTagCancelEvent" />
<signal name="PlaySelectedEvent" />
- <signal name="NewTagAtFrameEvent" />
<signal name="TagPlayEvent" />
<signal name="PlaysDeletedEvent" />
<signal name="TimeNodeChanged" />
@@ -363,6 +316,7 @@
<signal name="UnitDeleted" />
<signal name="UnitAdded" />
<signal name="KeyPressed" />
+ <signal name="NewTagAtPosEvent" />
</itemgroup>
</signals>
</object>
@@ -517,4 +471,19 @@
</itemgroup>
</signals>
</object>
+ <object type="LongoMatch.Gui.Component.Timeline" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="Timeline Signals">
+ <signal name="TimeNodeChanged" />
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeDeleted" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="SnapshotSeries" />
+ <signal name="TagPlay" />
+ <signal name="RenderPlaylist" />
+ <signal name="NewTagAtPosEvent" />
+ </itemgroup>
+ </signals>
+ </object>
</objects>
\ No newline at end of file
diff --git a/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp b/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp
index 74d95ec..0c532ba 100644
--- a/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp
+++ b/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp
@@ -52,8 +52,6 @@
<File subtype="Code" buildaction="Compile" name="Utils/Seeker.cs" />
<File subtype="Code" buildaction="Compile" name="Remuxer/MpegRemuxer.cs" />
<File subtype="Code" buildaction="Compile" name="Utils/MultimediaFactory.cs" />
- <File subtype="Code" buildaction="EmbedAsResource" name="gtk-gui/gui.stetic" />
- <File subtype="Code" buildaction="Compile" name="gtk-gui/generated.cs" />
<File subtype="Code" buildaction="Compile" name="Utils/GtkHelpers.cs" />
<File subtype="Directory" buildaction="Compile" name="Player" />
<File subtype="Code" buildaction="Compile" name="Player/GstPlayer.cs" />
@@ -69,4 +67,4 @@
<ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral,
PublicKeyToken=35e10195dab3c99f" />
<ProjectReference specificVersion="False" type="Gac" localcopy="False" refto="System.Core,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/LongoMatch.Services/LongoMatch.Services.mdp b/LongoMatch.Services/LongoMatch.Services.mdp
index b015ba0..62e14af 100644
--- a/LongoMatch.Services/LongoMatch.Services.mdp
+++ b/LongoMatch.Services/LongoMatch.Services.mdp
@@ -31,8 +31,6 @@
<File subtype="Code" buildaction="Compile" name="Services/MigrationsManager.cs" />
<File subtype="Code" buildaction="Compile" name="Services/ToolsManager.cs" />
<File subtype="Code" buildaction="Compile" name="Services/FileDB.cs" />
- <File subtype="Code" buildaction="EmbedAsResource" name="gtk-gui/gui.stetic" />
- <File subtype="Code" buildaction="Compile" name="gtk-gui/generated.cs" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
@@ -43,4 +41,4 @@
<ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral,
PublicKeyToken=35e10195dab3c99f" />
<ProjectReference specificVersion="False" type="Gac" localcopy="False" refto="System.Core,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index d7642d1..8009a9f 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -93,7 +93,7 @@ namespace LongoMatch.Services
analysisWindow.NewTagStartEvent += OnNewPlayStart;
analysisWindow.NewTagStopEvent += OnNewPlayStop;
analysisWindow.NewTagCancelEvent += OnNewPlayCancel;
- analysisWindow.NewTagAtFrameEvent += OnNewTagAtFrame;
+ analysisWindow.NewTagAtPosEvent += OnNewTagAtPos;
analysisWindow.TimeNodeChanged += OnTimeNodeChanged;
analysisWindow.PlaysDeletedEvent += OnPlaysDeleted;
analysisWindow.PlaySelectedEvent += OnPlaySelected;
@@ -223,8 +223,7 @@ namespace LongoMatch.Services
}
}
- protected virtual void OnNewTagAtFrame(Category category, int frame) {
- Time pos = new Time { MSeconds = frame*1000/openedProject.Description.File.Fps};
+ protected virtual void OnNewTagAtPos (Category category, Time pos) {
player.CloseSegment();
player.Seek (pos, true);
ProcessNewTag(category,pos);
diff --git a/LongoMatch.Services/Services/GameUnitsManager.cs
b/LongoMatch.Services/Services/GameUnitsManager.cs
index 029de87..283018f 100644
--- a/LongoMatch.Services/Services/GameUnitsManager.cs
+++ b/LongoMatch.Services/Services/GameUnitsManager.cs
@@ -57,7 +57,6 @@ namespace LongoMatch.Services
gameUnitsStarted.Clear();
fps = openedProject.Description.File.Fps;
- analysisWindow.UpdateGameUnits(openedProject.GameUnits);
}
private void StartGameUnit(GameUnit gameUnit) {
diff --git a/LongoMatch.Services/Services/PlaylistManager.cs b/LongoMatch.Services/Services/PlaylistManager.cs
index 5bb2893..2441d78 100644
--- a/LongoMatch.Services/Services/PlaylistManager.cs
+++ b/LongoMatch.Services/Services/PlaylistManager.cs
@@ -55,7 +55,7 @@ namespace LongoMatch.Services
{
openedProject = project;
if (project != null) {
- playlistWidget = analysisWindow.Playlist;
+ //playlistWidget = analysisWindow.Playlist;
player = analysisWindow.Player;
if (this.analysisWindow != analysisWindow) {
BindEvents(analysisWindow);
diff --git a/LongoMatch.mds b/LongoMatch.mds
index ae74955..fc9ca74 100644
--- a/LongoMatch.mds
+++ b/LongoMatch.mds
@@ -30,6 +30,8 @@
<Entry build="True" name="OxyPlotMono" configuration="Debug" />
<Entry build="True" name="Tests" configuration="Debug" />
<Entry build="True" name="LongoMatch.GUI.Helpers" configuration="Debug" />
+ <Entry build="True" name="LongoMatch.Drawing" configuration="Debug" />
+ <Entry build="True" name="LongoMatch.Drawing.Cairo" configuration="Debug" />
</Configuration>
<Configuration name="Release" ctype="CombineConfiguration">
<Entry build="True" name="LongoMatch.GUI" configuration="Release" />
@@ -44,6 +46,8 @@
<Entry build="True" name="OxyPlotMono" configuration="Release" />
<Entry build="True" name="Tests" configuration="Release" />
<Entry build="True" name="LongoMatch.GUI.Helpers" configuration="Release" />
+ <Entry build="True" name="LongoMatch.Drawing" configuration="Release" />
+ <Entry build="True" name="LongoMatch.Drawing.Cairo" configuration="Release" />
</Configuration>
</Configurations>
<StartMode startupentry="LongoMatchGtk" single="True">
@@ -59,6 +63,8 @@
<Execute type="None" entry="OxyPlotMono" />
<Execute type="None" entry="Tests" />
<Execute type="None" entry="LongoMatch.GUI.Helpers" />
+ <Execute type="None" entry="LongoMatch.Drawing" />
+ <Execute type="None" entry="LongoMatch.Drawing.Cairo" />
</StartMode>
<Entries>
<Entry filename="LongoMatch.GUI/LongoMatch.GUI.mdp" />
@@ -73,5 +79,7 @@
<Entry filename="oxyplot/OxyPlotMono/OxyPlotMono.csproj" />
<Entry filename="Tests/Tests.mdp" />
<Entry filename="LongoMatch.GUI.Helpers/LongoMatch.GUI.Helpers.mdp" />
+ <Entry filename="LongoMatch.Drawing/LongoMatch.Drawing.mdp" />
+ <Entry filename="LongoMatch.Drawing.Cairo/LongoMatch.Drawing.Cairo.mdp" />
</Entries>
</Combine>
\ No newline at end of file
diff --git a/LongoMatch/LongoMatchGtk.mdp b/LongoMatch/LongoMatchGtk.mdp
index cbaacdd..bd7cded 100644
--- a/LongoMatch/LongoMatchGtk.mdp
+++ b/LongoMatch/LongoMatchGtk.mdp
@@ -34,5 +34,6 @@
<ProjectReference type="Project" localcopy="True" refto="LongoMatch.Addins" />
<ProjectReference type="Project" localcopy="True" refto="LongoMatch.GUI.Multimedia" />
<ProjectReference type="Project" localcopy="True" refto="LongoMatch.GUI.Helpers" />
+ <ProjectReference type="Project" localcopy="True" refto="LongoMatch.Drawing.Cairo" />
</References>
</Project>
\ No newline at end of file
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index bf514de..fd30c0c 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -35,6 +35,7 @@ using LongoMatch.Video;
using LongoMatch.Multimedia;
using LongoMatch.Multimedia.Utils;
using LongoMatch.Gui.Helpers;
+using LongoMatch.Drawing.Cairo;
namespace LongoMatch
@@ -61,6 +62,7 @@ namespace LongoMatch
try {
AddinsManager manager = new AddinsManager(Config.PluginsConfigDir,
Config.PluginsDir);
manager.LoadConfigModifierAddins();
+ Config.DrawingToolkit = new CairoBackend ();
IMultimediaToolkit multimediaToolkit = new MultimediaToolkit();
Config.MultimediaToolkit = multimediaToolkit;
GUIToolkit guiToolkit = new GUIToolkit(version);
diff --git a/Tests/Tests.mdp b/Tests/Tests.mdp
index 899da55..ca8d043 100644
--- a/Tests/Tests.mdp
+++ b/Tests/Tests.mdp
@@ -57,4 +57,4 @@
<ProjectReference specificVersion="False" type="Gac" localcopy="False" refto="System.Core,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<ProjectReference type="Project" localcopy="True" refto="LongoMatch.Services" />
</References>
-</Project>
+</Project>
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]