model

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Slides   []string
	Page     int
	Author   string
	Date     string
	Theme    glamour.TermRendererOption
	Paging   string
	FileName string

	// VirtualText is used for additional information that is not part of the
	// original slides, it will be displayed on a slide and reset on page change
	VirtualText string
	Search      navigation.Search
	// contains filtered or unexported fields
}

Model represents the model of this presentation, which contains all the state related to the current slides.

func (*Model) CurrentPage added in v0.7.0

func (m *Model) CurrentPage() int

CurrentPage returns the current page the presentation is on.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model and begins watching the slides file for changes if it exists.

func (*Model) Load added in v0.3.0

func (m *Model) Load() error

Load loads all of the content and metadata for the presentation.

func (*Model) Pages added in v0.7.0

func (m *Model) Pages() []string

Pages returns all the slides in the presentation.

func (*Model) SetPage added in v0.7.0

func (m *Model) SetPage(page int)

SetPage sets which page the presentation should render.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update updates the presentation model.

func (Model) View

func (m Model) View() string

View renders the current slide in the presentation and the status bar which contains the author, date, and pagination information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL