mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
47 lines
No EOL
826 B
PHP
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
|
|
);
|
|
}
|
|
);
|
|
}
|
|
} |