Commit Graph

2003 Commits (930d14380ccfe5b6bdafa23c44cadf2cdf35828c)

Author SHA1 Message Date
nick black 930d14380c ncmenu: call write_header() on section disabled change 4 years ago
nick black fb6f1e4d53 ncmenu_unroll: don't unroll disabled sections 4 years ago
nick black 32c029e2d5 ncmenu: support disabled sections #1057 4 years ago
nick black 2dc1b89fbd ncmenu_section: add enabled_item_count flag #1057 4 years ago
nick black 0676101811 ncmenu: log error on bad section info 4 years ago
nick black ca0907a628 ncmenu: don't allow disabled entries to be selected #1057 4 years ago
nick black e9b5ea61f7 ncmenu: add disablechannels, set to constant currently #1057 4 years ago
nick black be2bba7be2 implement ncmenu_item_set_status #1057 4 years ago
nick black 7d528dcd6f ncmenu: add disabled flag to ncmenu_items, draw them grey #1057 4 years ago
nick black cba2d9684f
s/Brailler/Braille/g 4 years ago
nick black 4c15436de8
render: don't check tcache->cuf until necessary 4 years ago
nick black 60fb4a2351
selector: use easier languages #1053 4 years ago
nick black a7a75d4c12
draw_borders: account for all border masks 4 years ago
nick black 39d13c8489
draw_borders: remove unnecessary else clauses 4 years ago
nick black da1b8d1d53
install version.h #1054 4 years ago
nick black 1fe53d98fb
new notcurses ii test video #1055 4 years ago
nick black 68dbfeafc8
add version unit test #1054 4 years ago
nick black cf616ab2ad
fallin: don't use builddef macros 4 years ago
nick black 29e83717f9
demo: don't use builddef.h #defines #1054 4 years ago
nick black b809d5c7c5
s/USE_MULTIMEDIA/NOTCURSES_USE_MULTIMEDIA/g #1054 4 years ago
nick black bc90eb41e0
terminfo: load up BCE flag 4 years ago
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
4 years ago
nick black 1b3f97944a
whiteout: refresh after each cycle to clear cruft 4 years ago
nick black 81cf1fbc71
reel: don't draw bottom border over top border for one-line tablets #1052 4 years ago
nick black d101d2d2d9 add ncdirect_init() inhibit cbreak flag #1049 4 years ago
nick black 4e8cae7b2c
zoo: don't check cursor results, so we can run on vt100 #1047 4 years ago
nick black c6c157a5ad
notcurses_stats_alloc() everywhere 4 years ago
nick black bf28170c61
mark cliptop unused in reel poc 4 years ago
nick black f9e2c7863b
add notcurses_stats_alloc #1043 4 years ago
nick black 23bd4a2ac8 be less aggressive inserting LTR following bidi #850 4 years ago
nick black 4466f1aaff pool_load_direct: call egc_rtl() for RTL U200E forcings #850 4 years ago
nick black 4d95ae185f
account for reel borders when laying out tablets #1036 4 years ago
nick black 1eff105cb9
reel poc: print error on redraw fail #1036 4 years ago
nick black 270b1b20ee implement notcurses_render_to_buffer() #214 4 years ago
nick black cc99f06a2a tighten up render/writer columns 4 years ago
nick black bb6887e05d break up stattracking #1039 4 years ago
nick black f999f413c5 break out raster_and_write() #214 4 years ago
nick black 4a9be7fa90
include memory.h where necessary 4 years ago
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.
4 years ago
nick black 7241e0a5e1
demo tabletfxn: cliptop __attribute__ ((unused)) 4 years ago
nick black c2c4811053
reel: cap return lines at max size, warn on excess 4 years ago
nick black bf40e163c8
reel poc: cap return at true size 4 years ago
nick black 683217ef07 normalize style setters #1034 4 years ago
nick black 174a00b56c
add deprecated nctablet_ncplane() for old binaries 4 years ago
nick black 6ddf105746
uninline ncplane_new() so older binaries continue to link 4 years ago
nick black 8d347d14bb
move ncreel to PoCs, don't install #1033 4 years ago
nick black f15dc9ba80 ncreel: properly size tablets in all border conditions #1031 4 years ago
nick black c236b65266 name standard plane 'std' 4 years ago
nick black 20bf1ae2d4
nctablet_ncplane() -> nctablet_plane() 4 years ago
nick black ec85dd1c3b
ncreel_destroy: return void 4 years ago