Documentation
¶
Overview ¶
Package evalview is Data > Evaluate formula, after Excel's Evaluate Formula: a box over the grid showing the active cell's formula with the part computed next underlined and its value below. Enter puts the value in its place and underlines the next part, until the formula's value is left; → steps into a reference to another formula, ← and Esc step back out. The engine does the evaluating (sheet.Steps); the view draws it. It knows the UI only through Host.
Index ¶
Constants ¶
const ID = "evaluate"
ID identifies the view's box in mouse events.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host interface {
Theme() *theme.Theme
Size() (width, height int)
// Close closes the open overlay.
Close()
// Locale writes formulas as the user types them.
Locale() *locale.Locale
}
Host is what the view needs of the UI.
type View ¶
type View struct {
// contains filtered or unexported fields
}
View is the open Evaluate formula box.
func (*View) Key ¶
func (v *View) Key(k tea.KeyPressMsg) tea.Cmd
Key: Enter computes the next part (at the end, restarts, or steps out of a formula stepped into), → steps in, ← steps out, Esc steps out or closes.
func (*View) Layout ¶
Layout is the box: the formula, wrapped, then the next part and its value, under the menu bar and centered.