notcurses
notcurses copied to clipboard
tfman: add structural browser
ncman
should take the section+subsection structure and stick it into an nctree
. this nctree
will be anchored at the bottom. it ought be able to toggle the nctree
's visibility via some key. some other key ought allow navigation using this nctree. when we navigate through the page not using this tree, it ought still advance the tree, keeping it up to date with what's closest to visible.
i've written the necessary hookup code; we need implement nctree_add()
now (#2458).
some progress has been made
notes:
- ~~they're in the wrong order following the title -- error in
nctree_add()
?~~ - ~~make the plane transparent wherever there's no text~~
- left/right move between main browser and structure browser
- ~~update structure browser focus as we move through the regular browser~~
- ~~colorize based on distance from focus~~
- throw a perimeter around the actual text
- ~~add a key to toggle the structure menu's visibility~~
▁▁▁▁▁▁▁
▕ECRAPPO▏
▁🮀🮀🭨NAME▏
▕SYNOPSIS▏
ok, lots of progress. we can't yet drive from the structure browser, but that's about it. we definitely want a perimeter or some other means to set it off from the rest.
i'm retarded. rather than this being a vertical tree, it ought be a ribbon. that way there's no modality, because left/right move along the ribbon, and up/down move within the page. duh. yeah, this was obviously the thing to do. stupid!
yeah, we'll do this in dankamongmen/tfman-horizontal-structure
so for the horizontal bar...ideally we would show all on-screen topics, right? but we might not have room. so instead, we want whatever's in the center of the screen to be in the center of the bar. except then we might never be able to show the extrema. so how about: when we've most recently moved down, we show the bottommost section on the rightmost part of the bar, and then whatever else can fit. when we've most recently moved up (and when we start), we show the topmost section on the leftmost part of the bar, and then whatever else can fit. we always keep some minimum spacing between elements, and expand the spacing if there are too few elements. we show partial elements, so the amount of spacing never need change.
basics now work. need to polish.
looking pretty dope