jcs
/textview
/amendments
/textview.h
Amendments on November 17, 2026
tv_draw: Abstract scroll guts to TVScrollParts so users can call it
This would be useful for handling Page Down the same way as clicking
inPageDown, by now calling TVScrollPart(tv, inPageDown, false).
Amendments on November 11, 2026
TVOffsetFor*: Add caret flag, add TVScrollToOffset
Finding the offset for a click depends on whether the caller wants
to find text displayed at it or whether they are selecting text which
can start outside of that text.
Amendments on November 3, 2026
jcs made amendment
90
22 days ago
TVAppendLocked: Remember the first line touched
When we're running with autocalc off, this will speed up redrawing
when it's turned back on.
Amendments on October 15, 2026
jcs made amendment
84
about 1 month ago
Amendments on October 14, 2026
textview.h: Use 512 for TV_LINE_GROUP_NLINES so CPU can shift
Avoids having to do multiplication and division of 500
jcs made amendment
78
about 1 month ago
TVGetTextSlab: Cache last used slab, it's probably the same
Avoids walking the slab list every time. Also in TVApplyStyle, check
that we actually need to call Text{Font,Face,Size}.
jcs made amendment
67
about 1 month ago
Amendments on September 23, 2026
*: Split up into logical files for storage, layout, and drawing
This file is getting huge and hard to manage. We can always cat
everything together later for a single distributable file.
jcs made amendment
64
2 months ago
Amendments on December 15, 2024
jcs made amendment
59
about 1 year ago
jcs made amendment
58
about 1 year ago
Amendments on December 13, 2024
*: Add support for right and center alignment
Also avoid some errant setting of grew which were causing more
EraseRect doings than necessary.
Amendments on November 21, 2024
TVFindInRect: Make this public, allow tags with styles
Adding a tag to a style allows a chunk of text to be found later by
the caller by giving it a unique tag in its style.
Amendments on November 14, 2024
TVCalcLinesLocked+TVDrawMatch: Fix tabstop calculation
Turn tabstop into a number of pixels per tabstop rather than a number
of characters. This makes it behave more like a word processor that
will align characters of different fonts and sizes on a particular
vertical boundary, rather than indenting a number of spaces.
Also make TVDrawMatch bail early when drawing lines that are further
down than our viewport will show.
Amendments on November 13, 2024
TVAppendBitMap: Require a TVStyle passed with sizing information
This allows the caller to specify where on the baseline the bitmap
is drawn, and allows it to add spacing after it by setting
font_info.widMax.
Also handle lines with multiple styles growing the leading size.
Amendments on November 12, 2024
*: Add support for inline images!
Move styles to be stored in a slab just like the others so it can
grow as needed and allow BitMap data to be stored there.
Fix redrawing of lines when they have to grow due to larger text
added on the same line, now that we're not using the canvas.
Amendments on November 8, 2024
TVFindInRect: When we don't get a start hint, make an educated guess
This greatly speeds up scrolling
Also move everything to longs, on a huge text we were hitting the
max short size and wrapping around
TVTrackScrollControl: Use TVFindInRect
Now with everything using TVFindInRect, we just need to speed up
that one function...