driver

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package driver defines interfaces to be implemented by GUI drivers as used by package impress.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Init()
	Done()
	Title(title string)
	Size(rect image.Rectangle)
	NewFrame(rect image.Rectangle) Framer
	NewFont(height int, attributes map[string]string) Fonter
	NewImage(img image.Image) Imager
	NewMenu(label string) Menuer
	ClipboardGet(typeID int)
	ClipboardPut(clipboard.Clipboarder)
	Chan() <-chan event.Eventer
	Sync()
}

Driver is a internal interface to a application level functions

type Fonter

type Fonter interface {
	LineHeight() int
	Baseline() int
	Ascent() int
	Descent() int
	Close()
	Split(text string, edge int, indent int) []string
	Size(text string) image.Point
}

Fonter is a internal interface to a font functions

type Framer added in v0.2.4

type Framer interface {
	Drop()
	Size(rect image.Rectangle)
	Raise()
	NewFrame(rect image.Rectangle) Framer
	NewWindow(rect image.Rectangle, background color.Color) Painter
}

Framer is a internal interface to a layout window

type Imager

type Imager interface {
	Size() image.Point
	Close()
}

Imager is a internal interface to a image functions

type Menuer interface {
	NewMenu(label string) Menuer
	NewItem(label string, action string)
}

Menuer is a internal interface to a menu node functions

type Painter

type Painter interface {
	Drop()
	Size(rect image.Rectangle)
	Raise()
	Clear()
	Show()
	Fill(rect image.Rectangle, foreground color.Color)
	Line(from image.Point, to image.Point, foreground color.Color)
	Image(rect image.Rectangle, img Imager)
	Text(text string, font Fonter, from image.Point, foreground color.Color)
}

Painter is a internal interface to a window functions

Jump to

Keyboard shortcuts

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