viewer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const OSM_URL_PREFIX = "https://nominatim.openstreetmap.org"

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVFrame

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

func CSVFrameInit

func CSVFrameInit(th *Theme) *CSVFrame

func NewCSVFrame

func NewCSVFrame(th *Theme, reader io.Reader, w *app.Window) *CSVFrame

func NewTSVFrame

func NewTSVFrame(th *Theme, reader io.Reader, w *app.Window) *CSVFrame

func (*CSVFrame) Events

func (f *CSVFrame) Events() []interface{}

func (*CSVFrame) Find

func (f *CSVFrame) Find(anchor string) error

func (*CSVFrame) IsEmpty

func (f *CSVFrame) IsEmpty() bool

func (*CSVFrame) Layout

func (f *CSVFrame) Layout(gtx layout.Context) layout.Dimensions

type CommandEvent

type CommandEvent struct {
	Cmd string
}

type DotFrame

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

func NewDotFrame

func NewDotFrame(th *Theme, reader io.Reader, w *app.Window) *DotFrame

func (*DotFrame) Events

func (df *DotFrame) Events() []interface{}

func (*DotFrame) Find

func (df *DotFrame) Find(anchor string) error

func (*DotFrame) IsEmpty

func (df *DotFrame) IsEmpty() bool

func (*DotFrame) Layout

func (df *DotFrame) Layout(gtx layout.Context) layout.Dimensions

type HeaderLine

type HeaderLine struct {
	parse.Token
	// contains filtered or unexported fields
}

func HeaderLineInit

func HeaderLineInit(tkn parse.Token, th *Theme) *HeaderLine

func (*HeaderLine) Layout

func (h *HeaderLine) Layout(gtx layout.Context, peek Line) layout.Dimensions

func (*HeaderLine) Matches

func (h *HeaderLine) Matches(anchor string, re *regexp.Regexp) bool

type ImageFrame

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

func NewImageFrame

func NewImageFrame(th *Theme, reader io.Reader, w *app.Window) *ImageFrame

func (*ImageFrame) Events

func (imgf *ImageFrame) Events() []interface{}

func (*ImageFrame) Find

func (imgf *ImageFrame) Find(anchor string) error

func (*ImageFrame) IsEmpty

func (imgf *ImageFrame) IsEmpty() bool

func (*ImageFrame) Layout

func (imgf *ImageFrame) Layout(gtx layout.Context) layout.Dimensions

type Line

type Line interface {
	Layout(gtx layout.Context, peek Line) layout.Dimensions
	Matches(anchor string, re *regexp.Regexp) bool
}

type LinkEvent

type LinkEvent struct {
	Link string
}

type LinkLine

type LinkLine struct {
	parse.Token
	// contains filtered or unexported fields
}

func LinkLineInit

func LinkLineInit(tkn parse.Token, st *SuperTxtFrame, th *Theme) *LinkLine

func (*LinkLine) Layout

func (l *LinkLine) Layout(gtx layout.Context, peek Line) layout.Dimensions

func (*LinkLine) Matches

func (l *LinkLine) Matches(anchor string, re *regexp.Regexp) bool

type ParaLine

type ParaLine struct {
	parse.Token
	// contains filtered or unexported fields
}

func ParaLineInit

func ParaLineInit(tkn parse.Token, th *Theme) *ParaLine

func (*ParaLine) Layout

func (p *ParaLine) Layout(gtx layout.Context, peek Line) layout.Dimensions

func (*ParaLine) Matches

func (p *ParaLine) Matches(anchor string, re *regexp.Regexp) bool

type PointLine

type PointLine struct {
	parse.Token
	// contains filtered or unexported fields
}

func PointLineInit

func PointLineInit(tkn parse.Token, th *Theme, w *app.Window) *PointLine

func (*PointLine) Layout

func (p *PointLine) Layout(gtx layout.Context, peek Line) layout.Dimensions

func (*PointLine) Matches

func (p *PointLine) Matches(anchor string, re *regexp.Regexp) bool

type PreformattedLine

type PreformattedLine struct {
	parse.Token
	// contains filtered or unexported fields
}

func PreformattedLineInit

func PreformattedLineInit(tkn parse.Token, st *SuperTxtFrame, th *Theme, w *app.Window) *PreformattedLine

func (*PreformattedLine) Layout

func (p *PreformattedLine) Layout(gtx layout.Context, peek Line) layout.Dimensions

func (*PreformattedLine) Matches

func (p *PreformattedLine) Matches(anchor string, re *regexp.Regexp) bool

type QuoteLine

type QuoteLine struct {
	parse.Token
	// contains filtered or unexported fields
}

func QuoteLineInit

func QuoteLineInit(tkn parse.Token, th *Theme) *QuoteLine

func (*QuoteLine) Layout

func (q *QuoteLine) Layout(gtx layout.Context, peek Line) layout.Dimensions

func (*QuoteLine) Matches

func (q *QuoteLine) Matches(anchor string, re *regexp.Regexp) bool

type SuperTxtFrame

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

func NewSuperTxtFrame

func NewSuperTxtFrame(th *Theme, reader io.Reader, w *app.Window) *SuperTxtFrame

func (*SuperTxtFrame) Events

func (f *SuperTxtFrame) Events() []interface{}

func (*SuperTxtFrame) Find

func (f *SuperTxtFrame) Find(anchor string) error

func (*SuperTxtFrame) IsEmpty

func (f *SuperTxtFrame) IsEmpty() bool

func (*SuperTxtFrame) Layout

func (f *SuperTxtFrame) Layout(gtx layout.Context) layout.Dimensions

type Theme

type Theme struct {
	Sh           *text.Shaper
	ParaSz       unit.Sp
	HeadSz       unit.Sp
	QuotSz       unit.Sp
	SmallSz      unit.Sp
	BgColr       color.NRGBA
	ForeColr     color.NRGBA
	SelColr      color.NRGBA
	RaisedBgColr color.NRGBA
}

type TxtFrame

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

func NewTxtFrame

func NewTxtFrame(th *Theme, reader io.Reader, w *app.Window) *TxtFrame

func (*TxtFrame) Events

func (f *TxtFrame) Events() []interface{}

func (*TxtFrame) Find

func (f *TxtFrame) Find(anchor string) error

func (*TxtFrame) IsEmpty

func (f *TxtFrame) IsEmpty() bool

func (*TxtFrame) Layout

func (f *TxtFrame) Layout(gtx layout.Context) layout.Dimensions

type Viewer

type Viewer interface {
	Layout(gtx layout.Context) layout.Dimensions
	Events() []interface{}
	IsEmpty() bool
	Find(string) error
}

func NewViewerForReader

func NewViewerForReader(th *Theme, ext string, reader io.Reader, w *app.Window) Viewer

func NewViewerNoFallback

func NewViewerNoFallback(th *Theme, ext string, reader io.Reader, w *app.Window) Viewer

Jump to

Keyboard shortcuts

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