class_docstr: Control for visualising the content of a `Buffer`.
  
  :param input_processors: list of :class:`~prompt_toolkit.layout.processors.Processor`.
  :param lexer: :class:`~prompt_toolkit.layout.lexers.Lexer` instance for syntax highlighting.
  :param preview_search: `bool` or `CLIFilter`: Show search while typing.
  :param get_search_state: Callable that takes a CommandLineInterface and
      returns the SearchState to be used. (If not CommandLineInterface.search_state.)
  :param buffer_name: String representing the name of the buffer to display.
  :param default_char: :class:`.Char` instance to use to fill the background. This is
      transparent by default.
  :param focus_on_click: Focus this buffer when it's click, but not yet focussed.
class_docstr_tok: ["Control","for","visualising","the","content","of","a","`","Buffer","`",".",":","param","input_processors",":","list","of",":","class",":","`","~prompt_toolkit.layout.processors.Processor","`",".",":","param","lexer",":",":","class",":","`","~prompt_toolkit.layout.lexers.Lexer","`","instance","for","syntax","highlighting",".",":","param","preview_search",":","`","bool","`","or","`","CLIFilter","`",":","Show","search","while","typing",".",":","param","get_search_state",":","Callable","that","takes","a","CommandLineInterface","and","returns","the","SearchState","to","be","used",".","(","If","not","CommandLineInterface.search_state",".",")",":","param","buffer_name",":","String","representing","the","name","of","the","buffer","to","display",".",":","param","default_char",":",":","class",":","`",".Char","`","instance","to","use","to","fill","the","background",".","This","is","transparent","by","default",".",":","param","focus_on_click",":","Focus","this","buffer","when","it","'s","click",",","but","not","yet","focussed","."]
docstr: This should return the preferred width.
  
  Note: We don't specify a preferred width according to the content,
        because it would be too expensive. Calculating the preferred
        width can be done by calculating the longest line, but this would
        require applying all the processors to each line. This is
        unfeasible for a larger document, and doing it for small
        documents only would result in inconsistent behaviour.
docstr_tok: ["This","should","return","the","preferred","width",".","Note",":","We","do","n't","specify","a","preferred","width","according","to","the","content",",","because","it","would","be","too","expensive",".","Calculating","the","preferred","width","can","be","done","by","calculating","the","longest","line",",","but","this","would","require","applying","all","the","processors","to","each","line",".","This","is","unfeasible","for","a","larger","document",",","and","doing","it","for","small","documents","only","would","result","in","inconsistent","behaviour","."]
code: def preferred_width(self, cli, max_available_width):
      """
      This should return the preferred width.
  
      Note: We don't specify a preferred width according to the content,
            because it would be too expensive. Calculating the preferred
            width can be done by calculating the longest line, but this would
            require applying all the processors to each line. This is
            unfeasible for a larger document, and doing it for small
            documents only would result in inconsistent behaviour.
      """
      return None
  
imports: from __future__ import unicode_literals
  from abc import ABCMeta, abstractmethod
  from collections import namedtuple
  from six import with_metaclass
  from six.moves import range
  from prompt_toolkit.cache import SimpleCache
  from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
  from prompt_toolkit.filters import to_cli_filter
  from prompt_toolkit.mouse_events import MouseEventType
  from prompt_toolkit.search_state import SearchState
  from prompt_toolkit.selection import SelectionType
  from prompt_toolkit.token import Token
  from prompt_toolkit.utils import get_cwidth
  from .lexers import Lexer, SimpleLexer
  from .processors import Processor
  from .screen import Char, Point
  from .utils import token_list_width, split_lines, token_list_to_text
  import six
  import time
label_desc: Use image node_id 4 for calling the BufferControl obj's underlying member method code with example usage: obj.preferred_width(cli, max_available_width) and returns: None