class_docstr: Container widget that exposes a larger virtual screen to its content and
  displays it in a vertical scrollbale region.
  
  Typically this is wrapped in a large `HSplit` container. Make sure in that
  case to not specify a `height` dimension of the `HSplit`, so that it will
  scale according to the content.
  
  .. note::
  
      If you want to display a completion menu for widgets in this
      `ScrollablePane`, then it's still a good practice to use a
      `FloatContainer` with a `CompletionsMenu` in a `Float` at the top-level
      of the layout hierarchy, rather then nesting a `FloatContainer` in this
      `ScrollablePane`. (Otherwise, it's possible that the completion menu
      is clipped.)
  
  :param content: The content container.
  :param scrolloffset: Try to keep the cursor within this distance from the
      top/bottom (left/right offset is not used).
  :param keep_cursor_visible: When `True`, automatically scroll the pane so
      that the cursor (of the focused window) is always visible.
  :param keep_focused_window_visible: When `True`, automatically scroll the
      pane so that the focused window is visible, or as much visible as
      possible if it doesn't completely fit the screen.
  :param max_available_height: Always constraint the height to this amount
      for performance reasons.
  :param width: When given, use this width instead of looking at the children.
  :param height: When given, use this height instead of looking at the children.
  :param show_scrollbar: When `True` display a scrollbar on the right.
class_docstr_tok: ["Container","widget","that","exposes","a","larger","virtual","screen","to","its","content","and","displays","it","in","a","vertical","scrollbale","region",".","Typically","this","is","wrapped","in","a","large","`","HSplit","`","container",".","Make","sure","in","that","case","to","not","specify","a","`","height","`","dimension","of","the","`","HSplit","`",",","so","that","it","will","scale","according","to","the","content",".","..","note",":",":","If","you","want","to","display","a","completion","menu","for","widgets","in","this","`","ScrollablePane","`",",","then","it","'s","still","a","good","practice","to","use","a","`","FloatContainer","`","with","a","`","CompletionsMenu","`","in","a","`","Float","`","at","the","top-level","of","the","layout","hierarchy",",","rather","then","nesting","a","`","FloatContainer","`","in","this","`","ScrollablePane","`",".","(","Otherwise",",","it","'s","possible","that","the","completion","menu","is","clipped",".",")",":","param","content",":","The","content","container",".",":","param","scrolloffset",":","Try","to","keep","the","cursor","within","this","distance","from","the","top\/bottom","(","left\/right","offset","is","not","used",")",".",":","param","keep_cursor_visible",":","When","`","True","`",",","automatically","scroll","the","pane","so","that","the","cursor","(","of","the","focused","window",")","is","always","visible",".",":","param","keep_focused_window_visible",":","When","`","True","`",",","automatically","scroll","the","pane","so","that","the","focused","window","is","visible",",","or","as","much","visible","as","possible","if","it","does","n't","completely","fit","the","screen",".",":","param","max_available_height",":","Always","constraint","the","height","to","this","amount","for","performance","reasons",".",":","param","width",":","When","given",",","use","this","width","instead","of","looking","at","the","children",".",":","param","height",":","When","given",",","use","this","height","instead","of","looking","at","the","children",".",":","param","show_scrollbar",":","When","`","True","`","display","a","scrollbar","on","the","right","."]
docstr: Scroll the scrollable pane, so that this window becomes visible.
  
  :param visible_height: Height of this `ScrollablePane` that is rendered.
  :param virtual_height: Height of the virtual, temp screen.
  :param visible_win_write_pos: `WritePosition` of the nested window on the
      temp screen.
  :param cursor_position: The location of the cursor position of this
      window on the temp screen.
docstr_tok: ["Scroll","the","scrollable","pane",",","so","that","this","window","becomes","visible",".",":","param","visible_height",":","Height","of","this","`","ScrollablePane","`","that","is","rendered",".",":","param","virtual_height",":","Height","of","the","virtual",",","temp","screen",".",":","param","visible_win_write_pos",":","`","WritePosition","`","of","the","nested","window","on","the","temp","screen",".",":","param","cursor_position",":","The","location","of","the","cursor","position","of","this","window","on","the","temp","screen","."]
code: def _make_window_visible(
      self,
      visible_height: int,
      virtual_height: int,
      visible_win_write_pos: WritePosition,
      cursor_position: Point | None,
  ) -> None:
      """
      Scroll the scrollable pane, so that this window becomes visible.
  
      :param visible_height: Height of this `ScrollablePane` that is rendered.
      :param virtual_height: Height of the virtual, temp screen.
      :param visible_win_write_pos: `WritePosition` of the nested window on the
          temp screen.
      :param cursor_position: The location of the cursor position of this
          window on the temp screen.
      """
      # Start with maximum allowed scroll range, and then reduce according to
      # the focused window and cursor position.
      min_scroll = 0
      max_scroll = virtual_height - visible_height
  
      if self.keep_cursor_visible():
          # Reduce min/max scroll according to the cursor in the focused window.
          if cursor_position is not None:
              offsets = self.scroll_offsets
              cpos_min_scroll = (
                  cursor_position.y
                  - visible_height
                  + 1
                  + offsets.bottom
              )
              cpos_max_scroll = cursor_position.y - offsets.top
              min_scroll = max(min_scroll, cpos_min_scroll)
              max_scroll = max(0, min(max_scroll, cpos_max_scroll))
  
      if self.keep_focused_window_visible():
          # Reduce min/max scroll according to focused window position.
          # If the window is small enough, bot the top and bottom of the window
          # should be visible.
          if visible_win_write_pos.height <= visible_height:
              window_min_scroll = (
                  visible_win_write_pos.ypos
                  + visible_win_write_pos.height
                  - visible_height
              )
              window_max_scroll = visible_win_write_pos.ypos
          else:
              # Window does not fit on the screen. Make sure at least the whole
              # screen is occupied with this window, and nothing else is shown.
              window_min_scroll = visible_win_write_pos.ypos
              window_max_scroll = (
                  visible_win_write_pos.ypos
                  + visible_win_write_pos.height
                  - visible_height
              )
  
          min_scroll = max(min_scroll, window_min_scroll)
          max_scroll = min(max_scroll, window_max_scroll)
  
      if min_scroll > max_scroll:
          min_scroll = max_scroll  # Should not happen.
  
      # Finally, properly clip the vertical scroll.
      if self.vertical_scroll > max_scroll:
          self.vertical_scroll = max_scroll
      if self.vertical_scroll < min_scroll:
          self.vertical_scroll = min_scroll
  
imports: from __future__ import annotations
  from prompt_toolkit.data_structures import Point
  from prompt_toolkit.filters import FilterOrBool, to_filter
  from prompt_toolkit.key_binding import KeyBindingsBase
  from prompt_toolkit.mouse_events import MouseEvent
  from .containers import Container, ScrollOffsets
  from .dimension import AnyDimension, Dimension, sum_layout_dimensions, to_dimension
  from .mouse_handlers import MouseHandler, MouseHandlers
  from .screen import Char, Screen, WritePosition
label_desc: Use image node_id 14 for calling the ScrollablePane obj's underlying member method code with example usage: obj._make_window_visible(visible_height, virtual_height, visible_win_write_pos, cursor_position) without return types