[longomatch/drawing: 2/3] Added static drawing tool
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [longomatch/drawing: 2/3] Added static drawing tool
- Date: Fri, 2 Oct 2009 12:40:18 +0000 (UTC)
commit 82164937105841cb380c4d53d6086b9b62b4336d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Oct 1 18:48:55 2009 +0200
Added static drawing tool
CesarPlayer/Gui/PlayerBin.cs | 25 +-
CesarPlayer/Handlers/Handlers.cs | 1 +
CesarPlayer/gtk-gui/LongoMatch.Gui.PlayerBin.cs | 215 ++++++-----
CesarPlayer/gtk-gui/gui.stetic | 25 +-
CesarPlayer/gtk-gui/objects.xml | 9 +-
LongoMatch.mds | 10 +-
LongoMatch/Gui/Component/DrawingToolBox.cs | 58 +++-
LongoMatch/Gui/Component/DrawingWidget.cs | 43 ++-
LongoMatch/Gui/Dialog/DrawingTool.cs | 93 +++++
LongoMatch/Handlers/EventsManager.cs | 12 +-
LongoMatch/Handlers/Handlers.cs | 2 +
LongoMatch/LongoMatch.mdp | 2 +
.../LongoMatch.Gui.Component.DrawingToolBox.cs | 388 +++++++++++---------
.../gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs | 118 ++++++
LongoMatch/gtk-gui/gui.stetic | 274 ++++++++++++--
LongoMatch/gtk-gui/objects.xml | 1 +
16 files changed, 936 insertions(+), 340 deletions(-)
---
diff --git a/CesarPlayer/Gui/PlayerBin.cs b/CesarPlayer/Gui/PlayerBin.cs
index cfd64e9..1328818 100644
--- a/CesarPlayer/Gui/PlayerBin.cs
+++ b/CesarPlayer/Gui/PlayerBin.cs
@@ -40,6 +40,7 @@ namespace LongoMatch.Gui
public event ErrorHandler Error;
public event NextButtonClickedHandler Next;
public event PrevButtonClickedHandler Prev;
+ public event DrawFrameHandler DrawFrame;
private const int THUMBNAIL_WIDTH = 50;
private TickHandler tickHandler;
@@ -106,12 +107,17 @@ namespace LongoMatch.Gui
}
}
- public Pixbuf CurrentFrame{
+ public Pixbuf CurrentMiniatureFrame{
get{
Pixbuf pixbuf = player.GetCurrentFrame(50,50);
- if (pixbuf != null)
- return pixbuf;
- else return null;
+ return pixbuf;
+ }
+ }
+
+ public Pixbuf CurrentFrame{
+ get{
+ Pixbuf pixbuf = player.GetCurrentFrame();
+ return pixbuf;
}
}
@@ -487,6 +493,15 @@ namespace LongoMatch.Gui
else
Pause();
}
-#endregion
+
+ protected virtual void OnDrawButtonClicked (object sender, System.EventArgs e)
+ {
+ if (DrawFrame != null)
+ DrawFrame(CurrentFrame);
+ }
+
+
+#endregion
}
+
}
diff --git a/CesarPlayer/Handlers/Handlers.cs b/CesarPlayer/Handlers/Handlers.cs
index 1f5066e..972c0e9 100644
--- a/CesarPlayer/Handlers/Handlers.cs
+++ b/CesarPlayer/Handlers/Handlers.cs
@@ -32,6 +32,7 @@ namespace LongoMatch.Video.Handlers
public delegate void PrevButtonClickedHandler ();
public delegate void ProgressHandler (float progress);
public delegate void FramesProgressHandler (int actual, int total,Pixbuf frame);
+ public delegate void DrawFrameHandler (Pixbuf frame);
diff --git a/CesarPlayer/gtk-gui/LongoMatch.Gui.PlayerBin.cs b/CesarPlayer/gtk-gui/LongoMatch.Gui.PlayerBin.cs
index b5a818b..7dd32e8 100644
--- a/CesarPlayer/gtk-gui/LongoMatch.Gui.PlayerBin.cs
+++ b/CesarPlayer/gtk-gui/LongoMatch.Gui.PlayerBin.cs
@@ -25,6 +25,8 @@ namespace LongoMatch.Gui {
private Gtk.Button closebutton;
+ private Gtk.Button drawbutton;
+
private Gtk.Button playbutton;
private Gtk.Button pausebutton;
@@ -98,120 +100,144 @@ namespace LongoMatch.Gui {
w10.Expand = false;
w10.Fill = false;
// Container child buttonsbox.Gtk.Box+BoxChild
- this.playbutton = new Gtk.Button();
- this.playbutton.CanFocus = true;
- this.playbutton.Name = "playbutton";
- this.playbutton.UseUnderline = true;
- this.playbutton.Relief = ((Gtk.ReliefStyle)(2));
- // Container child playbutton.Gtk.Container+ContainerChild
+ this.drawbutton = new Gtk.Button();
+ this.drawbutton.CanFocus = true;
+ this.drawbutton.Name = "drawbutton";
+ this.drawbutton.UseUnderline = true;
+ // Container child drawbutton.Gtk.Container+ContainerChild
Gtk.Alignment w11 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
+ // Container child GtkAlignment1.Gtk.Container+ContainerChild
Gtk.HBox w12 = new Gtk.HBox();
w12.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox1.Gtk.Container+ContainerChild
Gtk.Image w13 = new Gtk.Image();
- w13.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-play", Gtk.IconSize.Button, 20);
+ w13.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-select-color", Gtk.IconSize.Menu, 16);
w12.Add(w13);
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox1.Gtk.Container+ContainerChild
Gtk.Label w15 = new Gtk.Label();
w12.Add(w15);
w11.Add(w12);
- this.playbutton.Add(w11);
- this.buttonsbox.Add(this.playbutton);
- Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.playbutton]));
+ this.drawbutton.Add(w11);
+ this.buttonsbox.Add(this.drawbutton);
+ Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.drawbutton]));
w19.Position = 1;
w19.Expand = false;
w19.Fill = false;
// Container child buttonsbox.Gtk.Box+BoxChild
- this.pausebutton = new Gtk.Button();
- this.pausebutton.CanFocus = true;
- this.pausebutton.Name = "pausebutton";
- this.pausebutton.UseUnderline = true;
- this.pausebutton.Relief = ((Gtk.ReliefStyle)(2));
- // Container child pausebutton.Gtk.Container+ContainerChild
+ this.playbutton = new Gtk.Button();
+ this.playbutton.CanFocus = true;
+ this.playbutton.Name = "playbutton";
+ this.playbutton.UseUnderline = true;
+ this.playbutton.Relief = ((Gtk.ReliefStyle)(2));
+ // Container child playbutton.Gtk.Container+ContainerChild
Gtk.Alignment w20 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
+ // Container child GtkAlignment2.Gtk.Container+ContainerChild
Gtk.HBox w21 = new Gtk.HBox();
w21.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox2.Gtk.Container+ContainerChild
Gtk.Image w22 = new Gtk.Image();
- w22.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-pause", Gtk.IconSize.Button, 20);
+ w22.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-play", Gtk.IconSize.Button, 20);
w21.Add(w22);
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox2.Gtk.Container+ContainerChild
Gtk.Label w24 = new Gtk.Label();
w21.Add(w24);
w20.Add(w21);
- this.pausebutton.Add(w20);
- this.buttonsbox.Add(this.pausebutton);
- Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.pausebutton]));
+ this.playbutton.Add(w20);
+ this.buttonsbox.Add(this.playbutton);
+ Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.playbutton]));
w28.Position = 2;
w28.Expand = false;
w28.Fill = false;
// Container child buttonsbox.Gtk.Box+BoxChild
- this.prevbutton = new Gtk.Button();
- this.prevbutton.CanFocus = true;
- this.prevbutton.Name = "prevbutton";
- this.prevbutton.UseUnderline = true;
- this.prevbutton.Relief = ((Gtk.ReliefStyle)(2));
- // Container child prevbutton.Gtk.Container+ContainerChild
+ this.pausebutton = new Gtk.Button();
+ this.pausebutton.CanFocus = true;
+ this.pausebutton.Name = "pausebutton";
+ this.pausebutton.UseUnderline = true;
+ this.pausebutton.Relief = ((Gtk.ReliefStyle)(2));
+ // Container child pausebutton.Gtk.Container+ContainerChild
Gtk.Alignment w29 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
+ // Container child GtkAlignment3.Gtk.Container+ContainerChild
Gtk.HBox w30 = new Gtk.HBox();
w30.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox3.Gtk.Container+ContainerChild
Gtk.Image w31 = new Gtk.Image();
- w31.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-previous", Gtk.IconSize.Button, 20);
+ w31.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-pause", Gtk.IconSize.Button, 20);
w30.Add(w31);
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox3.Gtk.Container+ContainerChild
Gtk.Label w33 = new Gtk.Label();
w30.Add(w33);
w29.Add(w30);
- this.prevbutton.Add(w29);
- this.buttonsbox.Add(this.prevbutton);
- Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.prevbutton]));
+ this.pausebutton.Add(w29);
+ this.buttonsbox.Add(this.pausebutton);
+ Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.pausebutton]));
w37.Position = 3;
w37.Expand = false;
w37.Fill = false;
// Container child buttonsbox.Gtk.Box+BoxChild
- this.nextbutton = new Gtk.Button();
- this.nextbutton.Sensitive = false;
- this.nextbutton.CanFocus = true;
- this.nextbutton.Name = "nextbutton";
- this.nextbutton.UseUnderline = true;
- this.nextbutton.Relief = ((Gtk.ReliefStyle)(2));
- // Container child nextbutton.Gtk.Container+ContainerChild
+ this.prevbutton = new Gtk.Button();
+ this.prevbutton.CanFocus = true;
+ this.prevbutton.Name = "prevbutton";
+ this.prevbutton.UseUnderline = true;
+ this.prevbutton.Relief = ((Gtk.ReliefStyle)(2));
+ // Container child prevbutton.Gtk.Container+ContainerChild
Gtk.Alignment w38 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
+ // Container child GtkAlignment4.Gtk.Container+ContainerChild
Gtk.HBox w39 = new Gtk.HBox();
w39.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox4.Gtk.Container+ContainerChild
Gtk.Image w40 = new Gtk.Image();
- w40.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-next", Gtk.IconSize.Button, 20);
+ w40.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-previous", Gtk.IconSize.Button, 20);
w39.Add(w40);
- // Container child GtkHBox.Gtk.Container+ContainerChild
+ // Container child GtkHBox4.Gtk.Container+ContainerChild
Gtk.Label w42 = new Gtk.Label();
w39.Add(w42);
w38.Add(w39);
- this.nextbutton.Add(w38);
- this.buttonsbox.Add(this.nextbutton);
- Gtk.Box.BoxChild w46 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.nextbutton]));
+ this.prevbutton.Add(w38);
+ this.buttonsbox.Add(this.prevbutton);
+ Gtk.Box.BoxChild w46 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.prevbutton]));
w46.Position = 4;
w46.Expand = false;
w46.Fill = false;
+ // Container child buttonsbox.Gtk.Box+BoxChild
+ this.nextbutton = new Gtk.Button();
+ this.nextbutton.Sensitive = false;
+ this.nextbutton.CanFocus = true;
+ this.nextbutton.Name = "nextbutton";
+ this.nextbutton.UseUnderline = true;
+ this.nextbutton.Relief = ((Gtk.ReliefStyle)(2));
+ // Container child nextbutton.Gtk.Container+ContainerChild
+ Gtk.Alignment w47 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
+ // Container child GtkAlignment5.Gtk.Container+ContainerChild
+ Gtk.HBox w48 = new Gtk.HBox();
+ w48.Spacing = 2;
+ // Container child GtkHBox5.Gtk.Container+ContainerChild
+ Gtk.Image w49 = new Gtk.Image();
+ w49.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-next", Gtk.IconSize.Button, 20);
+ w48.Add(w49);
+ // Container child GtkHBox5.Gtk.Container+ContainerChild
+ Gtk.Label w51 = new Gtk.Label();
+ w48.Add(w51);
+ w47.Add(w48);
+ this.nextbutton.Add(w47);
+ this.buttonsbox.Add(this.nextbutton);
+ Gtk.Box.BoxChild w55 = ((Gtk.Box.BoxChild)(this.buttonsbox[this.nextbutton]));
+ w55.Position = 5;
+ w55.Expand = false;
+ w55.Fill = false;
this.controlsbox.Add(this.buttonsbox);
- Gtk.Box.BoxChild w47 = ((Gtk.Box.BoxChild)(this.controlsbox[this.buttonsbox]));
- w47.Position = 0;
- w47.Expand = false;
- w47.Fill = false;
+ Gtk.Box.BoxChild w56 = ((Gtk.Box.BoxChild)(this.controlsbox[this.buttonsbox]));
+ w56.Position = 0;
+ w56.Expand = false;
+ w56.Fill = false;
// Container child controlsbox.Gtk.Box+BoxChild
this.tlabel = new Gtk.Label();
this.tlabel.Name = "tlabel";
this.tlabel.LabelProp = Mono.Unix.Catalog.GetString("Time:");
this.controlsbox.Add(this.tlabel);
- Gtk.Box.BoxChild w48 = ((Gtk.Box.BoxChild)(this.controlsbox[this.tlabel]));
- w48.Position = 1;
- w48.Expand = false;
- w48.Fill = false;
+ Gtk.Box.BoxChild w57 = ((Gtk.Box.BoxChild)(this.controlsbox[this.tlabel]));
+ w57.Position = 1;
+ w57.Expand = false;
+ w57.Fill = false;
// Container child controlsbox.Gtk.Box+BoxChild
this.timescale = new Gtk.HScale(null);
this.timescale.CanFocus = true;
@@ -224,15 +250,15 @@ namespace LongoMatch.Gui {
this.timescale.Digits = 0;
this.timescale.ValuePos = ((Gtk.PositionType)(2));
this.controlsbox.Add(this.timescale);
- Gtk.Box.BoxChild w49 = ((Gtk.Box.BoxChild)(this.controlsbox[this.timescale]));
- w49.Position = 2;
+ Gtk.Box.BoxChild w58 = ((Gtk.Box.BoxChild)(this.controlsbox[this.timescale]));
+ w58.Position = 2;
// Container child controlsbox.Gtk.Box+BoxChild
this.timelabel = new Gtk.Label();
this.timelabel.Name = "timelabel";
this.controlsbox.Add(this.timelabel);
- Gtk.Box.BoxChild w50 = ((Gtk.Box.BoxChild)(this.controlsbox[this.timelabel]));
- w50.Position = 3;
- w50.Expand = false;
+ Gtk.Box.BoxChild w59 = ((Gtk.Box.BoxChild)(this.controlsbox[this.timelabel]));
+ w59.Position = 3;
+ w59.Expand = false;
// Container child controlsbox.Gtk.Box+BoxChild
this.volumebutton = new Gtk.Button();
this.volumebutton.CanFocus = true;
@@ -240,31 +266,31 @@ namespace LongoMatch.Gui {
this.volumebutton.UseUnderline = true;
this.volumebutton.Relief = ((Gtk.ReliefStyle)(2));
// Container child volumebutton.Gtk.Container+ContainerChild
- Gtk.Alignment w51 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- Gtk.HBox w52 = new Gtk.HBox();
- w52.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Image w53 = new Gtk.Image();
- w53.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_volume", Gtk.IconSize.Button, 20);
- w52.Add(w53);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Label w55 = new Gtk.Label();
- w52.Add(w55);
- w51.Add(w52);
- this.volumebutton.Add(w51);
+ Gtk.Alignment w60 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
+ // Container child GtkAlignment6.Gtk.Container+ContainerChild
+ Gtk.HBox w61 = new Gtk.HBox();
+ w61.Spacing = 2;
+ // Container child GtkHBox6.Gtk.Container+ContainerChild
+ Gtk.Image w62 = new Gtk.Image();
+ w62.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_volume", Gtk.IconSize.Button, 20);
+ w61.Add(w62);
+ // Container child GtkHBox6.Gtk.Container+ContainerChild
+ Gtk.Label w64 = new Gtk.Label();
+ w61.Add(w64);
+ w60.Add(w61);
+ this.volumebutton.Add(w60);
this.controlsbox.Add(this.volumebutton);
- Gtk.Box.BoxChild w59 = ((Gtk.Box.BoxChild)(this.controlsbox[this.volumebutton]));
- w59.Position = 4;
- w59.Expand = false;
- w59.Fill = false;
+ Gtk.Box.BoxChild w68 = ((Gtk.Box.BoxChild)(this.controlsbox[this.volumebutton]));
+ w68.Position = 4;
+ w68.Expand = false;
+ w68.Fill = false;
this.vbox2.Add(this.controlsbox);
- Gtk.Box.BoxChild w60 = ((Gtk.Box.BoxChild)(this.vbox2[this.controlsbox]));
- w60.Position = 1;
- w60.Expand = false;
+ Gtk.Box.BoxChild w69 = ((Gtk.Box.BoxChild)(this.vbox2[this.controlsbox]));
+ w69.Position = 1;
+ w69.Expand = false;
this.mainbox.Add(this.vbox2);
- Gtk.Box.BoxChild w61 = ((Gtk.Box.BoxChild)(this.mainbox[this.vbox2]));
- w61.Position = 0;
+ Gtk.Box.BoxChild w70 = ((Gtk.Box.BoxChild)(this.mainbox[this.vbox2]));
+ w70.Position = 0;
// Container child mainbox.Gtk.Box+BoxChild
this.vbox3 = new Gtk.VBox();
this.vbox3.Name = "vbox3";
@@ -287,13 +313,13 @@ namespace LongoMatch.Gui {
this.vscale1.Digits = 0;
this.vscale1.ValuePos = ((Gtk.PositionType)(3));
this.vbox3.Add(this.vscale1);
- Gtk.Box.BoxChild w62 = ((Gtk.Box.BoxChild)(this.vbox3[this.vscale1]));
- w62.Position = 0;
+ Gtk.Box.BoxChild w71 = ((Gtk.Box.BoxChild)(this.vbox3[this.vscale1]));
+ w71.Position = 0;
this.mainbox.Add(this.vbox3);
- Gtk.Box.BoxChild w63 = ((Gtk.Box.BoxChild)(this.mainbox[this.vbox3]));
- w63.Position = 1;
- w63.Expand = false;
- w63.Fill = false;
+ Gtk.Box.BoxChild w72 = ((Gtk.Box.BoxChild)(this.mainbox[this.vbox3]));
+ w72.Position = 1;
+ w72.Expand = false;
+ w72.Fill = false;
this.Add(this.mainbox);
if ((this.Child != null)) {
this.Child.ShowAll();
@@ -304,6 +330,7 @@ namespace LongoMatch.Gui {
this.controlsbox.Hide();
this.Show();
this.closebutton.Clicked += new System.EventHandler(this.OnClosebuttonClicked);
+ this.drawbutton.Clicked += new System.EventHandler(this.OnDrawButtonClicked);
this.playbutton.Clicked += new System.EventHandler(this.OnPlaybuttonClicked);
this.pausebutton.Clicked += new System.EventHandler(this.OnPausebuttonClicked);
this.prevbutton.Clicked += new System.EventHandler(this.OnPrevbuttonClicked);
diff --git a/CesarPlayer/gtk-gui/gui.stetic b/CesarPlayer/gtk-gui/gui.stetic
index a4c826e..911a7c8 100644
--- a/CesarPlayer/gtk-gui/gui.stetic
+++ b/CesarPlayer/gtk-gui/gui.stetic
@@ -123,6 +123,23 @@
</packing>
</child>
<child>
+ <widget class="Gtk.Button" id="drawbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-select-color Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnDrawButtonClicked" />
+ </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.Button" id="playbutton">
<property name="MemberName" />
<property name="CanFocus">True</property>
@@ -134,7 +151,7 @@
<signal name="Clicked" handler="OnPlaybuttonClicked" />
</widget>
<packing>
- <property name="Position">1</property>
+ <property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -152,7 +169,7 @@
<signal name="Clicked" handler="OnPausebuttonClicked" />
</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>
@@ -171,7 +188,7 @@
<signal name="Clicked" handler="OnPrevbuttonClicked" />
</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>
@@ -191,7 +208,7 @@
<signal name="Clicked" handler="OnNextbuttonClicked" />
</widget>
<packing>
- <property name="Position">4</property>
+ <property name="Position">5</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
diff --git a/CesarPlayer/gtk-gui/objects.xml b/CesarPlayer/gtk-gui/objects.xml
index 2c177b0..90b3bef 100644
--- a/CesarPlayer/gtk-gui/objects.xml
+++ b/CesarPlayer/gtk-gui/objects.xml
@@ -1,4 +1,8 @@
<objects attr-sync="on">
+ <object type="LongoMatch.Gui.CapturerBin" palette-category="CesarPlayer" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
<object type="LongoMatch.Gui.PlayerBin" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups>
<itemgroup label="PlayerBin Properties">
@@ -13,11 +17,8 @@
<signal name="Error" />
<signal name="Next" />
<signal name="Prev" />
+ <signal name="DrawFrame" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.CapturerBin" palette-category="CesarPlayer" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals />
- </object>
</objects>
\ No newline at end of file
diff --git a/LongoMatch.mds b/LongoMatch.mds
index dc320a3..9796776 100644
--- a/LongoMatch.mds
+++ b/LongoMatch.mds
@@ -1,12 +1,12 @@
<Combine fileversion="2.0" description="LongoMatch : The Digital Coach" outputpath="build/bin/" releaseversion="0.9.0" name="LongoMatch">
<Policies>
+ <StandardHeader inheritsSet="GPLv2License" />
+ <TextStylePolicy FileWidth="120" TabWidth="4" TabsToSpaces="False" NoTabsAfterNonTabs="False" RemoveTrailingWhitespace="False" EolMarker="Native" />
+ <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileFormatDefault" />
<ChangeLogPolicy UpdateMode="None" inheritsSet="Mono">
<MessageStyle LineAlign="0" />
</ChangeLogPolicy>
<VersionControlPolicy inheritsSet="Mono" />
- <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileFormatDefault" />
- <TextStylePolicy FileWidth="120" TabWidth="4" TabsToSpaces="False" NoTabsAfterNonTabs="False" RemoveTrailingWhitespace="False" EolMarker="Native" />
- <StandardHeader inheritsSet="GPLv2License" />
</Policies>
<Configurations active="Release">
<Configuration name="Debug" ctype="CombineConfiguration">
@@ -14,14 +14,12 @@
<Entry build="True" name="libcesarplayer" configuration="Debug" />
<Entry build="True" name="Translations" configuration="Debug" />
<Entry build="True" name="CesarPlayer" configuration="Debug" />
- <Entry build="True" name="Test" configuration="Debug" />
</Configuration>
<Configuration name="Release" ctype="CombineConfiguration">
<Entry build="True" name="LongoMatch" configuration="Release" />
<Entry build="True" name="libcesarplayer" configuration="Release" />
<Entry build="True" name="Translations" configuration="Release" />
<Entry build="True" name="CesarPlayer" configuration="Release" />
- <Entry build="True" name="Test" configuration="Release" />
</Configuration>
</Configurations>
<StartMode startupentry="LongoMatch" single="True">
@@ -29,7 +27,6 @@
<Execute type="None" entry="libcesarplayer" />
<Execute type="None" entry="Translations" />
<Execute type="None" entry="CesarPlayer" />
- <Execute type="None" entry="Test" />
</StartMode>
<MonoDevelop.ChangeLogAddIn.ChangeLogInfo policy="UpdateNearestChangeLog" />
<Entries>
@@ -37,6 +34,5 @@
<Entry filename="libcesarplayer/liblongomatch.mdp" />
<Entry filename="Translations/Translations.mdse" />
<Entry filename="CesarPlayer/CesarPlayer.mdp" />
- <Entry filename="Test/Test.mdp" />
</Entries>
</Combine>
\ No newline at end of file
diff --git a/LongoMatch/Gui/Component/DrawingToolBox.cs b/LongoMatch/Gui/Component/DrawingToolBox.cs
index 1da2877..c3e1cea 100644
--- a/LongoMatch/Gui/Component/DrawingToolBox.cs
+++ b/LongoMatch/Gui/Component/DrawingToolBox.cs
@@ -25,11 +25,12 @@ namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem(true)]
public partial class DrawingToolBox : Gtk.Bin
{
public event LineWidthChangedHandler LineWidthChanged;
+ public event DrawToolChangedHandler DrawToolChanged;
public event ColorChangedHandler ColorChanged;
public event VisibilityChangedHandler VisibilityChanged;
public event ClearDrawingHandler ClearDrawing;
@@ -73,18 +74,10 @@ namespace LongoMatch.Gui.Component
button.ModifyBg(StateType.Normal,normalColor);
button.ModifyBg(StateType.Active,activeColor);
button.ModifyBg(StateType.Selected,activeColor);
- button.ModifyBg(StateType.Prelight,normalColor);
-
-
- }
-
- protected virtual void OnClearbuttonClicked (object sender, System.EventArgs e)
- {
- if (ClearDrawing != null)
- ClearDrawing();
+ button.ModifyBg(StateType.Prelight,normalColor);
}
- protected virtual void OnCombobox1Changed (object sender, System.EventArgs e)
+ protected virtual void OnCombobox1Changed(object sender, System.EventArgs e)
{
int lineWidth;
if (LineWidthChanged != null){
@@ -99,6 +92,47 @@ namespace LongoMatch.Gui.Component
if (ColorChanged != null && button.Active)
ColorChanged(button.Style.Background(StateType.Normal));
}
-
+
+ protected virtual void OnCirclebuttonToggled (object sender, System.EventArgs e)
+ {
+ if (DrawToolChanged != null && (sender as RadioButton).Active)
+ DrawToolChanged(DrawTool.CIRCLE);
+ }
+
+ protected virtual void OnRectanglebuttonToggled (object sender, System.EventArgs e)
+ {
+ if (DrawToolChanged != null && (sender as RadioButton).Active)
+ DrawToolChanged(DrawTool.RECTANGLE);
+ }
+
+ protected virtual void OnLinebuttonToggled (object sender, System.EventArgs e)
+ {
+ if (DrawToolChanged != null && (sender as RadioButton).Active)
+ DrawToolChanged(DrawTool.LINE);
+ }
+
+ protected virtual void OnCrossbuttonToggled (object sender, System.EventArgs e)
+ {
+ if (DrawToolChanged != null && (sender as RadioButton).Active)
+ DrawToolChanged(DrawTool.CROSS);
+ }
+
+ protected virtual void OnEraserbuttonToggled (object sender, System.EventArgs e)
+ {
+ if (DrawToolChanged != null && (sender as RadioButton).Active)
+ DrawToolChanged(DrawTool.ERASER);
+ }
+
+ protected virtual void OnPenbuttonToggled (object sender, System.EventArgs e)
+ {
+ if (DrawToolChanged != null && (sender as RadioButton).Active)
+ DrawToolChanged(DrawTool.PEN);
+ }
+
+ protected virtual void OnClearbuttonClicked (object sender, System.EventArgs e)
+ {
+ if (ClearDrawing != null)
+ ClearDrawing();
+ }
}
}
diff --git a/LongoMatch/Gui/Component/DrawingWidget.cs b/LongoMatch/Gui/Component/DrawingWidget.cs
index d9a56a0..b3f4e82 100644
--- a/LongoMatch/Gui/Component/DrawingWidget.cs
+++ b/LongoMatch/Gui/Component/DrawingWidget.cs
@@ -64,7 +64,7 @@ namespace LongoMatch.Gui.Component
this.Build();
lineColor = new Cairo.Color(Double.MaxValue,0,0);
lineWidth = 6;
- selectedTool = DrawTool.PEN;
+ SelectedTool = DrawTool.PEN;
loaded = false;
visible = true;
preview=false;
@@ -82,10 +82,11 @@ namespace LongoMatch.Gui.Component
}
drawingarea.WidthRequest=sourceWidth;
drawingarea.HeightRequest=sourceHeight;
+ value.Dispose();
loaded = true;
}
}
-
+
public int LineWidth{
set{lineWidth = value;}
}
@@ -95,7 +96,21 @@ namespace LongoMatch.Gui.Component
}
public DrawTool DrawTool{
- set{this.selectedTool = value;}
+ set{
+ this.selectedTool = value;
+ switch (selectedTool){
+ case DrawTool.LINE:
+ break;
+ case DrawTool.RECTANGLE:
+ break;
+ case DrawTool.CIRCLE:
+ break;
+ case DrawTool.CROSS:
+ break;
+ default:
+ break;
+ }
+ }
get{return selectedTool;}
}
@@ -103,6 +118,23 @@ namespace LongoMatch.Gui.Component
set{visible = value;}
}
+ public void ClearDrawing(){
+ drawings.Destroy();
+ drawings = new ImageSurface (Format.ARGB32,sourceWidth,sourceHeight);
+ QueueDraw();
+ }
+
+ public void SaveDraw(string filename){
+ Surface pngSurface = new ImageSurface (Format.ARGB32,sourceWidth,sourceHeight);
+ using (Context c = new Context(pngSurface)){
+ c.SetSourceSurface(source,xOffset,yOffset);
+ c.Paint();
+ c.SetSourceSurface(drawings,xOffset,yOffset);
+ c.Paint();
+ }
+ pngSurface.WriteToPng(filename);
+ }
+
private void SetContextProperties(Context c){
c.LineWidth = lineWidth;
c.LineCap = LineCap.Round;
@@ -119,7 +151,7 @@ namespace LongoMatch.Gui.Component
private void DrawRectangle(Context c, double x1, double y1, double x2, double y2){
SetContextProperties(c);
- c.Rectangle(x1-xOffset,y1-yOffset,x2-xOffset,y2-yOffset);
+ c.Rectangle(x1-xOffset,y1-yOffset,x2-x1,y2-y1);
c.Stroke();
c.Fill();
}
@@ -137,7 +169,7 @@ namespace LongoMatch.Gui.Component
radius = Math.Sqrt(Math.Pow((x2-x1),2)+
Math.Pow((y2-y1),2));
radius /=2;
- angle1 = 45.0 * (Math.PI/180);
+ angle1 = 0.0 * (Math.PI/180);
angle2 = 360.0 * (Math.PI/180);
SetContextProperties(c);
@@ -151,6 +183,7 @@ namespace LongoMatch.Gui.Component
{
if (!loaded)
return;
+ drawingarea.GdkWindow.Clear();
using (Context c = CairoHelper.Create(drawingarea.GdkWindow)){
c.SetSourceSurface(source,xOffset,yOffset);
diff --git a/LongoMatch/Gui/Dialog/DrawingTool.cs b/LongoMatch/Gui/Dialog/DrawingTool.cs
new file mode 100644
index 0000000..66d7924
--- /dev/null
+++ b/LongoMatch/Gui/Dialog/DrawingTool.cs
@@ -0,0 +1,93 @@
+//
+// Copyright (C) 2007-2009 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+
+using System;
+using Gdk;
+using Gtk;
+using Mono.Unix;
+using LongoMatch.Gui.Component;
+
+namespace LongoMatch.Gui.Dialog
+{
+
+
+ public partial class DrawingTool : Gtk.Dialog
+ {
+
+ public DrawingTool()
+ {
+ this.Build();
+ drawingtoolbox1.DrawToolChanged += OnDrawingtoolbox1DrawToolChanged;
+ }
+
+ public Pixbuf Image{
+ set{drawingwidget1.SourceImage = value;}
+ }
+
+ protected virtual void OnDrawingtoolbox1LineWidthChanged (int width)
+ {
+ drawingwidget1.LineWidth = width;
+ }
+
+ protected virtual void OnDrawingtoolbox1ColorChanged (Gdk.Color color)
+ {
+ drawingwidget1.LineColor = color;
+ }
+
+ protected virtual void OnDrawingtoolbox1VisibilityChanged (bool visible)
+ {
+ drawingwidget1.DrawingsVisible = visible;
+ }
+
+ protected virtual void OnDrawingtoolbox1ClearDrawing ()
+ {
+ drawingwidget1.ClearDrawing();
+ }
+
+ protected virtual void OnDrawingtoolbox1DrawToolChanged (DrawTool tool)
+ {
+ drawingwidget1.DrawTool = tool;
+ }
+
+ protected virtual void OnSavebuttonClicked (object sender, System.EventArgs e)
+ {
+ string filename;
+ FileChooserDialog fChooser;
+ FileFilter filter = new FileFilter();
+ filter.Name = "PNG Images";
+ filter.AddPattern("*.png");
+
+ fChooser = new FileChooserDialog(Catalog.GetString("Save File as..."),
+ (Gtk.Window)this.Toplevel,
+ FileChooserAction.Save,
+ "gtk-cancel",ResponseType.Cancel,
+ "gtk-save",ResponseType.Accept);
+ fChooser.SetCurrentFolder(MainClass.SnapshotsDir());
+ fChooser.Filter = filter;
+ fChooser.DoOverwriteConfirmation = true;
+
+ if (fChooser.Run() == (int)ResponseType.Accept){
+ filename = fChooser.Filename;
+ if (System.IO.Path.GetExtension(filename) != "png")
+ filename += ".png";
+ drawingwidget1.SaveDraw(filename);
+ }
+ fChooser.Destroy();
+ }
+ }
+}
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index de8d31f..6f48eb7 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -118,6 +118,7 @@ namespace LongoMatch
player.Next += OnNext;
player.Tick += OnTick;
player.SegmentClosedEvent += OnSegmentClosedEvent;
+ player.DrawFrame += OnDrawFrame;
}
private void ProcessNewMarkEvent(int section,Time pos){
@@ -135,7 +136,7 @@ namespace LongoMatch
length = new Time((int)player.StreamLength);
Time fStop = (stop > length) ? length: stop;
- Pixbuf miniature = player.CurrentFrame;
+ Pixbuf miniature = player.CurrentMiniatureFrame;
MediaTimeNode tn = openedProject.AddTimeNode(section,fStart, fStop,miniature);
treewidget.AddPlay(tn,section);
timeline.QueueDraw();
@@ -320,6 +321,15 @@ namespace LongoMatch
plNode.Rate = player.Rate;
}
+ protected virtual void OnDrawFrame (Pixbuf pixbuf){
+ DrawingTool dialog = new DrawingTool();
+ dialog.TransientFor = (Gtk.Window)player.Toplevel;
+ dialog.Image = pixbuf;
+ dialog.Run();
+ dialog.Destroy();
+ pixbuf.Dispose();
+ }
+
protected virtual void OnPlayersTagged (MediaTimeNode tNode, Team team){
PlayersSelectionDialog dialog = new PlayersSelectionDialog();
if (team == Team.LOCAL){
diff --git a/LongoMatch/Handlers/Handlers.cs b/LongoMatch/Handlers/Handlers.cs
index fbce12c..2785c27 100644
--- a/LongoMatch/Handlers/Handlers.cs
+++ b/LongoMatch/Handlers/Handlers.cs
@@ -51,6 +51,8 @@ namespace LongoMatch.Handlers
public delegate void ApplyCurrentRateHandler (PlayListTimeNode plNode);
//Drawing events
+ //Draw tool changed
+ public delegate void DrawToolChangedHandler (LongoMatch.Gui.Component.DrawTool drawTool);
//Paint color changed
public delegate void ColorChangedHandler (Gdk.Color color);
//Paint line width changed
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index 15c631a..f84406d 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -157,6 +157,8 @@
<File name="Gui/Dialog/TeamTemplateEditor.cs" subtype="Code" buildaction="Compile" />
<File name="gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs" subtype="Code" buildaction="Compile" />
<File name="Gui/Component/DrawingWidget.cs" subtype="Code" buildaction="Compile" />
+ <File name="Gui/Dialog/DrawingTool.cs" subtype="Code" buildaction="Compile" />
+ <File name="gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
index 4e4aed1..cadbd3b 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
@@ -15,19 +15,35 @@ namespace LongoMatch.Gui.Component {
private Gtk.VBox vbox2;
- private Gtk.Table table1;
+ private Gtk.Table toolstable;
- private Gtk.Button button49;
+ private Gtk.RadioButton circlebutton;
- private Gtk.Button button50;
+ private Gtk.Image image79;
- private Gtk.Button button51;
+ private Gtk.RadioButton crossbutton;
- private Gtk.Button button52;
+ private Gtk.Image image83;
+
+ private Gtk.RadioButton eraserbutton;
+
+ private Gtk.Image image81;
+
+ private Gtk.RadioButton linebutton;
+
+ private Gtk.Image image82;
+
+ private Gtk.RadioButton penbutton;
+
+ private Gtk.Image image80;
+
+ private Gtk.RadioButton rectanglebutton;
+
+ private Gtk.Image image84;
private Gtk.ComboBox combobox1;
- private Gtk.Table table2;
+ private Gtk.Table colorstable;
private Gtk.RadioButton bbutton;
@@ -55,104 +71,124 @@ namespace LongoMatch.Gui.Component {
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
- this.table1 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
- this.table1.Name = "table1";
- this.table1.RowSpacing = ((uint)(6));
- this.table1.ColumnSpacing = ((uint)(6));
- // Container child table1.Gtk.Table+TableChild
- this.button49 = new Gtk.Button();
- this.button49.CanFocus = true;
- this.button49.Name = "button49";
- this.button49.UseUnderline = true;
- // Container child button49.Gtk.Container+ContainerChild
- Gtk.Alignment w1 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- Gtk.HBox w2 = new Gtk.HBox();
- w2.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Image w3 = new Gtk.Image();
- w3.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line-45", Gtk.IconSize.Menu, 16);
- w2.Add(w3);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Label w5 = new Gtk.Label();
- w2.Add(w5);
- w1.Add(w2);
- this.button49.Add(w1);
- this.table1.Add(this.button49);
- Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table1[this.button49]));
- w9.TopAttach = ((uint)(1));
- w9.BottomAttach = ((uint)(2));
- w9.LeftAttach = ((uint)(1));
- w9.RightAttach = ((uint)(2));
- // Container child table1.Gtk.Table+TableChild
- this.button50 = new Gtk.Button();
- this.button50.CanFocus = true;
- this.button50.Name = "button50";
- this.button50.UseUnderline = true;
- // Container child button50.Gtk.Container+ContainerChild
- Gtk.Alignment w10 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- Gtk.HBox w11 = new Gtk.HBox();
- w11.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Image w12 = new Gtk.Image();
- w12.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line-ends-with-arrow", Gtk.IconSize.Menu, 16);
- w11.Add(w12);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Label w14 = new Gtk.Label();
- w11.Add(w14);
- w10.Add(w11);
- this.button50.Add(w10);
- this.table1.Add(this.button50);
- // Container child table1.Gtk.Table+TableChild
- this.button51 = new Gtk.Button();
- this.button51.CanFocus = true;
- this.button51.Name = "button51";
- this.button51.UseUnderline = true;
- // Container child button51.Gtk.Container+ContainerChild
- Gtk.Alignment w19 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- Gtk.HBox w20 = new Gtk.HBox();
- w20.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Image w21 = new Gtk.Image();
- w21.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-rectangle-unfilled", Gtk.IconSize.Menu, 16);
- w20.Add(w21);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Label w23 = new Gtk.Label();
- w20.Add(w23);
- w19.Add(w20);
- this.button51.Add(w19);
- this.table1.Add(this.button51);
- Gtk.Table.TableChild w27 = ((Gtk.Table.TableChild)(this.table1[this.button51]));
- w27.LeftAttach = ((uint)(1));
- w27.RightAttach = ((uint)(2));
- // Container child table1.Gtk.Table+TableChild
- this.button52 = new Gtk.Button();
- this.button52.CanFocus = true;
- this.button52.Name = "button52";
- this.button52.UseUnderline = true;
- // Container child button52.Gtk.Container+ContainerChild
- Gtk.Alignment w28 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- Gtk.HBox w29 = new Gtk.HBox();
- w29.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Image w30 = new Gtk.Image();
- w30.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-ellipse-unfilled", Gtk.IconSize.Menu, 16);
- w29.Add(w30);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Label w32 = new Gtk.Label();
- w29.Add(w32);
- w28.Add(w29);
- this.button52.Add(w28);
- this.table1.Add(this.button52);
- Gtk.Table.TableChild w36 = ((Gtk.Table.TableChild)(this.table1[this.button52]));
- w36.TopAttach = ((uint)(1));
- w36.BottomAttach = ((uint)(2));
- this.vbox2.Add(this.table1);
- Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(this.vbox2[this.table1]));
- w37.Position = 0;
+ this.toolstable = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
+ this.toolstable.Name = "toolstable";
+ this.toolstable.RowSpacing = ((uint)(6));
+ this.toolstable.ColumnSpacing = ((uint)(6));
+ // Container child toolstable.Gtk.Table+TableChild
+ this.circlebutton = new Gtk.RadioButton("");
+ this.circlebutton.CanFocus = true;
+ this.circlebutton.Name = "circlebutton";
+ this.circlebutton.DrawIndicator = false;
+ this.circlebutton.UseUnderline = true;
+ this.circlebutton.Group = new GLib.SList(System.IntPtr.Zero);
+ this.circlebutton.Remove(this.circlebutton.Child);
+ // Container child circlebutton.Gtk.Container+ContainerChild
+ this.image79 = new Gtk.Image();
+ this.image79.Name = "image79";
+ this.image79.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-circle-unfilled", Gtk.IconSize.Menu, 16);
+ this.circlebutton.Add(this.image79);
+ this.toolstable.Add(this.circlebutton);
+ Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.toolstable[this.circlebutton]));
+ w2.TopAttach = ((uint)(2));
+ w2.BottomAttach = ((uint)(3));
+ w2.LeftAttach = ((uint)(1));
+ w2.RightAttach = ((uint)(2));
+ w2.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child toolstable.Gtk.Table+TableChild
+ this.crossbutton = new Gtk.RadioButton("");
+ this.crossbutton.CanFocus = true;
+ this.crossbutton.Name = "crossbutton";
+ this.crossbutton.DrawIndicator = false;
+ this.crossbutton.UseUnderline = true;
+ this.crossbutton.Group = this.circlebutton.Group;
+ this.crossbutton.Remove(this.crossbutton.Child);
+ // Container child crossbutton.Gtk.Container+ContainerChild
+ this.image83 = new Gtk.Image();
+ this.image83.Name = "image83";
+ this.image83.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line-45", Gtk.IconSize.Menu, 16);
+ this.crossbutton.Add(this.image83);
+ this.toolstable.Add(this.crossbutton);
+ Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.toolstable[this.crossbutton]));
+ w4.TopAttach = ((uint)(1));
+ w4.BottomAttach = ((uint)(2));
+ w4.LeftAttach = ((uint)(1));
+ w4.RightAttach = ((uint)(2));
+ w4.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child toolstable.Gtk.Table+TableChild
+ this.eraserbutton = new Gtk.RadioButton("");
+ this.eraserbutton.CanFocus = true;
+ this.eraserbutton.Name = "eraserbutton";
+ this.eraserbutton.DrawIndicator = false;
+ this.eraserbutton.UseUnderline = true;
+ this.eraserbutton.Group = this.circlebutton.Group;
+ this.eraserbutton.Remove(this.eraserbutton.Child);
+ // Container child eraserbutton.Gtk.Container+ContainerChild
+ this.image81 = new Gtk.Image();
+ this.image81.Name = "image81";
+ this.image81.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16);
+ this.eraserbutton.Add(this.image81);
+ this.toolstable.Add(this.eraserbutton);
+ Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.toolstable[this.eraserbutton]));
+ w6.LeftAttach = ((uint)(1));
+ w6.RightAttach = ((uint)(2));
+ w6.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child toolstable.Gtk.Table+TableChild
+ this.linebutton = new Gtk.RadioButton("");
+ this.linebutton.CanFocus = true;
+ this.linebutton.Name = "linebutton";
+ this.linebutton.DrawIndicator = false;
+ this.linebutton.UseUnderline = true;
+ this.linebutton.Group = this.circlebutton.Group;
+ this.linebutton.Remove(this.linebutton.Child);
+ // Container child linebutton.Gtk.Container+ContainerChild
+ this.image82 = new Gtk.Image();
+ this.image82.Name = "image82";
+ this.image82.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line-ends-with-arrow", Gtk.IconSize.Menu, 16);
+ this.linebutton.Add(this.image82);
+ this.toolstable.Add(this.linebutton);
+ Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.toolstable[this.linebutton]));
+ w8.TopAttach = ((uint)(1));
+ w8.BottomAttach = ((uint)(2));
+ w8.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child toolstable.Gtk.Table+TableChild
+ this.penbutton = new Gtk.RadioButton("");
+ this.penbutton.CanFocus = true;
+ this.penbutton.Name = "penbutton";
+ this.penbutton.DrawIndicator = false;
+ this.penbutton.UseUnderline = true;
+ this.penbutton.Group = this.circlebutton.Group;
+ this.penbutton.Remove(this.penbutton.Child);
+ // Container child penbutton.Gtk.Container+ContainerChild
+ this.image80 = new Gtk.Image();
+ this.image80.Name = "image80";
+ this.image80.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-freeform-line", Gtk.IconSize.Menu, 16);
+ this.penbutton.Add(this.image80);
+ this.toolstable.Add(this.penbutton);
+ Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.toolstable[this.penbutton]));
+ w10.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child toolstable.Gtk.Table+TableChild
+ this.rectanglebutton = new Gtk.RadioButton("");
+ this.rectanglebutton.CanFocus = true;
+ this.rectanglebutton.Name = "rectanglebutton";
+ this.rectanglebutton.DrawIndicator = false;
+ this.rectanglebutton.UseUnderline = true;
+ this.rectanglebutton.Group = this.circlebutton.Group;
+ this.rectanglebutton.Remove(this.rectanglebutton.Child);
+ // Container child rectanglebutton.Gtk.Container+ContainerChild
+ this.image84 = new Gtk.Image();
+ this.image84.Name = "image84";
+ this.image84.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-rectangle-unfilled", Gtk.IconSize.Menu, 16);
+ this.rectanglebutton.Add(this.image84);
+ this.toolstable.Add(this.rectanglebutton);
+ Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.toolstable[this.rectanglebutton]));
+ w12.TopAttach = ((uint)(2));
+ w12.BottomAttach = ((uint)(3));
+ w12.YOptions = ((Gtk.AttachOptions)(4));
+ this.vbox2.Add(this.toolstable);
+ Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox2[this.toolstable]));
+ w13.Position = 0;
+ w13.Expand = false;
// Container child vbox2.Gtk.Box+BoxChild
this.combobox1 = Gtk.ComboBox.NewText();
this.combobox1.AppendText(Mono.Unix.Catalog.GetString("2 px"));
@@ -163,133 +199,139 @@ namespace LongoMatch.Gui.Component {
this.combobox1.Name = "combobox1";
this.combobox1.Active = 2;
this.vbox2.Add(this.combobox1);
- Gtk.Box.BoxChild w38 = ((Gtk.Box.BoxChild)(this.vbox2[this.combobox1]));
- w38.Position = 1;
- w38.Expand = false;
- w38.Fill = false;
+ Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox2[this.combobox1]));
+ w14.Position = 1;
+ w14.Expand = false;
+ w14.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
- this.table2 = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
- this.table2.Name = "table2";
- this.table2.RowSpacing = ((uint)(6));
- this.table2.ColumnSpacing = ((uint)(6));
- // Container child table2.Gtk.Table+TableChild
+ this.colorstable = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
+ this.colorstable.Name = "colorstable";
+ this.colorstable.RowSpacing = ((uint)(6));
+ this.colorstable.ColumnSpacing = ((uint)(6));
+ // Container child colorstable.Gtk.Table+TableChild
this.bbutton = new Gtk.RadioButton("");
this.bbutton.Name = "bbutton";
this.bbutton.DrawIndicator = false;
this.bbutton.UseUnderline = true;
this.bbutton.FocusOnClick = false;
this.bbutton.Group = new GLib.SList(System.IntPtr.Zero);
- this.table2.Add(this.bbutton);
- Gtk.Table.TableChild w39 = ((Gtk.Table.TableChild)(this.table2[this.bbutton]));
- w39.LeftAttach = ((uint)(1));
- w39.RightAttach = ((uint)(2));
- w39.YOptions = ((Gtk.AttachOptions)(4));
- // Container child table2.Gtk.Table+TableChild
+ this.colorstable.Add(this.bbutton);
+ Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(this.colorstable[this.bbutton]));
+ w15.LeftAttach = ((uint)(1));
+ w15.RightAttach = ((uint)(2));
+ w15.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child colorstable.Gtk.Table+TableChild
this.blbutton = new Gtk.RadioButton("");
this.blbutton.Name = "blbutton";
this.blbutton.DrawIndicator = false;
this.blbutton.UseUnderline = true;
this.blbutton.FocusOnClick = false;
this.blbutton.Group = this.bbutton.Group;
- this.table2.Add(this.blbutton);
- Gtk.Table.TableChild w40 = ((Gtk.Table.TableChild)(this.table2[this.blbutton]));
- w40.TopAttach = ((uint)(1));
- w40.BottomAttach = ((uint)(2));
- w40.LeftAttach = ((uint)(1));
- w40.RightAttach = ((uint)(2));
- w40.YOptions = ((Gtk.AttachOptions)(4));
- // Container child table2.Gtk.Table+TableChild
+ this.colorstable.Add(this.blbutton);
+ Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.colorstable[this.blbutton]));
+ w16.TopAttach = ((uint)(1));
+ w16.BottomAttach = ((uint)(2));
+ w16.LeftAttach = ((uint)(1));
+ w16.RightAttach = ((uint)(2));
+ w16.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child colorstable.Gtk.Table+TableChild
this.gbutton = new Gtk.RadioButton("");
this.gbutton.Name = "gbutton";
this.gbutton.DrawIndicator = false;
this.gbutton.UseUnderline = true;
this.gbutton.FocusOnClick = false;
this.gbutton.Group = this.bbutton.Group;
- this.table2.Add(this.gbutton);
- Gtk.Table.TableChild w41 = ((Gtk.Table.TableChild)(this.table2[this.gbutton]));
- w41.TopAttach = ((uint)(2));
- w41.BottomAttach = ((uint)(3));
- w41.YOptions = ((Gtk.AttachOptions)(4));
- // Container child table2.Gtk.Table+TableChild
+ this.colorstable.Add(this.gbutton);
+ Gtk.Table.TableChild w17 = ((Gtk.Table.TableChild)(this.colorstable[this.gbutton]));
+ w17.TopAttach = ((uint)(2));
+ w17.BottomAttach = ((uint)(3));
+ w17.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child colorstable.Gtk.Table+TableChild
this.rbutton = new Gtk.RadioButton("");
this.rbutton.Name = "rbutton";
this.rbutton.DrawIndicator = false;
this.rbutton.UseUnderline = true;
this.rbutton.FocusOnClick = false;
this.rbutton.Group = this.bbutton.Group;
- this.table2.Add(this.rbutton);
- Gtk.Table.TableChild w42 = ((Gtk.Table.TableChild)(this.table2[this.rbutton]));
- w42.TopAttach = ((uint)(1));
- w42.BottomAttach = ((uint)(2));
- w42.YOptions = ((Gtk.AttachOptions)(4));
- // Container child table2.Gtk.Table+TableChild
+ this.colorstable.Add(this.rbutton);
+ Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.colorstable[this.rbutton]));
+ w18.TopAttach = ((uint)(1));
+ w18.BottomAttach = ((uint)(2));
+ w18.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child colorstable.Gtk.Table+TableChild
this.wbutton = new Gtk.RadioButton("");
this.wbutton.Name = "wbutton";
this.wbutton.DrawIndicator = false;
this.wbutton.UseUnderline = true;
this.wbutton.FocusOnClick = false;
this.wbutton.Group = this.bbutton.Group;
- this.table2.Add(this.wbutton);
- Gtk.Table.TableChild w43 = ((Gtk.Table.TableChild)(this.table2[this.wbutton]));
- w43.YOptions = ((Gtk.AttachOptions)(4));
- // Container child table2.Gtk.Table+TableChild
+ this.colorstable.Add(this.wbutton);
+ Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(this.colorstable[this.wbutton]));
+ w19.YOptions = ((Gtk.AttachOptions)(4));
+ // Container child colorstable.Gtk.Table+TableChild
this.ybutton = new Gtk.RadioButton("");
this.ybutton.Name = "ybutton";
this.ybutton.DrawIndicator = false;
this.ybutton.UseUnderline = true;
this.ybutton.FocusOnClick = false;
this.ybutton.Group = this.bbutton.Group;
- this.table2.Add(this.ybutton);
- Gtk.Table.TableChild w44 = ((Gtk.Table.TableChild)(this.table2[this.ybutton]));
- w44.TopAttach = ((uint)(2));
- w44.BottomAttach = ((uint)(3));
- w44.LeftAttach = ((uint)(1));
- w44.RightAttach = ((uint)(2));
- w44.YOptions = ((Gtk.AttachOptions)(4));
- this.vbox2.Add(this.table2);
- Gtk.Box.BoxChild w45 = ((Gtk.Box.BoxChild)(this.vbox2[this.table2]));
- w45.Position = 2;
- w45.Expand = false;
- w45.Fill = false;
+ this.colorstable.Add(this.ybutton);
+ Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(this.colorstable[this.ybutton]));
+ w20.TopAttach = ((uint)(2));
+ w20.BottomAttach = ((uint)(3));
+ w20.LeftAttach = ((uint)(1));
+ w20.RightAttach = ((uint)(2));
+ w20.YOptions = ((Gtk.AttachOptions)(4));
+ this.vbox2.Add(this.colorstable);
+ Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.vbox2[this.colorstable]));
+ w21.Position = 2;
+ w21.Expand = false;
+ w21.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.clearbutton = new Gtk.Button();
this.clearbutton.CanFocus = true;
this.clearbutton.Name = "clearbutton";
this.clearbutton.UseUnderline = true;
// Container child clearbutton.Gtk.Container+ContainerChild
- Gtk.Alignment w46 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
+ Gtk.Alignment w22 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
- Gtk.HBox w47 = new Gtk.HBox();
- w47.Spacing = 2;
+ Gtk.HBox w23 = new Gtk.HBox();
+ w23.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Image w48 = new Gtk.Image();
- w48.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.LargeToolbar, 24);
- w47.Add(w48);
+ Gtk.Image w24 = new Gtk.Image();
+ w24.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.LargeToolbar, 24);
+ w23.Add(w24);
// Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Label w50 = new Gtk.Label();
- w47.Add(w50);
- w46.Add(w47);
- this.clearbutton.Add(w46);
+ Gtk.Label w26 = new Gtk.Label();
+ w23.Add(w26);
+ w22.Add(w23);
+ this.clearbutton.Add(w22);
this.vbox2.Add(this.clearbutton);
- Gtk.Box.BoxChild w54 = ((Gtk.Box.BoxChild)(this.vbox2[this.clearbutton]));
- w54.Position = 3;
- w54.Expand = false;
- w54.Fill = false;
+ Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.vbox2[this.clearbutton]));
+ w30.Position = 3;
+ w30.Expand = false;
+ w30.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.label1 = new Gtk.Label();
this.label1.Name = "label1";
this.label1.LabelProp = Mono.Unix.Catalog.GetString("Draw-><b> D</b>\nClear-><b> C</b>\nHide-><b> S</b>\nShow-><b> S</b>\n");
this.label1.UseMarkup = true;
this.vbox2.Add(this.label1);
- Gtk.Box.BoxChild w55 = ((Gtk.Box.BoxChild)(this.vbox2[this.label1]));
- w55.Position = 4;
- w55.Expand = false;
- w55.Fill = false;
+ Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.vbox2[this.label1]));
+ w31.Position = 4;
+ w31.Expand = false;
+ w31.Fill = false;
this.Add(this.vbox2);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.Hide();
+ this.rectanglebutton.Toggled += new System.EventHandler(this.OnRectanglebuttonToggled);
+ this.penbutton.Toggled += new System.EventHandler(this.OnPenbuttonToggled);
+ this.linebutton.Toggled += new System.EventHandler(this.OnLinebuttonToggled);
+ this.eraserbutton.Toggled += new System.EventHandler(this.OnEraserbuttonToggled);
+ this.crossbutton.Toggled += new System.EventHandler(this.OnCrossbuttonToggled);
+ this.circlebutton.Toggled += new System.EventHandler(this.OnCirclebuttonToggled);
this.combobox1.Changed += new System.EventHandler(this.OnCombobox1Changed);
this.ybutton.Toggled += new System.EventHandler(this.OnButtonToggled);
this.wbutton.Toggled += new System.EventHandler(this.OnButtonToggled);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
new file mode 100644
index 0000000..7b7e2c8
--- /dev/null
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
@@ -0,0 +1,118 @@
+// ------------------------------------------------------------------------------
+// <autogenerated>
+// This code was generated by a tool.
+//
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </autogenerated>
+// ------------------------------------------------------------------------------
+
+namespace LongoMatch.Gui.Dialog {
+
+
+ public partial class DrawingTool {
+
+ private Gtk.HBox hbox1;
+
+ private Gtk.VBox vbox2;
+
+ private LongoMatch.Gui.Component.DrawingToolBox drawingtoolbox1;
+
+ private Gtk.Button savebutton;
+
+ private LongoMatch.Gui.Component.DrawingWidget drawingwidget1;
+
+ private Gtk.Button button271;
+
+ protected virtual void Build() {
+ Stetic.Gui.Initialize(this);
+ // Widget LongoMatch.Gui.Dialog.DrawingTool
+ this.Name = "LongoMatch.Gui.Dialog.DrawingTool";
+ this.Title = Mono.Unix.Catalog.GetString("Drawing Tool");
+ this.Icon = Gdk.Pixbuf.LoadFromResource("longomatch.png");
+ this.WindowPosition = ((Gtk.WindowPosition)(4));
+ this.Modal = true;
+ this.Gravity = ((Gdk.Gravity)(5));
+ this.SkipPagerHint = true;
+ this.SkipTaskbarHint = true;
+ this.HasSeparator = false;
+ // Internal child LongoMatch.Gui.Dialog.DrawingTool.VBox
+ Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog1_VBox.Gtk.Box+BoxChild
+ this.hbox1 = new Gtk.HBox();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.vbox2 = new Gtk.VBox();
+ this.vbox2.Name = "vbox2";
+ this.vbox2.Spacing = 6;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.drawingtoolbox1 = new LongoMatch.Gui.Component.DrawingToolBox();
+ this.drawingtoolbox1.Events = ((Gdk.EventMask)(256));
+ this.drawingtoolbox1.Name = "drawingtoolbox1";
+ this.vbox2.Add(this.drawingtoolbox1);
+ Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.drawingtoolbox1]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.savebutton = new Gtk.Button();
+ this.savebutton.CanFocus = true;
+ this.savebutton.Name = "savebutton";
+ this.savebutton.UseStock = true;
+ this.savebutton.UseUnderline = true;
+ this.savebutton.Label = "gtk-save";
+ this.vbox2.Add(this.savebutton);
+ Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.savebutton]));
+ w3.Position = 1;
+ w3.Expand = false;
+ w3.Fill = false;
+ this.hbox1.Add(this.vbox2);
+ Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox2]));
+ w4.Position = 0;
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.drawingwidget1 = new LongoMatch.Gui.Component.DrawingWidget();
+ this.drawingwidget1.Events = ((Gdk.EventMask)(256));
+ this.drawingwidget1.Name = "drawingwidget1";
+ this.hbox1.Add(this.drawingwidget1);
+ Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox1[this.drawingwidget1]));
+ w5.Position = 1;
+ w1.Add(this.hbox1);
+ Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w1[this.hbox1]));
+ w6.Position = 0;
+ // Internal child LongoMatch.Gui.Dialog.DrawingTool.ActionArea
+ Gtk.HButtonBox w7 = this.ActionArea;
+ w7.Name = "dialog1_ActionArea";
+ w7.Spacing = 6;
+ w7.BorderWidth = ((uint)(5));
+ w7.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.button271 = new Gtk.Button();
+ this.button271.CanFocus = true;
+ this.button271.Name = "button271";
+ this.button271.UseUnderline = true;
+ this.button271.Label = Mono.Unix.Catalog.GetString("button271");
+ this.AddActionWidget(this.button271, 0);
+ Gtk.ButtonBox.ButtonBoxChild w8 = ((Gtk.ButtonBox.ButtonBoxChild)(w7[this.button271]));
+ w8.Expand = false;
+ w8.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll();
+ }
+ this.DefaultWidth = 600;
+ this.DefaultHeight = 434;
+ this.button271.Hide();
+ this.Show();
+ this.drawingtoolbox1.LineWidthChanged += new LongoMatch.Handlers.LineWidthChangedHandler(this.OnDrawingtoolbox1LineWidthChanged);
+ this.drawingtoolbox1.ColorChanged += new LongoMatch.Handlers.ColorChangedHandler(this.OnDrawingtoolbox1ColorChanged);
+ this.drawingtoolbox1.VisibilityChanged += new LongoMatch.Handlers.VisibilityChangedHandler(this.OnDrawingtoolbox1VisibilityChanged);
+ this.drawingtoolbox1.ClearDrawing += new LongoMatch.Handlers.ClearDrawingHandler(this.OnDrawingtoolbox1ClearDrawing);
+ this.savebutton.Clicked += new System.EventHandler(this.OnSavebuttonClicked);
+ }
+ }
+}
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index c5f99d1..4d536d5 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -4053,7 +4053,7 @@ You can download it using this direct link:</property>
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.DrawingToolBox" design-size="67 333">
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.DrawingToolBox" design-size="67 335">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
@@ -4061,92 +4061,190 @@ You can download it using this direct link:</property>
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
- <widget class="Gtk.Table" id="table1">
+ <widget class="Gtk.Table" id="toolstable">
<property name="MemberName" />
- <property name="NRows">2</property>
+ <property name="NRows">3</property>
<property name="NColumns">2</property>
<property name="RowSpacing">6</property>
<property name="ColumnSpacing">6</property>
<child>
- <widget class="Gtk.Button" id="button49">
+ <widget class="Gtk.RadioButton" id="circlebutton">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:stock_draw-line-45 Menu</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>
+ <signal name="Toggled" handler="OnCirclebuttonToggled" />
+ <child>
+ <widget class="Gtk.Image" id="image79">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:stock_draw-circle-unfilled Menu</property>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="TopAttach">1</property>
- <property name="BottomAttach">2</property>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
- <property name="AutoSize">False</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">True</property>
+ <property name="YExpand">False</property>
<property name="YFill">True</property>
<property name="YShrink">False</property>
</packing>
</child>
<child>
- <widget class="Gtk.Button" id="button50">
+ <widget class="Gtk.RadioButton" id="crossbutton">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:stock_draw-line-ends-with-arrow Menu</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>
+ <signal name="Toggled" handler="OnCrossbuttonToggled" />
+ <child>
+ <widget class="Gtk.Image" id="image83">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:stock_draw-line-45 Menu</property>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="AutoSize">False</property>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</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>
<property name="XFill">True</property>
<property name="XShrink">False</property>
- <property name="YExpand">True</property>
+ <property name="YExpand">False</property>
<property name="YFill">True</property>
<property name="YShrink">False</property>
</packing>
</child>
<child>
- <widget class="Gtk.Button" id="button51">
+ <widget class="Gtk.RadioButton" id="eraserbutton">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:stock_draw-rectangle-unfilled Menu</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>
+ <signal name="Toggled" handler="OnEraserbuttonToggled" />
+ <child>
+ <widget class="Gtk.Image" id="image81">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-delete Menu</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
- <property name="AutoSize">False</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">True</property>
+ <property name="YExpand">False</property>
<property name="YFill">True</property>
<property name="YShrink">False</property>
</packing>
</child>
<child>
- <widget class="Gtk.Button" id="button52">
+ <widget class="Gtk.RadioButton" id="linebutton">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:stock_draw-ellipse-unfilled Menu</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>
+ <signal name="Toggled" handler="OnLinebuttonToggled" />
+ <child>
+ <widget class="Gtk.Image" id="image82">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:stock_draw-line-ends-with-arrow Menu</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="TopAttach">1</property>
<property name="BottomAttach">2</property>
- <property name="AutoSize">False</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">True</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="penbutton">
+ <property name="MemberName" />
+ <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>
+ <signal name="Toggled" handler="OnPenbuttonToggled" />
+ <child>
+ <widget class="Gtk.Image" id="image80">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:stock_draw-freeform-line Menu</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <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>
+ <child>
+ <widget class="Gtk.RadioButton" id="rectanglebutton">
+ <property name="MemberName" />
+ <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>
+ <signal name="Toggled" handler="OnRectanglebuttonToggled" />
+ <child>
+ <widget class="Gtk.Image" id="image84">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:stock_draw-rectangle-unfilled Menu</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</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>
@@ -4155,6 +4253,7 @@ You can download it using this direct link:</property>
<packing>
<property name="Position">0</property>
<property name="AutoSize">False</property>
+ <property name="Expand">False</property>
</packing>
</child>
<child>
@@ -4177,7 +4276,7 @@ You can download it using this direct link:</property>
</packing>
</child>
<child>
- <widget class="Gtk.Table" id="table2">
+ <widget class="Gtk.Table" id="colorstable">
<property name="MemberName" />
<property name="NRows">3</property>
<property name="NColumns">2</property>
@@ -4191,7 +4290,7 @@ You can download it using this direct link:</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<property name="FocusOnClick">False</property>
- <property name="Group">group1</property>
+ <property name="Group">colors</property>
<signal name="Toggled" handler="OnButtonToggled" />
</widget>
<packing>
@@ -4215,7 +4314,7 @@ You can download it using this direct link:</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<property name="FocusOnClick">False</property>
- <property name="Group">group1</property>
+ <property name="Group">colors</property>
<signal name="Toggled" handler="OnButtonToggled" />
</widget>
<packing>
@@ -4241,7 +4340,7 @@ You can download it using this direct link:</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<property name="FocusOnClick">False</property>
- <property name="Group">group1</property>
+ <property name="Group">colors</property>
<signal name="Toggled" handler="OnButtonToggled" />
</widget>
<packing>
@@ -4265,7 +4364,7 @@ You can download it using this direct link:</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<property name="FocusOnClick">False</property>
- <property name="Group">group1</property>
+ <property name="Group">colors</property>
<signal name="Toggled" handler="OnButtonToggled" />
</widget>
<packing>
@@ -4289,7 +4388,7 @@ You can download it using this direct link:</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<property name="FocusOnClick">False</property>
- <property name="Group">group1</property>
+ <property name="Group">colors</property>
<signal name="Toggled" handler="OnButtonToggled" />
</widget>
<packing>
@@ -4311,7 +4410,7 @@ You can download it using this direct link:</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<property name="FocusOnClick">False</property>
- <property name="Group">group1</property>
+ <property name="Group">colors</property>
<signal name="Toggled" handler="OnButtonToggled" />
</widget>
<packing>
@@ -4371,9 +4470,6 @@ Show-><b> S</b>
<property name="Fill">False</property>
</packing>
</child>
- <child>
- <placeholder />
- </child>
</widget>
</child>
</widget>
@@ -4565,4 +4661,112 @@ Show-><b> S</b>
</widget>
</child>
</widget>
+ <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.DrawingTool" design-size="600 434">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Drawing Tool</property>
+ <property name="Icon">resource:longomatch.png</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Gravity">Center</property>
+ <property name="SkipPagerHint">True</property>
+ <property name="SkipTaskbarHint">True</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <property name="HasSeparator">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</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>
+ <widget class="LongoMatch.Gui.Component.DrawingToolBox" id="drawingtoolbox1">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <signal name="LineWidthChanged" handler="OnDrawingtoolbox1LineWidthChanged" />
+ <signal name="ColorChanged" handler="OnDrawingtoolbox1ColorChanged" />
+ <signal name="VisibilityChanged" handler="OnDrawingtoolbox1VisibilityChanged" />
+ <signal name="ClearDrawing" handler="OnDrawingtoolbox1ClearDrawing" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="savebutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-save</property>
+ <signal name="Clicked" handler="OnSavebuttonClicked" />
+ <property name="label">gtk-save</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>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.DrawingWidget" id="drawingwidget1">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</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">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button271">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">button271</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">0</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</stetic-interface>
\ No newline at end of file
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index bb29036..2e5855d 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -15,6 +15,7 @@
<signal name="ColorChanged" />
<signal name="VisibilityChanged" />
<signal name="ClearDrawing" />
+ <signal name="DrawToolChanged" />
</itemgroup>
</signals>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]