Browse Source

enshort namespaces

PHP-GTK3
yggverse 4 months ago
parent
commit
ee2f8ba3b1
  1. 10
      src/Entity/Browser/Container.php
  2. 26
      src/Entity/Browser/Container/Page.php
  3. 17
      src/Entity/Browser/Container/Page/Content.php
  4. 4
      src/Entity/Browser/Container/Page/Content/Viewport.php
  5. 10
      src/Entity/Browser/Container/Page/Navbar/History.php
  6. 6
      src/Entity/Browser/Container/Page/Progressbar.php
  7. 11
      src/Entity/Browser/Container/Page/Response.php
  8. 6
      src/Entity/Browser/Container/Page/Response/Query.php
  9. 6
      src/Entity/Browser/Container/Page/Response/Send.php
  10. 1
      src/Entity/Browser/Container/Tab.php
  11. 5
      src/Entity/Browser/Header.php
  12. 11
      src/Entity/Browser/Header/Tray.php
  13. 11
      src/Entity/Browser/History.php
  14. 15
      src/Entity/Browser/History/Container.php
  15. 11
      src/Entity/Browser/History/Container/Content.php
  16. 6
      src/Entity/Browser/History/Container/Content/Table.php
  17. 6
      src/Entity/Browser/History/Container/Content/Viewport.php
  18. 21
      src/Entity/Browser/History/Container/Navbar.php
  19. 25
      src/Entity/Browser/Menu.php
  20. 7
      src/Entity/Browser/Menu/File.php
  21. 11
      src/Entity/Browser/Menu/Tab.php

10
src/Entity/Browser/Container.php

@ -4,20 +4,20 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser; namespace Yggverse\Yoda\Entity\Browser;
use \Yggverse\Yoda\Entity\Browser\Container\Tab; use \Yggverse\Yoda\Entity\Browser;
class Container class Container
{ {
public \GtkBox $gtk; public \GtkBox $gtk;
// Dependencies // Dependencies
public \Yggverse\Yoda\Entity\Browser $browser; public Browser $browser;
// Requirements // Requirements
public \Yggverse\Yoda\Entity\Browser\Container\Tab $tab; public Container\Tab $tab;
public function __construct( public function __construct(
\Yggverse\Yoda\Entity\Browser $browser Browser $browser
) { ) {
// Init dependency // Init dependency
$this->browser = $browser; $this->browser = $browser;
@ -28,7 +28,7 @@ class Container
); );
// Init tab // Init tab
$this->tab = new Tab( $this->tab = new Container\Tab(
$this $this
); );

26
src/Entity/Browser/Container/Page.php

@ -6,12 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\Container;
use \Yggverse\Yoda\Entity\Browser\Container; use \Yggverse\Yoda\Entity\Browser\Container;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Title;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Navbar;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Progressbar;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Response;
use \Yggverse\Yoda\Model\Connection; use \Yggverse\Yoda\Model\Connection;
use \Yggverse\Yoda\Model\Filesystem; use \Yggverse\Yoda\Model\Filesystem;
@ -23,11 +17,11 @@ class Page
public Container $container; public Container $container;
// Requirements // Requirements
public Title $title; public Page\Title $title;
public Navbar $navbar; public Page\Navbar $navbar;
public Progressbar $progressbar; public Page\Progressbar $progressbar;
public Content $content; public Page\Content $content;
public Response $response; public Page\Response $response;
public function __construct( public function __construct(
Container $container Container $container
@ -41,12 +35,12 @@ class Page
); );
// Init title // Init title
$this->title = new Title( $this->title = new Page\Title(
$this $this
); );
// Init navbar // Init navbar
$this->navbar = new Navbar( $this->navbar = new Page\Navbar(
$this $this
); );
@ -55,7 +49,7 @@ class Page
); );
// Init content // Init content
$this->content = new Content( $this->content = new Page\Content(
$this $this
); );
@ -67,7 +61,7 @@ class Page
); );
// Init progress bar // Init progress bar
$this->progressbar = new Progressbar( $this->progressbar = new Page\Progressbar(
$this $this
); );
@ -76,7 +70,7 @@ class Page
); );
// Init response bar // Init response bar
$this->response = new Response( $this->response = new Page\Response(
$this $this
); );

