final public static function beginFrame($x = 0, $y = 0, $z = 0, $scale = null,
                                            \ManiaLib\Gui\Layouts\AbstractLayout $layout = null)
    {
        $frame = new Elements\Frame();
        $frame->setPosition($x, $y, $z);
        $frame->setScale($scale);
        if ($layout instanceof Layouts\AbstractLayout) {
            $frame->setLayout($layout);
        }
        $frame->buildXML();

        self::$parentFrames[] = $frame;
        self::$parentNodes[] = $frame->getDOMElement();
        self::$parentLayouts[] = $frame->getLayout();
    }