mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
init header navigation menu
This commit is contained in:
parent
b0b38581aa
commit
006f039282
6 changed files with 191 additions and 9 deletions
|
|
@ -4,16 +4,30 @@ declare(strict_types=1);
|
|||
|
||||
namespace Yggverse\Yoda\Entity\Browser;
|
||||
|
||||
use \Yggverse\Yoda\Entity\Browser\Header\Navigation;
|
||||
|
||||
class Header
|
||||
{
|
||||
public \GtkHeaderBar $gtk;
|
||||
|
||||
// Dependencies
|
||||
public \Yggverse\Yoda\Entity\Browser $browser;
|
||||
|
||||
// Requirements
|
||||
public \Yggverse\Yoda\Entity\Browser\Header\Navigation $navigation;
|
||||
|
||||
// Defaults
|
||||
protected bool $_actions = true;
|
||||
protected string $_title = 'Yoda';
|
||||
protected string $_subtitle = '';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
public function __construct(
|
||||
\Yggverse\Yoda\Entity\Browser $browser
|
||||
) {
|
||||
// Init dependencies
|
||||
$this->browser = $browser;
|
||||
|
||||
// Init header
|
||||
$this->gtk = new \GtkHeaderBar;
|
||||
|
||||
$this->gtk->set_show_close_button(
|
||||
|
|
@ -27,6 +41,15 @@ class Header
|
|||
$this->gtk->set_subtitle(
|
||||
$this->_subtitle
|
||||
);
|
||||
|
||||
// Init navigation element
|
||||
$this->navigation = new Navigation(
|
||||
$this
|
||||
);
|
||||
|
||||
$this->gtk->add(
|
||||
$this->navigation->gtk
|
||||
);
|
||||
}
|
||||
|
||||
public function setTitle(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue