Documentation ¶
Overview ¶
Package pdf provides an pdf bubble which can render pdf files as strings.
Index ¶
- func ReadPdf(name string) (string, error)
- type Bubble
- func (b *Bubble) GotoTop()
- func (b Bubble) Init() tea.Cmd
- func (b *Bubble) SetBorderColor(color lipgloss.AdaptiveColor)
- func (b *Bubble) SetBorderless(borderless bool)
- func (b *Bubble) SetFileName(filename string) tea.Cmd
- func (b *Bubble) SetIsActive(active bool)
- func (b *Bubble) SetSize(w, h int)
- func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd)
- func (b Bubble) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bubble ¶
type Bubble struct { Viewport viewport.Model BorderColor lipgloss.AdaptiveColor Active bool Borderless bool FileName string }
Bubble represents the properties of a pdf bubble.
func New ¶
func New(active, borderless bool, borderColor lipgloss.AdaptiveColor) Bubble
New creates a new instance of a PDF.
func (*Bubble) SetBorderColor ¶
func (b *Bubble) SetBorderColor(color lipgloss.AdaptiveColor)
SetBorderColor sets the current color of the border.
func (*Bubble) SetBorderless ¶
SetBorderless sets weather or not to show the border.
func (*Bubble) SetFileName ¶
SetFileName sets current file to render, this returns a cmd which will render the pdf.
func (*Bubble) SetIsActive ¶
SetIsActive sets if the bubble is currently active.
Click to show internal directories.
Click to hide internal directories.