Render a single frame

Creates Renderer objects on demand

@param string $type type of renderer to use
@param Frame $frame the frame to render
967613
protected function _render_frame($type, $frame) {

    if ( !isset($this->_renderers[$type]) ) {
      
      switch ($type) {
      case "block":
        $this->_renderers[$type] = new Block_Renderer($this->_dompdf);
        break;

      case "inline":
        $this->_renderers[$type] = new Inline_Renderer($this->_dompdf);
        break;

      case "text":
        $this->_renderers[$type] = new Text_Renderer($this->_dompdf);
        break;

      case "image":
        $this->_renderers[$type] = new Image_Renderer($this->_dompdf);
        break;
      
      case "table-cell":
        $this->_renderers[$type] = new Table_Cell_Renderer($this->_dompdf);
        break;
      
      case "table-row-group":
        $this->_renderers[$type] = new Table_Row_Group_Renderer($this->_dompdf);
        break;

      case "list-bullet":
        $this->_renderers[$type] = new List_Bullet_Renderer($this->_dompdf);
        break;

      case "php":
        $this->_renderers[$type] = new PHP_Evaluator($this->_canvas);
        break;

      case "javascript":
        $this->_renderers[$type] = new Javascript_Embedder($this->_dompdf);
        break;
        
      }
    }
    
    $this->_renderers[$type]->render($frame);

  }
1359542
private void fireFrameType(CEMI frame, int type)
	{
		final FrameEvent e = new FrameEvent(this, frame);
		for (final Iterator i = listeners.iterator(); i.hasNext();) {
			final TransportListener l = (TransportListener) i.next();
			try {
				if (type == 0)
					l.broadcast(e);
				else if (type == 1)
					l.group(e);
				else if (type == 2)
					l.dataIndividual(e);
				else if (type == 3)
					l.dataConnected(e);
			}
			catch (final RuntimeException rte) {
				removeTransportListener(l);
				logger.error("removed event listener", rte);
			}
		}
	}
1234257
function _renderFrame(time) {
            var stage = _stages[_state].stage;
            // update all game objects
            me.game.update(time, stage);
            // render all game objects
            me.game.draw(stage);
            // schedule the next frame update
            if (_animFrameId !== -1) {
                _animFrameId = window.requestAnimationFrame(_renderFrame);
            }
        }
237967
public void setFrameType(final FrameType FRAME_TYPE) {
        getModel().setFrameType(FRAME_TYPE);
        init(getInnerBounds().width, getInnerBounds().height);
        repaint(getInnerBounds());
    }
552171
public function setType($type)
    {
        switch($type)
        {
            case self::YOUTUBE:
                return new Services\Youtube();
                break;

            case self::VIMEO:
                return new Services\Vimeo();
                break;

            default:
                throw new \InvalidArgumentException("$type is not a valid video site");
        }
    }
65934
public function onFrame($data, $type)
    {
        foreach (explode("\n", $data) as $pct) {
            if ($pct === '') {
                continue;
            }
            $pct = json_decode($pct, true);
            if (isset($pct[0])) {
                foreach ($pct as $i) {
                    $this->onPacket(rtrim($i, "\n"), $type);
                }
            } else {
                $this->onPacket($pct, $type);
            }
        }
    }
679899
private void fireFrameType(final CEMI frame, final int type)
	{
		final FrameEvent e = new FrameEvent(this, frame);
		final Consumer<? super TransportListener> c;
		if (type == 0)
			c = l -> l.broadcast(e);
		else if (type == 1)
			c = l -> l.group(e);
		else if (type == 2)
			c = l -> l.dataIndividual(e);
		else if (type == 3)
			c = l -> l.dataConnected(e);
		else
			return;
		listeners.fire(c);
	}
1354198
public function get_frame_width(Frame $frame)
    {
        $key = $frame->get_id();

        if (!isset($this->_frames[$key])) {
            throw new Exception("Frame not found in cellmap");
        }

        $cols = $this->_frames[$key]["columns"];
        $w = 0;
        foreach ($cols as $i) {
            $w += $this->_columns[$i]["used-width"];
        }

        return $w;
    }
