demo

package
v0.0.0-...-6ff2563 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

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

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

NewDemoDockWindow creates and displays our demo dock window.

func NewDemoTableWindow

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

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

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

DockablePanel provides a sample dockable panel.

func NewDockablePanel

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

NewDockablePanel creates a new sample dockable panel.

func (*DockablePanel) AttemptClose

func (d *DockablePanel) AttemptClose() bool

AttemptClose implements TabCloser.

func (*DockablePanel) MayAttemptClose

func (d *DockablePanel) MayAttemptClose() bool

MayAttemptClose implements TabCloser.

func (*DockablePanel) Modified

func (d *DockablePanel) Modified() bool

Modified implements Dockable.

func (*DockablePanel) Title

func (d *DockablePanel) Title() string

Title implements Dockable.

func (*DockablePanel) TitleIcon

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

TitleIcon implements Dockable.

func (*DockablePanel) Tooltip

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