bug-ncurses
[Top][All Lists]
Advanced

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

Re: readline-like program


From: Steve Litt
Subject: Re: readline-like program
Date: Thu, 13 Jan 2005 23:19:06 -0500
User-agent: KMail/1.6.1

On Thursday 13 January 2005 08:12 pm, James Strother wrote:
> I'm not sure if this is the appropriate forum, if it isn't then I
> would really appreciate any links you think might be useful.  I've
> been attempting to write a program that would have a readline-like
> interface.  After reading through the manpages it appears that I
> should be doing something like:
>
>   initscr();
>   cbreak();
>   noecho();
>   keypad(stdscr,TRUE);
>   for (;;) {
>     int a = getch();
>     /* do something */
>   }
>
> This sets the WINDOW size to the physical screen size, which is not
> what I want.  I want the rest of the terminal to be unaffected with
> just a single terminal-input line at the end.  I tried (and tried..)
> various combinations of setupterm and newwin, but I couldn't quite
> get it to work.  Is there a "curses" way to do this or am I stuck
> using termcap?
>
> Many Thanks,
>   Jim Strother

Here's an article that places a menu on its own window, which I believe is 
pretty much what you want. The entire document (not just the one article) 
might give you some other tips.

http://www.troubleshooters.com/lpm/200405/200405.htm#_Putting_the_Menu_in_its_Own_Window

HTH

SteveT
Steve Litt
Author: 
   * Universal Troubleshooting Process courseware
   * Troubleshooting Techniques of the Successful Technologist
   * Rapid Learning: Secret Weapon of the Successful Technologist
Webmaster
   * Troubleshooters.Com
   * http://www.troubleshooters.com

(Legal Disclaimer) Follow these suggestions at your own risk.




reply via email to

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