mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
51 lines
No EOL
911 B
PHP
51 lines
No EOL
911 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Yggverse\Yoda\Entity\Browser\Header\Tray;
|
|
|
|
use \GtkMenuButton;
|
|
|
|
use \Yggverse\Yoda\Entity\Browser\Header\Tray;
|
|
use \Yggverse\Yoda\Entity\Browser\Menu;
|
|
|
|
class Navigation
|
|
{
|
|
// GTK
|
|
public GtkMenuButton $gtk;
|
|
|
|
// Dependencies
|
|
public Tray $tray;
|
|
|
|
// Requirements
|
|
public Menu $menu;
|
|
|
|
// Defaults
|
|
public const TOOLTIP = 'Navigation';
|
|
|
|
public function __construct(
|
|
Tray $tray
|
|
) {
|
|
// Init dependencies
|
|
$this->tray = $tray;
|
|
|
|
// Init navigation container
|
|
$this->gtk = new GtkMenuButton;
|
|
|
|
$this->gtk->set_tooltip_text(
|
|
_($this::TOOLTIP)
|
|
);
|
|
|
|
// Init menu
|
|
$this->menu = new Menu(
|
|
$this->tray->header->browser
|
|
);
|
|
|
|
$this->gtk->set_popup(
|
|
$this->menu->gtk
|
|
);
|
|
|
|
// Render
|
|
$this->gtk->show();
|
|
}
|
|
} |