Link to home
Create AccountLog in
Avatar of georgopanos
georgopanosFlag for United States of America

asked on

XDIALOG for LINUX C++ program

I have a question about XDIALOG in linux. I wrote a program in C++ that displays its output at a command prompt that constantly updates but I wanted it to display it in a GUI so I could control the size of the TEXT and change the colors and XDIALOG would be perfect if I could keep updating it.

Is it possible?  

Thanks
Avatar of skullnobrains
skullnobrains

you can display the output of your program in a --tailbox.

for example
run_program | xdialog --tailbox - 100 250
Avatar of georgopanos

ASKER

A tailbox will not work. The tailbox is just like the command prompt basically scolling text kind of like a log file.

I need the text large and I want it stationary so when there is a change and look up at the screen your eye goes to the same location and sees the change. I even thought using the command that closes the info box after a certain period of time and reopening in the same location but that will not be appealing to the eye watching flickering information on the screen. Any other ideas would be appreciated.
a tailbox will let you specify colors and text sizes but xdialog does not seem to be the right tool for what you need.

GTK (or possibly gtk-server), QT4, or possibly ncurses or even a web browser will likely do the trick, but since i have no idea what you want, it will be difficult to tell you which would be the best for your usage. a sample output and some basic requirements would be great
I was actually thinking a web browser but was unsure how to proceed.
I also considered keeping it a command line program but the largest font I could find was a size 32 by installing the terminus font package. I really would have liked to continue using the command line if I could find a font package that was much larger.

more on what I have written is a program that grabs the current quotes for precious metals and calculates and displays the price and scrap price.
the basic output is this below.

Gold = $xxxx.xx
Silver = $xxxx.xx
Platinum =$xxxx.xx
Scrap Gold per dwt = $xxx.xx
Scrap Silver per dwt = $xxx.xx
Scrap Platinum per dwt = $xxx.xx

I can have it output to a file and I was considering if it was possible to have a browser keep reading the file and updating the display output.
I need to be able to control the text so that it is readable from afar.
I really do not want to use GTK or QT4. I want to keep this as simple as possible please.
SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
OK thank you for your help thus far. It works which is great! But I am very unfamiliar with javascript and attempted to do some research to change fonts and colors and cannot seem to succeed the only font I was able to change was the second frame that displays [file:///tmp/s]

right above the input value I added
<FONT SIZE=48>

Can you help me where do I put the code for font size, font color and if I need actual font name? Also how do I get rid of the second box that displays file:///tmp/s?


I also had another idea based on this idea of yours what if I output everything to a file in html code, or would that not work in this case. I think this is a stupid idea but I thought I would throw it past you to get your opinion.

Also if you have any info on the asciart that would be awesome. I attempted that route I created the ascii numbers but had problems with C++ to move the cursor around the screen. Could not find code that actually worked.
Can you help me where do I put the code for font size, font color and if I need actual font name?

i'll be back soon on that part. it is only feasible if you host bith the source file and the frame on the same server, because of various cross-domain scripting restrictions. i'm pretty busy right now, but i'll come with a working sample, possibly by using something else than an iframe (ajax or something similar) if you are bothered with the restriction

Also how do I get rid of the second box that displays file:///tmp/s?

not sure i understand, bu i added the box, because i did not want to hard-code the filename. removing it should be trivial.


I also had another idea based on this idea of yours what if I output everything to a file in html code, or would that not work in this case

it would with the code i gave you above. just name the file *.html and make it valid html

Also if you have any info on the asciart that would be awesome. I attempted that route I created the ascii numbers but had problems with C++ to move the cursor around the screen

i'd need a sample, and better description of the bug, but i'm not really knowlegable on hat part
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thank you for your solutions!