diff --git a/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php b/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php index daba44cf..2800308d 100644 --- a/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php +++ b/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php @@ -76,6 +76,19 @@ abstract class Markup ); } ); + + $this->gtk->connect( + 'configure-event', + function( + GtkWindow $window, + GdkEvent $event + ) { + return $this->_onConfigure( + $label, + $event + ); + } + ); } protected function _onActivateLink( @@ -94,6 +107,11 @@ abstract class Markup return false; } + abstract protected function _onConfigure( + GtkLabel $label, + GdkEvent $event + ): bool; + abstract public function set( string $value ): void; diff --git a/src/Entity/Browser.php b/src/Entity/Browser.php index a757ff2b..bdde2039 100644 --- a/src/Entity/Browser.php +++ b/src/Entity/Browser.php @@ -75,16 +75,6 @@ class Browser $this->gtk->show(); // Init events - $this->gtk->connect( - 'configure-event', - function( - GtkWindow $window, - // GdkEvent $event - ) { - // @TODO render data wordwrap by $window->get_size() - } - ); - $this->gtk->connect( 'destroy', function() diff --git a/src/Entity/Browser/Container/Page/Content/Gemtext.php b/src/Entity/Browser/Container/Page/Content/Gemtext.php index 08f3a3d2..b04be589 100644 --- a/src/Entity/Browser/Container/Page/Content/Gemtext.php +++ b/src/Entity/Browser/Container/Page/Content/Gemtext.php @@ -248,6 +248,14 @@ class Gemtext extends Markup ); } + protected function _onConfigure( + GtkLabel $label, + GdkEvent $event + ): bool + { + // @TODO + } + protected function _onActivateLink( GtkLabel $label, string $href diff --git a/src/Entity/Browser/Container/Page/Content/Plain.php b/src/Entity/Browser/Container/Page/Content/Plain.php index 64312b75..09a4fe5e 100644 --- a/src/Entity/Browser/Container/Page/Content/Plain.php +++ b/src/Entity/Browser/Container/Page/Content/Plain.php @@ -24,4 +24,12 @@ class Plain extends Markup ) ); } + + protected function _onConfigure( + GtkLabel $label, + GdkEvent $event + ): bool + { + // @TODO + } } \ No newline at end of file