17
src/Entity/Browser/Container/Page/Content.php

@ -6,11 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\Container\Page;
use \Yggverse\Yoda\Entity\Browser\Container\Page; use \Yggverse\Yoda\Entity\Browser\Container\Page;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content\Gemtext;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content\Image;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content\Plain;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content\Viewport;
use \Yggverse\Yoda\Model\Filesystem; use \Yggverse\Yoda\Model\Filesystem;
class Content class Content
@ -21,7 +16,7 @@ class Content
public Page $page; public Page $page;
// Requirements // Requirements
public Viewport $viewport; public Content\Viewport $viewport;
// Defaults // Defaults
public const MARGIN = 8; public const MARGIN = 8;
@ -50,7 +45,7 @@ class Content
); );
// Init scrolled window viewport // Init scrolled window viewport
$this->viewport = new Viewport( $this->viewport = new Content\Viewport(
$this $this
); );
@ -72,7 +67,7 @@ class Content
$title = null; $title = null;
$document = new Gemtext( $document = new Content\Gemtext(
$this $this
); );
@ -108,7 +103,7 @@ class Content
case Filesystem::MIME_TEXT_PLAIN: case Filesystem::MIME_TEXT_PLAIN:
$document = new Plain( $document = new Content\Plain(
$this $this
); );
@ -123,7 +118,7 @@ class Content
case Filesystem::MIME_IMAGE_PNG: case Filesystem::MIME_IMAGE_PNG:
case Filesystem::MIME_IMAGE_WEBP: case Filesystem::MIME_IMAGE_WEBP:
$document = new Image( $document = new Content\Image(
$this $this
); );
@ -135,7 +130,7 @@ class Content
default: default:
$document = new Plain( $document = new Content\Plain(
$this $this
); );

4
src/Entity/Browser/Container/Page/Content/Viewport.php

@ -6,10 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\Container\Page\Content;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content; use \Yggverse\Yoda\Entity\Browser\Container\Page\Content;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content\Gemtext;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content\Image;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Content\Plain;
class Viewport class Viewport
{ {
public \GtkViewport $gtk; public \GtkViewport $gtk;

10
src/Entity/Browser/Container/Page/Navbar/History.php

@ -5,8 +5,6 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Container\Page\Navbar; namespace Yggverse\Yoda\Entity\Browser\Container\Page\Navbar;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Navbar; use \Yggverse\Yoda\Entity\Browser\Container\Page\Navbar;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Navbar\History\Back;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Navbar\History\Forward;
use \Yggverse\Yoda\Model\History as Memory; use \Yggverse\Yoda\Model\History as Memory;
@ -19,8 +17,8 @@ class History
public Memory $memory; public Memory $memory;
// Requirements // Requirements
public Back $back; public History\Back $back;
public Forward $forward; public History\Forward $forward;
public function __construct( public function __construct(
Navbar $navbar Navbar $navbar
@ -37,7 +35,7 @@ class History
\GtkButtonBoxStyle::EXPAND \GtkButtonBoxStyle::EXPAND
); );
$this->back = new Back( $this->back = new History\Back(
$this->navbar $this->navbar
); );
@ -45,7 +43,7 @@ class History
$this->back->gtk $this->back->gtk
); );
$this->forward = new Forward( $this->forward = new History\Forward(
$this->navbar $this->navbar
); );

6
src/Entity/Browser/Container/Page/Progressbar.php