1309509
public function onFrame($data, $type)
    {
        $ws = $this;
        $req = json_decode($data, true);
        if ($req['type'] === 'subscribe') {
            $eventName = $req['event'];
            $this->appInstance->pubsub->sub($req['event'], $this, function ($data) use ($ws, $eventName) {
                $ws->sendObject([
                    'type' => 'event',
                    'event' => $eventName,
                    'data' => $data,
                ]);
            });
        }
    }
440862
public function renderLine($type = 'cursor')
    {
        $choice = $this->choices[$this->line];
        $this->stream->write(Terminal::cursorToLineStart());
        if (is_string($choice)) {
            $this->stream->write($this->getTemplate($type, $this->getGroupTemplate($choice)));
            $this->stream->write(Terminal::cursorToLineStart());
        } else {
            $choice = ['selected' => isset($this->selections[$choice['key']])] + $choice;
            $this->stream->write($this->getTemplate($type, $this->getChoiceTemplate($choice)));
            $this->stream->write(Terminal::cursorToLineStart());
        }
    }
888658
public function render($type = 'all') {
		if ('all' != $type) {
			return $this->_render($type);
		}

		$out = '';
		foreach (array('js', 'scriptBlock', 'css') as $type) {
			$out .= $this->_render($type);
		}

		return $out;
	}
1076611
function (frameType, beanDef) {
            var writer = new ariaUtilsFunctionWriter(["skin", "std"]);
            var out = writer.out;
            // writer.writeEnsureObjectExists("skin.frame"); // not necessary, already done by normFrame
            // writer.writeEnsureObjectExists("std"); // not necessary, already done by normFrame
            ariaUtilsInheritanceNormalization.writeInheritanceNormalization({
                writer : writer,
                beanDef : beanDef,
                varToNormalize : "skin.frame",
                parentVars : ["skin", "std.frame", "std"]
            });
            // remove properties from the direct object in case they are present
            var properties = beanDef.$properties;
            for (var propName in properties) {
                if (properties.hasOwnProperty(propName)) {
                    out.push("delete skin", writer.getDotProperty(propName), ";");
                }
            }
            var res = writer.createFunction();
            writer.$dispose();
            return res;
        }
1215840
public static void setRenderer(int type) {
		switch (type) {
			case IMMEDIATE_RENDERER:
				setRenderer(new ImmediateModeOGLRenderer());
				return;
			case VERTEX_ARRAY_RENDERER:
				setRenderer(new VAOGLRenderer());
				return;
		}
		
		throw new RuntimeException("Unknown renderer type: "+type);
	}
491595
public function render($content, $type = '')
    {
        // Check variables
        $this->checkContent($content);
        if (!$type) {
            if ($this->defaultType !== false) {
                $type = $this->defaultType;
            }
        }
        $this->setType($type);

        // Render html
        return $this->renderElement($content);
    }
571700
public static function create($type=null) {
	$type = self::check_type($type);
	
	self::destroy($type);
	self::start($type);
}
1333991
public function toggleFramed( $framed = null ) {
		$this->framed = $framed !== null ? (bool)$framed : !$this->framed;
		$this->toggleClasses( [ 'oo-ui-buttonElement-framed' ], $this->framed );
		$this->toggleClasses( [ 'oo-ui-buttonElement-frameless' ], !$this->framed );
		return $this;
	}
263428
public void writeScript(AbstractRenderAppender sb)
    {
        assert(sb != null) : "The paramter 'sb' must not be null;";
        if (_writeScript)
            return;

        _writeScript = true;
        IScriptReporter sr = getParentScriptReporter();
        if (sr != null) {
            sr.writeScript(sb);
            return;
        }

        writeBeforeBlocks(sb);
        writeFrameworkScript(sb);
        writeAfterBlocks(sb);
    }