command

package
v0.0.0-...-b34c1d9 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateName

func GenerateName(args ...string) string

GenerateName generates a custom command name.

Types

type BindCallback

type BindCallback = func(*BindData)

type BindData

type BindData struct {
	CommandName string
	Element     element.Element
	Callback    BindCallback
	Event       Event
}

BindData is data which is passed to a bind callback when invoked.

type Callback

type Callback = func(*CommandData)

BindCallback is the callback that is specified for a binding.

type CommandData

type CommandData struct {
	CommandName string
	Element     element.Element
	Callback    Callback
}

CommandData is data which is passed to a command callback when invoked.

type Event

type Event struct {
	MouseButton int
	KeyCode     int
	ElementX    int
	ElementY    int
	Wheel       int
	Key         string
	ScreenX     int
	ScreenY     int
}

Event is the part of the callback data that contains information about any events that have taken place.

type Font

type Font struct {
	Name      string
	Size      string
	Modifiers []string
}

Font is the part of the callback data that contain information about dialog interaction.

type FontData

type FontData struct {
	CommandName string
	Element     element.Element
	Callback    FontDialogCallback
	Font        Font
}

FontData is data which is passed to a font dialog callback when invoked.

type FontDialogCallback

type FontDialogCallback = func(*FontData)

Jump to

Keyboard shortcuts

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