#pragma once #include #include namespace psemek::ui { struct container_impl { container_impl(element * parent) : parent_{parent} {} element::children_range children() const; bool empty() const; std::size_t size() const; void resize(std::size_t new_size); std::size_t add(std::shared_ptr c); void add(std::shared_ptr c, std::size_t index); std::shared_ptr get(std::size_t index) const; std::optional find(element * c) const; std::shared_ptr remove(element * c); std::shared_ptr remove(std::size_t index); void clear(); protected: element * parent_; std::vector> children_; std::vector children_range_; }; }