Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Is there any good tui library in C++ under Windows?

Reply
Thread Tools

Is there any good tui library in C++ under Windows?

 
 
Water Lin
Guest
Posts: n/a
 
      06-12-2009
I want to write a text user interface for my program.

That means I will print out something for user, and user will choose which step he wants to run.

Now I am just using cout and cin to output and input. It is really a dirty job.

I need to write a lot of switch statements to judge what I need to do next.

One more thing, I don't know how to output color text under Windows command line, is it possible? How?

so, any suggestion on my task?

--
Water Lin
http://blog.waterlin.org
 
Reply With Quote
 
 
 
 
Vicky
Guest
Posts: n/a
 
      06-12-2009
On Jun 12, 10:10*am, Water Lin <Water...@ymail.com> wrote:
> I want to write a text user interface for my program.
>
> That means I will print out something for user, and user will choose which step he wants to run.
>
> Now I am just using cout and cin to output and input. It is really a dirty job.
>
> I need to write a lot of switch statements to judge what I need to do next.
>
> One more thing, I don't know how to output color text under Windows command line, is it possible? How?
>
> so, any suggestion on my task?
>
> --
> Water Linhttp://blog.waterlin.org


Your problem is not so clear. TUI programming will be quit OS
dependent. For Unix/Linux there is curse library. You can use it.
 
Reply With Quote
 
 
 
 
rabbits77
Guest
Posts: n/a
 
      06-12-2009
Vicky wrote:
> On Jun 12, 10:10 am, Water Lin <Water...@ymail.com> wrote:
>> I want to write a text user interface for my program.
>>
>> That means I will print out something for user, and user will choose which step he wants to run.
>>
>> Now I am just using cout and cin to output and input. It is really a dirty job.
>>
>> I need to write a lot of switch statements to judge what I need to do next.
>>
>> One more thing, I don't know how to output color text under Windows command line, is it possible? How?
>>
>> so, any suggestion on my task?
>>
>> --
>> Water Linhttp://blog.waterlin.org

>
> Your problem is not so clear. TUI programming will be quit OS
> dependent. For Unix/Linux there is curse library. You can use it.

Yes, OP could use ncurses under cygwin.
I am not sure if ncurses has a port to plain Win
though. I think that I have heard of such a thing
but cannot currently find it so maybe it
stopped being maintained a long time ago.
If OP is targetting windows only then
it might be a good idea to look at
some old DOS programming guides
Also, see this article on Turbo Vision
and see if you can get the C++ sources somewhere.
They are apparently a little hard to find?
If you find them post a link back here!
http://en.wikipedia.org/wiki/Turbo_Vision
 
Reply With Quote
 
Tony
Guest
Posts: n/a
 
      06-12-2009
Water Lin wrote:
> I want to write a text user interface for my program.
>
> That means I will print out something for user, and user will choose
> which step he wants to run.
>
> Now I am just using cout and cin to output and input. It is really a
> dirty job.
>
> I need to write a lot of switch statements to judge what I need to do
> next.
>
> One more thing, I don't know how to output color text under Windows
> command line, is it possible? How?
>
> so, any suggestion on my task?


The Win32 console IO API is quite good and has both UNICODE and codepage
support. You might want to either build some higher level stuff around the
API, use it directly or search for a wrapper online that someone has already
created and made available (CodeProject may be worth searching). Here's a
starting link on MSDN:

http://msdn.microsoft.com/en-us/libr...10(VS.85).aspx

More description of the Win32 console and an example of what is possible
with it on this Wikipedia page (click on the GNU Midnight Commander
graphic):

http://en.wikipedia.org/wiki/Win32_console


 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      06-14-2009
On Fri, 12 Jun 2009 04:30:38 -0700 (PDT), Vicky <> wrote:
> On Jun 12, 10:10*am, Water Lin <Water...@ymail.com> wrote:
>> I want to write a text user interface for my program.
>>
>> That means I will print out something for user, and user will choose which step he wants to run.
>> Now I am just using cout and cin to output and input. It is really a dirty job.
>> I need to write a lot of switch statements to judge what I need to do next.
>> One more thing, I don't know how to output color text under Windows command line, is it possible? How?
>> so, any suggestion on my task?


> Your problem is not so clear. TUI programming will be quit OS
> dependent.


Not if he does a prompting interface, like this:

Enter a foo value: d898hhd
Enter a bar value: djkjhjc8
...

But both Unix and Windows users hate such interfaces.

For an overview of Unix interface styles, see

http://www.catb.org/~esr/writings/ta...l/ch11s06.html

One of those will probably be a best fit on Windows, too.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!
 
Reply With Quote
 
Water Lin
Guest
Posts: n/a
 
      06-15-2009
Tony wrote:

> Water Lin wrote:
>> I want to write a text user interface for my program.
>>
>> That means I will print out something for user, and user will choose
>> which step he wants to run.
>>
>> Now I am just using cout and cin to output and input. It is really a
>> dirty job.
>>
>> I need to write a lot of switch statements to judge what I need to do
>> next.
>>
>> One more thing, I don't know how to output color text under Windows
>> command line, is it possible? How?
>>
>> so, any suggestion on my task?

