MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / model

Struct model

internal/app/model.go:46–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46type model struct {
47 w, h int
48 now time.Time
49 mode Mode
50
51 workspace *Workspace
52 board *Board // always points to workspace.ActiveBoard()
53 stars []Star
54 saver *Saver
55
56 grabID string
57 grabDx, grabDy int
58 grabStartX, grabStartY int // world-coords at press, used to detect click vs drag
59
60 pull PullState
61 hoverStr int
62
63 transition *Transition
64
65 editor Editor
66
67 lastClickT time.Time
68 lastClickN string
69
70 // help panel: slides up from the bottom when toggled with `?`.
71 // helpTarget is 0 (closed) or 1 (open); helpAnim eases toward target.
72 helpAnim float32
73 helpTarget float32
74
75 // Board-switch crossfade. While boardAnimFrom != nil, the previous
76 // board's content fades out (with its own cork grain), then the new
77 // active board fades in. Driven by tick.
78 boardAnim float32
79 boardAnimFrom *Board
80 boardAnimOldStars []Star
81 boardAnimDir int
82
83 fontMenu *FontMenu
84 bgMenu *BackgroundMenu
85
86 // rename mode: when true, keystrokes edit renameBuffer until enter/esc.
87 renaming bool
88 renameBuffer string
89
90 // transient status message shown in the footer
91 toast string
92 toastUntil time.Time
93
94 // "press D again" arm window for board deletion
95 deleteArmedUntil time.Time
96
97 mouseX, mouseY int
98
99 // Single-step undo for the most recent destructive action. Currently
100 // records note deletes (the note + its touching strings + which board
101 // it lived on). Cleared after a successful undo or when overwritten
102 // by another delete.
103 undoSnap *deleteSnapshot

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected