From 902f594336af1e43d8770effa9d7570dc2cd7c36 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 5 Jul 2024 01:59:50 +0300 Subject: [PATCH] init tab registry, implement tabs refresh method --- src/Entity/Window/Tab.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Entity/Window/Tab.php b/src/Entity/Window/Tab.php index a028924a..4d75692b 100644 --- a/src/Entity/Window/Tab.php +++ b/src/Entity/Window/Tab.php @@ -13,6 +13,9 @@ class Tab public \Yggverse\Yoda\Entity\Window $window; + // App entity operations + private array $_tab = []; + // Defaults private bool $_reorderable = true; private bool $_scrollable = true; @@ -84,5 +87,23 @@ class Tab $this->window->header->setTitle( $entity->title->gtk->get_text() ); + + // Register new tab entity + $this->_tab[] = $entity; + } + + public function refresh() + { + foreach ($this->_tab as $entity) + { + switch (true) + { + case $entity instanceof History: + + $entity->content->update(); + + break; + } + } } } \ No newline at end of file