about summary refs log tree commit diff stats
path: root/src/local/select.nim
Commit message (Collapse)AuthorAgeFilesLines
* pager, select: hide menu if right click ends outsidebptato2024-12-181-2/+15
| | | | | | | | Inspired by Dillo. (Just the movement mechanism; Dillo doesn't hide the context menu on double click, but we still do.) Also, we now disable highlighting of menu items when the mouse is hovering outside.
* select: fix height definitionbptato2024-12-151-13/+10
| | | | | now I sort of understand how it works. basically maxh and maxw represent the inner area occupied by the widget at any time.
* select: pad options in newSelectbptato2024-11-261-0/+1
| | | | this way it works for <select> tags too
* pager, select: add more items, misc fixesbptato2024-11-251-24/+46
| | | | | | eh probably have to move the event loop to pager...
* select: misc fixesbptato2024-11-241-2/+10
| | | | | * jump to first selected item (if any) when opened * fix crash on control chars in option (at least they didn't bleed...)
* select: fix display with multi-width charsbptato2024-11-241-6/+11
| | | | progress. now they only mess up coloring a bit.
* pager, select: implement more functionsbptato2024-11-241-4/+16
| | | | | not quite happy with this design but for now let's just try to make it work well
* pager, select: add right click menu, fix some bugsbptato2024-11-231-22/+36
| | | | | | | | | | | | | | | | | | It's *not* a context menu: items are fixed, and currently not even customizable. Former is a feature, latter is a bug. Also, select now has improved mouse support; its behavior is a combination of the w3m menu (for btn1) and GTK Firefox context menu (for btn3). Also, fix some bugs in select: * lines with double width chars are handled better (not perfectly, but at least the grid isn't completely mangled anymore) * non-multiple select now highlights the currently selected option * small selects at the bottom of the screen are handled correctly * selects at the right edge of the screen are handled correctly * select multiple no longer discards selected items on cursorLeft
* select: various improvementsbptato2024-11-211-69/+79
| | | | | | * replace weird cursor position representation * add cursorTop, cursorMiddle, cursorBottom, scrollDown, scrollUp * expose fromy, cursory to JS
* select: add cursorPrevLink, cursorNextLinkbptato2024-11-171-0/+6
|
* utils, types: merge some modulesbptato2024-11-031-1/+1
| | | | | * line, vector, matrix -> path * twtuni, charcategory -> twtstr
* container: fix control char displaybptato2024-09-281-2/+2
| | | | | | Also, kill twidth and its friends; we haven't been using it for a while now. (In the future, a solution with PUA chars might be worth exploring.)
* select: use a separate module (again)bptato2024-09-241-0/+315
| | | | | | | | | Now we dispatch to select objects from the pager object too, just to make things even more confusing. Well, it works better than the previous arrangement, in that trying to use unimplemented movements now just throws instead of moving around the container. Yay for OOP (?)
* pager: refactor drawing codebptato2024-06-221-307/+0
| | | | | | | * merge select into container * avoid unnecessary redraws in draw() for parts of the screen that haven't been updated * various image redraw fixes
* Move JS wrapper into Monouchabptato2024-06-031-1/+1
| | | | Operation "modularize Chawan somewhat" part 3
* js: refactorbptato2024-05-081-1/+1
| | | | | | | * prefix to-be-separated modules with js * remove dynstreams dependency * untangle from EmptyPromise * move typeptr into tojs
* Update code stylebptato2024-04-171-9/+9
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* cell: update FormatFlag naming, remove useless templatesbptato2024-03-211-2/+2
|
* Remove newFormatbptato2024-01-231-2/+2
| | | | Pointless; it just returned a default zero-initialized object.
* Various fixesbptato2023-12-131-2/+2
| | | | | | | * Makefile: fix parallel build, add new binaries to install target * twtstr: split out libunicode-related stuff to luwrap * config: quote default gopher2html URL env var for unquote * adapter/: get rid of types/url dependency, use CURL url in all cases
* break up twtstr somewhatbptato2023-12-131-0/+1
| | | | | Avoid computing e.g. charwidth data for http which does not need it at all.
* move around more modulesbptato2023-09-141-2/+2
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* move some modules to local/bptato2023-09-141-0/+306
makes a bit more sense than the previous arrangement