Bind a renderer to the given callable by constructing a new rendering view.
490907
def bind(renderer, to):
    

    @wraps(to)
    def view(request, **kwargs):
        try:
            returned = to(request, **kwargs)
        except Exception as error:
            view_error = getattr(renderer, "view_error", None)
            if view_error is None:
                raise
            return view_error(request, error)

        try:
            return renderer.render(request, returned)
        except Exception as error:
            render_error = getattr(renderer, "render_error", None)
            if render_error is None:
                raise
            return render_error(request, returned, error)

    return view
124483
def render(self, ctx=None):
        '''
        
        '''
        self._initialize()
        if ctx is None:
            ctx = RenderContext()
        #
        # if we are called from within render, return a dummy object...
        #
        if self in ctx:
            self._current_rendered = self._in_render_value()
        else:
            ctx.push(self)
            if self.dependency_type == Calculated.VALUE_BASED:
                self._rendered_field = self._field.render(ctx)
            self._render()
            ctx.pop()
        return self._current_rendered
1258345
function() {
		if ( !this.force2D && WebGLRenderer.isSupported( this.el ) ) {
			this.renderer = new WebGLRenderer( this.el );
		} else if ( Canvas2DRenderer.isSupported( this.el ) ) {
			this.renderer = new Canvas2DRenderer( this.el );
		} else {
			throw new Error( "No supported renderer!" );
		}
	}
322029
protected RenderVisitor createHelperInstance(Appendable outputBuf, SoyRecord data) {
    return new RenderVisitor(
        evalVisitorFactory,
        outputBuf,
        basicTemplates,
        deltemplates,
        data,
        ijData,
        activeDelPackageSelector,
        msgBundle,
        xidRenamingMap,
        cssRenamingMap,
        debugSoyTemplateInfo,
        pluginInstances);
  }
757615
@SideOnly(Side.CLIENT)
	public static void onRenderBlock(IRenderBlockCallback callback, CallbackOption<IRenderBlockCallbackPredicate> option)
	{
		renderBlockRegistry.registerCallback(callback, option);
	}
128851
def set_renderer(self, renderer):
        
        viewport = None
        if renderer == 'opengl':
            from enaml.qt.QtWidgets import QOpenGLWidget
            viewport = QOpenGLWidget()
        elif renderer == 'default':
            try:
                from enaml.qt.QtWidgets import QOpenGLWidget
                viewport = QOpenGLWidget()
            except ImportError as e:
                warnings.warn(
                    "QOpenGLWidget could not be imported: {}".format(e))
        self.widget.setViewport(viewport)
975393
private void addGeneratedResource(FacesContext context, String resourceName, String rendererType, String value,
                                      UIViewRoot view) {
        final UIOutput resource = new UIOutput();
        resource.getAttributes().put("name", resourceName);
        resource.setRendererType(rendererType);
        resource.getAttributes().put("library", value);
        view.addComponentResource(context, resource, HEAD);
    }
713861
def _new_render(response):
    
    orig_render = response.__class__.render

    # No arguments, is used as bound method.
    def _inner_render():
        try:
            return orig_render(response)
        except HttpRedirectRequest as e:
            return HttpResponseRedirect(e.url, status=e.status)

    return _inner_render
482482
public <I extends Renderable, O> Renderer<? super I, ? extends O> getRenderer(final I renderable,
            final Class<? extends RenderingFormat<? extends O>> renderingFormat) {

        RendererSelection bestMatch = null;

        final Collection<RendererBeanDescriptor<?>> descriptors =
                _descriptorProvider.getRendererBeanDescriptorsForRenderingFormat(renderingFormat);
        for (final RendererBeanDescriptor<?> descriptor : descriptors) {
            final RendererSelection rendererMatch = isRendererMatch(descriptor, renderable, bestMatch);
            if (rendererMatch != null) {
                bestMatch = rendererMatch;
            }
        }

        if (bestMatch == null) {
            logger.warn("Didn't find any matches for renderable {} (format={})", renderable, renderingFormat);
            return null;
        }

        @SuppressWarnings("unchecked") final Renderer<? super I, ? extends O> renderer =
                (Renderer<? super I, ? extends O>) bestMatch.getRenderer();

        if (logger.isInfoEnabled()) {
            logger.info("Returning renderer '{}' for renderable '{}' in format '{}'",
                    new Object[] { renderer, renderable.getClass().getName(), renderingFormat.getName() });
        }

        return renderer;
    }
