/** * @return Window */ public function createRootWindow() { $rootWindow = new Window(); $rootWindow->setX(0); $rootWindow->setY(0); $rootWindow->setWidth($this->shellCommandRepository->getTerminalWidth()); $rootWindow->setHeight($this->shellCommandRepository->getTerminalHeight()); return $rootWindow; }
/** * @return $this */ public function run() { $this->shellCommandRepository->switchInputToCatchMode(); $this->cycleHandler->init(); $this->isRun = true; while ($this->isRun && ($symbol = fread(STDIN, 4096))) { $cycleEvent = $this->createCycleEvent($symbol); $this->cycleHandler->handleIteration($cycleEvent); } $this->shellCommandRepository->switchInputToTextMode(); return $this; }
/** * @param OutputInterface $output */ public function initDraw(OutputInterface $output) { $this->terminalDrawer->setOutput($output); $this->shellCommandRepository->resetTerminal(); }