mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
implement viewport to integrate scrolled window features for data label
This commit is contained in:
parent
27fc6fd289
commit
38cb571189
2 changed files with 37 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||||
namespace Yggverse\Yoda\Entity\Browser\Container\Tab\Page;
|
namespace Yggverse\Yoda\Entity\Browser\Container\Tab\Page;
|
||||||
|
|
||||||
use \Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content\Data;
|
use \Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content\Data;
|
||||||
|
use \Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content\Viewport;
|
||||||
|
|
||||||
class Content
|
class Content
|
||||||
{
|
{
|
||||||
|
|
@ -15,6 +16,7 @@ class Content
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
public \Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content\Data $data;
|
public \Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content\Data $data;
|
||||||
|
public \Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content\Viewport $viewport;
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
private int $_margin = 8;
|
private int $_margin = 8;
|
||||||
|
|
@ -43,14 +45,24 @@ class Content
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init label
|
// Init viewport
|
||||||
|
// to integrate scrolled window features for data label
|
||||||
|
$this->viewport = new Viewport(
|
||||||
|
$this
|
||||||
|
);
|
||||||
|
|
||||||
|
// Init data label
|
||||||
$this->data = new Data(
|
$this->data = new Data(
|
||||||
$this
|
$this
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->add(
|
$this->viewport->gtk->add(
|
||||||
$this->data->gtk
|
$this->data->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->gtk->add(
|
||||||
|
$this->viewport->gtk
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refresh()
|
public function refresh()
|
||||||
|
|
|
||||||
23
src/Entity/Browser/Container/Tab/Page/Content/Viewport.php
Normal file
23
src/Entity/Browser/Container/Tab/Page/Content/Viewport.php
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content;
|
||||||
|
|
||||||
|
class Viewport
|
||||||
|
{
|
||||||
|
public \GtkViewport $gtk;
|
||||||
|
|
||||||
|
// Dependencies
|
||||||
|
public \Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content $content;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
\Yggverse\Yoda\Entity\Browser\Container\Tab\Page\Content $content
|
||||||
|
) {
|
||||||
|
// Init dependencies
|
||||||
|
$this->content = $content;
|
||||||
|
|
||||||
|
// Init viewport
|
||||||
|
$this->gtk = new \GtkViewport;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue