implement bookmarks browser

This commit is contained in:
yggverse 2024-07-24 20:16:41 +03:00
parent 107718022d
commit 49ec6ee23d
16 changed files with 840 additions and 1 deletions

View file

@ -0,0 +1,49 @@
<?php
declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Menu;
use \GtkMenuItem;
use \Yggverse\Yoda\Entity\Browser\Menu;
use \Yggverse\Yoda\Entity\Browser\Bookmark as Window;
class Bookmark
{
// GTK
public GtkMenuItem $gtk;
// Dependencies
public Menu $menu;
// Defaults
public const LABEL = 'Bookmarks';
public function __construct(
Menu $menu
) {
// Init dependencies
$this->menu = $menu;
// Init menu item
$this->gtk = GtkMenuItem::new_with_label(
$this::LABEL
);
// Render
$this->gtk->show();
// Int events
$this->gtk->connect(
'activate',
function()
{
new Window(
$this->menu->browser
);
}
);
}
}

View file

@ -40,7 +40,7 @@ class History
'activate',
function()
{
$history = new Window(
new Window(
$this->menu->browser
);
}