From faa85d72924297286bd622bed43c8986a043531c Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 20 Jul 2024 18:27:10 +0300 Subject: [PATCH] add _onFocusOut abstract method --- src/Abstract/Entity/Entry.php | 15 +++++++++++++++ .../Browser/Container/Page/Navbar/Request.php | 5 +++++ .../Browser/Container/Page/Response/Query.php | 5 +++++ .../Browser/History/Container/Navbar/Filter.php | 5 +++++ 4 files changed, 30 insertions(+) diff --git a/src/Abstract/Entity/Entry.php b/src/Abstract/Entity/Entry.php index b79be79a..220872f6 100644 --- a/src/Abstract/Entity/Entry.php +++ b/src/Abstract/Entity/Entry.php @@ -71,6 +71,17 @@ abstract class Entry ); } ); + + $this->gtk->connect( + 'focus-out-event', + function ( + \GtkEntry $entry + ) { + $this->_onFocusOut( + $entry + ); + } + ); } abstract protected function _onActivate( @@ -86,6 +97,10 @@ abstract class Entry \GtkEntry $entry ): void; + abstract protected function _onFocusOut( + \GtkEntry $entry + ): void; + public function setLength( ?int $value = null ): void diff --git a/src/Entity/Browser/Container/Page/Navbar/Request.php b/src/Entity/Browser/Container/Page/Navbar/Request.php index c4666394..44cba96d 100644 --- a/src/Entity/Browser/Container/Page/Navbar/Request.php +++ b/src/Entity/Browser/Container/Page/Navbar/Request.php @@ -56,4 +56,9 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb ); } } + + protected function _onFocusOut( + \GtkEntry $entry + ): void + {} } \ No newline at end of file diff --git a/src/Entity/Browser/Container/Page/Response/Query.php b/src/Entity/Browser/Container/Page/Response/Query.php index 67a6d48f..dbf4f367 100644 --- a/src/Entity/Browser/Container/Page/Response/Query.php +++ b/src/Entity/Browser/Container/Page/Response/Query.php @@ -41,6 +41,11 @@ class Query extends \Yggverse\Yoda\Abstract\Entity\Entry ): void {} + protected function _onFocusOut( + \GtkEntry $entry + ): void + {} + public function refresh(): void { // @TODO diff --git a/src/Entity/Browser/History/Container/Navbar/Filter.php b/src/Entity/Browser/History/Container/Navbar/Filter.php index 32cb9b01..07d7f278 100644 --- a/src/Entity/Browser/History/Container/Navbar/Filter.php +++ b/src/Entity/Browser/History/Container/Navbar/Filter.php @@ -31,4 +31,9 @@ class Filter extends \Yggverse\Yoda\Abstract\Entity\Browser\History\Container\Na \GtkEntry $entry ): void {} + + protected function _onFocusOut( + \GtkEntry $entry + ): void + {} } \ No newline at end of file