implement setText method

This commit is contained in:
yggverse 2024-07-05 02:28:52 +03:00
parent 50460d3928
commit aea00e602f

View file

@ -12,6 +12,7 @@ class Statusbar
// Defaults
private int $_margin = 8;
private string $_text = '';
public function __construct(
\Yggverse\Yoda\Entity\Window\Tab\Address $address
@ -48,4 +49,15 @@ class Statusbar
$this->_margin
);
}
public function setText(
?string $text = null
): void
{
$this->gtk->set_text(
is_null($text) ? $this->_text : trim(
$text
)
);
}
}