[chronojump] Encoder capture bars with a clickable icon
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder capture bars with a clickable icon
- Date: Mon, 21 Mar 2022 12:22:47 +0000 (UTC)
commit d98023ede942505aa050e9fb728b163df9751700
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Mar 21 13:21:47 2022 +0100
Encoder capture bars with a clickable icon
src/gui/cairo/bars.cs | 11 ++++++++---
src/gui/eventExecute.cs | 20 ++++++++++----------
2 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/src/gui/cairo/bars.cs b/src/gui/cairo/bars.cs
index 6ed486df5..3d5bf0275 100644
--- a/src/gui/cairo/bars.cs
+++ b/src/gui/cairo/bars.cs
@@ -252,7 +252,7 @@ public abstract class CairoBars : CairoGeneric
public abstract void GraphDo (List<PointF> pointMain_l, List<List<PointF>> pointSecondary_ll, bool
mainAtLeft,
List<Cairo.Color> colorMain_l, List<Cairo.Color> colorSecondary, List<string> names_l,
string labelBarMain, string labelBarSecondary, bool labelRotateInFirstBar,
- int fontHeightForBottomNames, int marginForBottomNames, string title);
+ int fontHeightForBottomNames, int marginForBottomNames, string title, bool clickable);
protected void initGraph(string font, double widthPercent1)
{
@@ -793,7 +793,7 @@ public class CairoBars1Series : CairoBars
public override void GraphDo (List<PointF> pointMain_l, List<List<PointF>> pointSecondary_ll, bool
mainAtLeft,
List<Cairo.Color> colorMain_l, List<Cairo.Color> colorSecondary, List<string> names_l,
string labelBarMain, string labelBarSecondary, bool labelRotateInFirstBar,
- int fontHeightForBottomNames, int marginForBottomNames, string title)
+ int fontHeightForBottomNames, int marginForBottomNames, string title, bool clickable)
{
LogB.Information("at CairoBars1Series.Do");
this.pointMain_l = pointMain_l;
@@ -823,6 +823,9 @@ public class CairoBars1Series : CairoBars
writeTitleAtTop ();
+ if(clickable)
+ addClickableMark (g);
+
endGraphDisposing(g, surface, area.GdkWindow);
}
}
@@ -1142,7 +1145,7 @@ public class CairoBarsNHSeries : CairoBars
public override void GraphDo (List<PointF> pointMain_l, List<List<PointF>> pointSecondary_ll, bool
mainAtLeft,
List<Cairo.Color> colorMain_l, List<Cairo.Color> colorSecondary_l, List<string>
names_l,
string labelBarMain, string labelBarSecondary, bool labelRotateInFirstBar,
- int fontHeightForBottomNames, int marginForBottomNames, string title)
+ int fontHeightForBottomNames, int marginForBottomNames, string title, bool clickable)
{
this.pointSecondary_ll = pointSecondary_ll;
this.pointMain_l = pointMain_l;
@@ -1175,6 +1178,8 @@ public class CairoBarsNHSeries : CairoBars
writeTitleAtTop ();
writeLegend ();
+ if(clickable)
+ addClickableMark (g);
endGraphDisposing(g, surface, area.GdkWindow);
}
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 9567bad6a..291f20d05 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -2640,17 +2640,17 @@ public class CairoPaintBarsPreJumpSimple : CairoPaintBarsPre
cb.GraphDo (pointB_l, pointSecondary_ll, false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- fontHeightForBottomNames, bottomMargin, title);
+ fontHeightForBottomNames, bottomMargin, title, false);
} else if (showBarA) //takeOff, takeOffWeight
cb.GraphDo (pointA_l, new List<List<PointF>>(), false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- fontHeightForBottomNames, bottomMargin, title);
+ fontHeightForBottomNames, bottomMargin, title, false);
else //rest of the jumps: sj, cmj, ..
cb.GraphDo (pointB_l, new List<List<PointF>>(), false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- fontHeightForBottomNames, bottomMargin, title);
+ fontHeightForBottomNames, bottomMargin, title, false);
}
}
@@ -2779,7 +2779,7 @@ public class CairoPaintBarsPreJumpReactive : CairoPaintBarsPre
cb.GraphDo (pointB_l, pointSecondary_ll, false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- fontHeightForBottomNames, bottomMargin, title);
+ fontHeightForBottomNames, bottomMargin, title, false);
}
}
@@ -2880,7 +2880,7 @@ public class CairoPaintBarsPreRunSimple : CairoPaintBarsPre
cb.GraphDo (point_l, new List<List<PointF>>(), false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- fontHeightForBottomNames, bottomMargin, title);
+ fontHeightForBottomNames, bottomMargin, title, false);
}
}
@@ -2991,7 +2991,7 @@ public class CairoPaintBarsPreRunInterval : CairoPaintBarsPre
cb.GraphDo (point_l, new List<List<PointF>>(), false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- fontHeightForBottomNames, bottomMargin, title);
+ fontHeightForBottomNames, bottomMargin, title, false);
}
}
@@ -3120,7 +3120,7 @@ public class CairoPaintBarsPreJumpReactiveRealtimeCapture : CairoPaintBarsPre
cb.GraphDo (pointB_l, pointSecondary_ll, false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- 14, 8, title);
+ 14, 8, title, false);
}
}
@@ -3292,7 +3292,7 @@ public class CairoPaintBarsPreRunIntervalRealtimeCapture : CairoPaintBarsPre
cb.GraphDo (point_l, new List<List<PointF>>(), false,
new List<Cairo.Color>(), new List<Cairo.Color>(), names_l,
"", "", false,
- 14, 22, title); //22 because there are two rows
+ 14, 22, title, false); //22 because there are two rows
}
}
@@ -3585,7 +3585,7 @@ public class CairoPaintBarplotPreEncoder : CairoPaintBarsPre
cb.GraphDo (dataA_l, new List<List<PointF>>(), false,
colorMain_l, new List<Cairo.Color>(), names_l,
"", "", false,
- 14, 8, "my title");
+ 14, 8, "my title", true);
else {
List<List<PointF>> pointSecondary_ll = new List<List<PointF>>();
pointSecondary_ll.Add(dataA_l);
@@ -3593,7 +3593,7 @@ public class CairoPaintBarplotPreEncoder : CairoPaintBarsPre
cb.GraphDo (dataB_l, pointSecondary_ll, false,
colorMain_l, colorSecondary_l, names_l,
"Ecc", "Con", true,
- 14, 8, "my title");
+ 14, 8, "my title", true);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]