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
A component for rendering a viewport in a Bubble Tea application.
Structs§
- Gutter
Context - GutterContext provides context to a
GutterFunc. - Highlight
Info - 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§
- Gutter
Func - 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: