glide

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package glide provides a web browser

Index

Constants

View Source
const (
	// Version is the version of this package being used
	Version = "v0.0.12"
	// GitCommit is the commit just before the latest version commit
	GitCommit = "6bc1a67"
	// VersionDate is the date-time of the latest version commit in UTC (in the format 'YYYY-MM-DD HH:MM', which is the Go format '2006-01-02 15:04')
	VersionDate = "2023-12-26 23:38"
)

Variables

View Source
var PageType = gti.AddType(&gti.Type{
	Name:       "goki.dev/glide/glide.Page",
	ShortName:  "glide.Page",
	IDName:     "page",
	Doc:        "Page represents one web browser page",
	Directives: gti.Directives{},
	Fields:     ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}),
	Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{
		{"Frame", &gti.Field{Name: "Frame", Type: "goki.dev/gi/v2/gi.Frame", LocalType: "gi.Frame", Doc: "", Directives: gti.Directives{}, Tag: ""}},
	}),
	Methods:  ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{}),
	Instance: &Page{},
})

PageType is the gti.Type for Page

Functions

This section is empty.

Types

type Context added in v0.0.2

type Context struct {
	gidom.ContextBase
	// Page is the page associated with the context
	Page *Page
}

Context implements gidom.Context

func (*Context) OpenURL added in v0.0.2

func (c *Context) OpenURL(url string)

func (*Context) PageURL added in v0.0.2

func (c *Context) PageURL() string

type Page

type Page struct {
	gi.Frame

	// The history of URLs that have been visited. The oldest page is first.
	History []string

	// PageURL is the current page URL
	PageURL string
}

Page represents one web browser page

func NewPage

func NewPage(par ki.Ki, name ...string) *Page

NewPage adds a new Page with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.

func (*Page) AppBar added in v0.0.5

func (pg *Page) AppBar(tb *gi.Toolbar)

AppBar is the default app bar for a Page

func (*Page) Context added in v0.0.2

func (pg *Page) Context() *Context

Context returns the Context for the page.

func (*Page) KiType

func (t *Page) KiType() *gti.Type

KiType returns the *gti.Type of Page

func (*Page) New

func (t *Page) New() ki.Ki

New returns a new *Page value

func (*Page) OnInit

func (pg *Page) OnInit()

func (*Page) OpenURL

func (pg *Page) OpenURL(url string) error

OpenURL sets the content of the page from the given url.

func (*Page) SetClass

func (t *Page) SetClass(v string) *Page

SetClass sets the [Page.Class]

func (*Page) SetCustomContextMenu

func (t *Page) SetCustomContextMenu(v func(m *gi.Scene)) *Page

SetCustomContextMenu sets the [Page.CustomContextMenu]

func (*Page) SetStackTop

func (t *Page) SetStackTop(v int) *Page

SetStackTop sets the [Page.StackTop]

func (*Page) SetStripes

func (t *Page) SetStripes(v gi.Stripes) *Page

SetStripes sets the [Page.Stripes]

func (*Page) SetTooltip

func (t *Page) SetTooltip(v string) *Page

SetTooltip sets the [Page.Tooltip]

Jump to

Keyboard shortcuts

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