Documentation ¶
Overview ¶
Package dumpfile implements encoding and decoding of Edwood dump file.
A dump file stores the state of Edwood so that it can be restored when Edwood is restarted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { Position float64 // Position within the row (in percentage) Tag Text // Tag above the column (usually "New ... Delcol") }
Column stores the state of a column in Edwood.
type Content ¶
type Content struct { CurrentDir string // Edwood's current working directory VarFont string // Variable width font FixedFont string // Fixed width font RowTag Text // Top-most tag (usually "Newcol ... Exit") Columns []Column // List of columns Windows []*Window // List of windows across all columns }
Content stores the state of Edwood.
func LoadLegacy ¶
TODO(rjk): split this apart into smaller functions and files.
type Text ¶
type Text struct { Buffer string `json:",omitempty"` // UTF-8 encoded text Q0 int // Selection starts at this rune position Q1 int // Selection ends before this rune position }
Text is a UTF-8 encoded text with a substring selected using rune-indexing (instead of byte-indexing).
type Window ¶
type Window struct { Type WindowType // Type of window Column int // Column index where the window will be placed Position float64 // Position within the column (in percentage) Font string `json:",omitempty"` // Font name or path Tag Text // Tag above this window (usually "/path/to/file Del ...") // Text buffer and selection of body. // Body.Buffer is empty if Type == Unsaved. Body Text // Used for Type == Exec ExecDir string `json:",omitempty"` // Execute command in this directory ExecCommand string `json:",omitempty"` // Command to execute }
Window stores the state of a window in Edwood.
type WindowType ¶
type WindowType int
WindowType defines the type of window.
const ( Saved WindowType = iota // Saved is a File and directory stored on disk Unsaved // Unsaved contains buffer that's not stored on disk Zerox // Zerox is a copy of a Saved or Unsaved window Exec // Exec is a window controlled by an outside process )
Click to show internal directories.
Click to hide internal directories.