web

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package web provides a web browser.

Index

Constants

This section is empty.

Variables

View Source
var PageType = types.AddType(&types.Type{Name: "cogentcore.org/cogent/web.Page", IDName: "page", Doc: "Page represents one web browser page.", Embeds: []types.Field{{Name: "Frame"}}, Fields: []types.Field{{Name: "History", Doc: "The history of URLs that have been visited. The oldest page is first."}, {Name: "Context", Doc: "Context is the page's [htmlview.Context]."}}, Instance: &Page{}})

PageType is the types.Type for Page

Functions

This section is empty.

Types

type Page

type Page struct {
	core.Frame

	// The history of URLs that have been visited. The oldest page is first.
	History []string `set:"-"`

	// Context is the page's [htmlview.Context].
	Context *htmlview.Context `set:"-"`
}

Page represents one web browser page.

func NewPage

func NewPage(parent tree.Node, name ...string) *Page

NewPage adds a new Page with the given name to the given parent: Page represents one web browser page.

func (*Page) AppBar

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

AppBar is the default app bar for a Page

func (*Page) New

func (t *Page) New() tree.Node

New returns a new *Page value

func (*Page) NodeType

func (t *Page) NodeType() *types.Type

NodeType returns the *types.Type of Page

func (*Page) OnInit

func (pg *Page) OnInit()

func (*Page) OpenURL

func (pg *Page) OpenURL(url string)

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

func (*Page) SetTooltip

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

SetTooltip sets the [Page.Tooltip]

Directories

Path Synopsis
cmd
web

Jump to

Keyboard shortcuts

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