@ -4,12 +4,14 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Container\Page; namespace Yggverse\Yoda\Entity\Browser\Container\Page;
use \Yggverse\Yoda\Entity\Browser\Container\Page;
class Progressbar class Progressbar
{ {
public \GtkProgressBar $gtk; public \GtkProgressBar $gtk;
// Dependencies // Dependencies
public \Yggverse\Yoda\Entity\Browser\Container\Page $page; public Page $page;
// Defaults // Defaults
private bool $_active = false; private bool $_active = false;
@ -17,7 +19,7 @@ class Progressbar
private float $_step = 0.02; private float $_step = 0.02;
public function __construct( public function __construct(
\Yggverse\Yoda\Entity\Browser\Container\Page $page, Page $page,
) { ) {
// Init dependencies // Init dependencies
$this->page = $page; $this->page = $page;

11
src/Entity/Browser/Container/Page/Response.php

@ -6,9 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\Container\Page;
use \Yggverse\Yoda\Entity\Browser\Container\Page; use \Yggverse\Yoda\Entity\Browser\Container\Page;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Response\Query;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Response\Send;
use \Yggverse\Net\Address; use \Yggverse\Net\Address;
class Response class Response
@ -19,8 +16,8 @@ class Response
public Page $page; public Page $page;
// Requirements // Requirements
public Query $query; public Response\Query $query;
public Send $send; public Response\Send $send;
// Defaults // Defaults
public const MARGIN = 8; public const MARGIN = 8;
@ -58,7 +55,7 @@ class Response
); );
// Init query field // Init query field
$this->query = new Query( $this->query = new Response\Query(
$this $this
); );
@ -70,7 +67,7 @@ class Response
); );
// Init send button // Init send button
$this->send = new Send( $this->send = new Response\Send(
$this $this
); );

6
src/Entity/Browser/Container/Page/Response/Query.php

