mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
implement _onButtonPressEvent method
This commit is contained in:
parent
ee2f8ba3b1
commit
6afc498186
3 changed files with 29 additions and 6 deletions
|
|
@ -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
|
|||
string $href
|
||||
): bool;
|
||||
|
||||
abstract protected function _onButtonPressEvent(
|
||||
\GtkLabel $label,
|
||||
\GdkEvent $event
|
||||
): bool;
|
||||
|
||||
abstract public function set(
|
||||
string $value
|
||||
): void;
|
||||
|
|
|
|||
|
|
@ -267,6 +267,14 @@ class Gemtext extends Markup
|
|||
);
|
||||
}
|
||||
|
||||
protected function _onButtonPressEvent(
|
||||
\GtkLabel $label,
|
||||
\GdkEvent $event
|
||||
): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private function _wrap(
|
||||
string $value
|
||||
): string
|
||||
|
|
|
|||
|
|
@ -29,4 +29,12 @@ class Plain extends Markup
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function _onButtonPressEvent(
|
||||
\GtkLabel $label,
|
||||
\GdkEvent $event
|
||||
): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue