diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-30 23:36:30 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-30 23:36:30 -0400 |
commit | 7bbd28aa08593f2c5e72b86090128d584edf184b (patch) | |
tree | 6d7a96c24b420838d6104c828293ed02d52e8f54 /libs/canvas/canvas/item.h | |
parent | 006ba7cd3640c65a4bc5cd5d2bfc22ffc47d1673 (diff) |
notable changes to try to improve most of enter/leave handling for canvas items
Diffstat (limited to 'libs/canvas/canvas/item.h')
-rw-r--r-- | libs/canvas/canvas/item.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/canvas/canvas/item.h b/libs/canvas/canvas/item.h index 538ac8bb79..7cad50e883 100644 --- a/libs/canvas/canvas/item.h +++ b/libs/canvas/canvas/item.h @@ -88,6 +88,21 @@ public: Group* parent () const { return _parent; } + + uint32_t depth() const; + const Item* closest_ancestor_with (const Item& other) const; + bool common_ancestor_within (uint32_t, const Item& other) const; + + /** returns true if this item is an ancestor of @param candidate, + * and false otherwise. + */ + bool is_ancestor_of (const Item& candidate) const { + return candidate.is_descendant_of (*this); + } + /** returns true if this Item is a descendant of @param candidate, + * and false otherwise. + */ + bool is_descendant_of (const Item& candidate) const; void set_position (Duple); void set_x_position (Coord); |