unused but slightly tricky code to add track name/instrument to an SMF file when...
[ardour.git] / libs / canvas / item.cc
index 47eb77d7a3086d4bf3456f366855bfe8bd54d7e0..e2cdc698bb69dd92e7747940118c0ddff1d51dd3 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include "pbd/compose.h"
-#include "pbd/stacktrace.h"
+#include "pbd/demangle.h"
 #include "pbd/convert.h"
 
 #include "ardour/utils.h"
@@ -817,7 +817,7 @@ Item::render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
 }
 
 void
-Item::add_child_bounding_boxes() const
+Item::add_child_bounding_boxes (bool include_hidden) const
 {
        boost::optional<Rect> self;
        Rect bbox;
@@ -830,7 +830,7 @@ Item::add_child_bounding_boxes() const
 
        for (list<Item*>::const_iterator i = _items.begin(); i != _items.end(); ++i) {
 
-               if (!(*i)->visible()) {
+               if (!(*i)->visible() && !include_hidden) {
                        continue;
                }
 
@@ -867,6 +867,17 @@ Item::add (Item* i)
        _bounding_box_dirty = true;
 }
 
+void
+Item::add_front (Item* i)
+{
+       /* XXX should really notify canvas about this */
+
+       _items.push_front (i);
+       i->reparent (this);
+       invalidate_lut ();
+       _bounding_box_dirty = true;
+}
+
 void
 Item::remove (Item* i)
 {