command

package
v0.0.0-...-d6d939f Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Overview

˅

˅

˅

˅

˅

˅

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMain

type AppMain struct {
	// contains filtered or unexported fields
}

func NewAppMain

func NewAppMain() *AppMain

type Command

type Command interface {
	Execute()
}

type HistoryCommand

type HistoryCommand struct {
	// contains filtered or unexported fields
}

Holder of the past commands

func NewHistoryCommand

func NewHistoryCommand() *HistoryCommand

func (*HistoryCommand) Add

func (h *HistoryCommand) Add(cmd Command)

func (*HistoryCommand) Clear

func (h *HistoryCommand) Clear()

Delete all past commands.

func (*HistoryCommand) Execute

func (h *HistoryCommand) Execute()

Execute all past commands

func (*HistoryCommand) Undo

func (h *HistoryCommand) Undo()

Delete the last command

type PaintingCanvas

type PaintingCanvas struct {
	// contains filtered or unexported fields
}

func NewPaintingCanvas

func NewPaintingCanvas(window *walk.MainWindow) *PaintingCanvas

func (*PaintingCanvas) Clear

func (p *PaintingCanvas) Clear()

func (*PaintingCanvas) Paint

func (p *PaintingCanvas) Paint(x int, y int)

type PaintingCommand

type PaintingCommand struct {
	// contains filtered or unexported fields
}

Command to paint a single point

func NewPaintingCommand

func NewPaintingCommand(paintingTarget PaintingTarget, paintingPosX int, paintingPosY int) *PaintingCommand

func (*PaintingCommand) Execute

func (p *PaintingCommand) Execute()

type PaintingTarget

type PaintingTarget interface {
	Paint(x int, y int)

	Clear()
}

Jump to

Keyboard shortcuts

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