Documentation
¶
Overview ¶
Package page implements creation of pages.
Index ¶
- func New(ps ...props.PageNumber) core.Page
- type Page
- func (p *Page) Add(rows ...core.Row) core.Page
- func (p *Page) GetNumber() int
- func (p *Page) GetRows() []core.Row
- func (p *Page) GetStructure() *node.Node[core.Structure]
- func (p *Page) Render(provider core.Provider, cell entity.Cell)
- func (p *Page) SetConfig(config *entity.Config)
- func (p *Page) SetNumber(number, total int)
- func (p *Page) SetPageControl(control core.PageControl)
- func (p *Page) SetPageIndex(index int)
- func (p *Page) SetPageTotal(total int)
- func (p *Page) SetRunningStrings(runningStrings map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page is one page of the document, holding its rows and the numbering used in headers and footers.
func (*Page) GetStructure ¶
GetStructure returns the Structure of a Page.
func (*Page) SetPageControl ¶ added in v0.2.2
func (p *Page) SetPageControl(control core.PageControl)
SetPageControl attaches the page-break controller the rows use to decide when content moves to the next page.
func (*Page) SetPageIndex ¶ added in v0.2.2
SetPageIndex records the physical 1-based page index.
func (*Page) SetPageTotal ¶ added in v0.2.2
SetPageTotal records the physical page total exposed via the provider's page context while this page renders.
func (*Page) SetRunningStrings ¶ added in v0.2.2
SetRunningStrings records named running strings (e.g. the active chapter title) exposed via the provider's page context while this page renders.