>
> The Win32 console IO API is quite good and has both UNICODE and codepage
> support. You might want to either build some higher level stuff around the
> API, use it directly or search for a wrapper online that someone has already
> created and made available (CodeProject may be worth searching). Here's a
> starting link on MSDN:
>
> http://msdn.microsoft.com/en-us/libr...10(VS.85).aspx
>
> More description of the Win32 console and an example of what is possible
> with it on this Wikipedia page (click on the GNU Midnight Commander
> graphic):
>
> http://en.wikipedia.org/wiki/Win32_console
>


Thanks for this instructions.

I think I can study something from Turbo Vision, is it good to start?

http://tvision.sourceforge.net/

--
Water Lin
http://blog.waterlin.org
 
Reply With Quote
 
Water Lin
Guest
Posts: n/a
 
      06-16-2009
rabbits77 wrote:

> Vicky wrote:
>> On Jun 12, 10:10 am, Water Lin <Water...@ymail.com> wrote:
>>> I want to write a text user interface for my program.
>>>
>>> That means I will print out something for user, and user will choose which step he wants to run.
>>>
>>> Now I am just using cout and cin to output and input. It is really a dirty job.
>>>
>>> I need to write a lot of switch statements to judge what I need to do next.
>>>
>>> One more thing, I don't know how to output color text under Windows command line, is it possible? How?
>>>
>>> so, any suggestion on my task?
>>>
>>> --
>>> Water Linhttp://blog.waterlin.org

>>
>> Your problem is not so clear. TUI programming will be quit OS
>> dependent. For Unix/Linux there is curse library. You can use it.

> Yes, OP could use ncurses under cygwin.
> I am not sure if ncurses has a port to plain Win
> though. I think that I have heard of such a thing
> but cannot currently find it so maybe it
> stopped being maintained a long time ago.
> If OP is targetting windows only then
> it might be a good idea to look at
> some old DOS programming guides
> Also, see this article on Turbo Vision
> and see if you can get the C++ sources somewhere.
> They are apparently a little hard to find?
> If you find them post a link back here!
> http://en.wikipedia.org/wiki/Turbo_Vision



I think this is the Turbo Vision download link:
-----------
http://tvision.sourceforge.net/

But I can't compile it under Cygwin or MinGW.

Cygwin provide me two errors:
-----------------------------------------
/usr/include/sys/unistd.h:203: error: declaration of C function `int CLY_YieldP
ocessor(useconds_t)' conflicts with
.../include/compatlayer.h:1618: error: previous declaration `void CLY_YieldProce
sor(int)' here
make[1]: *** [obj/calcdisp.o] error1
make[1]: Leaving directory `/home/water/TurboVision/contrib/tvision/makes'
make: *** [static-lib] error 2
--
Water Lin
http://blog.waterlin.org
 
Reply With Quote
 
Tony
Guest
Posts: n/a
 
      06-19-2009
Water Lin wrote:
> Tony wrote:
>
>> Water Lin wrote:
>>> I want to write a text user interface for my program.
>>>
>>> That means I will print out something for user, and user will choose
>>> which step he wants to run.
>>>
>>> Now I am just using cout and cin to output and input. It is really a
>>> dirty job.
>>>
>>> I need to write a lot of switch statements to judge what I need to
>>> do next.
>>>
>>> One more thing, I don't know how to output color text under Windows
>>> command line, is it possible? How?
>>>
>>> so, any suggestion on my task?

>>
>> The Win32 console IO API is quite good and has both UNICODE and
>> codepage support. You might want to either build some higher level
>> stuff around the API, use it directly or search for a wrapper online
>> that someone has already created and made available (CodeProject may
>> be worth searching). Here's a starting link on MSDN:
>>
>> http://msdn.microsoft.com/en-us/libr...10(VS.85).aspx
>>
>> More description of the Win32 console and an example of what is
>> possible with it on this Wikipedia page (click on the GNU Midnight
>> Commander graphic):
>>
>> http://en.wikipedia.org/wiki/Win32_console
>>

>
> Thanks for this instructions.
>
> I think I can study something from Turbo Vision, is it good to start?
>
> http://tvision.sourceforge.net/


The only way to find out is to dive in and research the framework and see if
it will meet your requirements. Only you can decide that.


 
Reply With Quote
 
rabbits77
Guest
Posts: n/a
 
      06-19-2009
> Thanks for this instructions.
>
> I think I can study something from Turbo Vision, is it good to start?
>
> http://tvision.sourceforge.net/

Most definitely this is a good place to start!
Note: I am the one that recommended it in the first
place.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming in TUI not CLI like the program "links", the text webbrowser. C_learner C Programming 6 10-25-2010 05:17 AM
Is it possible to create a GUI/TUI toolkit using ruby? simonh Ruby 6 01-08-2006 11:28 PM
java tui sd Java 4 12-14-2005 11:30 AM
WTD: webpage counter TUI-friendly Robert J.N. Speirs HTML 1 06-19-2004 11:22 AM
TUI library Imobach González Sosa Ruby 3 10-10-2003 02:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57