@ -4,15 +4,17 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Container\Page\Response; namespace Yggverse\Yoda\Entity\Browser\Container\Page\Response;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Response;
class Query extends \Yggverse\Yoda\Abstract\Entity\Entry class Query extends \Yggverse\Yoda\Abstract\Entity\Entry
{ {
public \Yggverse\Yoda\Entity\Browser\Container\Page\Response $response; public Response $response;
// Defaults // Defaults
protected string $_placeholder = 'Enter response...'; protected string $_placeholder = 'Enter response...';
public function __construct( public function __construct(
\Yggverse\Yoda\Entity\Browser\Container\Page\Response $response Response $response
) { ) {
// Use parent features // Use parent features
parent::__construct(); parent::__construct();

6
src/Entity/Browser/Container/Page/Response/Send.php

@ -4,16 +4,18 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Container\Page\Response; namespace Yggverse\Yoda\Entity\Browser\Container\Page\Response;
use \Yggverse\Yoda\Entity\Browser\Container\Page\Response;
class Send extends \Yggverse\Yoda\Abstract\Entity\Button class Send extends \Yggverse\Yoda\Abstract\Entity\Button
{ {
// Dependencies // Dependencies
public \Yggverse\Yoda\Entity\Browser\Container\Page\Response $response; public Response $response;
// Defaults // Defaults
protected string $_label = 'Send'; protected string $_label = 'Send';
public function __construct( public function __construct(
\Yggverse\Yoda\Entity\Browser\Container\Page\Response $response Response $response
) { ) {
// Use parent features // Use parent features
parent::__construct(); parent::__construct();

1
src/Entity/Browser/Container/Tab.php

@ -5,7 +5,6 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Container; namespace Yggverse\Yoda\Entity\Browser\Container;
use \Yggverse\Yoda\Entity\Browser\Container; use \Yggverse\Yoda\Entity\Browser\Container;
use \Yggverse\Yoda\Entity\Browser\Container\Page;
class Tab class Tab
{ {

5
src/Entity/Browser/Header.php

@ -5,7 +5,6 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser; namespace Yggverse\Yoda\Entity\Browser;
use \Yggverse\Yoda\Entity\Browser; use \Yggverse\Yoda\Entity\Browser;
use \Yggverse\Yoda\Entity\Browser\Header\Tray;
class Header class Header
{ {
@ -15,7 +14,7 @@ class Header
public Browser $browser; public Browser $browser;
// Requirements // Requirements
public Tray $tray; public Header\Tray $tray;
// Defaults // Defaults
protected bool $_actions = true; protected bool $_actions = true;
@ -44,7 +43,7 @@ class Header
); );
// Init tray area // Init tray area
$this->tray = new Tray( $this->tray = new Header\Tray(
$this $this
); );

11
src/Entity/Browser/Header/Tray.php

@ -6,9 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\Header;
use \Yggverse\Yoda\Entity\Browser\Header; use \Yggverse\Yoda\Entity\Browser\Header;
use \Yggverse\Yoda\Entity\Browser\Header\Tray\Navigation;
use \Yggverse\Yoda\Entity\Browser\Header\Tray\Tab;
class Tray class Tray
{ {
public \GtkBox $gtk; public \GtkBox $gtk;
@ -17,8 +14,8 @@ class Tray
public Header $header; public Header $header;
// Requirements // Requirements
public Navigation $navigation; public Tray\Navigation $navigation;
public Tab $tab; public Tray\Tab $tab;
// Defaults // Defaults
protected bool $_actions = true; protected bool $_actions = true;
@ -50,7 +47,7 @@ class Tray
); );
// Init navigation // Init navigation
$this->navigation = new Navigation( $this->navigation = new Tray\Navigation(
$this $this
); );
@ -59,7 +56,7 @@ class Tray
); );
// Init new tab button // Init new tab button
$this->tab = new Tab( $this->tab = new Tray\Tab(
$this $this
); );

11
src/Entity/Browser/History.php

@ -4,9 +4,6 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser; namespace Yggverse\Yoda\Entity\Browser;
use \Yggverse\Yoda\Entity\Browser\History\Header;
use \Yggverse\Yoda\Entity\Browser\History\Container;
use \Yggverse\Yoda\Entity\Browser; use \Yggverse\Yoda\Entity\Browser;
class History class History
@ -17,8 +14,8 @@ class History
public Browser $browser; public Browser $browser;
// Requirements // Requirements
public Header $header; public History\Header $header;
public Container $container; public History\Container $container;
// Defaults // Defaults
public const WIDTH = 640; public const WIDTH = 640;
@ -45,7 +42,7 @@ class History
} }
// Init header // Init header
$this->header = new Header( $this->header = new History\Header(
$this $this
); );
@ -54,7 +51,7 @@ class History
); );
// Init container // Init container
$this->container = new Container( $this->container = new History\Container(
$this $this
); );

15
src/Entity/Browser/History/Container.php

@ -4,22 +4,21 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\History; namespace Yggverse\Yoda\Entity\Browser\History;
use \Yggverse\Yoda\Entity\Browser\History\Container\Navbar; use \Yggverse\Yoda\Entity\Browser\History;
use \Yggverse\Yoda\Entity\Browser\History\Container\Content;
class Container class Container
{ {
public \GtkBox $gtk; public \GtkBox $gtk;
// Dependencies // Dependencies
public \Yggverse\Yoda\Entity\Browser\History $history; public History $history;
// Requirements // Requirements
public \Yggverse\Yoda\Entity\Browser\History\Container\Navbar $navbar; public Container\Navbar $navbar;
public \Yggverse\Yoda\Entity\Browser\History\Container\Content $content; public Container\Content $content;
public function __construct( public function __construct(
\Yggverse\Yoda\Entity\Browser\History $history History $history
) { ) {
// Init dependency // Init dependency
$this->history = $history; $this->history = $history;
@ -30,7 +29,7 @@ class Container
); );
// Init navbar // Init navbar
$this->navbar = new Navbar( $this->navbar = new Container\Navbar(
$this $this
); );
@ -39,7 +38,7 @@ class Container
); );
// Init content // Init content
$this->content = new Content( $this->content = new Container\Content(
$this $this
); );

11
src/Entity/Browser/History/Container/Content.php

@ -6,9 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\History\Container;
use \Yggverse\Yoda\Entity\Browser\History\Container; use \Yggverse\Yoda\Entity\Browser\History\Container;
use \Yggverse\Yoda\Entity\Browser\History\Container\Content\Viewport;
use \Yggverse\Yoda\Entity\Browser\History\Container\Content\Table;
class Content class Content
{ {
public \GtkScrolledWindow $gtk; public \GtkScrolledWindow $gtk;
@ -17,8 +14,8 @@ class Content
public Container $container; public Container $container;
// Requirements // Requirements
public Viewport $viewport; public Content\Viewport $viewport;
public Table $table; public Content\Table $table;
// Defaults // Defaults
public const MARGIN = 8; public const MARGIN = 8;
@ -45,12 +42,12 @@ class Content
); );
// Init history records table // Init history records table
$this->table = new Table( $this->table = new Content\Table(
$this $this
); );
// Init viewport to integrate scrolled window features // Init viewport to integrate scrolled window features
$this->viewport = new Viewport( $this->viewport = new Content\Viewport(
$this $this
); );

6
src/Entity/Browser/History/Container/Content/Table.php

@ -6,8 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\History\Container\Content;
use \Yggverse\Yoda\Entity\Browser\History\Container\Content; use \Yggverse\Yoda\Entity\Browser\History\Container\Content;
use \Yggverse\Yoda\Entity\Browser\History\Container\Content\Table\Data;
class Table class Table
{ {
public \GtkTreeView $gtk; public \GtkTreeView $gtk;
@ -16,7 +14,7 @@ class Table
public Content $content; public Content $content;
// Requirements // Requirements
public Data $data; public Table\Data $data;
// Defaults // Defaults
public const TIME = 'Time'; public const TIME = 'Time';
@ -60,7 +58,7 @@ class Table
); );
// Init data model // Init data model
$this->data = new Data( $this->data = new Table\Data(
$this $this
); );

6
src/Entity/Browser/History/Container/Content/Viewport.php

@ -4,15 +4,17 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\History\Container\Content; namespace Yggverse\Yoda\Entity\Browser\History\Container\Content;
use \Yggverse\Yoda\Entity\Browser\History\Container\Content;
class Viewport class Viewport
{ {
public \GtkViewport $gtk; public \GtkViewport $gtk;
// Dependencies // Dependencies
public \Yggverse\Yoda\Entity\Browser\History\Container\Content $content; public Content $content;
public function __construct( public function __construct(
\Yggverse\Yoda\Entity\Browser\History\Container\Content $content Content $content
) { ) {
// Init dependencies // Init dependencies
$this->content = $content; $this->content = $content;

21
src/Entity/Browser/History/Container/Navbar.php

@ -6,11 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\History\Container;
use \Yggverse\Yoda\Entity\Browser\History\Container; use \Yggverse\Yoda\Entity\Browser\History\Container;
use \Yggverse\Yoda\Entity\Browser\History\Container\Navbar\Delete;
use \Yggverse\Yoda\Entity\Browser\History\Container\Navbar\Filter;
use \Yggverse\Yoda\Entity\Browser\History\Container\Navbar\Open;
use \Yggverse\Yoda\Entity\Browser\History\Container\Navbar\Search;
class Navbar class Navbar
{ {
public \GtkBox $gtk; public \GtkBox $gtk;
@ -19,10 +14,10 @@ class Navbar
public Container $container; public Container $container;
// Requirements // Requirements
public Delete $delete; public Navbar\Delete $delete;
public Filter $filter; public Navbar\Filter $filter;
public Open $open; public Navbar\Open $open;
public Search $search; public Navbar\Search $search;
// Defaults // Defaults
public const MARGIN = 8; public const MARGIN = 8;
@ -60,7 +55,7 @@ class Navbar
); );
// Init open button // Init open button
$this->open = new Open( $this->open = new Navbar\Open(
$this $this
); );
@ -69,7 +64,7 @@ class Navbar
); );
// Init delete button // Init delete button
$this->delete = new Delete( $this->delete = new Navbar\Delete(
$this $this
); );
@ -78,7 +73,7 @@ class Navbar
); );
// Init filter entry // Init filter entry
$this->filter = new Filter( $this->filter = new Navbar\Filter(
$this $this
); );
@ -90,7 +85,7 @@ class Navbar
); );
// Init search button // Init search button
$this->search = new Search( $this->search = new Navbar\Search(
$this $this
); );

25
src/Entity/Browser/Menu.php

@ -4,26 +4,23 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser; namespace Yggverse\Yoda\Entity\Browser;
use \Yggverse\Yoda\Entity\Browser\Menu\File; use \Yggverse\Yoda\Entity\Browser;
use \Yggverse\Yoda\Entity\Browser\Menu\Tab;
use \Yggverse\Yoda\Entity\Browser\Menu\History;
use \Yggverse\Yoda\Entity\Browser\Menu\Quit;
class Menu class Menu
{ {
public \GtkMenu $gtk; public \GtkMenu $gtk;
// Dependencies // Dependencies
public \Yggverse\Yoda\Entity\Browser $browser; public Browser $browser;
// Requirements // Requirements
public \Yggverse\Yoda\Entity\Browser\Menu\File $file; public Menu\File $file;
public \Yggverse\Yoda\Entity\Browser\Menu\Tab $tab; public Menu\Tab $tab;
public \Yggverse\Yoda\Entity\Browser\Menu\History $history; public Menu\History $history;
public \Yggverse\Yoda\Entity\Browser\Menu\Quit $quit; public Menu\Quit $quit;
public function __construct( public function __construct(
\Yggverse\Yoda\Entity\Browser $browser Browser $browser
) { ) {
// Init dependencies // Init dependencies
$this->browser = $browser; $this->browser = $browser;
@ -32,7 +29,7 @@ class Menu
$this->gtk = new \GtkMenu; $this->gtk = new \GtkMenu;
// Init file menu item // Init file menu item
$this->file = new File( $this->file = new Menu\File(
$this $this
); );
@ -41,7 +38,7 @@ class Menu
); );
// Init tab menu item // Init tab menu item
$this->tab = new Tab( $this->tab = new Menu\Tab(
$this $this
); );
@ -50,7 +47,7 @@ class Menu
); );
// Init history menu item // Init history menu item
$this->history = new History( $this->history = new Menu\History(
$this $this
); );
@ -64,7 +61,7 @@ class Menu
); );
// Init quit menu item // Init quit menu item
$this->quit = new Quit( $this->quit = new Menu\Quit(
$this $this
); );

