0

I am looking for a cross platform GUI toolkit (for C) that works equally well in the terminal as it does in the "graphical world".

What (I think) I want is something like ncurses but with the option to set the guimode before starting. So for example if my program is started from the commandline I can go textmode and if it is started from X or Windows or whatever I can instead start a graphical GUI using the same API. Something like this...

guimode=TEXTMODEGUI; or guimode=GRAPHICALGUI; before doing something like this...

drawwindow("title","text");

I have not found any ncurses to gtk+/wx/qt/whatever wrappers so far. Does something like this exits?!

Waxhead
  • 500
  • 3
  • 16
  • This could be quite a challenge, given that the semantics of ncurses are not easily mappable to those of GTK+ and friends. – Eugen Rieck Feb 04 '12 at 15:38

2 Answers2

2

If you are willing to accept C++ for the GUI part, use libyui from the YaST project. It supports Qt, Gtk and ncurses. I answered a similar question to yours here.

Community
  • 1
  • 1
duncan
  • 6,113
  • 3
  • 29
  • 24
1

The only project I've run into like this is Charva for Java. I have not used it and there appears to be no development since 2006.

Craig
  • 4,750
  • 22
  • 21