demo

package
v0.33.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MPL-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NewMenuID = unison.UserBaseID + iota
	NewWindowActionID
	NewTableWindowActionID
	NewDockWindowActionID
	OpenActionID
)

IDs for the actions

Variables

View Source
var (
	// NewWindowAction opens a new demo window when triggered.
	NewWindowAction *unison.Action
	// NewTableWindowAction opens a new demo table window when triggered.
	NewTableWindowAction *unison.Action
	// NewDockWindowAction opens a new demo dock window when triggered.
	NewDockWindowAction *unison.Action
	// OpenAction presents a file open dialog and then prints any selected files onto the console.
	OpenAction *unison.Action
)

Functions

func ClassicAppleLogoImage

func ClassicAppleLogoImage() (*unison.Image, error)

ClassicAppleLogoImage returns an image of the classic rainbow-colored Apple logo.

func HomeImage

func HomeImage() (*unison.Image, error)

HomeImage returns a stylized image of a home, suitable for an icon.

func MountainsImage

func MountainsImage() (*unison.Image, error)

MountainsImage returns an image of some mountains.

func NewDemoDockWindow added in v0.3.0

func NewDemoDockWindow(where unison.Point) (*unison.Window, error)

NewDemoDockWindow creates and displays our demo dock window.

func NewDemoTableWindow added in v0.3.0

func NewDemoTableWindow(where unison.Point) (*unison.Window, error)

NewDemoTableWindow creates and displays our demo table window.

func NewDemoWindow

func NewDemoWindow(where unison.Point) (*unison.Window, error)

NewDemoWindow creates and displays our demo window.

func ShowAboutWindow

func ShowAboutWindow(item unison.MenuItem)

ShowAboutWindow displays the about window, creating it if necessary.

Types

type DockablePanel added in v0.3.0

type DockablePanel struct {
	unison.Panel
	Text  string
	Tip   string
	Color unison.Ink
}

DockablePanel provides a sample dockable panel.

func NewDockablePanel added in v0.3.0

func NewDockablePanel(title, tip string, background unison.Ink) *DockablePanel

NewDockablePanel creates a new sample dockable panel.

func (*DockablePanel) AttemptClose added in v0.3.0

func (d *DockablePanel) AttemptClose() bool

AttemptClose implements TabCloser.

func (*DockablePanel) MayAttemptClose added in v0.3.0

func (d *DockablePanel) MayAttemptClose() bool

MayAttemptClose implements TabCloser.

func (*DockablePanel) Modified added in v0.3.0

func (d *DockablePanel) Modified() bool

Modified implements Dockable.

func (*DockablePanel) Title added in v0.3.0

func (d *DockablePanel) Title() string

Title implements Dockable.

func (*DockablePanel) TitleIcon added in v0.3.0

func (d *DockablePanel) TitleIcon(suggestedSize unison.Size) unison.Drawable

TitleIcon implements Dockable.

func (*DockablePanel) Tooltip added in v0.3.0

func (d *DockablePanel) Tooltip() string

Tooltip implements Dockable.

Jump to

Keyboard shortcuts

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