demo

package
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MPL-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NewMenuID = unison.UserBaseID + iota
	NewWindowActionID
	NewTableWindowActionID
	NewDockWindowActionID
	NewMarkdownWindowActionID
	NewSVGWindowActionID
	ShowColorsWindowActionID
	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
	// NewMarkdownWindowAction opens a new demo markdown window when triggered.
	NewMarkdownWindowAction *unison.Action
	// NewSVGWindowAction opens a new demo SVG window when triggered.
	NewSVGWindowAction *unison.Action
	// ShowColorsWindowAction opens a demo colors window when triggered.
	ShowColorsWindowAction *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 MountainsImage

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

MountainsImage returns an image of some mountains.

func NewDemoColorsWindow added in v0.69.0

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

NewDemoColorsWindow creates and displays our demo colors window.

func NewDemoDockWindow added in v0.3.0

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

NewDemoDockWindow creates and displays our demo dock window.

func NewDemoMarkdownWindow added in v0.69.0

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

NewDemoMarkdownWindow creates and displays our demo markdown window.

func NewDemoSVGWindow added in v0.73.0

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

NewDemoSVGWindow creates and displays our demo SVG 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 {
	Text string
	Tip  string
	unison.Panel
	Color unison.Color
}

DockablePanel provides a sample dockable panel.

func NewDockablePanel added in v0.3.0

func NewDockablePanel(title, tip string, background unison.Color) *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