573371
function map(callable, children) {
  var iterator = (0, _cmap.default)(callable, children)[Symbol.asyncIterator]();
  return new _Children.default(iterator, undefined);
}
30119
def bind(self, callback):
        
        handlers = self._handlers
        if self._self is None:
            raise RuntimeError('%s already fired, cannot add callbacks' % self)
        if handlers is None:
            handlers = []
            self._handlers = handlers
        handlers.append(callback)
995093
def bind(self):
        """"""
        # This is called simply to deal with anything that might be currently bound (for example, Pyglet objects),
        gl.glBindTexture(gl.GL_TEXTURE_2D, 0)

        # Store current viewport size for later
        self._old_viewport = get_viewport()

        # Bind the FBO, and change the viewport to fit its texture.
        gl.glBindFramebufferEXT(gl.GL_FRAMEBUFFER_EXT, self.id)  # Rendering off-screen
        gl.glViewport(0, 0, self.texture.width, self.texture.height)
600007
function()
	{
		if(!this._modelBindersMap) this._initBinding();
		if(!this._collectionBinder)
		{
			this._explicitSubviewsStruct = null;

			if(this._template) this.element.innerHTML = this._template;

			if(this.render !== noop) this.render();
			this.renderSubviews();
		}
	}
1058415
function bind(property, options, preserveContext, shouldDisplay, valueNormalizer, childProperties) {
      var data = options.data;
      var fn = options.fn;
      var inverse = options.inverse;
      var view = data.view;
      var normalized, observer, i;

      // we relied on the behavior of calling without
      // context to mean this === window, but when running
      // "use strict", it's possible for this to === undefined;
      var currentContext = this || window;

      normalized = normalizePath(currentContext, property, data);

      if (data.insideGroup) {
        observer = function() {
          while (view._contextView) {
            view = view._contextView;
          }
          run.once(view, 'rerender');
        };

        var template, context;
        var result = handlebarsGet(currentContext, property, options);

        result = valueNormalizer ? valueNormalizer(result) : result;

        context = preserveContext ? currentContext : result;
        if (shouldDisplay(result)) {
          template = fn;
        } else if (inverse) {
          template = inverse;
        }

        template(context, { data: options.data });
      } else {
        var viewClass = _HandlebarsBoundView;
        var viewOptions = {
          preserveContext: preserveContext,
          shouldDisplayFunc: shouldDisplay,
          valueNormalizerFunc: valueNormalizer,
          displayTemplate: fn,
          inverseTemplate: inverse,
          path: property,
          pathRoot: currentContext,
          previousContext: currentContext,
          isEscaped: !options.hash.unescaped,
          templateData: options.data,
          templateHash: options.hash,
          helperName: options.helperName
        };

        if (options.isWithHelper) {
          viewClass = WithView;
        }

        // Create the view that will wrap the output of this template/property
        // and add it to the nearest view's childViews array.
        // See the documentation of Ember._HandlebarsBoundView for more.
        var bindView = view.createChildView(viewClass, viewOptions);

        view.appendChild(bindView);

        observer = function() {
          run.scheduleOnce('render', bindView, 'rerenderIfNeeded');
        };
      }

      // Observes the given property on the context and
      // tells the Ember._HandlebarsBoundView to re-render. If property
      // is an empty string, we are printing the current context
      // object ({{this}}) so updating it is not our responsibility.
      if (typeof this === 'object' && normalized.path !== '') {
        view.registerObserver(normalized.root, normalized.path, observer);
        if (childProperties) {
          for (i=0; i<childProperties.length; i++) {
            view.registerObserver(normalized.root, normalized.path+'.'+childProperties[i], observer);
          }
        }
      }
    }
47843
def render_context(self, context, *args, **kwargs):
        
        if getattr(context, '_with_template', None) is None:
            context._set_with_template(self)
        runtime._render_context(self,
                                self.callable_,
                                context,
                                *args,
                                **kwargs)
1133406
def create_cell_renderer_combo(self, tree_view, title="title", assign=0, editable=False, model=None, function=None):
        """'
        
        """
        renderer_combo = Gtk.CellRendererCombo()
        renderer_combo.set_property('editable', editable)
        if model:
            renderer_combo.set_property('model', model)
        if function:
            renderer_combo.connect("edited", function)
        renderer_combo.set_property("text-column", 0)
        renderer_combo.set_property("has-entry", False)
        column = Gtk.TreeViewColumn(title, renderer_combo, text=assign)
        tree_view.append_column(column)
432877
def render(self, view, context=None):
        """"""
        return self.runtime.render(self, view, context)