Browse Source

implement _onButtonPressEvent method

PHP-GTK3
yggverse 4 months ago
parent
commit
6afc498186
  1. 19
      src/Abstract/Entity/Browser/Container/Page/Content/Markup.php
  2. 8
      src/Entity/Browser/Container/Page/Content/Gemtext.php
  3. 8
      src/Entity/Browser/Container/Page/Content/Plain.php

19
src/Abstract/Entity/Browser/Container/Page/Content/Markup.php

@ -67,12 +67,14 @@ abstract class Markup
$this->gtk->connect( $this->gtk->connect(
'button-press-event', 'button-press-event',
function() function(
{ \GtkLabel $label,
// Markup container has focus disabled (to hide cursor position), \GdkEvent $event
// solution remove selection from request entry on click this area ) {
return $this->_onButtonPressEvent(
// @TODO $label,
$event
);
} }
); );
} }
@ -82,6 +84,11 @@ abstract class Markup
string $href string $href
): bool; ): bool;
abstract protected function _onButtonPressEvent(
\GtkLabel $label,
\GdkEvent $event
): bool;
abstract public function set( abstract public function set(
string $value string $value
): void; ): void;

8
src/Entity/Browser/Container/Page/Content/Gemtext.php

@ -267,6 +267,14 @@ class Gemtext extends Markup
); );
} }
protected function _onButtonPressEvent(
\GtkLabel $label,
\GdkEvent $event
): bool
{
return false;
}
private function _wrap( private function _wrap(
string $value string $value
): string ): string

8
src/Entity/Browser/Container/Page/Content/Plain.php

@ -29,4 +29,12 @@ class Plain extends Markup
{ {
return true; return true;
} }
protected function _onButtonPressEvent(
\GtkLabel $label,
\GdkEvent $event
): bool
{
return false;
}
} }
Loading…
Cancel
Save