hseditor

package
v0.0.0-...-667d129 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package hseditor provides editors for the various file types. These generally take the form of a window which displays a single widget, as well as some context-sensitive menu for the main menu bar.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

type Editor struct {
	*hswindow.Window
	Path    *hscommon.PathEntry
	Project *hsproject.Project
}

Editor represents an editor

func New

func New(path *hscommon.PathEntry, x, y float32, project *hsproject.Project) *Editor

New creates a new editor

func (*Editor) Cleanup

func (e *Editor) Cleanup()

Cleanup cides an editor

func (*Editor) EncodeState

func (e *Editor) EncodeState() []byte

EncodeState returns widget's state (unique for each editor type) in byte slice format

func (*Editor) GetID

func (e *Editor) GetID() string

GetID returns editors ID

func (*Editor) GetWindowTitle

func (e *Editor) GetWindowTitle() string

GetWindowTitle returns window title

func (*Editor) HasChanges

func (e *Editor) HasChanges(editor Saveable) bool

HasChanges returns true if editor has changed data

func (*Editor) Save

func (e *Editor) Save(editor Saveable)

Save saves an editor

func (*Editor) State

func (e *Editor) State() hsstate.EditorState

State returns editors state

type Saveable

type Saveable interface {
	// GenerateSaveData is called by the underlying interface (namely hseditor.Editor) to retrieve the data
	// the editor wants written to the file.
	GenerateSaveData() []byte
}

Saveable denotes a struct that has data that can be saved to a file.

Directories

Path Synopsis
Package hsanimdataeditor contains D2 editor's data
Package hsanimdataeditor contains D2 editor's data
Package hscofeditor contains cof editor's data
Package hscofeditor contains cof editor's data
Package hsdc6editor represents a dc6 editor window
Package hsdc6editor represents a dc6 editor window
Package hsdcceditor contains dcc editor's data
Package hsdcceditor contains dcc editor's data
Package hsds1editor contains ds1 editor's data
Package hsds1editor contains ds1 editor's data
Package hsdt1editor contains dt1 editor's data
Package hsdt1editor contains dt1 editor's data
Package hsfonteditor contains font editor's data
Package hsfonteditor contains font editor's data
Package hsfonttableeditor represents fontTableEditor's window
Package hsfonttableeditor represents fontTableEditor's window
Package hspaletteeditor contains palette editor's data
Package hspaletteeditor contains palette editor's data
Package hspalettemapeditor contains palette map editor's data
Package hspalettemapeditor contains palette map editor's data
Package hssoundeditor represents a soundEditor's window
Package hssoundeditor represents a soundEditor's window
Package hsstringtableeditor contains string tables editor's data
Package hsstringtableeditor contains string tables editor's data
Package hstexteditor contains text editor's data
Package hstexteditor contains text editor's data

Jump to

Keyboard shortcuts

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