-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.php
More file actions
39 lines (29 loc) · 770 Bytes
/
App.php
File metadata and controls
39 lines (29 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
namespace Ardillo\Examples\TableGallery;
use Ardillo\{
ReactApp,
Size,
TableModel,
};
class App extends ReactApp
{
public Main\Window $win;
public Handler $handler;
public TableModel $model;
public function onSigInt(int $signo): void
{
echo 'Caught SIGINT ...' . PHP_EOL;
unset($this->win);
$this->stop();
}
protected function OnInit(): void
{
$this->handler = new Handler;
$this->model = new TableModel($this->handler);
$this->win = new Main\Window('Ardillo Table Gallery', new Size(1000, 600), false);
$this->win->setup();
$this->win->show();
$this->loop->addSignal(self::SIGINT, $this->onSigInt(...));
}
}