bug-ncurses
[Top][All Lists]
Advanced

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

Re: Color support in NCursesMenu::post()


From: Thomas Dickey
Subject: Re: Color support in NCursesMenu::post()
Date: Mon, 1 Jan 2018 20:10:34 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Dec 29, 2017 at 05:24:19PM +0100, Federico Di Pierro wrote:
> Hi!
> 
> I was wondering if color support for post() method is planned.
> 
> I see 2 way to achieve that:
> 1) by hooking a callback, like:
> virtual OnItemPrint(int currX, int currY, NCursesMenuItem &item),
> that defaults to waddnstr().
> 
> Then everyone can override the method and add any attribute he wishes.
> 
> 2) By adding an attribute field to NCursesMenuItem, and parsing that field
> in _nc_Post_Item before printing (eg: wattron(menu->win, item->attributes)).
> 
> Is there such a plan?

I haven't thought about it :-)

> Would a patch be considered and accepted?

sure (the usual constraints on portability and compatibility apply).

thanks

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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