Commit Graph

2008 Commits

Author SHA1 Message Date
nick black
a672790f2c
ncmenu_mouse_selected: comment typo 2020-10-15 07:51:07 -04:00
nick black
34442f263f demo: let ncmenu handle section shortcuts #1058 2020-10-15 07:46:32 -04:00
nick black
0e294626ab menu poc: let menu handle section shortcuts #1058 2020-10-15 07:46:32 -04:00
nick black
a1a4087ca7 ncmenu: handle section shortcuts when offered #1058 2020-10-15 07:46:32 -04:00
nick black
e885d87d1a introduce NCKEY_ESC, use it everywhere 2020-10-15 07:46:32 -04:00
nick black
930d14380c ncmenu: call write_header() on section disabled change 2020-10-15 02:58:03 -04:00
nick black
fb6f1e4d53 ncmenu_unroll: don't unroll disabled sections 2020-10-15 02:58:03 -04:00
nick black
32c029e2d5 ncmenu: support disabled sections #1057 2020-10-15 02:58:03 -04:00
nick black
2dc1b89fbd ncmenu_section: add enabled_item_count flag #1057 2020-10-15 02:58:03 -04:00
nick black
0676101811 ncmenu: log error on bad section info 2020-10-15 02:58:03 -04:00
nick black
ca0907a628 ncmenu: don't allow disabled entries to be selected #1057 2020-10-15 02:58:03 -04:00
nick black
e9b5ea61f7 ncmenu: add disablechannels, set to constant currently #1057 2020-10-15 02:58:03 -04:00
nick black
be2bba7be2 implement ncmenu_item_set_status #1057 2020-10-15 02:58:03 -04:00
nick black
7d528dcd6f ncmenu: add disabled flag to ncmenu_items, draw them grey #1057 2020-10-15 02:58:03 -04:00
nick black
cba2d9684f
s/Brailler/Braille/g 2020-10-13 21:17:34 -04:00
nick black
4c15436de8
render: don't check tcache->cuf until necessary 2020-10-12 02:54:18 -04:00
nick black
60fb4a2351
selector: use easier languages #1053 2020-10-11 09:51:55 -04:00
nick black
a7a75d4c12
draw_borders: account for all border masks 2020-10-11 06:39:21 -04:00
nick black
39d13c8489
draw_borders: remove unnecessary else clauses 2020-10-11 05:54:15 -04:00
nick black
da1b8d1d53
install version.h #1054 2020-10-10 20:53:45 -04:00
nick black
1fe53d98fb
new notcurses ii test video #1055 2020-10-10 20:48:16 -04:00
nick black
68dbfeafc8
add version unit test #1054 2020-10-10 20:33:23 -04:00
nick black
cf616ab2ad
fallin: don't use builddef macros 2020-10-10 19:55:56 -04:00
nick black
29e83717f9
demo: don't use builddef.h #defines #1054 2020-10-10 19:51:15 -04:00
nick black
b809d5c7c5
s/USE_MULTIMEDIA/NOTCURSES_USE_MULTIMEDIA/g #1054 2020-10-10 19:37:01 -04:00
nick black
bc90eb41e0
terminfo: load up BCE flag 2020-10-09 01:33:23 -04:00
nick black
fd936461fc A few changes to startup details
* Even when emitting smcup, emit an explicit screen clear, to handle
  smcup that fills the screen with old background color #1045
* Rather than emitting notcurses_mouse_disable(), emit the more
  powerful (proper superset) reset_term_attributes)
* Emit a diagnostic when we're not connected to a terminal
2020-10-09 01:19:36 -04:00
nick black
1b3f97944a
whiteout: refresh after each cycle to clear cruft 2020-10-08 18:38:44 -04:00
nick black
81cf1fbc71
reel: don't draw bottom border over top border for one-line tablets #1052 2020-10-08 18:18:32 -04:00
nick black
d101d2d2d9 add ncdirect_init() inhibit cbreak flag #1049 2020-10-07 07:43:50 -04:00
nick black
4e8cae7b2c
zoo: don't check cursor results, so we can run on vt100 #1047 2020-10-07 04:31:15 -04:00
nick black
c6c157a5ad
notcurses_stats_alloc() everywhere 2020-10-07 04:24:10 -04:00
nick black
bf28170c61
mark cliptop unused in reel poc 2020-10-07 02:28:58 -04:00
nick black
f9e2c7863b
add notcurses_stats_alloc #1043 2020-10-06 23:33:28 -04:00
nick black
23bd4a2ac8 be less aggressive inserting LTR following bidi #850 2020-10-05 18:56:09 -04:00
nick black
4466f1aaff pool_load_direct: call egc_rtl() for RTL U200E forcings #850 2020-10-05 18:56:09 -04:00
nick black
4d95ae185f
account for reel borders when laying out tablets #1036 2020-10-05 16:46:56 -04:00
nick black
1eff105cb9
reel poc: print error on redraw fail #1036 2020-10-05 15:39:19 -04:00
nick black
270b1b20ee implement notcurses_render_to_buffer() #214 2020-10-04 11:43:25 -04:00
nick black
cc99f06a2a tighten up render/writer columns 2020-10-04 10:04:02 -04:00
nick black
bb6887e05d break up stattracking #1039 2020-10-04 10:04:02 -04:00
nick black
f999f413c5 break out raster_and_write() #214 2020-10-04 10:04:02 -04:00
nick black
4a9be7fa90
include memory.h where necessary 2020-10-03 18:54:34 -04:00
Marek Habersack
a29bfe9c42 [C++] Deal with widgets grabbing full ownership of Panel
Fixes: https://github.com/dankamongmen/notcurses/issues/1009

Whenever a widget is created with its `*_create` function it currently
claims full ownership of the passed panel, including its destruction.
However, the C++ wrapper around the panel is not aware of this and will
attempt to destroy the native panel in the destructor, leading to
segfaults.

Fix this by introduction of a `Widget` class which contains the logic to
properly modify the `Panel` instance to not double-destroy the native
panel.  The solution is a bit fragile since the `Panel` instance is left
intact (we can't free it for the user) in a state that's safe for the
C++ wrapper, but calling any C function via the wrapper **will** pass a
`NULL` pointer in the panel argument - therefore the C functions MUST be
proofed against this.  The proofing belongs in the C backend code since
this protects also C and other language binding users from such abuse.

The Widget class will first verify that the passed `Plane` instance
hasn't already been "disowned" and will throw an exception to the effect
if it was.  Next, it will proceed to take over ownership of the native
panel instance and mark the passed `Panel` as "invalid" (i.e. not owning
any native panel instance anymore)

The above changes require modification of `Panel` instances and so all
the widget constructors taking `const*` or `const&` have been removed
from widget classes.
2020-10-03 13:19:49 -04:00
nick black
7241e0a5e1
demo tabletfxn: cliptop __attribute__ ((unused)) 2020-10-03 02:43:18 -04:00
nick black
c2c4811053
reel: cap return lines at max size, warn on excess 2020-09-30 04:23:21 -04:00
nick black
bf40e163c8
reel poc: cap return at true size 2020-09-30 03:43:41 -04:00
nick black
683217ef07 normalize style setters #1034 2020-09-29 13:09:44 -04:00
nick black
174a00b56c
add deprecated nctablet_ncplane() for old binaries 2020-09-29 11:59:33 -04:00
nick black
6ddf105746
uninline ncplane_new() so older binaries continue to link 2020-09-29 11:52:48 -04:00