page_model

package
v0.0.0-...-00ef510 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNewInvalidTerminalSize = errors.New(`page_model.New: TerminalSize.IsValid returned error`)

ErrNewInvalidTerminalSize - TerminalSize.IsValid returned error

View Source
var ErrUpdateInvalidTerminalSize = errors.New(`PageModel.Update: TerminalSize.IsValid returned error`)

ErrUpdateInvalidTerminalSize - TerminalSize.IsValid returned error

Functions

This section is empty.

Types

type PageModel

type PageModel struct {
	// contains filtered or unexported fields
}

PageModel - class which is getting page text parts for render in a terminal

func New

func New(appName coty.NameApp, pageBody page.Body, sizeTerminal ts.TerminalSize) (*PageModel, error)

New constructs PageModel object

func (*PageModel) GetAnchorRowAbsolutelyIndex

func (pgm *PageModel) GetAnchorRowAbsolutelyIndex() index.Index

GetAnchorRowAbsolutelyIndex gets anchorRowAbsolutelyIndex field

func (*PageModel) GetBodyModel

func (pgm *PageModel) GetBodyModel() *body_model.BodyModel

GetBodyModel gets modelBody field

func (*PageModel) GetFooterModel

func (pgm *PageModel) GetFooterModel() *footer_model.FooterModel

GetFooterModel gets modelFooter field

func (*PageModel) GetHeaderModel

func (pgm *PageModel) GetHeaderModel() *header_model.HeaderModel

GetHeaderModel gets modelHeader field

func (*PageModel) GetRowCount

func (pgm *PageModel) GetRowCount() size.Height

GetRowCount gets rowCount field

func (*PageModel) GetUsingTermSize

func (pgm *PageModel) GetUsingTermSize() ts.TerminalSize

GetUsingTermSize gets usingTermSize field

func (*PageModel) Shift

func (pgm *PageModel) Shift(terminalHeight size.Height, shift int)

Shift applies a shift to display dynamic_row window

func (*PageModel) Update

func (pgm *PageModel) Update(sizeTerm ts.TerminalSize, shiftVertical int) error

Update applies terminal size and display actionSequence to the models and rebuild getting display dynamic_row window

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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