[longomatch] Add zooming support in the drawing tool
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add zooming support in the drawing tool
- Date: Thu, 23 Apr 2015 15:20:23 +0000 (UTC)
commit c0b85629deae6c59469030d5a831737cf94b4a7a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Apr 17 18:17:55 2015 +0200
Add zooming support in the drawing tool
LongoMatch.Core/Common/Enums.cs | 4 +
.../Interfaces/Drawing/IDrawingToolkit.cs | 99 +++--
LongoMatch.Core/Store/Point.cs | 50 ++-
LongoMatch.Drawing.Cairo/CairoBackend.cs | 7 +
.../LongoMatch.Drawing.Cairo.csproj | 38 +-
LongoMatch.Drawing.Cairo/WidgetWrapper.cs | 40 ++-
LongoMatch.Drawing/Canvas.cs | 88 +++-
.../CanvasObjects/Blackboard/LineObject.cs | 2 -
LongoMatch.Drawing/Widgets/Blackboard.cs | 94 ++++-
LongoMatch.GUI/Gui/Dialog/DrawingTool.cs | 80 +++-
.../LongoMatch.Gui.Component.DashboardWidget.cs | 7 +-
.../gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs | 467 ++++++++++++--------
LongoMatch.GUI/gtk-gui/gui.stetic | 196 ++++++++-
LongoMatch.GUI/gtk-gui/objects.xml | 8 +
images/cursors/zoom | Bin 0 -> 989 bytes
15 files changed, 873 insertions(+), 307 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Enums.cs b/LongoMatch.Core/Common/Enums.cs
index 307df20..48ea27b 100644
--- a/LongoMatch.Core/Common/Enums.cs
+++ b/LongoMatch.Core/Common/Enums.cs
@@ -122,6 +122,7 @@ namespace LongoMatch.Core.Common
public enum DrawTool
{
+ None,
Pen,
Line,
Ellipse,
@@ -135,6 +136,9 @@ namespace LongoMatch.Core.Common
Player,
Text,
Counter,
+ Zoom,
+ CanMove,
+ Move,
}
public enum CaptureSourceType
diff --git a/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
b/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
index 9fa3b47..3214770 100644
--- a/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
+++ b/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
@@ -22,58 +22,99 @@ using System.Collections.Generic;
namespace LongoMatch.Core.Interfaces.Drawing
{
- public interface IContext:IDisposable {
- object Value {get;}
+ public interface IContext:IDisposable
+ {
+ object Value { get; }
}
-
- public interface ISurface:IDisposable {
+
+ public interface ISurface:IDisposable
+ {
Image Copy ();
- object Value {get;}
- IContext Context {get;}
+
+ object Value { get; }
+
+ IContext Context { get; }
+
int Width { get; }
+
int Height { get; }
}
-
+
public interface IDrawingToolkit
{
- IContext Context {set; get;}
- int LineWidth {set;}
- bool ClearOperation {set;}
- Color StrokeColor {set;}
- Color FillColor {set;}
- string FontFamily {set;}
- FontSlant FontSlant {set;}
- FontWeight FontWeight {set;}
- FontAlignment FontAlignment {set;}
- int FontSize {set;}
- LineStyle LineStyle {set;}
-
- ISurface CreateSurface (string filename, bool warnOnDispose=true);
- ISurface CreateSurface (int width, int height, Image image=null, bool wanrnOnDispose=true);
+ IContext Context { set; get; }
+
+ int LineWidth { set; }
+
+ bool ClearOperation { set; }
+
+ Color StrokeColor { set; }
+
+ Color FillColor { set; }
+
+ string FontFamily { set; }
+
+ FontSlant FontSlant { set; }
+
+ FontWeight FontWeight { set; }
+
+ FontAlignment FontAlignment { set; }
+
+ int FontSize { set; }
+
+ LineStyle LineStyle { set; }
+
+ ISurface CreateSurface (string filename, bool warnOnDispose = true);
+
+ ISurface CreateSurface (int width, int height, Image image = null, bool wanrnOnDispose =
true);
+
void DrawSurface (ISurface surface, Point p = null);
- void Begin();
- void End();
+
+ void Begin ();
+
+ void End ();
+
void Clear (Color color);
+
void TranslateAndScale (Point translation, Point scale);
+
+ void Clip (Area are);
+
void DrawLine (Point start, Point stop);
+
void DrawTriangle (Point corner, double width, double height,
SelectionPosition orientation);
+
void DrawRectangle (Point start, double width, double height);
+
void DrawRoundedRectangle (Point start, double width, double height, double radius);
+
void DrawArea (params Point[] vertices);
+
void DrawPoint (Point point);
+
void DrawCircle (Point center, double radius);
+
void DrawEllipse (Point center, double axisX, double axisY);
- void DrawText (Point point, double width, double height, string text, bool escape=false, bool
ellipsize=false);
- void DrawImage (Image image);
- void DrawImage (Point start, double width, double height, Image image, bool scale, bool
masked=false);
- void DrawArrow(Point start, Point stop, int lenght, double degrees, bool closed);
+
+ void DrawText (Point point, double width, double height, string text, bool escape = false,
bool ellipsize = false);
+
+ void DrawImage (Image image);
+
+ void DrawImage (Point start, double width, double height, Image image, bool scale, bool
masked = false);
+
+ void DrawArrow (Point start, Point stop, int lenght, double degrees, bool closed);
+
void Save (ICanvas canvas, double width, double height, string filename);
+
Image Copy (ICanvas canvas, double width, double height);
+
Area UserToDevice (Area area);
+
void Invoke (EventHandler handler);
- void MeasureText(string text, out int width, out int height,
- string fontFamily, int fontSize, FontWeight fontWeight);
+
+ void MeasureText (string text, out int width, out int height,
+ string fontFamily, int fontSize, FontWeight fontWeight);
}
}
diff --git a/LongoMatch.Core/Store/Point.cs b/LongoMatch.Core/Store/Point.cs
index c8b3c0d..537d5fa 100644
--- a/LongoMatch.Core/Store/Point.cs
+++ b/LongoMatch.Core/Store/Point.cs
@@ -24,41 +24,51 @@ namespace LongoMatch.Core.Common
{
[Serializable]
- public class Point {
+ public class Point
+ {
- public Point (double x, double y) {
+ public Point (double x, double y)
+ {
X = x;
Y = y;
}
-
+
public double X {
get;
set;
}
-
+
public double Y {
get;
set;
}
-
- public double Distance (Point p) {
+
+ public double Distance (Point p)
+ {
return Math.Sqrt (Math.Pow (X - p.X, 2) + Math.Pow (Y - p.Y, 2));
}
-
- public Point Normalize (int width, int height) {
- return new Point (Math.Min(X, width) / width,
- Math.Min (Y, height) / height);
+
+ public Point Normalize (int width, int height)
+ {
+ return new Point (Math.Min (X, width) / width,
+ Math.Min (Y, height) / height);
}
-
- public Point Denormalize (int width, int height) {
+
+ public Point Denormalize (int width, int height)
+ {
return new Point (X * width, Y * height);
}
+ public Point Copy ()
+ {
+ return new Point (X, Y);
+ }
+
public override string ToString ()
{
return string.Format ("[Point: X={0}, Y={1}]", X, Y);
}
-
+
public override bool Equals (object obj)
{
Point p = obj as Point;
@@ -67,17 +77,19 @@ namespace LongoMatch.Core.Common
return p.X == X && p.Y == Y;
}
-
+
public override int GetHashCode ()
{
- return (X.ToString() + "-" + Y.ToString()).GetHashCode();
+ return (X.ToString () + "-" + Y.ToString ()).GetHashCode ();
}
-
- public static Point operator + (Point p1, Point p2) {
+
+ public static Point operator + (Point p1, Point p2)
+ {
return new Point (p1.X + p2.X, p1.Y + p2.Y);
}
-
- public static Point operator - (Point p1, Point p2) {
+
+ public static Point operator - (Point p1, Point p2)
+ {
return new Point (p1.X - p2.X, p1.Y - p2.Y);
}
}
diff --git a/LongoMatch.Drawing.Cairo/CairoBackend.cs b/LongoMatch.Drawing.Cairo/CairoBackend.cs
index b54f227..68f7d70 100644
--- a/LongoMatch.Drawing.Cairo/CairoBackend.cs
+++ b/LongoMatch.Drawing.Cairo/CairoBackend.cs
@@ -188,6 +188,13 @@ namespace LongoMatch.Drawing.Cairo
}
}
+ public void Clip (Area area)
+ {
+ CContext.Rectangle (area.Start.X, area.Start.Y,
+ area.Width, area.Height);
+ CContext.Clip ();
+ }
+
public Area UserToDevice (Area a)
{
double x, y, x2, y2, x3, y3;
diff --git a/LongoMatch.Drawing.Cairo/LongoMatch.Drawing.Cairo.csproj
b/LongoMatch.Drawing.Cairo/LongoMatch.Drawing.Cairo.csproj
index 08ad9cd..eee25e6 100644
--- a/LongoMatch.Drawing.Cairo/LongoMatch.Drawing.Cairo.csproj
+++ b/LongoMatch.Drawing.Cairo/LongoMatch.Drawing.Cairo.csproj
@@ -8,6 +8,8 @@
<RootNamespace>LongoMatch.Drawing.Cairo</RootNamespace>
<AssemblyName>LongoMatch.Drawing.Cairo</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -65,6 +67,22 @@
<Link>cross</Link>
<LogicalName>cross</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="..\images\cursors\zoom">
+ <Link>zoom</Link>
+ <LogicalName>zoom</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\images\cursors\hand_opened">
+ <Link>hand_opened</Link>
+ <LogicalName>hand_opened</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\images\cursors\hand_closed">
+ <Link>hand_closed</Link>
+ <LogicalName>hand_closed</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\images\cursors\hand_select">
+ <Link>hand_select</Link>
+ <LogicalName>hand_select</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="..\images\cursors\angle" />
@@ -72,22 +90,10 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="Mono.Cairo" />
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Private>False</Private>
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Private>False</Private>
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Private>False</Private>
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Private>False</Private>
- <Package>gtk-sharp-2.0</Package>
- </Reference>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LongoMatch.Core\LongoMatch.Core.csproj">
diff --git a/LongoMatch.Drawing.Cairo/WidgetWrapper.cs b/LongoMatch.Drawing.Cairo/WidgetWrapper.cs
index 82fc692..df5a6c3 100644
--- a/LongoMatch.Drawing.Cairo/WidgetWrapper.cs
+++ b/LongoMatch.Drawing.Cairo/WidgetWrapper.cs
@@ -156,51 +156,63 @@ namespace LongoMatch.Drawing.Cairo
public void SetCursorForTool (DrawTool tool)
{
- string cursor;
+ string cursorStr = null;
+ Gdk.Cursor cursor = null;
switch (tool) {
case DrawTool.Line:
- cursor = "arrow";
+ cursorStr = "arrow";
break;
case DrawTool.Cross:
- cursor = "cross";
+ cursorStr = "cross";
break;
case DrawTool.Text:
- cursor = "text";
+ cursorStr = "text";
break;
case DrawTool.Counter:
- cursor = "number";
+ cursorStr = "number";
break;
case DrawTool.Ellipse:
case DrawTool.CircleArea:
- cursor = "ellipse";
+ cursorStr = "ellipse";
break;
case DrawTool.Rectangle:
case DrawTool.RectangleArea:
- cursor = "rect";
+ cursorStr = "rect";
break;
case DrawTool.Angle:
- cursor = "angle";
+ cursorStr = "angle";
break;
case DrawTool.Pen:
- cursor = "freehand";
+ cursorStr = "freehand";
break;
case DrawTool.Eraser:
- cursor = "eraser";
+ cursorStr = "eraser";
break;
case DrawTool.Player:
- cursor = "player";
+ cursorStr = "player";
+ break;
+ case DrawTool.Zoom:
+ cursorStr = "zoom";
+ break;
+ case DrawTool.CanMove:
+ cursorStr = "hand_opened";
+ break;
+ case DrawTool.Move:
+ cursorStr = "hand_closed";
break;
case DrawTool.Selection:
+ cursorStr = "hand_select";
+ break;
default:
cursor = null;
break;
}
- if (cursor == null) {
- widget.GdkWindow.Cursor = null;
+ if (cursorStr == null) {
+ widget.GdkWindow.Cursor = cursor;
} else {
Cursor c = new Cursor (widget.Display,
- Gdk.Pixbuf.LoadFromResource (cursor), 0, 0);
+ Gdk.Pixbuf.LoadFromResource (cursorStr), 0, 0);
widget.GdkWindow.Cursor = c;
}
}
diff --git a/LongoMatch.Drawing/Canvas.cs b/LongoMatch.Drawing/Canvas.cs
index 8476c39..3c14a46 100644
--- a/LongoMatch.Drawing/Canvas.cs
+++ b/LongoMatch.Drawing/Canvas.cs
@@ -132,6 +132,14 @@ namespace LongoMatch.Drawing
}
/// <summary>
+ /// Defines a clip region
+ /// </summary>
+ protected Area ClipRegion {
+ get;
+ set;
+ }
+
+ /// <summary>
/// When set to <c>true</c> redraws events are not ignored
/// </summary>
protected bool IgnoreRedraws {
@@ -170,7 +178,7 @@ namespace LongoMatch.Drawing
}
}
- void HandleSizeChangedEvent ()
+ protected virtual void HandleSizeChangedEvent ()
{
/* After a resize objects are rescalled and we need to invalidate
* their cached surfaces */
@@ -180,6 +188,30 @@ namespace LongoMatch.Drawing
}
/// <summary>
+ /// Must be called before any drawing operation is performed
+ /// to apply transformation, scalling and clipping.
+ /// </summary>
+ /// <param name="context">Context to draw</param>
+ protected void Begin (IContext context)
+ {
+ tk.Context = context;
+ tk.Begin ();
+ if (ClipRegion != null) {
+ tk.Clip (ClipRegion);
+ }
+ tk.TranslateAndScale (Translation, new Point (ScaleX, ScaleY));
+ }
+
+ /// <summary>
+ /// Must be called after drawing operations to restore the context
+ /// </summary>
+ protected void End ()
+ {
+ tk.End ();
+ tk.Context = null;
+ }
+
+ /// <summary>
/// Draws the canvas objects the specified context and area.
/// Object are drawn in the following order:
/// 1) Regular objects
@@ -191,9 +223,7 @@ namespace LongoMatch.Drawing
public virtual void Draw (IContext context, Area area)
{
List<CanvasObject> highlighted = new List<CanvasObject> ();
- tk.Context = context;
- tk.Begin ();
- tk.TranslateAndScale (Translation, new Point (ScaleX, ScaleY));
+ Begin (context);
foreach (ICanvasObject co in Objects) {
if (co.Visible) {
if (co is ICanvasSelectableObject) {
@@ -216,8 +246,7 @@ namespace LongoMatch.Drawing
foreach (CanvasObject co in highlighted) {
co.Draw (tk, area);
}
- tk.End ();
- tk.Context = null;
+ End ();
}
}
@@ -229,9 +258,10 @@ namespace LongoMatch.Drawing
{
protected bool moving, moved;
protected Point start;
+ protected CanvasObject highlighted;
+
uint lastTime;
Selection clickedSel;
- CanvasObject highlighted;
public SelectionCanvas (IWidget widget) : base (widget)
{
@@ -521,19 +551,19 @@ namespace LongoMatch.Drawing
protected virtual void HandleMotionEvent (Point coords)
{
Selection sel;
+ Point userCoords;
- coords = ToUserCoords (coords);
+ userCoords = ToUserCoords (coords);
if (moving && Selections.Count != 0) {
sel = Selections [0];
- sel.Drawable.Move (sel, coords, start);
+ sel.Drawable.Move (sel, userCoords, start);
widget.ReDraw (sel.Drawable);
SelectionMoved (sel);
- start = coords;
moved = true;
} else {
- CursorMoved (coords);
- start = coords;
+ CursorMoved (userCoords);
}
+ start = ToUserCoords (coords);
}
void HandleButtonReleasedEvent (Point coords, ButtonType type, ButtonModifier modifier)
@@ -568,12 +598,13 @@ namespace LongoMatch.Drawing
public abstract class BackgroundCanvas: SelectionCanvas
{
+ public event EventHandler RegionOfInterestChanged;
Image background;
+ Area regionOfInterest;
public BackgroundCanvas (IWidget widget) : base (widget)
{
- widget.SizeChangedEvent += HandleSizeChangedEvent;
}
public Image Background {
@@ -586,7 +617,21 @@ namespace LongoMatch.Drawing
}
}
- protected virtual void HandleSizeChangedEvent ()
+ public Area RegionOfInterest {
+ set {
+ regionOfInterest = value;
+ HandleSizeChangedEvent ();
+ widget.ReDraw ();
+ if (RegionOfInterestChanged != null) {
+ RegionOfInterestChanged (this, null);
+ }
+ }
+ get {
+ return regionOfInterest;
+ }
+ }
+
+ protected override void HandleSizeChangedEvent ()
{
if (background != null) {
double scaleX, scaleY;
@@ -594,20 +639,27 @@ namespace LongoMatch.Drawing
background.ScaleFactor ((int)widget.Width, (int)widget.Height, out scaleX,
out scaleY, out translation);
+ ClipRegion = new Area (new Point (translation.X, translation.Y),
+ background.Width * scaleX, background.Height * scaleY);
ScaleX = scaleX;
ScaleY = scaleY;
Translation = translation;
+ if (RegionOfInterest != null) {
+ ScaleX *= background.Width / RegionOfInterest.Width;
+ ScaleY *= background.Height / RegionOfInterest.Height;
+ Translation -= new Point (RegionOfInterest.Start.X * ScaleX,
+ RegionOfInterest.Start.Y * ScaleY);
+ }
}
+ base.HandleSizeChangedEvent ();
}
public override void Draw (IContext context, Area area)
{
if (Background != null) {
- tk.Context = context;
- tk.Begin ();
- tk.TranslateAndScale (Translation, new Point (ScaleX, ScaleY));
+ Begin (context);
tk.DrawImage (Background);
- tk.End ();
+ End ();
}
base.Draw (context, area);
}
diff --git a/LongoMatch.Drawing/CanvasObjects/Blackboard/LineObject.cs
b/LongoMatch.Drawing/CanvasObjects/Blackboard/LineObject.cs
index d4a6187..9d82d64 100644
--- a/LongoMatch.Drawing/CanvasObjects/Blackboard/LineObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Blackboard/LineObject.cs
@@ -38,7 +38,6 @@ namespace LongoMatch.Drawing.CanvasObjects.Blackboard
if (!UpdateDrawArea (tk, area, Drawable.Area)) {
return;
}
- ;
tk.Begin ();
tk.FillColor = Drawable.FillColor;
@@ -65,7 +64,6 @@ namespace LongoMatch.Drawing.CanvasObjects.Blackboard
if (Selected) {
DrawCornerSelection (tk, Drawable.Start);
DrawCornerSelection (tk, Drawable.Stop);
- DrawSelectionArea (tk);
}
tk.End ();
}
diff --git a/LongoMatch.Drawing/Widgets/Blackboard.cs b/LongoMatch.Drawing/Widgets/Blackboard.cs
index e194817..8b4f35c 100644
--- a/LongoMatch.Drawing/Widgets/Blackboard.cs
+++ b/LongoMatch.Drawing/Widgets/Blackboard.cs
@@ -21,6 +21,7 @@ using LongoMatch.Core.Handlers;
using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
using LongoMatch.Core.Store.Drawables;
+using System;
namespace LongoMatch.Drawing.Widgets
{
@@ -34,7 +35,8 @@ namespace LongoMatch.Drawing.Widgets
DrawTool tool;
FrameDrawing drawing;
ISurface backbuffer;
- bool handdrawing, inObjectCreation;
+ bool handdrawing, inObjectCreation, inZooming;
+ double currentZoom;
public Blackboard (IWidget widget) : base (widget)
{
@@ -46,6 +48,8 @@ namespace LongoMatch.Drawing.Widgets
LineType = LineType.Arrow;
FontSize = 12;
tool = DrawTool.Selection;
+ currentZoom = 1;
+ MaxZoom = 4;
}
protected override void Dispose (bool disposing)
@@ -124,6 +128,11 @@ namespace LongoMatch.Drawing.Widgets
}
}
+ public double MaxZoom {
+ get;
+ set;
+ }
+
public void DeleteSelection ()
{
foreach (ICanvasDrawableObject o in Selections.Select (s => s.Drawable)) {
@@ -166,6 +175,46 @@ namespace LongoMatch.Drawing.Widgets
tk.Save (this, Background.Width, Background.Height, filename);
}
+ public void Zoom (double zoom, Point center = null)
+ {
+ Area roi;
+ double width, height;
+
+ if (currentZoom == zoom)
+ return;
+
+ if (RegionOfInterest == null)
+ roi = new Area (new Point (0, 0),
+ Background.Width, Background.Height);
+ else
+ roi = RegionOfInterest;
+
+ width = Background.Width / zoom;
+ height = Background.Height / zoom;
+
+ if (center == null) {
+ roi.Start.X = roi.Start.X + roi.Width / 2 - width / 2;
+ roi.Start.Y = roi.Start.Y + roi.Height / 2 - height / 2;
+ } else {
+ roi.Start.X = center.X - width / 2;
+ roi.Start.Y = center.Y - height / 2;
+ }
+ roi.Width = width;
+ roi.Height = height;
+ ClipRoi (roi);
+ RegionOfInterest = roi;
+ currentZoom = zoom;
+ }
+
+ void ClipRoi (Area roi)
+ {
+ Point st = roi.Start;
+ st.X = Math.Max (st.X, 0);
+ st.Y = Math.Max (st.Y, 0);
+ st.X = Math.Min (st.X, (Background.Width - roi.Width));
+ st.Y = Math.Min (st.Y, (Background.Height - roi.Height));
+ }
+
ICanvasSelectableObject Add (IBlackboardObject drawable)
{
ICanvasSelectableObject cso = Utils.CanvasFromDrawableObject (drawable);
@@ -179,9 +228,14 @@ namespace LongoMatch.Drawing.Widgets
SelectionPosition pos = SelectionPosition.BottomRight;
bool resize = true, copycolor = true, sele = true;
- if (Tool == DrawTool.Selection)
+ if (Tool == DrawTool.Selection) {
+ if (Selections.Count == 0 && currentZoom != 1) {
+ widget.SetCursorForTool (DrawTool.Move);
+ inZooming = true;
+ }
return;
-
+ }
+
if (sel != null) {
ClearSelection ();
}
@@ -245,8 +299,11 @@ namespace LongoMatch.Drawing.Widgets
case DrawTool.Eraser:
handdrawing = true;
break;
+ case DrawTool.Zoom:
+ Zoom (Math.Min (currentZoom + 0.1, MaxZoom), start);
+ break;
}
-
+
if (drawable != null) {
if (copycolor) {
drawable.StrokeColor = Color.Copy ();
@@ -273,6 +330,11 @@ namespace LongoMatch.Drawing.Widgets
protected override void StopMove (bool moved)
{
Selection sel = Selections.FirstOrDefault ();
+
+ if (inZooming) {
+ widget.SetCursorForTool (DrawTool.CanMove);
+ }
+
if (sel != null) {
(sel.Drawable as ICanvasDrawableObject).IDrawableObject.Reorder ();
}
@@ -281,6 +343,7 @@ namespace LongoMatch.Drawing.Widgets
inObjectCreation = false;
}
handdrawing = false;
+ inZooming = false;
}
protected override void ShowMenu (Point coords)
@@ -318,7 +381,12 @@ namespace LongoMatch.Drawing.Widgets
protected override void CursorMoved (Point coords)
{
- if (handdrawing) {
+ if (inZooming && RegionOfInterest != null) {
+ Point diff = coords - start;
+ RegionOfInterest.Start -= diff;
+ ClipRoi (RegionOfInterest);
+ RegionOfInterest = RegionOfInterest;
+ } else if (handdrawing) {
using (IContext c = backbuffer.Context) {
tk.Context = c;
tk.Begin ();
@@ -335,6 +403,16 @@ namespace LongoMatch.Drawing.Widgets
tk.End ();
}
widget.ReDraw ();
+ } else {
+ base.CursorMoved (coords);
+ if (Tool == DrawTool.Selection) {
+ DrawTool moveTool = currentZoom == 1 ? DrawTool.None :
DrawTool.CanMove;
+ if (highlighted == null) {
+ widget.SetCursorForTool (moveTool);
+ } else {
+ widget.SetCursorForTool (DrawTool.Selection);
+ }
+ }
}
}
@@ -347,11 +425,9 @@ namespace LongoMatch.Drawing.Widgets
base.Draw (context, area);
if (backbuffer != null) {
- tk.Context = context;
- tk.Begin ();
- tk.TranslateAndScale (Translation, new Point (ScaleX, ScaleY));
+ Begin (context);
tk.DrawSurface (backbuffer);
- tk.End ();
+ End ();
}
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
index c71dcc2..d71baf6 100644
--- a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
+++ b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
@@ -17,32 +17,32 @@
//
using System;
using Gtk;
-using Mono.Unix;
using LongoMatch.Core.Common;
-using LongoMatch.Gui.Component;
+using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
-using LongoMatch.Gui.Helpers;
-using LongoMatch.Drawing.Widgets;
-using LongoMatch.Drawing.Cairo;
using LongoMatch.Core.Store.Drawables;
-using LongoMatch.Core.Interfaces.Drawing;
-using Misc = LongoMatch.Gui.Helpers.Misc;
+using LongoMatch.Drawing.Cairo;
+using LongoMatch.Drawing.Widgets;
+using LongoMatch.Gui.Helpers;
+using Mono.Unix;
using Color = LongoMatch.Core.Common.Color;
using Drawable = LongoMatch.Core.Store.Drawables.Drawable;
using Image = LongoMatch.Core.Common.Image;
+using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Dialog
{
public partial class DrawingTool : Gtk.Dialog
{
+ readonly Blackboard blackboard;
TimelineEvent play;
- Blackboard blackboard;
FrameDrawing drawing;
Drawable selectedDrawable;
Gtk.Dialog playerDialog;
Text playerText;
Project project;
double scaleFactor;
+ bool ignoreChanges;
public DrawingTool ()
{
@@ -53,6 +53,7 @@ namespace LongoMatch.Gui.Dialog
blackboard.ConfigureObjectEvent += HandleConfigureObjectEvent;
blackboard.ShowMenuEvent += HandleShowMenuEvent;
blackboard.DrawableChangedEvent += HandleDrawableChangedEvent;
+ blackboard.RegionOfInterestChanged += HandleRegionOfInterestChanged;
selectbutton.Active = true;
@@ -69,6 +70,9 @@ namespace LongoMatch.Gui.Dialog
playerbuttonimage.Pixbuf = Misc.LoadIcon ("longomatch-person", 20);
numberbuttonimage.Pixbuf = Misc.LoadIcon ("longomatch-counter", 20);
anglebuttonimage.Pixbuf = Misc.LoadIcon ("longomatch-angle", 20);
+ zoombuttonimage.Pixbuf = Misc.LoadIcon ("longomatch-search", 20);
+ zoomoutimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-zoom-out", 14);
+ zoominimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-zoom-in", 14);
selectbutton.Toggled += HandleToolClicked;
eraserbutton.Toggled += HandleToolClicked;
@@ -83,6 +87,7 @@ namespace LongoMatch.Gui.Dialog
playerbutton.Toggled += HandleToolClicked;
anglebutton.Toggled += HandleToolClicked;
numberbutton.Toggled += HandleToolClicked;
+ zoombutton.Toggled += HandleToolClicked;
// Force tooltips to be translatable as there seems to be a bug in stetic
// code generation for translatable tooltips.
@@ -102,6 +107,7 @@ namespace LongoMatch.Gui.Dialog
stylecombobox.TooltipMarkup = Catalog.GetString ("Change the line style");
typecombobox.TooltipMarkup = Catalog.GetString ("Change the line style");
clearbutton.TooltipMarkup = Catalog.GetString ("Clear all drawings");
+ zoombutton.TooltipMarkup = Catalog.GetString ("Zoom tool. Click to zoom in, Alt+Click
to zoom out");
FillLineStyle ();
FillLineType ();
@@ -124,6 +130,14 @@ namespace LongoMatch.Gui.Dialog
linesizespinbutton.Value = 4;
clearbutton.Clicked += HandleClearClicked;
+ zoomscale.CanFocus = false;
+ zoomscale.SetRange (1, 4);
+ zoomscale.SetIncrements (0.2, 0.2);
+ zoomscale.ValueChanged += HandleZoomValueChanged;
+ hscrollbar.ValueChanged += HandleScrollValueChanged;
+ wscrollbar.ValueChanged += HandleScrollValueChanged;
+ hscrollbar.Visible = wscrollbar.Visible = false;
+ zoomscale.Value = 1;
}
public override void Destroy ()
@@ -390,6 +404,8 @@ namespace LongoMatch.Gui.Dialog
blackboard.Tool = DrawTool.Angle;
} else if (sender == playerbutton) {
blackboard.Tool = DrawTool.Player;
+ } else if (sender == zoombutton) {
+ blackboard.Tool = DrawTool.Zoom;
}
}
@@ -497,5 +513,53 @@ namespace LongoMatch.Gui.Dialog
args.RetVal = true;
}
}
+
+ void HandleRegionOfInterestChanged (object sender, EventArgs e)
+ {
+ if (play != null) {
+ //play.RegionOfInterest = blackboard.RegionOfInterest;
+ }
+ if (blackboard.RegionOfInterest.Width == blackboard.Background.Width &&
+ blackboard.RegionOfInterest.Height == blackboard.Background.Height) {
+ hscrollbar.Visible = false;
+ wscrollbar.Visible = false;
+ } else {
+ hscrollbar.Visible = true;
+ wscrollbar.Visible = true;
+ hscrollbar.SetRange (0, blackboard.Background.Height -
+ blackboard.RegionOfInterest.Height);
+ wscrollbar.SetRange (0, blackboard.Background.Width -
+ blackboard.RegionOfInterest.Width);
+ ignoreChanges = true;
+ wscrollbar.Value = blackboard.RegionOfInterest.Start.X;
+ hscrollbar.Value = blackboard.RegionOfInterest.Start.Y;
+ zoomscale.Value = blackboard.Background.Width /
blackboard.RegionOfInterest.Width;
+ ignoreChanges = false;
+ }
+ }
+
+ void HandleScrollValueChanged (object sender, EventArgs e)
+ {
+ if (ignoreChanges)
+ return;
+
+ if (sender == wscrollbar) {
+ blackboard.RegionOfInterest.Start.X = wscrollbar.Value;
+ } else {
+ blackboard.RegionOfInterest.Start.Y = hscrollbar.Value;
+ }
+ blackboard.RegionOfInterest = blackboard.RegionOfInterest;
+ }
+
+ void HandleZoomValueChanged (object sender, EventArgs e)
+ {
+ zoomlabel.Text = string.Format ("{0,3}%", (int)(zoomscale.Value * 100));
+
+ if (ignoreChanges)
+ return;
+
+ blackboard.Zoom (zoomscale.Value);
+ }
+
}
}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs
index 3d1eb9d..4fd6e36 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs
@@ -151,7 +151,6 @@ namespace LongoMatch.Gui.Component
this.addcatbuttonimage = new global::Gtk.Image ();
this.addcatbuttonimage.Name = "addcatbuttonimage";
this.addcatbutton.Add (this.addcatbuttonimage);
- this.addcatbutton.Label = null;
this.hbuttonbox2.Add (this.addcatbutton);
global::Gtk.ButtonBox.ButtonBoxChild w2 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.addcatbutton]));
w2.Expand = false;
@@ -164,7 +163,6 @@ namespace LongoMatch.Gui.Component
this.addtimerbuttonimage = new global::Gtk.Image ();
this.addtimerbuttonimage.Name = "addtimerbuttonimage";
this.addtimerbutton.Add (this.addtimerbuttonimage);
- this.addtimerbutton.Label = null;
this.hbuttonbox2.Add (this.addtimerbutton);
global::Gtk.ButtonBox.ButtonBoxChild w4 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.addtimerbutton]));
w4.Position = 1;
@@ -178,7 +176,6 @@ namespace LongoMatch.Gui.Component
this.addscorebuttonimage = new global::Gtk.Image ();
this.addscorebuttonimage.Name = "addscorebuttonimage";
this.addscorebutton.Add (this.addscorebuttonimage);
- this.addscorebutton.Label = null;
this.hbuttonbox2.Add (this.addscorebutton);
global::Gtk.ButtonBox.ButtonBoxChild w6 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.addscorebutton]));
w6.Position = 2;
@@ -192,7 +189,6 @@ namespace LongoMatch.Gui.Component
this.addcardbuttonimage = new global::Gtk.Image ();
this.addcardbuttonimage.Name = "addcardbuttonimage";
this.addcardbutton.Add (this.addcardbuttonimage);
- this.addcardbutton.Label = null;
this.hbuttonbox2.Add (this.addcardbutton);
global::Gtk.ButtonBox.ButtonBoxChild w8 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.addcardbutton]));
w8.Position = 3;
@@ -206,7 +202,6 @@ namespace LongoMatch.Gui.Component
this.addtagbuttonimage = new global::Gtk.Image ();
this.addtagbuttonimage.Name = "addtagbuttonimage";
this.addtagbutton.Add (this.addtagbuttonimage);
- this.addtagbutton.Label = null;
this.hbuttonbox2.Add (this.addtagbutton);
global::Gtk.ButtonBox.ButtonBoxChild w10 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.addtagbutton]));
w10.Position = 4;
@@ -518,7 +513,6 @@ namespace LongoMatch.Gui.Component
this.applyimage = new global::Gtk.Image ();
this.applyimage.Name = "applyimage";
this.applybutton.Add (this.applyimage);
- this.applybutton.Label = null;
this.periodsbox.Add (this.applybutton);
global::Gtk.Box.BoxChild w48 = ((global::Gtk.Box.BoxChild)(this.periodsbox
[this.applybutton]));
w48.Position = 2;
@@ -576,6 +570,7 @@ namespace LongoMatch.Gui.Component
this.linkproperties = new global::LongoMatch.Gui.Component.LinkProperties ();
this.linkproperties.Events = ((global::Gdk.EventMask)(256));
this.linkproperties.Name = "linkproperties";
+ this.linkproperties.Edited = false;
this.propertiesnotebook.Add (this.linkproperties);
global::Gtk.Notebook.NotebookChild w53 =
((global::Gtk.Notebook.NotebookChild)(this.propertiesnotebook [this.linkproperties]));
w53.Position = 2;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
index d09084c..9964b7a 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
@@ -66,6 +66,22 @@ namespace LongoMatch.Gui.Dialog
private global::Gtk.Image textbuttonimage;
+ private global::Gtk.RadioButton zoombutton;
+
+ private global::Gtk.Image zoombuttonimage;
+
+ private global::Gtk.HBox hbox2;
+
+ private global::Gtk.Label zoomlabel;
+
+ private global::Gtk.HBox zoomhbox;
+
+ private global::Gtk.Image zoomoutimage;
+
+ private global::Gtk.HScale zoomscale;
+
+ private global::Gtk.Image zoominimage;
+
private global::Gtk.Frame linesframe;
private global::Gtk.Alignment GtkAlignment4;
@@ -116,8 +132,20 @@ namespace LongoMatch.Gui.Dialog
private global::Gtk.Button savebutton;
+ private global::Gtk.HBox hbox3;
+
+ private global::Gtk.VBox vbox4;
+
private global::Gtk.DrawingArea drawingarea;
+ private global::Gtk.HScrollbar wscrollbar;
+
+ private global::Gtk.VBox vbox5;
+
+ private global::Gtk.VScrollbar hscrollbar;
+
+ private global::Gtk.Alignment alignment1;
+
private global::Gtk.Button closebutton;
protected virtual void Build ()
@@ -171,7 +199,6 @@ namespace LongoMatch.Gui.Dialog
this.anglebutton.TooltipMarkup = "Angle tool";
this.anglebutton.CanFocus = true;
this.anglebutton.Name = "anglebutton";
- this.anglebutton.Active = true;
this.anglebutton.DrawIndicator = false;
this.anglebutton.UseUnderline = true;
this.anglebutton.Group = new global::GLib.SList (global::System.IntPtr.Zero);
@@ -184,6 +211,8 @@ namespace LongoMatch.Gui.Dialog
global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.toolstable
[this.anglebutton]));
w4.TopAttach = ((uint)(6));
w4.BottomAttach = ((uint)(7));
+ w4.LeftAttach = ((uint)(1));
+ w4.RightAttach = ((uint)(2));
w4.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child toolstable.Gtk.Table+TableChild
this.crossbutton = new global::Gtk.RadioButton ("");
@@ -409,10 +438,86 @@ namespace LongoMatch.Gui.Dialog
w28.LeftAttach = ((uint)(1));
w28.RightAttach = ((uint)(2));
w28.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child toolstable.Gtk.Table+TableChild
+ this.zoombutton = new global::Gtk.RadioButton ("");
+ this.zoombutton.TooltipMarkup = "Index tool";
+ this.zoombutton.CanFocus = true;
+ this.zoombutton.Name = "zoombutton";
+ this.zoombutton.DrawIndicator = false;
+ this.zoombutton.UseUnderline = true;
+ this.zoombutton.Group = this.anglebutton.Group;
+ this.zoombutton.Remove (this.zoombutton.Child);
+ // Container child zoombutton.Gtk.Container+ContainerChild
+ this.zoombuttonimage = new global::Gtk.Image ();
+ this.zoombuttonimage.Name = "zoombuttonimage";
+ this.zoombutton.Add (this.zoombuttonimage);
+ this.toolstable.Add (this.zoombutton);
+ global::Gtk.Table.TableChild w30 = ((global::Gtk.Table.TableChild)(this.toolstable
[this.zoombutton]));
+ w30.TopAttach = ((uint)(6));
+ w30.BottomAttach = ((uint)(7));
+ w30.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox3.Add (this.toolstable);
- global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.toolstable]));
- w29.Position = 1;
- w29.Expand = false;
+ global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.toolstable]));
+ w31.Position = 1;
+ w31.Expand = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 6;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.zoomlabel = new global::Gtk.Label ();
+ this.zoomlabel.Name = "zoomlabel";
+ this.zoomlabel.LabelProp = "100%";
+ this.hbox2.Add (this.zoomlabel);
+ global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.zoomlabel]));
+ w32.Position = 0;
+ w32.Expand = false;
+ w32.Fill = false;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.zoomhbox = new global::Gtk.HBox ();
+ this.zoomhbox.Name = "zoomhbox";
+ this.zoomhbox.Spacing = 6;
+ // Container child zoomhbox.Gtk.Box+BoxChild
+ this.zoomoutimage = new global::Gtk.Image ();
+ this.zoomoutimage.WidthRequest = 14;
+ this.zoomoutimage.HeightRequest = 8;
+ this.zoomoutimage.Name = "zoomoutimage";
+ this.zoomhbox.Add (this.zoomoutimage);
+ global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.zoomhbox
[this.zoomoutimage]));
+ w33.Position = 0;
+ w33.Expand = false;
+ w33.Fill = false;
+ // Container child zoomhbox.Gtk.Box+BoxChild
+ this.zoomscale = new global::Gtk.HScale (null);
+ this.zoomscale.CanFocus = true;
+ this.zoomscale.Name = "zoomscale";
+ this.zoomscale.Adjustment.Upper = 100;
+ this.zoomscale.Adjustment.PageIncrement = 10;
+ this.zoomscale.Adjustment.StepIncrement = 1;
+ this.zoomscale.DrawValue = false;
+ this.zoomscale.Digits = 0;
+ this.zoomscale.ValuePos = ((global::Gtk.PositionType)(2));
+ this.zoomhbox.Add (this.zoomscale);
+ global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.zoomhbox
[this.zoomscale]));
+ w34.Position = 1;
+ // Container child zoomhbox.Gtk.Box+BoxChild
+ this.zoominimage = new global::Gtk.Image ();
+ this.zoominimage.WidthRequest = 14;
+ this.zoominimage.HeightRequest = 8;
+ this.zoominimage.Name = "zoominimage";
+ this.zoomhbox.Add (this.zoominimage);
+ global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.zoomhbox
[this.zoominimage]));
+ w35.Position = 2;
+ w35.Expand = false;
+ w35.Fill = false;
+ this.hbox2.Add (this.zoomhbox);
+ global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.zoomhbox]));
+ w36.Position = 1;
+ this.vbox3.Add (this.hbox2);
+ global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox2]));
+ w37.Position = 2;
+ w37.Expand = false;
+ w37.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.linesframe = new global::Gtk.Frame ();
this.linesframe.Name = "linesframe";
@@ -432,10 +537,10 @@ namespace LongoMatch.Gui.Dialog
this.colorbutton.Events = ((global::Gdk.EventMask)(784));
this.colorbutton.Name = "colorbutton";
this.table1.Add (this.colorbutton);
- global::Gtk.Table.TableChild w30 = ((global::Gtk.Table.TableChild)(this.table1
[this.colorbutton]));
- w30.LeftAttach = ((uint)(1));
- w30.RightAttach = ((uint)(2));
- w30.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w38 = ((global::Gtk.Table.TableChild)(this.table1
[this.colorbutton]));
+ w38.LeftAttach = ((uint)(1));
+ w38.RightAttach = ((uint)(2));
+ w38.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.colorslabel = new global::Gtk.Label ();
this.colorslabel.Name = "colorslabel";
@@ -443,9 +548,9 @@ namespace LongoMatch.Gui.Dialog
this.colorslabel.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Color</b>");
this.colorslabel.UseMarkup = true;
this.table1.Add (this.colorslabel);
- global::Gtk.Table.TableChild w31 = ((global::Gtk.Table.TableChild)(this.table1
[this.colorslabel]));
- w31.XOptions = ((global::Gtk.AttachOptions)(4));
- w31.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w39 = ((global::Gtk.Table.TableChild)(this.table1
[this.colorslabel]));
+ w39.XOptions = ((global::Gtk.AttachOptions)(4));
+ w39.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label3 = new global::Gtk.Label ();
this.label3.Name = "label3";
@@ -453,11 +558,11 @@ namespace LongoMatch.Gui.Dialog
this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Size</b>");
this.label3.UseMarkup = true;
this.table1.Add (this.label3);
- global::Gtk.Table.TableChild w32 = ((global::Gtk.Table.TableChild)(this.table1
[this.label3]));
- w32.TopAttach = ((uint)(1));
- w32.BottomAttach = ((uint)(2));
- w32.XOptions = ((global::Gtk.AttachOptions)(4));
- w32.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w40 = ((global::Gtk.Table.TableChild)(this.table1
[this.label3]));
+ w40.TopAttach = ((uint)(1));
+ w40.BottomAttach = ((uint)(2));
+ w40.XOptions = ((global::Gtk.AttachOptions)(4));
+ w40.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label4 = new global::Gtk.Label ();
this.label4.Name = "label4";
@@ -465,11 +570,11 @@ namespace LongoMatch.Gui.Dialog
this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Style</b>");
this.label4.UseMarkup = true;
this.table1.Add (this.label4);
- global::Gtk.Table.TableChild w33 = ((global::Gtk.Table.TableChild)(this.table1
[this.label4]));
- w33.TopAttach = ((uint)(2));
- w33.BottomAttach = ((uint)(3));
- w33.XOptions = ((global::Gtk.AttachOptions)(4));
- w33.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table1
[this.label4]));
+ w41.TopAttach = ((uint)(2));
+ w41.BottomAttach = ((uint)(3));
+ w41.XOptions = ((global::Gtk.AttachOptions)(4));
+ w41.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label5 = new global::Gtk.Label ();
this.label5.Name = "label5";
@@ -477,11 +582,11 @@ namespace LongoMatch.Gui.Dialog
this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Type</b>");
this.label5.UseMarkup = true;
this.table1.Add (this.label5);
- global::Gtk.Table.TableChild w34 = ((global::Gtk.Table.TableChild)(this.table1
[this.label5]));
- w34.TopAttach = ((uint)(3));
- w34.BottomAttach = ((uint)(4));
- w34.XOptions = ((global::Gtk.AttachOptions)(4));
- w34.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w42 = ((global::Gtk.Table.TableChild)(this.table1
[this.label5]));
+ w42.TopAttach = ((uint)(3));
+ w42.BottomAttach = ((uint)(4));
+ w42.XOptions = ((global::Gtk.AttachOptions)(4));
+ w42.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.linesizespinbutton = new global::Gtk.SpinButton (2, 20, 1);
this.linesizespinbutton.CanFocus = true;
@@ -491,35 +596,35 @@ namespace LongoMatch.Gui.Dialog
this.linesizespinbutton.Numeric = true;
this.linesizespinbutton.Value = 4;
this.table1.Add (this.linesizespinbutton);
- global::Gtk.Table.TableChild w35 = ((global::Gtk.Table.TableChild)(this.table1
[this.linesizespinbutton]));
- w35.TopAttach = ((uint)(1));
- w35.BottomAttach = ((uint)(2));
- w35.LeftAttach = ((uint)(1));
- w35.RightAttach = ((uint)(2));
- w35.XOptions = ((global::Gtk.AttachOptions)(4));
- w35.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table1
[this.linesizespinbutton]));
+ w43.TopAttach = ((uint)(1));
+ w43.BottomAttach = ((uint)(2));
+ w43.LeftAttach = ((uint)(1));
+ w43.RightAttach = ((uint)(2));
+ w43.XOptions = ((global::Gtk.AttachOptions)(4));
+ w43.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.stylecombobox = global::Gtk.ComboBox.NewText ();
this.stylecombobox.TooltipMarkup = "Change the line style";
this.stylecombobox.Name = "stylecombobox";
this.table1.Add (this.stylecombobox);
- global::Gtk.Table.TableChild w36 = ((global::Gtk.Table.TableChild)(this.table1
[this.stylecombobox]));
- w36.TopAttach = ((uint)(2));
- w36.BottomAttach = ((uint)(3));
- w36.LeftAttach = ((uint)(1));
- w36.RightAttach = ((uint)(2));
- w36.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w44 = ((global::Gtk.Table.TableChild)(this.table1
[this.stylecombobox]));
+ w44.TopAttach = ((uint)(2));
+ w44.BottomAttach = ((uint)(3));
+ w44.LeftAttach = ((uint)(1));
+ w44.RightAttach = ((uint)(2));
+ w44.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.typecombobox = global::Gtk.ComboBox.NewText ();
this.typecombobox.TooltipMarkup = "Change the line style";
this.typecombobox.Name = "typecombobox";
this.table1.Add (this.typecombobox);
- global::Gtk.Table.TableChild w37 = ((global::Gtk.Table.TableChild)(this.table1
[this.typecombobox]));
- w37.TopAttach = ((uint)(3));
- w37.BottomAttach = ((uint)(4));
- w37.LeftAttach = ((uint)(1));
- w37.RightAttach = ((uint)(2));
- w37.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table1
[this.typecombobox]));
+ w45.TopAttach = ((uint)(3));
+ w45.BottomAttach = ((uint)(4));
+ w45.LeftAttach = ((uint)(1));
+ w45.RightAttach = ((uint)(2));
+ w45.YOptions = ((global::Gtk.AttachOptions)(4));
this.GtkAlignment4.Add (this.table1);
this.linesframe.Add (this.GtkAlignment4);
this.GtkLabel4 = new global::Gtk.Label ();
@@ -528,10 +633,10 @@ namespace LongoMatch.Gui.Dialog
this.GtkLabel4.UseMarkup = true;
this.linesframe.LabelWidget = this.GtkLabel4;
this.vbox3.Add (this.linesframe);
- global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.linesframe]));
- w40.Position = 2;
- w40.Expand = false;
- w40.Fill = false;
+ global::Gtk.Box.BoxChild w48 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.linesframe]));
+ w48.Position = 3;
+ w48.Expand = false;
+ w48.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.textframe = new global::Gtk.Frame ();
this.textframe.Name = "textframe";
@@ -551,12 +656,12 @@ namespace LongoMatch.Gui.Dialog
this.backgroundcolorbutton.Events = ((global::Gdk.EventMask)(784));
this.backgroundcolorbutton.Name = "backgroundcolorbutton";
this.table4.Add (this.backgroundcolorbutton);
- global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table4
[this.backgroundcolorbutton]));
- w41.TopAttach = ((uint)(1));
- w41.BottomAttach = ((uint)(2));
- w41.LeftAttach = ((uint)(1));
- w41.RightAttach = ((uint)(2));
- w41.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w49 = ((global::Gtk.Table.TableChild)(this.table4
[this.backgroundcolorbutton]));
+ w49.TopAttach = ((uint)(1));
+ w49.BottomAttach = ((uint)(2));
+ w49.LeftAttach = ((uint)(1));
+ w49.RightAttach = ((uint)(2));
+ w49.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.backgroundcolorslabel2 = new global::Gtk.Label ();
this.backgroundcolorslabel2.Name = "backgroundcolorslabel2";
@@ -564,11 +669,11 @@ namespace LongoMatch.Gui.Dialog
this.backgroundcolorslabel2.LabelProp = global::Mono.Unix.Catalog.GetString
("<b>Background</b>");
this.backgroundcolorslabel2.UseMarkup = true;
this.table4.Add (this.backgroundcolorslabel2);
- global::Gtk.Table.TableChild w42 = ((global::Gtk.Table.TableChild)(this.table4
[this.backgroundcolorslabel2]));
- w42.TopAttach = ((uint)(1));
- w42.BottomAttach = ((uint)(2));
- w42.XOptions = ((global::Gtk.AttachOptions)(4));
- w42.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w50 = ((global::Gtk.Table.TableChild)(this.table4
[this.backgroundcolorslabel2]));
+ w50.TopAttach = ((uint)(1));
+ w50.BottomAttach = ((uint)(2));
+ w50.XOptions = ((global::Gtk.AttachOptions)(4));
+ w50.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.backgroundcolorslabel3 = new global::Gtk.Label ();
this.backgroundcolorslabel3.Name = "backgroundcolorslabel3";
@@ -576,21 +681,21 @@ namespace LongoMatch.Gui.Dialog
this.backgroundcolorslabel3.LabelProp = global::Mono.Unix.Catalog.GetString
("<b>Size</b>");
this.backgroundcolorslabel3.UseMarkup = true;
this.table4.Add (this.backgroundcolorslabel3);
- global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table4
[this.backgroundcolorslabel3]));
- w43.TopAttach = ((uint)(2));
- w43.BottomAttach = ((uint)(3));
- w43.XOptions = ((global::Gtk.AttachOptions)(4));
- w43.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w51 = ((global::Gtk.Table.TableChild)(this.table4
[this.backgroundcolorslabel3]));
+ w51.TopAttach = ((uint)(2));
+ w51.BottomAttach = ((uint)(3));
+ w51.XOptions = ((global::Gtk.AttachOptions)(4));
+ w51.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.textcolorbutton = new global::Gtk.ColorButton ();
this.textcolorbutton.CanFocus = true;
this.textcolorbutton.Events = ((global::Gdk.EventMask)(784));
this.textcolorbutton.Name = "textcolorbutton";
this.table4.Add (this.textcolorbutton);
- global::Gtk.Table.TableChild w44 = ((global::Gtk.Table.TableChild)(this.table4
[this.textcolorbutton]));
- w44.LeftAttach = ((uint)(1));
- w44.RightAttach = ((uint)(2));
- w44.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w52 = ((global::Gtk.Table.TableChild)(this.table4
[this.textcolorbutton]));
+ w52.LeftAttach = ((uint)(1));
+ w52.RightAttach = ((uint)(2));
+ w52.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.textcolorslabel2 = new global::Gtk.Label ();
this.textcolorslabel2.Name = "textcolorslabel2";
@@ -598,9 +703,9 @@ namespace LongoMatch.Gui.Dialog
this.textcolorslabel2.LabelProp = global::Mono.Unix.Catalog.GetString
("<b>Color</b>");
this.textcolorslabel2.UseMarkup = true;
this.table4.Add (this.textcolorslabel2);
- global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table4
[this.textcolorslabel2]));
- w45.XOptions = ((global::Gtk.AttachOptions)(4));
- w45.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w53 = ((global::Gtk.Table.TableChild)(this.table4
[this.textcolorslabel2]));
+ w53.XOptions = ((global::Gtk.AttachOptions)(4));
+ w53.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.textspinbutton = new global::Gtk.SpinButton (6, 100, 1);
this.textspinbutton.CanFocus = true;
@@ -610,12 +715,12 @@ namespace LongoMatch.Gui.Dialog
this.textspinbutton.Numeric = true;
this.textspinbutton.Value = 12;
this.table4.Add (this.textspinbutton);
- global::Gtk.Table.TableChild w46 = ((global::Gtk.Table.TableChild)(this.table4
[this.textspinbutton]));
- w46.TopAttach = ((uint)(2));
- w46.BottomAttach = ((uint)(3));
- w46.LeftAttach = ((uint)(1));
- w46.RightAttach = ((uint)(2));
- w46.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w54 = ((global::Gtk.Table.TableChild)(this.table4
[this.textspinbutton]));
+ w54.TopAttach = ((uint)(2));
+ w54.BottomAttach = ((uint)(3));
+ w54.LeftAttach = ((uint)(1));
+ w54.RightAttach = ((uint)(2));
+ w54.YOptions = ((global::Gtk.AttachOptions)(4));
this.GtkAlignment13.Add (this.table4);
this.textframe.Add (this.GtkAlignment13);
this.GtkLabel5 = new global::Gtk.Label ();
@@ -624,138 +729,144 @@ namespace LongoMatch.Gui.Dialog
this.GtkLabel5.UseMarkup = true;
this.textframe.LabelWidget = this.GtkLabel5;
this.vbox3.Add (this.textframe);
- global::Gtk.Box.BoxChild w49 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.textframe]));
- w49.Position = 3;
- w49.Expand = false;
- w49.Fill = false;
+ global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.textframe]));
+ w57.Position = 4;
+ w57.Expand = false;
+ w57.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.clearbutton = new global::Gtk.Button ();
this.clearbutton.TooltipMarkup = "Clear all drawings";
this.clearbutton.CanFocus = true;
this.clearbutton.Name = "clearbutton";
this.clearbutton.UseUnderline = true;
- // Container child clearbutton.Gtk.Container+ContainerChild
- global::Gtk.Alignment w50 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w51 = new global::Gtk.HBox ();
- w51.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w52 = new global::Gtk.Image ();
- w52.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-clear",
global::Gtk.IconSize.LargeToolbar);
- w51.Add (w52);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w54 = new global::Gtk.Label ();
- w51.Add (w54);
- w50.Add (w51);
- this.clearbutton.Add (w50);
+ global::Gtk.Image w58 = new global::Gtk.Image ();
+ w58.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-clear",
global::Gtk.IconSize.LargeToolbar);
+ this.clearbutton.Image = w58;
this.vbox3.Add (this.clearbutton);
- global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.clearbutton]));
- w58.PackType = ((global::Gtk.PackType)(1));
- w58.Position = 4;
- w58.Expand = false;
- w58.Fill = false;
+ global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.clearbutton]));
+ w59.PackType = ((global::Gtk.PackType)(1));
+ w59.Position = 5;
+ w59.Expand = false;
+ w59.Fill = false;
this.vbox2.Add (this.vbox3);
- global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.vbox3]));
- w59.Position = 0;
+ global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.vbox3]));
+ w60.Position = 0;
// Container child vbox2.Gtk.Box+BoxChild
this.savetoprojectbutton = new global::Gtk.Button ();
this.savetoprojectbutton.CanFocus = true;
this.savetoprojectbutton.Name = "savetoprojectbutton";
this.savetoprojectbutton.UseUnderline = true;
- // Container child savetoprojectbutton.Gtk.Container+ContainerChild
- global::Gtk.Alignment w60 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w61 = new global::Gtk.HBox ();
- w61.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w62 = new global::Gtk.Image ();
- w62.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save",
global::Gtk.IconSize.Menu);
- w61.Add (w62);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w64 = new global::Gtk.Label ();
- w64.LabelProp = global::Mono.Unix.Catalog.GetString ("Save to Project");
- w64.UseUnderline = true;
- w61.Add (w64);
- w60.Add (w61);
- this.savetoprojectbutton.Add (w60);
+ this.savetoprojectbutton.Label = global::Mono.Unix.Catalog.GetString ("Save to
Project");
+ global::Gtk.Image w61 = new global::Gtk.Image ();
+ w61.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save",
global::Gtk.IconSize.Menu);
+ this.savetoprojectbutton.Image = w61;
this.vbox2.Add (this.savetoprojectbutton);
- global::Gtk.Box.BoxChild w68 = ((global::Gtk.Box.BoxChild)(this.vbox2
[this.savetoprojectbutton]));
- w68.PackType = ((global::Gtk.PackType)(1));
- w68.Position = 1;
- w68.Expand = false;
- w68.Fill = false;
+ global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.vbox2
[this.savetoprojectbutton]));
+ w62.PackType = ((global::Gtk.PackType)(1));
+ w62.Position = 1;
+ w62.Expand = false;
+ w62.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.savebutton = new global::Gtk.Button ();
this.savebutton.CanFocus = true;
this.savebutton.Name = "savebutton";
this.savebutton.UseUnderline = true;
- // Container child savebutton.Gtk.Container+ContainerChild
- global::Gtk.Alignment w69 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w70 = new global::Gtk.HBox ();
- w70.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w71 = new global::Gtk.Image ();
- w71.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save",
global::Gtk.IconSize.Menu);
- w70.Add (w71);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w73 = new global::Gtk.Label ();
- w73.LabelProp = global::Mono.Unix.Catalog.GetString ("Save to File");
- w73.UseUnderline = true;
- w70.Add (w73);
- w69.Add (w70);
- this.savebutton.Add (w69);
+ this.savebutton.Label = global::Mono.Unix.Catalog.GetString ("Save to File");
+ global::Gtk.Image w63 = new global::Gtk.Image ();
+ w63.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save",
global::Gtk.IconSize.Menu);
+ this.savebutton.Image = w63;
this.vbox2.Add (this.savebutton);
- global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.vbox2
[this.savebutton]));
- w77.PackType = ((global::Gtk.PackType)(1));
- w77.Position = 2;
- w77.Expand = false;
- w77.Fill = false;
+ global::Gtk.Box.BoxChild w64 = ((global::Gtk.Box.BoxChild)(this.vbox2
[this.savebutton]));
+ w64.PackType = ((global::Gtk.PackType)(1));
+ w64.Position = 2;
+ w64.Expand = false;
+ w64.Fill = false;
this.hbox1.Add (this.vbox2);
- global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
- w78.Position = 0;
- w78.Expand = false;
- w78.Fill = false;
+ global::Gtk.Box.BoxChild w65 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
+ w65.Position = 0;
+ w65.Expand = false;
+ w65.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
+ this.hbox3 = new global::Gtk.HBox ();
+ this.hbox3.Name = "hbox3";
+ this.hbox3.Spacing = 6;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.vbox4 = new global::Gtk.VBox ();
+ this.vbox4.Name = "vbox4";
+ this.vbox4.Spacing = 6;
+ // Container child vbox4.Gtk.Box+BoxChild
this.drawingarea = new global::Gtk.DrawingArea ();
this.drawingarea.Name = "drawingarea";
- this.hbox1.Add (this.drawingarea);
- global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.hbox1
[this.drawingarea]));
- w79.Position = 1;
+ this.vbox4.Add (this.drawingarea);
+ global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.vbox4
[this.drawingarea]));
+ w66.Position = 0;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.wscrollbar = new global::Gtk.HScrollbar (null);
+ this.wscrollbar.Name = "wscrollbar";
+ this.wscrollbar.Adjustment.Upper = 100;
+ this.wscrollbar.Adjustment.PageIncrement = 10;
+ this.wscrollbar.Adjustment.PageSize = 10;
+ this.wscrollbar.Adjustment.StepIncrement = 1;
+ this.vbox4.Add (this.wscrollbar);
+ global::Gtk.Box.BoxChild w67 = ((global::Gtk.Box.BoxChild)(this.vbox4
[this.wscrollbar]));
+ w67.Position = 1;
+ w67.Expand = false;
+ w67.Fill = false;
+ this.hbox3.Add (this.vbox4);
+ global::Gtk.Box.BoxChild w68 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.vbox4]));
+ w68.Position = 0;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.vbox5 = new global::Gtk.VBox ();
+ this.vbox5.Name = "vbox5";
+ this.vbox5.Spacing = 6;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.hscrollbar = new global::Gtk.VScrollbar (null);
+ this.hscrollbar.Name = "hscrollbar";
+ this.hscrollbar.Adjustment.Upper = 100;
+ this.hscrollbar.Adjustment.PageIncrement = 10;
+ this.hscrollbar.Adjustment.PageSize = 10;
+ this.hscrollbar.Adjustment.StepIncrement = 1;
+ this.vbox5.Add (this.hscrollbar);
+ global::Gtk.Box.BoxChild w69 = ((global::Gtk.Box.BoxChild)(this.vbox5
[this.hscrollbar]));
+ w69.Position = 0;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.alignment1.Name = "alignment1";
+ this.vbox5.Add (this.alignment1);
+ global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.vbox5
[this.alignment1]));
+ w70.Position = 1;
+ w70.Expand = false;
+ w70.Fill = false;
+ this.hbox3.Add (this.vbox5);
+ global::Gtk.Box.BoxChild w71 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.vbox5]));
+ w71.Position = 1;
+ w71.Expand = false;
+ w71.Fill = false;
+ this.hbox1.Add (this.hbox3);
+ global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hbox3]));
+ w72.Position = 1;
w1.Add (this.hbox1);
- global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox1]));
- w80.Position = 0;
+ global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox1]));
+ w73.Position = 0;
// Internal child LongoMatch.Gui.Dialog.DrawingTool.ActionArea
- global::Gtk.HButtonBox w81 = this.ActionArea;
- w81.Name = "dialog1_ActionArea";
- w81.Spacing = 6;
- w81.BorderWidth = ((uint)(5));
- w81.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ global::Gtk.HButtonBox w74 = this.ActionArea;
+ w74.Name = "dialog1_ActionArea";
+ w74.Spacing = 6;
+ w74.BorderWidth = ((uint)(5));
+ w74.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.closebutton = new global::Gtk.Button ();
this.closebutton.CanFocus = true;
this.closebutton.Name = "closebutton";
this.closebutton.UseUnderline = true;
- // Container child closebutton.Gtk.Container+ContainerChild
- global::Gtk.Alignment w82 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w83 = new global::Gtk.HBox ();
- w83.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w84 = new global::Gtk.Image ();
- w84.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-close",
global::Gtk.IconSize.Menu);
- w83.Add (w84);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w86 = new global::Gtk.Label ();
- w86.LabelProp = global::Mono.Unix.Catalog.GetString ("Close");
- w86.UseUnderline = true;
- w83.Add (w86);
- w82.Add (w83);
- this.closebutton.Add (w82);
+ this.closebutton.Label = global::Mono.Unix.Catalog.GetString ("Close");
+ global::Gtk.Image w75 = new global::Gtk.Image ();
+ w75.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-close",
global::Gtk.IconSize.Menu);
+ this.closebutton.Image = w75;
this.AddActionWidget (this.closebutton, 0);
- global::Gtk.ButtonBox.ButtonBoxChild w90 =
((global::Gtk.ButtonBox.ButtonBoxChild)(w81 [this.closebutton]));
- w90.Expand = false;
- w90.Fill = false;
+ global::Gtk.ButtonBox.ButtonBoxChild w76 =
((global::Gtk.ButtonBox.ButtonBoxChild)(w74 [this.closebutton]));
+ w76.Expand = false;
+ w76.Fill = false;
if ((this.Child != null)) {
this.Child.ShowAll ();
}
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 3d32d51..0c4cf5f 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -784,6 +784,7 @@ Sort by competition</property>
<widget class="LongoMatch.Gui.Component.LinkProperties"
id="linkproperties">
<property name="MemberName" />
<property name="Events">ButtonPressMask</property>
+ <property name="Edited">False</property>
</widget>
<packing>
<property name="Position">2</property>
@@ -3201,7 +3202,7 @@ You can download it using this direct link:</property>
</widget>
</child>
</widget>
- <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.DrawingTool" design-size="977 964">
+ <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.DrawingTool" design-size="977 1023">
<property name="MemberName" />
<property name="Title" translatable="yes">Drawing Tool</property>
<property name="Icon">stock:longomatch Menu</property>
@@ -3253,9 +3254,6 @@ You can download it using this direct link:</property>
<property name="RowSpacing">6</property>
<property name="ColumnSpacing">6</property>
<child>
- <placeholder />
- </child>
- <child>
<widget class="Gtk.RadioButton" id="anglebutton">
<property name="MemberName" />
<property name="Visible">False</property>
@@ -3277,6 +3275,8 @@ You can download it using this direct link:</property>
<packing>
<property name="TopAttach">6</property>
<property name="BottomAttach">7</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
<property name="AutoSize">True</property>
<property name="YOptions">Fill</property>
<property name="XExpand">True</property>
@@ -3654,6 +3654,36 @@ You can download it using this direct link:</property>
<property name="YShrink">False</property>
</packing>
</child>
+ <child>
+ <widget class="Gtk.RadioButton" id="zoombutton">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Index tool</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">False</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">tools</property>
+ <child>
+ <widget class="Gtk.Image" id="zoombuttonimage">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="Position">1</property>
@@ -3662,6 +3692,82 @@ You can download it using this direct link:</property>
</packing>
</child>
<child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="zoomlabel">
+ <property name="MemberName" />
+ <property name="LabelProp">100%</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.HBox" id="zoomhbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="zoomoutimage">
+ <property name="MemberName" />
+ <property name="WidthRequest">14</property>
+ <property name="HeightRequest">8</property>
+ </widget>
+ <packing>
+ <property name="Position">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="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="DrawValue">False</property>
+ <property name="Digits">0</property>
+ <property name="ValuePos">Top</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Image" id="zoominimage">
+ <property name="MemberName" />
+ <property name="WidthRequest">14</property>
+ <property name="HeightRequest">8</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
<widget class="Gtk.Frame" id="linesframe">
<property name="MemberName" />
<property name="ShadowType">None</property>
@@ -3868,7 +3974,7 @@ You can download it using this direct link:</property>
</child>
</widget>
<packing>
- <property name="Position">2</property>
+ <property name="Position">3</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -4037,7 +4143,7 @@ You can download it using this direct link:</property>
</child>
</widget>
<packing>
- <property name="Position">3</property>
+ <property name="Position">4</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -4055,7 +4161,7 @@ You can download it using this direct link:</property>
</widget>
<packing>
<property name="PackType">End</property>
- <property name="Position">4</property>
+ <property name="Position">5</property>
<property name="AutoSize">False</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -4111,8 +4217,82 @@ You can download it using this direct link:</property>
</packing>
</child>
<child>
- <widget class="Gtk.DrawingArea" id="drawingarea">
+ <widget class="Gtk.HBox" id="hbox3">
<property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.DrawingArea" id="drawingarea">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HScrollbar" id="wscrollbar">
+ <property name="MemberName" />
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="PageSize">10</property>
+ <property name="StepIncrement">1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VScrollbar" id="hscrollbar">
+ <property name="MemberName" />
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="PageSize">10</property>
+ <property name="StepIncrement">1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </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>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="Position">1</property>
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index a239b2d..b1965cb 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -324,4 +324,12 @@
<itemgroups />
<signals />
</object>
+ <object type="LongoMatch.Gui.Component.LinkProperties" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <itemgroups>
+ <itemgroup label="LinkProperties Properties">
+ <property name="Edited" />
+ </itemgroup>
+ </itemgroups>
+ <signals />
+ </object>
</objects>
\ No newline at end of file
diff --git a/images/cursors/zoom b/images/cursors/zoom
new file mode 100644
index 0000000..9c4da20
Binary files /dev/null and b/images/cursors/zoom differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]