class_docstr: Typical usage:
  
  ::
  
      output = Vt100_Output.from_pty(sys.stdout)
      r = Renderer(style, output)
      r.render(cli, layout=...)
class_docstr_tok: ["Typical","usage",":",":",":","output","=","Vt100_Output.from_pty","(","sys.stdout",")","r","=","Renderer","(","style",",","output",")","r.render","(","cli",",","layout=","...",")"]
docstr: Render the current interface to the output.
  
  :param is_done: When True, put the cursor at the end of the interface. We
          won't print any changes to this part.
docstr_tok: ["Render","the","current","interface","to","the","output",".",":","param","is_done",":","When","True",",","put","the","cursor","at","the","end","of","the","interface",".","We","wo","n't","print","any","changes","to","this","part","."]
code: def render(self, cli, layout, is_done=False):
      """
      Render the current interface to the output.
  
      :param is_done: When True, put the cursor at the end of the interface. We
              won't print any changes to this part.
      """
      output = self.output
  
      # Enter alternate screen.
      if self.use_alternate_screen and not self._in_alternate_screen:
          self._in_alternate_screen = True
          output.enter_alternate_screen()
  
      # Enable bracketed paste.
      if not self._bracketed_paste_enabled:
          self.output.enable_bracketed_paste()
          self._bracketed_paste_enabled = True
  
      # Enable/disable mouse support.
      needs_mouse_support = self.mouse_support(cli)
  
      if needs_mouse_support and not self._mouse_support_enabled:
          output.enable_mouse_support()
          self._mouse_support_enabled = True
  
      elif not needs_mouse_support and self._mouse_support_enabled:
          output.disable_mouse_support()
          self._mouse_support_enabled = False
  
      # Create screen and write layout to it.
      size = output.get_size()
      screen = Screen()
      screen.show_cursor = (
          False  # Hide cursor by default, unless one of the
      )
      # containers decides to display it.
      mouse_handlers = MouseHandlers()
  
      if is_done:
          height = 0  # When we are done, we don't necessary want to fill up until the bottom.
      else:
          height = self._last_screen.height if self._last_screen else 0
          height = max(self._min_available_height, height)
  
      # When te size changes, don't consider the previous screen.
      if self._last_size != size:
          self._last_screen = None
  
      # When we render using another style, do a full repaint. (Forget about
      # the previous rendered screen.)
      # (But note that we still use _last_screen to calculate the height.)
      if self.style.invalidation_hash() != self._last_style_hash:
          self._last_screen = None
          self._attrs_for_token = None
      if self._attrs_for_token is None:
          self._attrs_for_token = _TokenToAttrsCache(
              self.style.get_attrs_for_token
          )
      self._last_style_hash = self.style.invalidation_hash()
  
      layout.write_to_screen(
          cli,
          screen,
          mouse_handlers,
          WritePosition(
              xpos=0,
              ypos=0,
              width=size.columns,
              height=(
                  size.rows if self.use_alternate_screen else height
              ),
              extended_height=size.rows,
          ),
      )
  
      # When grayed. Replace all tokens in the new screen.
      if cli.is_aborting or cli.is_exiting:
          screen.replace_all_tokens(Token.Aborted)
  
      # Process diff and write to output.
      self._cursor_pos, self._last_token = _output_screen_diff(
          output,
          screen,
          self._cursor_pos,
          self._last_screen,
          self._last_token,
          is_done,
          use_alternate_screen=self.use_alternate_screen,
          attrs_for_token=self._attrs_for_token,
          size=size,
          previous_width=(
              self._last_size.columns if self._last_size else 0
          ),
      )
      self._last_screen = screen
      self._last_size = size
      self.mouse_handlers = mouse_handlers
  
      # Write title if it changed.
      new_title = cli.terminal_title
  
      if new_title != self._last_title:
          if new_title is None:
              self.output.clear_title()
          else:
              self.output.set_title(new_title)
          self._last_title = new_title
  
      output.flush()
  
imports: from __future__ import unicode_literals
  from prompt_toolkit.filters import to_cli_filter
  from prompt_toolkit.layout.mouse_handlers import MouseHandlers
  from prompt_toolkit.layout.screen import Point, Screen, WritePosition
  from prompt_toolkit.output import Output
  from prompt_toolkit.styles import Style
  from prompt_toolkit.token import Token
  from prompt_toolkit.utils import is_windows
  from six.moves import range
label_desc: Use image node_id 7 for calling the Renderer obj's underlying member method code with example usage: obj.render(cli, layout, is_done) without return types