MCPcopy Create free account

hub / github.com/B33pBeeps/redthread / functions

Functions208 in github.com/B33pBeeps/redthread

↓ 58 callersMethodSetRune
SetRune writes just rune+fg+attr without allocation.
internal/app/render.go:77
↓ 31 callersFunctionruneLen
--- helpers ----------------------------------------------------------
internal/app/draw.go:507
↓ 29 callersMethodTouch
()
internal/app/storage.go:171
↓ 23 callersMethodWriteText
WriteText writes a single-line string cell-by-cell starting at (x, y), wrapping handled by the caller.
internal/app/render.go:194
↓ 22 callersMethodsetToast
setToast schedules a transient status message in the footer.
internal/app/model.go:794
↓ 14 callersMethodDimmed
(f float32)
internal/app/theme.go:64
↓ 12 callersMethodSelection
()
internal/app/notes.go:384
↓ 11 callersMethodSetTarget
(x, y int)
internal/app/wire.go:30
↓ 9 callersMethodStop
()
internal/app/wire.go:46
↓ 8 callersMethodnudgeSel
nudgeSel moves the selected note by SCREEN-cell deltas (converted to world) and triggers a directional overshoot bounce. This keeps nudges feeling lik
internal/app/model.go:936
↓ 7 callersMethodCorkOn
CorkOn reports whether the cork texture overlay should be drawn.
internal/app/notes.go:259
↓ 7 callersMethodInside
(x, y int)
internal/app/render.go:58
↓ 7 callersMethodOnCustom
()
internal/app/menu.go:193
↓ 7 callersMethodfindNote
--- helpers ----------------------------------------------------------
internal/app/model.go:1147
↓ 6 callersMethodBgColor
BgColor returns the solid fill color when one is set and parses; otherwise (nil, false) — meaning transparent (terminal shows through).
internal/app/notes.go:263
↓ 6 callersMethodMove
(delta int)
internal/app/menu.go:24
↓ 6 callersFunctionNewCanvas
(w, h int)
internal/app/render.go:42
↓ 6 callersMethodPinPos
PinPos — screen position of the pin (top-center) including bob.
internal/app/notes.go:150
↓ 6 callersMethodSerialize
--- serialize --------------------------------------------------------- Serialize walks the grid, coalescing adjacent cells that share style. Returns
internal/app/render.go:98
↓ 6 callersMethodSetBlank
SetBlank clears a cell back to transparent (erases cork stars etc).
internal/app/render.go:86
↓ 6 callersFunctionWorldX
WorldX / WorldY convert a screen cell coordinate to the equivalent world coordinate given the zoom scale.
internal/app/notes.go:64
↓ 6 callersFunctiondrawFooter
drawFooter writes a bottom status bar.
internal/app/draw.go:490
↓ 5 callersMethodFindNote
(id string)
internal/app/notes.go:486
↓ 5 callersMethodInvolvesNote
(id string)
internal/app/notes.go:185
↓ 5 callersMethodSelected
()
internal/app/menu.go:34
↓ 5 callersMethodSelected
Selected returns the Background described by the working state.
internal/app/menu.go:254
↓ 5 callersMethodSplit
Split returns the live (title, body) from the textarea content. First non-empty line is the title; the rest (skipping one separator blank) is the body
internal/app/edit.go:80
↓ 5 callersFunctionWorldY
(screenY, zoom int)
internal/app/notes.go:72
↓ 5 callersMethodrefreshActive
refreshActive points m.board at the workspace's current active board and regenerates per-board state (stars + global highlight color).
internal/app/model.go:145
↓ 4 callersMethodActiveBoard
ActiveBoard returns the currently-focused board, never nil while the workspace has at least one board.
internal/app/notes.go:276
↓ 4 callersMethodDim
Dim applies a multiplier to every cell's foreground color, preserving transparency on bare cells. Used for blurring the backdrop during edit.
internal/app/render.go:231
↓ 4 callersFunctionDimsFor
DimsFor returns rendered note size at a zoom level.
internal/app/notes.go:49
↓ 4 callersFunctionGenStarsForBoard
GenStarsForBoard returns a cork-texture stable across resizes-of-equal-size AND distinct per `grainSeed`. Row 0 is reserved for the tab bar — no stars
internal/app/notes.go:593
↓ 4 callersFunctionGetTint
(name string)
internal/app/theme.go:270
↓ 4 callersFunctionModeAttr
ModeAttr returns attribute bits to OR into cell renders. Unicode-math modes provide no ANSI attributes of their own (the visual "boldness" comes from
internal/app/theme.go:374
↓ 4 callersFunctionNewBackgroundMenu
(current Background)
internal/app/menu.go:164
↓ 4 callersFunctionParseHexColor
ParseHexColor parses "#rrggbb" or "rrggbb" (case-insensitive) into an RGB. Returns ok=false for any malformed input.
internal/app/theme.go:30
↓ 4 callersFunctionSaveWorkspace
SaveWorkspace writes the workspace as a v4 file (workspace envelope).
internal/app/storage.go:132
↓ 4 callersFunctionScreenX
ScreenX / ScreenY convert a world cell to screen (no bob applied).
internal/app/notes.go:75
↓ 4 callersFunctionStyleText
StyleText maps ASCII letters/digits to the mode's Unicode variant.
internal/app/theme.go:377
↓ 4 callersFunctionTargetRect
TargetRect returns the centered edit-card rect for a given canvas size.
internal/app/anim.go:23
↓ 4 callersMethodToggleCork
ToggleCork flips the cork overlay (used by left/right/space on the cork row).
internal/app/menu.go:225
↓ 4 callersFunctiondrawNote
drawNote renders a Note at the board's zoom level.
internal/app/draw.go:100
↓ 4 callersFunctiondrawShadow
drawShadow wraps shadowRect for a Note at board zoom.
internal/app/draw.go:56
↓ 4 callersFunctiondrawStringSet
drawStringSet is the shared inner loop. It draws strings whose effective in-front layer matches `inFront`. If `attachToTopID` is set, any string touch
internal/app/wire.go:116
↓ 4 callersMethodeffectiveStars
effectiveStars returns the cork texture only when cork mode is active; otherwise nil, so drawCork draws nothing (transparent / solid bg).
internal/app/model.go:1161
↓ 4 callersFunctiongenID
()
internal/app/notes.go:568
↓ 4 callersFunctionlerpI
(a, b int, t float32)
internal/app/anim.go:116
↓ 4 callersFunctionroundToward
(f float32)
internal/app/notes.go:120
↓ 4 callersFunctionseedWorkspace
seedWorkspace returns a workspace with one seeded "main" board and the default look (cork on, transparent fill).
internal/app/notes.go:655
↓ 4 callersMethodstartBoardAnim
startBoardAnim captures the current board + its stars as the "from" frame of a board-switch crossfade. Call it BEFORE mutating the workspace's active
internal/app/model.go:132
↓ 4 callersFunctionutf8Decode
utf8Decode is a thin wrapper. Kept separate so future width-aware logic (e.g. CJK double-width) can slot in here.
internal/app/render.go:317
↓ 4 callersFunctionvertBorderChar
--- borders --------------------------------------------------------- vertBorderChar picks the character used for a vertical border cell at row-offset
internal/app/draw.go:86
↓ 4 callersFunctionzoomScale
zoomScale returns the render-time scale factor applied to BOTH the note dimensions AND the note positions. This is "workspace zoom": at zoom -3 the wh
internal/app/notes.go:27
↓ 3 callersMethodApplyGlobalBorder
ApplyGlobalBorder syncs the package-level SelBorder with this board's HighlightColor. Call on load and whenever HighlightColor changes.
internal/app/notes.go:376
↓ 3 callersMethodConnect
(fromID, toID string)
internal/app/notes.go:495
↓ 3 callersMethodFlush
()
internal/app/storage.go:182
↓ 3 callersMethodGet
(x, y int)
internal/app/render.go:62
↓ 3 callersMethodHitTopmost
(cx, cy int)
internal/app/notes.go:419
↓ 3 callersFunctionLerp
Lerp blends two colors linearly (0 → a, 1 → b).
internal/app/theme.go:80
↓ 3 callersFunctionLoadWorkspace
LoadWorkspace reads notes.json, migrating older schemas on the way in. Returns (nil, nil) when the file simply doesn't exist yet.
internal/app/storage.go:64
↓ 3 callersMethodName
()
internal/app/theme.go:348
↓ 3 callersMethodOnCork
OnCork / OnCustom report which special row the cursor is on.
internal/app/menu.go:192
↓ 3 callersMethodSample
()
internal/app/theme.go:369
↓ 3 callersMethodScreenRect
ScreenRect — drawing rect (no bob, stable for shadow/hit-test).
internal/app/notes.go:138
↓ 3 callersFunctionScreenY
(worldY, zoom int)
internal/app/notes.go:79
↓ 3 callersFunctionSpliceOverlay
SpliceOverlay splices `overlay` onto `bg` at visual cell position (x, y). Both strings are newline-separated; ANSI CSI escapes are preserved. Style st
internal/app/render.go:366
↓ 3 callersFunctionabsF
(x float32)
internal/app/wire.go:247
↓ 3 callersFunctiondrawBoardSnapshot
drawBoardSnapshot renders one full board's content (cork + strings + notes) at full brightness. Apply Dim() afterwards if you want a fade. Used by bot
internal/app/model.go:1251
↓ 3 callersFunctiondrawCork
drawCork paints scattered brown ASCII chars across the canvas.
internal/app/draw.go:14
↓ 3 callersFunctiondrawCurve
drawCurve is the low-level renderer. If `tight`, straight line. Else, parabolic sag. Chars chosen with terminal aspect (~2:1) correction so diagonals
internal/app/wire.go:165
↓ 3 callersFunctiondrawStringsBehind
drawStringsBehind renders only the strings with InFront=false. Called BEFORE notes are drawn so they sit beneath. If `attachToTopID` is non-empty, str
internal/app/wire.go:67
↓ 3 callersFunctiondrawStringsInFront
drawStringsInFront renders strings with InFront=true plus any string touching the active "attachToTopID" note (dragged or transitioning), plus the in-
internal/app/wire.go:74
↓ 3 callersFunctioneaseInOutCubic
(t float32)
internal/app/anim.go:108
↓ 3 callersFunctionhexNibble
(b byte)
internal/app/theme.go:48
↓ 3 callersFunctionintToStr
(n int)
internal/app/notes.go:355
↓ 3 callersMethodnormalizeLegacy
()
internal/app/notes.go:174
↓ 3 callersFunctiontickCmd
()
internal/app/model.go:42
↓ 2 callersFunctionBackgroundMenuRect
(w, h int)
internal/app/menu.go:277
↓ 2 callersMethodBlankRect
BlankRect clears a rectangle back to transparent.
internal/app/render.go:180
↓ 2 callersMethodBlitAt
BlitAt copies every cell from `src` into this canvas at offset (dx, dy). Cells that fall outside this canvas are clipped. Source-empty cells (Rune ==
internal/app/render.go:213
↓ 2 callersMethodConnectToWall
ConnectToWall creates a string from a note to a WORLD-coord wall-pin. The caller is responsible for converting a mouse click (screen) to world before
internal/app/notes.go:517
↓ 2 callersMethodCycle
(direction int)
internal/app/notes.go:398
↓ 2 callersMethodCycleActive
CycleActive moves the active index by `delta`, wrapping around.
internal/app/notes.go:316
↓ 2 callersFunctionDataPath
()
internal/app/storage.go:35
↓ 2 callersMethodEffectiveX
EffectiveX: SCREEN X = world→screen projection + bob.
internal/app/notes.go:128
↓ 2 callersMethodEffectiveY
EffectiveY: SCREEN Y = world→screen projection + bob.
internal/app/notes.go:133
↓ 2 callersFunctionFontMenuRect
--- rendering --------------------------------------------------------
internal/app/menu.go:38
↓ 2 callersMethodHexBackspace
()
internal/app/menu.go:245
↓ 2 callersMethodHexInput
HexInput appends valid hex characters to the custom buffer (single leading '#'), capping at "#rrggbb", and live-previews the result.
internal/app/menu.go:229
↓ 2 callersMethodMoveActive
MoveActive shifts the active board by `delta` positions in the workspace order (negative = move left, positive = move right). Wraps around. The active
internal/app/notes.go:293
↓ 2 callersFunctionNewTransitionIn
(n *Note, zoom int)
internal/app/anim.go:61
↓ 2 callersMethodRaise
(i int)
internal/app/notes.go:428
↓ 2 callersFunctionRectFromNote
RectFromNote builds the source rect for a note at the board's zoom (SCREEN coords, no bob — transitions should start from the stable resting position,
internal/app/anim.go:57
↓ 2 callersFunctionScreenDeltaToWorld
ScreenDeltaToWorld converts a 1-cell screen delta into a world delta, ensuring a non-zero input always moves at least 1 world cell.
internal/app/notes.go:83
↓ 2 callersMethodTick
()
internal/app/wire.go:35
↓ 2 callersMethodUpdate
--- Update ------------------------------------------------------------
internal/app/model.go:163
↓ 2 callersMethodView
--- View -------------------------------------------------------------
internal/app/model.go:1170
↓ 2 callersFunctionabs
(x int)
internal/app/model.go:965
↓ 2 callersMethodcopyNoteText
copyNoteText writes the title (if any) and body to the system clipboard, joined with a blank line. Updates the toast in place of error logs.
internal/app/model.go:1013
next →1–100 of 208, ranked by callers