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

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

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

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

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