MCPcopy Create free account

hub / github.com/B33pBeeps/redthread / functions

Functions208 in github.com/B33pBeeps/redthread

↓ 2 callersMethodcount
()
internal/app/menu.go:189
↓ 2 callersMethodcycleHoverStr
(delta int)
internal/app/model.go:885
↓ 2 callersFunctiondrawFontMenuAt
(c *Canvas, x, y int, menu *FontMenu)
internal/app/menu.go:70
↓ 2 callersFunctiondrawNoteInternal
(c *Canvas, rect Rect, n *Note, selected bool, textMode TextStyleMode, borderOverride *RGB)
internal/app/draw.go:265
↓ 2 callersFunctiondrawTapeStrip
drawTapeStrip — simplified: tape crease pattern + a single red pin.
internal/app/draw.go:450
↓ 2 callersFunctioneditBodyHeight
(rect Rect)
internal/app/edit.go:57
↓ 2 callersFunctioneditBodyWidth
(rect Rect)
internal/app/edit.go:49
↓ 2 callersFunctionevalCurve
evalCurve returns (x,y) at parametric t for a linear interp between (fx,fy) and (fx+dx,fy+dy) plus a downward sag = 4*sagAmt*t*(1-t).
internal/app/wire.go:220
↓ 2 callersMethodflashSel
()
internal/app/model.go:923
↓ 2 callersFunctionhash
(s string)
internal/app/draw.go:561
↓ 2 callersFunctioninitialModel
(ws *Workspace)
internal/app/model.go:116
↓ 2 callersFunctionnormalizeLoadedBoard
(b *Board)
internal/app/storage.go:116
↓ 2 callersFunctionresolveEndpoint
resolveEndpoint returns an endpoint's screen position, honoring the optional pin override (used by the zoom transition).
internal/app/wire.go:155
↓ 2 callersFunctionshadowChar
shadowChar picks a character for a shadow cell — dithered base + slash sprinkles in the mid-density band for texture.
internal/app/draw.go:63
↓ 2 callersFunctionshadowRect
shadowRect paints an ASCII-dithered drop shadow under a rect.
internal/app/draw.go:21
↓ 2 callersMethodsnapPullToNote
snapPullToNote walks the notes list and snaps the pull's target to the next (or previous, if dir=-1) note's pin position, skipping the source.
internal/app/model.go:364
↓ 2 callersFunctionsplitAtVisual
--- ANSI-aware string splicing ------------------------------------- splitAtVisual cuts `s` at visible cell column `col`. CSI escape sequences (`\x1b[
internal/app/render.go:252
↓ 2 callersFunctionsplitLines
(s string)
internal/app/render.go:388
↓ 2 callersFunctionstyleRune
styleRune — Unicode block offsets: sans-serif bold: A..Z=0x1D5D4 a..z=0x1D5EE 0..9=0x1D7EC sans-serif italic: A..Z=0x1D608 a..z=0x
internal/app/theme.go:437
↓ 2 callersFunctiontrimRunes
(s string, n int)
internal/app/draw.go:509
↓ 2 callersMethodzoomStep
zoomStep clamps within the full [ZoomMin, ZoomMax] range.
internal/app/model.go:873
↓ 1 callersMethodAddBoard
AddBoard appends a fresh board with a unique grain seed and makes it active. Returns the new board.
internal/app/notes.go:329
↓ 1 callersMethodBgSGR
BgSGR emits the background-color SGR for this color. The renderer is otherwise foreground-only; this is used for the optional solid board background.
internal/app/theme.go:24
↓ 1 callersMethodDelete
(id string)
internal/app/notes.go:464
↓ 1 callersMethodDeleteBoard
DeleteBoard removes the board at index i. Refuses to delete the last remaining board.
internal/app/notes.go:344
↓ 1 callersMethodDeleteStringAt
(i int)
internal/app/notes.go:540
↓ 1 callersMethodDeleteStringsTouching
(id string)
internal/app/notes.go:548
↓ 1 callersFunctionDitherShade
DitherShade returns a halftone char for a given (x,y) and density 0..1.
internal/app/theme.go:290
↓ 1 callersMethodDone
(now time.Time)
internal/app/anim.go:97
↓ 1 callersMethodHex
()
internal/app/theme.go:60
↓ 1 callersMethodHit
Hit tests a screen-cell (cx, cy) against the note's current screen rect.
internal/app/notes.go:144
↓ 1 callersMethodLabel
Label returns a human-readable summary for the toast.
internal/app/menu.go:259
↓ 1 callersFunctionNewEditor
(n *Note, w, h int)
internal/app/edit.go:23
↓ 1 callersFunctionNewFontMenu
(current TextStyleMode)
internal/app/menu.go:13
↓ 1 callersMethodNewNote
NewNote places a note at screen-centre converted to world coords, so it appears centred at whatever zoom level the user is on.
internal/app/notes.go:440
↓ 1 callersFunctionNewSaver
(w *Workspace, delay time.Duration)
internal/app/storage.go:167
↓ 1 callersFunctionNewTransitionOut
(n *Note, zoom int)
internal/app/anim.go:71
↓ 1 callersMethodPos
Pos returns an endpoint's SCREEN position (for drawing).
internal/app/notes.go:190
↓ 1 callersMethodProgress
Progress: 0 = at source, 1 = at target. In runs 0→1; Out runs 1→0.
internal/app/anim.go:82
↓ 1 callersMethodResize
(w, h int)
internal/app/edit.go:71
↓ 1 callersFunctionRun
Run is the package's main entry point. cmd/redthread/main.go calls it.
internal/app/app.go:15
↓ 1 callersMethodSGR
()
internal/app/theme.go:17
↓ 1 callersMethodSelect
(id string)
internal/app/notes.go:396
↓ 1 callersMethodStart
(fromID string, fromX, fromY int)
internal/app/wire.go:21
↓ 1 callersMethodStringsTouching
(id string)
internal/app/notes.go:530
↓ 1 callersFunctionStyleViewText
StyleViewText applies styleRune to a pre-rendered string while passing through ANSI CSI escape sequences untouched. Useful when post-processing the ou
internal/app/theme.go:393
↓ 1 callersMethodcaptureDeleteSnapshot
captureDeleteSnapshot records `n` and the strings that touch it so a subsequent `u` can put everything back. Overwrites any prior snapshot — undo only
internal/app/model.go:802
↓ 1 callersMethodcolorIndex
colorIndex returns the BackgroundColors index for the cursor, or -1.
internal/app/menu.go:196
↓ 1 callersMethodcommitPullAt
commitPullAt finalizes the pull: connects to a note if the target lands on one, otherwise drops a wall-pin at the world coords beneath.
internal/app/model.go:340
↓ 1 callersFunctioncomposeEditorValue
composeEditorValue builds the textarea seed text. Empty notes seed as an empty string so the cursor lands on row 1, not row 3.
internal/app/edit.go:39
↓ 1 callersFunctiondrawBackgroundMenu
(c *Canvas, menu *BackgroundMenu)
internal/app/menu.go:301
↓ 1 callersFunctiondrawBackgroundMenuAt
(c *Canvas, x, y int, menu *BackgroundMenu)
internal/app/menu.go:306
↓ 1 callersMethoddrawBoardView
(c *Canvas)
internal/app/model.go:1213
↓ 1 callersFunctiondrawFontMenu
(c *Canvas, menu *FontMenu)
internal/app/menu.go:65
↓ 1 callersMethoddrawFooterView
(c *Canvas)
internal/app/model.go:1379
↓ 1 callersFunctiondrawHelpPanel
drawHelpPanel renders the bordered slide-up panel. anim ∈ [0,1] controls its height. Columns are rendered at fixed x-offsets so all keys/descriptions
internal/app/model.go:1478
↓ 1 callersFunctiondrawNoteAt
drawNoteAt renders the full note (border, tape, title, body, decor) at an arbitrary rect. Used by both normal rendering and the zoom transition.
internal/app/draw.go:261
↓ 1 callersFunctiondrawNoteAtWithBorder
drawNoteAtWithBorder is drawNoteAt with an explicit border-color override (used during the zoom transition to avoid the highlight flashing mid-anim).
internal/app/draw.go:108
↓ 1 callersFunctiondrawNoteFrame
drawNoteFrame draws only the frame (tape, borders, title row, separator, inner flourish, fold glyph) — NOT the body. Used in edit mode where a live te
internal/app/draw.go:117
↓ 1 callersMethoddrawTabBar
drawTabBar draws row 0: " redthread • work │ personal │ ideas ". The active board has a "•" prefix and brighter color. While renaming, the active b
internal/app/model.go:1332
↓ 1 callersMethoddrawTransitionView
drawTransitionView — clean 3D zoom with an animated backdrop fade. The cork + background notes fade from full brightness (at transition start) down to
internal/app/model.go:1276
↓ 1 callersFunctioneffectiveStyleAt
effectiveStyleAt returns the SGR sequence active at visual column `col` within string `s` — i.e., the last CSI seen before that column. An empty retur
internal/app/render.go:328
↓ 1 callersMethodhandleBgMenuKey
handleBgMenuKey drives the background picker. Up/down move between the cork toggle, the color rows, and the custom-hex row, live-previewing as they go
internal/app/model.go:469
↓ 1 callersMethodhandleBoardKey
(key string)
internal/app/model.go:525
↓ 1 callersMethodhandleEditKey
(msg tea.KeyMsg, key string)
internal/app/model.go:972
↓ 1 callersMethodhandleFontMenuKey
(key string)
internal/app/model.go:439
↓ 1 callersMethodhandleKey
--- key handlers ------------------------------------------------------
internal/app/model.go:258
↓ 1 callersMethodhandleMouse
--- mouse handlers ---------------------------------------------------
internal/app/model.go:1038
↓ 1 callersMethodhandlePullKey
handlePullKey lets the keyboard drive the in-progress string pull — arrows nudge the virtual endpoint, tab/S-tab snap to other notes, enter commits at
internal/app/model.go:295
↓ 1 callersMethodhandleRenameKey
handleRenameKey intercepts every keystroke while the user is editing a board's name in the tab bar. Enter commits, esc cancels.
internal/app/model.go:405
↓ 1 callersFunctionjoinLines
(lines []string)
internal/app/render.go:401
↓ 1 callersFunctionlerpRect
lerpRect eases rect a toward b by t with easeInOutCubic — gives a nicer "glide" than a linear or ease-out-only curve.
internal/app/anim.go:120
↓ 1 callersMethodnewCanvas
newCanvas builds a canvas pre-set with the workspace's solid background (nil for cork/transparent, which keeps cells transparent).
internal/app/model.go:1151
↓ 1 callersMethodoverlayFontMenuOnString
(base string)
internal/app/model.go:1206
↓ 1 callersFunctionpickStringChar
pickStringChar maps a local (dx, dy) direction to a line character, accounting for terminal cell aspect ratio (~2:1 tall:wide). Without this correctio
internal/app/wire.go:229
↓ 1 callersMethodrestoreDeletedNote
restoreDeletedNote re-inserts the most recently deleted note at its original z-position on its original board, along with any strings it was connected
internal/app/model.go:828
↓ 1 callersFunctionriseOffset
riseOffset returns the Y-offset (negative = up) applied during the morph to sell the 3D lift. Peaks at the middle of the transition with amplitude ~3
internal/app/anim.go:133
↓ 1 callersFunctionseedBoard
--- seed ---------------------------------------------------------
internal/app/notes.go:625
↓ 1 callersFunctionshadowGrowth
shadowGrowth returns how many extra cells of shadow thickness to add during the morph. Peaks mid-transition.
internal/app/anim.go:143
↓ 1 callersFunctionsplitClipboardText
splitClipboardText parses pasted text into (title, body) the same way the editor's Split does: first line is the title, the rest is the body, with at
internal/app/model.go:17
↓ 1 callersMethodsyncColor
syncColor live-previews the fill as the cursor lands on a color/custom row; on the cork row the fill is left unchanged.
internal/app/menu.go:216
↓ 1 callersFunctionvisibleWidth
visibleWidth returns the visible-cell width of a string, ignoring CSI.
internal/app/render.go:287
↓ 1 callersFunctionwrapLines
(body string, width int)
internal/app/draw.go:517
MethodBrighter
(f float32)
internal/app/theme.go:68
MethodBrightness
Brightness — Rec 601 luma, used by the monochrome dither pass.
internal/app/theme.go:95
MethodClear
()
internal/app/render.go:52
MethodFillRect
FillRect writes a single rune + style across a rectangular area, overwriting whatever was there (useful for drop shadows, clears, etc).
internal/app/render.go:167
FunctionGenStars
GenStars returns a stable cork-texture for (w,h) using the default seed. For per-board grain, use GenStarsForBoard.
internal/app/notes.go:586
FunctionHalftoneChar
HalftoneChar is a simple level lookup (0..4).
internal/app/theme.go:314
MethodInit
()
internal/app/model.go:159
MethodIsEmpty
IsEmpty returns true if the cell is the fully-transparent default.
internal/app/render.go:30
MethodMove
(delta int)
internal/app/menu.go:203
MethodSet
(x, y int, cell Cell)
internal/app/render.go:69
FunctionTestBackgroundMenuSelection
(t *testing.T)
internal/app/background_test.go:172
FunctionTestBackgroundNormalizeLegacy
(t *testing.T)
internal/app/background_test.go:113
FunctionTestBackgroundPersistenceRoundTrip
(t *testing.T)
internal/app/background_test.go:10
FunctionTestParseHexColor
(t *testing.T)
internal/app/background_test.go:50
FunctionTestSerializeBackgroundSGR
(t *testing.T)
internal/app/background_test.go:133
FunctionTestV4FileLoadsAsCork
(t *testing.T)
internal/app/background_test.go:28
FunctionTestViewRendersAcrossBackgroundModes
(t *testing.T)
internal/app/background_test.go:147
← previousnext →101–200 of 208, ranked by callers