mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
require _onConfigure event implementation for custom wordwrap
This commit is contained in:
parent
52d25c6ffa
commit
88e77e6b80
4 changed files with 34 additions and 10 deletions
|
|
@ -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(
|
protected function _onActivateLink(
|
||||||
|
|
@ -94,6 +107,11 @@ abstract class Markup
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract protected function _onConfigure(
|
||||||
|
GtkLabel $label,
|
||||||
|
GdkEvent $event
|
||||||
|
): bool;
|
||||||
|
|
||||||
abstract public function set(
|
abstract public function set(
|
||||||
string $value
|
string $value
|
||||||
): void;
|
): void;
|
||||||
|
|
|
||||||
|
|
@ -75,16 +75,6 @@ class Browser
|
||||||
$this->gtk->show();
|
$this->gtk->show();
|
||||||
|
|
||||||
// Init events
|
// Init events
|
||||||
$this->gtk->connect(
|
|
||||||
'configure-event',
|
|
||||||
function(
|
|
||||||
GtkWindow $window,
|
|
||||||
// GdkEvent $event
|
|
||||||
) {
|
|
||||||
// @TODO render data wordwrap by $window->get_size()
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'destroy',
|
'destroy',
|
||||||
function()
|
function()
|
||||||
|
|
|
||||||
|
|
@ -248,6 +248,14 @@ class Gemtext extends Markup
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function _onConfigure(
|
||||||
|
GtkLabel $label,
|
||||||
|
GdkEvent $event
|
||||||
|
): bool
|
||||||
|
{
|
||||||
|
// @TODO
|
||||||
|
}
|
||||||
|
|
||||||
protected function _onActivateLink(
|
protected function _onActivateLink(
|
||||||
GtkLabel $label,
|
GtkLabel $label,
|
||||||
string $href
|
string $href
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,12 @@ class Plain extends Markup
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function _onConfigure(
|
||||||
|
GtkLabel $label,
|
||||||
|
GdkEvent $event
|
||||||
|
): bool
|
||||||
|
{
|
||||||
|
// @TODO
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue