Yoda/src/Entity/Browser/Menu/Debug.php
2024-07-26 23:02:19 +03:00

47 lines
No EOL
826 B
PHP

<?php
declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Menu;
use \GtkMenuItem;
use \Yggverse\Yoda\Entity\Browser\Menu;
class Debug
{
// GTK
public GtkMenuItem $gtk;
// Dependencies
public Menu $menu;
// Defaults
public const LABEL = 'Debug';
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()
{
$this->menu->browser->gtk->set_interactive_debugging(
true
);
}
);
}
}