Mailinglist Archive: opensuse-programming (42 mails)

< Previous Next >
Re: [suse-programming-e] Help with using Ncurses and C++
  • From: Stefan Hundhammer <sh@xxxxxxx>
  • Date: Mon, 24 May 2004 11:37:47 +0200
  • Message-id: <>
On Friday 21 May 2004 22:01, Charley wrote:
> I have just spend the last few hours researching on both the list
> archives and using google without much success. I am looking at moving a
> project from a real-time (sort of) version of Windows NT to run under SuSE
> Linux 9.1. From the OS perspective everything looks good, however one small
> subject is messing me up. Most of the code is written in C, compiled under
> C++ and it is our intention to rewrite to OO type C++. And while this also
> is pretty straight forward we are stumbling on a small problem. Most of the
> time the system runs with little input from the users, however there are
> quite a few setup screens that need to be on terminal type screens. We are
> using QT for the more complex setup screens but need to use Ncurses for the
> runtime stuff. Has anyone had an experience using Ncurses in a C++ class
> type programming?

Have a look at the YaST2 NCurses UI. In fact, YaST2 uses an UI abstraction
that provides both a Qt based and a NCurses based UI - if you use it from
YCP, that is.

Install the source RPMs for yast2-core, yast2-ncurses, yast2-qt. In the
yast2-core source directory, look at libyui/doc/ and libyui/doc/examples to
get an idea of what this looks like.

One caveat, though: The YaST2 engine isn't anything you might want to call
"small". That abstraction level comes at a price. ;-)

But even if you don't want to use it like this, it might give you some ideas
how to approach your task.

Stefan Hundhammer <sh@xxxxxxx> Penguin by conviction.
YaST2 Development
SuSE Linux AG
Nuernberg, Germany

< Previous Next >