hsstate

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: 0 Imported by: 0

Documentation

Overview

Package hsstate contains structs that describe the state of the application. This allows us to save the state of the application to a file when exited, and then re-load the state when the application is opened again.

Index

Constants

View Source
const (
	ToolWindowTypeMPQExplorer     = ToolWindowType("MPQ Explorer")
	ToolWindowTypeProjectExplorer = ToolWindowType("Project Explorer")
	ToolWindowTypeConsole         = ToolWindowType("Console")
)

ToolWindows types

Variables

This section is empty.

Functions

This section is empty.

Types

type AppState

type AppState struct {
	ProjectPath   string            `json:"projectPath"`
	EditorWindows []EditorState     `json:"editorWindows"`
	ToolWindows   []ToolWindowState `json:"toolWindows"`
}

AppState holds information related to the running state of HellSpawner.

type EditorState

type EditorState struct {
	WindowState
	Path    []byte `json:"path"` // this gets exported as raw JSON to prevent an import loop
	Encoded []byte `json:"state"`
}

EditorState holds information about the state of an open editor

type ToolWindowState

type ToolWindowState struct {
	Type ToolWindowType `json:"type"`
	WindowState
}

ToolWindowState holds information about tool windows (e.g. MPQ Explorer)

type ToolWindowType

type ToolWindowType string

ToolWindowType represents type of tool window

type WindowState

type WindowState struct {
	Visible bool    `json:"visible"`
	PosX    float32 `json:"x"`
	PosY    float32 `json:"y"`
	Width   float32 `json:"w"`
	Height  float32 `json:"h"`
}

WindowState holds information about windows.

Jump to

Keyboard shortcuts

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