Documentation
¶
Index ¶
- type Layout
- func (l *Layout) GetViewportHeight() int
- func (l *Layout) GetViewportWidth() int
- func (l *Layout) GetViewportYPosition() int
- func (l *Layout) HalfPageDown()
- func (l *Layout) HalfPageUp()
- func (l *Layout) Init() tea.Cmd
- func (l *Layout) LineDown()
- func (l *Layout) LineUp()
- func (l *Layout) PageDown()
- func (l *Layout) PageUp()
- func (l *Layout) ScrollToBottom()
- func (l *Layout) ScrollToTop()
- func (l *Layout) SetContent(content string)
- func (l *Layout) SetFooter(footer string)
- func (l *Layout) SetFooterHeight(height int)
- func (l *Layout) SetFooterStyle(style lipgloss.Style)
- func (l *Layout) SetHeader(header string)
- func (l *Layout) SetHeaderHeight(height int)
- func (l *Layout) SetHeaderStyle(style lipgloss.Style)
- func (l *Layout) SetViewportYPosition(y int)
- func (l *Layout) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (l *Layout) View() string
- func (l *Layout) ViewportAtBottom() bool
- func (l *Layout) ViewportAtTop() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout struct {
// contains filtered or unexported fields
}
Layout represents our base TUI layout with header, viewport, and footer
func (*Layout) GetViewportHeight ¶
GetViewportHeight returns the current height of the viewport
func (*Layout) GetViewportWidth ¶
GetViewportWidth returns the current width of the viewport
func (*Layout) GetViewportYPosition ¶
GetViewportYPosition gets the current vertical scroll position
func (*Layout) HalfPageDown ¶
func (l *Layout) HalfPageDown()
HalfPageDown scrolls the viewport down half a page
func (*Layout) HalfPageUp ¶
func (l *Layout) HalfPageUp()
HalfPageUp scrolls the viewport up half a page
func (*Layout) PageDown ¶
func (l *Layout) PageDown()
PageDown scrolls the viewport down a full page
func (*Layout) ScrollToBottom ¶
func (l *Layout) ScrollToBottom()
ScrollToBottom scrolls to the bottom of the viewport
func (*Layout) ScrollToTop ¶
func (l *Layout) ScrollToTop()
ScrollToTop scrolls to the top of the viewport
func (*Layout) SetContent ¶
SetContent sets the viewport content
func (*Layout) SetFooterHeight ¶
SetFooterHeight sets the footer height
func (*Layout) SetFooterStyle ¶
SetFooterStyle sets the footer style
func (*Layout) SetHeaderHeight ¶
SetHeaderHeight sets the header height
func (*Layout) SetHeaderStyle ¶
SetHeaderStyle sets the header style
func (*Layout) SetViewportYPosition ¶
SetViewportYPosition sets the vertical scroll position of the viewport
func (*Layout) ViewportAtBottom ¶
ViewportAtBottom returns whether the viewport is scrolled to the bottom
func (*Layout) ViewportAtTop ¶
ViewportAtTop returns whether the viewport is scrolled to the top