7
src/Entity/Browser/Menu/File.php

@ -6,9 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\Menu;
use \Yggverse\Yoda\Entity\Browser\Menu; use \Yggverse\Yoda\Entity\Browser\Menu;
use \Yggverse\Yoda\Entity\Browser\Menu\File\Open;
use \Yggverse\Yoda\Entity\Browser\Menu\File\Save;
class File class File
{ {
public \GtkMenuItem $gtk; public \GtkMenuItem $gtk;
@ -34,7 +31,7 @@ class File
$file = new \GtkMenu; $file = new \GtkMenu;
// Init tab menu items // Init tab menu items
$open = new Open( $open = new File\Open(
$this $this
); );
@ -42,7 +39,7 @@ class File
$open->gtk $open->gtk
); );
$save = new Save( $save = new File\Save(
$this $this
); );

11
src/Entity/Browser/Menu/Tab.php

@ -6,9 +6,6 @@ namespace Yggverse\Yoda\Entity\Browser\Menu;
use \Yggverse\Yoda\Entity\Browser\Menu; use \Yggverse\Yoda\Entity\Browser\Menu;
use \Yggverse\Yoda\Entity\Browser\Menu\Tab\Add;
use \Yggverse\Yoda\Entity\Browser\Menu\Tab\Close;
class Tab class Tab
{ {
public \GtkMenuItem $gtk; public \GtkMenuItem $gtk;
@ -17,8 +14,8 @@ class Tab
public Menu $menu; public Menu $menu;
// Requirements // Requirements
public Add $add; public Tab\Add $add;
public Close $close; public Tab\Close $close;
// Defaults // Defaults
public const LABEL = 'Tab'; public const LABEL = 'Tab';
@ -38,7 +35,7 @@ class Tab
$tab = new \GtkMenu; $tab = new \GtkMenu;
// Init new tab menu item // Init new tab menu item
$this->add = new Add( $this->add = new Tab\Add(
$this $this
); );
@ -47,7 +44,7 @@ class Tab
); );
// Init close tab menu item // Init close tab menu item
$this->close = new Close( $this->close = new Tab\Close(
$this $this
); );

Loading…
Cancel
Save