class

Bubbles::Viewport::Model

Inherits Reference < Object

Constructors

new(*opts : Option) : Model
Source

Instance methods

at_bottom
Source
at_top
Source
clear_highlights
Source
content
Source
content=(s : String)
Source
content_lines=(lines : Array(String))
Source
ensure_visible(line : Int32, colstart : Int32, colend : Int32)
Source
ensure_visible(line_idx : Int32)
Source
fill_height=(fill_height : Bool)
Source
fill_height?
Source
get_content
Source
goto_bottom
Source
goto_top
Source
half_page_down

HalfPageDown moves the view down by half the height of the viewport. Ported exactly from Go: vendor/bubbles/viewport/viewport.go:501

Source
half_page_up

HalfPageUp moves the view up by half the height of the viewport. Ported exactly from Go: vendor/bubbles/viewport/viewport.go:509

Source
height
Source
height=(h : Int32)
Source
highlight_next
Source
highlight_previous
Source
highlight_style
Source
highlight_style=(highlight_style : Lipgloss::Style)
Source
highlights=(matches : Array(Array(Int32)))
Source
horizontal_scroll_percent
Source
horizontal_step
Source
horizontal_step=(step : Int32)
Source
init
Source
key_map
Source
key_map=(key_map : KeyMap)
Source
left_gutter_func
Source
left_gutter_func=(left_gutter_func : GutterFunc)
Source
mouse_wheel_delta
Source
mouse_wheel_delta=(mouse_wheel_delta : Int32)
Source
mouse_wheel_enabled=(mouse_wheel_enabled : Bool)
Source
mouse_wheel_enabled?
Source
page_down

PageDown moves the view down by the number of lines in the viewport. Ported exactly from Go: vendor/bubbles/viewport/viewport.go:486

Source
page_up

PageUp moves the view up by one height of the viewport. Ported exactly from Go: vendor/bubbles/viewport/viewport.go:494

Source
past_bottom
Source
scroll_down(lines : Int32)
Source
scroll_left(cols : Int32)
Source
scroll_percent

ScrollPercent returns the amount scrolled as a float between 0 and 1. Ported exactly from Go: vendor/bubbles/viewport/viewport.go:200

Source
scroll_right(cols : Int32)
Source
scroll_up(lines : Int32)
Source
selected_highlight_style
Source
selected_highlight_style=(selected_highlight_style : Lipgloss::Style)
Source
set_content(s : String)
Source
set_content_lines(lines : Array(String))
Source
set_height(h : Int32)
Source
set_highlights(matches : Array(Array(Int32)))
Source
set_horizontal_step(step : Int32)
Source
set_width(w : Int32)
Source
set_x_offset(x : Int32)
Source
set_y_offset(y : Int32)
Source
soft_wrap=(soft_wrap : Bool)
Source
soft_wrap?
Source
style
Source
style=(style : Lipgloss::Style)
Source
style_line_func
Source
style_line_func=(style_line_func : Int32 -> Lipgloss::Style | Nil)
Source
total_line_count

TotalLineCount returns the total number of lines (both hidden and visible) within the viewport, accounting for soft wrapping. Ported exactly from Go: vendor/bubbles/viewport/viewport.go:570

Source
update(msg : Tea::Msg) : Tuple(Model, Tea::Cmd | Nil)
Source
view

View renders the viewport into a string. Ported exactly from Go: vendor/bubbles/viewport/viewport.go:728

Source
visible_line_count
Source
width
Source
width=(w : Int32)
Source
x_offset
Source
x_offset=(x : Int32)
Source
y_offset
Source
y_offset=(y : Int32)
Source
y_position
Source
y_position=(y_position : Int32)
Source