Skip to main content

Module viewport

Module viewport 

Source
Expand description

Cleanroom Rust port of upstream Go source file: viewport/viewport.go Cleanroom Rust port of upstream Go source file: viewport/keymap.go Cleanroom Rust port of upstream Go source file: viewport/highlight.go Upstream Target Tag / Version: v2.1.0

# Viewport

A component for rendering a viewport in a Bubble Tea application.

Structs§

GutterContext
GutterContext provides context to a GutterFunc.
HighlightInfo
HighlightInfo holds the highlight ranges for a set of matches.
KeyMap
KeyMap defines the keybindings for the viewport.
Model
Model is the Bubble Tea model for this viewport element.

Functions§

default_key_map
DefaultKeyMap returns a set of pager-like default keybindings.
new
with_height
WithHeight is an initialization option that sets the height of the viewport. Pass as an argument to new.
with_key_map
WithKeyMap sets the keymap used by the viewport.
with_width
WithWidth is an initialization option that sets the width of the viewport. Pass as an argument to new.

Type Aliases§

GutterFunc
GutterFunc can be implemented and set into Model::left_gutter_func.
Option
Option is a configuration option that works in conjunction with new. For example: