[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
signature.asc
Description: Digital signature
- Re: Color support in NCursesMenu::post(),
Thomas Dickey <=
- Re: Color support in NCursesMenu::post(), ncurses, 2018/01/02
- Re: Color support in NCursesMenu::post(), Thomas Dickey, 2018/01/02
- Re: Color support in NCursesMenu::post(), Federico Di Pierro, 2018/01/02
- Re: Color support in NCursesMenu::post(), Thomas Dickey, 2018/01/02
- Re: Color support in NCursesMenu::post(), ncurses, 2018/01/06
- Re: Color support in NCursesMenu::post(), Thomas Dickey, 2018/01/06
- Re: Color support in NCursesMenu::post(), Federico Di Pierro, 2018/01/07
- Re: Color support in NCursesMenu::post(), Thomas Dickey, 2018/01/07
- Re: Color support in NCursesMenu::post(), Federico Di Pierro, 2018/01/07
- Re: Color support in NCursesMenu::post(), ncurses, 2018/01/08