Documentation
¶
Overview ¶
Package help is vigo's contextual-help slot. Every view carries a HelpCtx; pressing F1 should open the topic registered for the focused view's context. v0.2 ships only the wiring and an About dialog; the real topic browser arrives in v0.7.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "v0.2.0"
Version is the human-readable build label shown in the About dialog. Hosts override it from main if they want a richer string (commit hash, build date, etc.).
Functions ¶
Types ¶
type HelpCtx ¶
type HelpCtx uint16
HelpCtx identifies a help topic. Zero (CtxNone) means the view has no specific topic; F1 then falls back to the About dialog.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps HelpCtx values to topics. The zero value is ready to use; pass it around by pointer so writes are visible everywhere.
func Default ¶
func Default() *Registry
Default returns a registry seeded with the About topic. Hosts use it as a starting point and Register additional contexts on top.
func (*Registry) Lookup ¶
Lookup returns the topic registered for ctx and whether one was found. Callers should fall back to CtxAbout when ok is false.