viewer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 37 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

func (*CSVFrame) Title added in v0.2.0

func (f *CSVFrame) Title() string

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

func (*DotFrame) Title added in v0.2.0

func (df *DotFrame) Title() string

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

func (*ImageFrame) Title added in v0.2.0

func (imgf *ImageFrame) Title() string

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

func (*SuperTxtFrame) Title added in v0.2.0

func (f *SuperTxtFrame) Title() string

type SvgBobFrame added in v0.2.0

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

func NewSvgBobFrame added in v0.2.0

func NewSvgBobFrame(th *Theme, reader io.Reader, w *app.Window) *SvgBobFrame

func (*SvgBobFrame) Events added in v0.2.0

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

func (*SvgBobFrame) Find added in v0.2.0

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

func (*SvgBobFrame) IsEmpty added in v0.2.0

func (df *SvgBobFrame) IsEmpty() bool

func (*SvgBobFrame) Layout added in v0.2.0

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

func (*SvgBobFrame) Title added in v0.2.0

func (df *SvgBobFrame) Title() string

type SvgFrame added in v0.2.0

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

func NewSvgFrame added in v0.2.0

func NewSvgFrame(th *Theme, reader io.Reader, w *app.Window) *SvgFrame

func (*SvgFrame) Events added in v0.2.0

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

func (*SvgFrame) Find added in v0.2.0

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

func (*SvgFrame) IsEmpty added in v0.2.0

func (df *SvgFrame) IsEmpty() bool

func (*SvgFrame) Layout added in v0.2.0

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

func (*SvgFrame) Title added in v0.2.0

func (df *SvgFrame) Title() string

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

func (*TxtFrame) Title added in v0.2.0

func (f *TxtFrame) Title() string

type Viewer

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

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