summaryrefslogtreecommitdiff
path: root/libs/canvas/flag.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-12 14:53:44 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-12 14:53:44 -0400
commit590882f3c8e063528452d71daffb36d3151da05e (patch)
tree27480b4b85a7d2a8aeae51c9c9470c196b8dfff8 /libs/canvas/flag.cc
parent551014240a49ee11b9dc7541bbe8427ac3402aef (diff)
change Canvas heirarchy and constructors
Items no longer need a parent group (they require a Canvas pointer instead), so all constructors have been rationalized and have two variants, one with a parent and one with a canvas. All Items now inherit from Fill and Outline, to banish diagonal inheritance and virtual base classes and all that. There were zero changes to the Ardour GUI arising from these changes.
Diffstat (limited to 'libs/canvas/flag.cc')
-rw-r--r--libs/canvas/flag.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/canvas/flag.cc b/libs/canvas/flag.cc
index e72aece1f5..f5379791df 100644
--- a/libs/canvas/flag.cc
+++ b/libs/canvas/flag.cc
@@ -25,11 +25,25 @@
using namespace std;
using namespace ArdourCanvas;
-Flag::Flag (Group* parent, Distance height, Color outline_color, Color fill_color, Duple position)
- : Group (parent)
+Flag::Flag (Canvas* canvas, Distance height, Color outline_color, Color fill_color, Duple position)
+ : Group (canvas)
, _outline_color (outline_color)
, _fill_color (fill_color)
{
+ setup (height, position);
+}
+
+Flag::Flag (Group* group, Distance height, Color outline_color, Color fill_color, Duple position)
+ : Group (group)
+ , _outline_color (outline_color)
+ , _fill_color (fill_color)
+{
+ setup (height, position);
+}
+
+void
+Flag::setup (Distance height, Duple position)
+{
_text = new Text (this);
_text->set_alignment (Pango::ALIGN_CENTER);
_text->set_color (_outline_color);