bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rows and Cols check in InitMenu() method


From: Federico Di Pierro
Subject: Re: Rows and Cols check in InitMenu() method
Date: Fri, 29 Dec 2017 10:27:00 +0100

I finally managed to get vertical scroll kind of working playing with vertical menu size and set_format.
There is still an issues:
it seems that window is required to be at least N cols wide, where N is the length of the largest string between all NCursesMenuItems.
I'd expect NCursesMenuItems to be automatically truncated given window dimension, eg:
"mvwprintw(WIN, 1, 1, "%.*s", WIN.width(), str);"
Instead it seems i've got to truncate inputted NCursesMenuItems myself and then pass it to menu.
Is this correct?

Thanks!

Federico

2017-12-28 20:45 GMT+01:00 Federico Di Pierro <address@hidden>:
Hi everyone!

While trying ncurses C++ api, i struggled to understand the reason behind the check inside InitMenu: https://github.com/mirror/ncurses/blob/b22573b1ba4b51da883fa5f805b52f153fa5fae9/c%2B%2B/cursesm.cc#L154

​I don't understand why a NCursesMenu cannot be framed if it contains too many objects.
I mean, if its content can scroll, why not making it scroll taking into account that first/last row should not be touched?​

​Am i missing anything?​

​Thanks for your time,​
Federico


reply via email to

[Prev in Thread] Current Thread [Next in Thread]