undoable

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package undoable contains edit extensions that provide an undo-mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AugmentedTextService

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

AugmentedTextService provides read/write functionality with undo capability.

func NewAugmentedTextService

func NewAugmentedTextService(wrapped edit.AugmentedTextService, commander cmd.Commander) AugmentedTextService

NewAugmentedTextService returns a new instance of a service.

func (AugmentedTextService) RequestClear

func (service AugmentedTextService) RequestClear(key resource.Key, restoreFunc func())

RequestClear queues the change to set both the text and the sound empty.

func (AugmentedTextService) RequestRemove

func (service AugmentedTextService) RequestRemove(key resource.Key, restoreFunc func())

RequestRemove queues the change to remove both the text and the sound from the storage.

func (AugmentedTextService) RequestSetSound

func (service AugmentedTextService) RequestSetSound(key resource.Key, sound audio.L8, restoreFunc func())

RequestSetSound queues the change to update the sound.

func (AugmentedTextService) RequestSetText

func (service AugmentedTextService) RequestSetText(key resource.Key, value string, restoreFunc func())

RequestSetText queues the change to update the text.

func (AugmentedTextService) Sound

func (service AugmentedTextService) Sound(key resource.Key) audio.L8

Sound returns the audio value of the identified text resource. In case the text resource has no audio, an empty sound will be returned.

func (AugmentedTextService) Text

func (service AugmentedTextService) Text(key resource.Key) string

Text returns the textual value of the identified text resource.

func (AugmentedTextService) WithAudio

func (service AugmentedTextService) WithAudio(key resource.Key) bool

WithAudio returns true if the identified resource is one with an audio component.

type MovieService

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

MovieService provides read/write functionality with undo capability.

func NewMovieService

func NewMovieService(wrapped edit.MovieService, commander cmd.Commander) MovieService

NewMovieService returns a new instance of a service.

func (MovieService) Audio

func (service MovieService) Audio(key resource.Key) audio.L8

Audio returns the audio component of identified movie.

func (MovieService) RequestAddScene

func (service MovieService) RequestAddScene(key resource.Key, scene movie.HighResScene, restoreFunc func())

RequestAddScene queues to add the given scene at the end of the movie.

func (MovieService) RequestMoveSceneEarlier

func (service MovieService) RequestMoveSceneEarlier(key resource.Key, scene int, restoreFunc func())

RequestMoveSceneEarlier queues to move the identified scene earlier.

func (MovieService) RequestMoveSceneLater

func (service MovieService) RequestMoveSceneLater(key resource.Key, scene int, restoreFunc func())

RequestMoveSceneLater queues to move the identified scene later.

func (MovieService) RequestRemoveScene

func (service MovieService) RequestRemoveScene(key resource.Key, scene int, restoreFunc func())

RequestRemoveScene queues to remove the identified scene.

func (MovieService) RequestSetAudio

func (service MovieService) RequestSetAudio(key resource.Key, soundData audio.L8, restoreFunc func())

RequestSetAudio queues the change to update the audio track.

func (MovieService) RequestSetSceneFramesDisplayTime

func (service MovieService) RequestSetSceneFramesDisplayTime(key resource.Key,
	scene int, displayTime time.Duration, restoreFunc func())

RequestSetSceneFramesDisplayTime requests to set the display time for each frame.

func (MovieService) RequestSetSubtitles

func (service MovieService) RequestSetSubtitles(key resource.Key,
	language resource.Language, subtitles movie.SubtitleList, restoreFunc func())

RequestSetSubtitles queues the change to update subtitles.

func (MovieService) SizeWarning

func (service MovieService) SizeWarning(key resource.Key) bool

SizeWarning returns true if the given movie is larger than the underlying archive would support.

func (MovieService) Subtitles

func (service MovieService) Subtitles(key resource.Key, language resource.Language) movie.SubtitleList

Subtitles returns the subtitles associated with the given key.

func (MovieService) Video

func (service MovieService) Video(key resource.Key) []movie.Scene

Video returns the video component of identified movie.

type SoundEffectService

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

SoundEffectService provides read/write functionality with undo capability.

func NewSoundEffectService

func NewSoundEffectService(wrapped edit.SoundEffectService, commander cmd.Commander) SoundEffectService

NewSoundEffectService returns a new instance of a service.

func (SoundEffectService) Audio

func (service SoundEffectService) Audio(key resource.Key) audio.L8

Audio returns the audio component of identified sound effect.

func (SoundEffectService) Modified

func (service SoundEffectService) Modified(key resource.Key) bool

Modified returns true if the identified sound resource is marked as modified.

func (SoundEffectService) RequestClear

func (service SoundEffectService) RequestClear(key resource.Key, restoreFunc func())

RequestClear queues to reset the identified audio resource to a silent one-sample audio.

func (SoundEffectService) RequestRemove

func (service SoundEffectService) RequestRemove(key resource.Key, restoreFunc func())

RequestRemove queues to erase the sound from the resources.

func (SoundEffectService) RequestSetAudio

func (service SoundEffectService) RequestSetAudio(key resource.Key, data audio.L8, restoreFunc func())

RequestSetAudio queues the change to update the audio.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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