View: Keep a list of owned traces in RowItemOwner
[pulseview.git] / pv / view / rowitemowner.h
index d961d6b9eeb9098ef0f4f271ada681fabe8c6baf..4b538e6d664fa34f0dc7caf2afcf610e21635772 100644 (file)
@@ -61,10 +61,28 @@ public:
        /**
         * Returns a list of row items owned by this object.
         */
-       virtual std::vector< std::shared_ptr<RowItem> > child_items() const = 0;
+       virtual const std::vector< std::shared_ptr<RowItem> >&
+               child_items() const;
+
+       /**
+        * Clears the list of child items.
+        */
+       void clear_child_items();
+
+       /**
+        * Adds a child item to this object.
+        */
+       void add_child_item(std::shared_ptr<RowItem> item);
+
+       /**
+        * Removes a child item from this object.
+        */
+       void remove_child_item(std::shared_ptr<RowItem> item);
 
-protected:
        virtual void update_viewport() = 0;
+
+private:
+       std::vector< std::shared_ptr<RowItem> > _items;
 };
 
 } // view