]> sigrok.org Git - pulseview.git/blobdiff - pv/view/rowitemowner.h
View: Keep a list of owned traces in RowItemOwner
[pulseview.git] / pv / view / rowitemowner.h
index 53e2e14fd798ee3943c619e20abbc91546fe100e..4b538e6d664fa34f0dc7caf2afcf610e21635772 100644 (file)
@@ -61,9 +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);
 
        virtual void update_viewport() = 0;
+
+private:
+       std::vector< std::shared_ptr<RowItem> > _items;
 };
 
 } // view