Re: Terminal-like widget



On Wed, 2010-11-24 at 20:41 +0100, Jan van der Laan wrote:
> I am looking for a terminal-like widget. Something that offers a prompt 
> for user input and displays messages/output. I have looked at 
> libvte(mm), but as far as I am aware libvte expects a second process 
> which probably also has to supply the prompt etc. using for example 
> readline. In my case I have a library that has, as fas as the terminal 
> part is concerned, two signals: one get_input at which point my program 
> is expected to show a prompt and get input from the user which is then 
> send back to the library and two write_message at which point my program 
> is expected to write the message to the console (btw this can also 
> happen during input).
> 
> I have looked at 'modifying' a textview and have got something that 
> behaves somewhat like a terminal. However, getting everything exactly 
> right is going to be quite a bit of work and I'd rather focus on other 
> aspects of my program. Does any one know of an existing widget I could 
> use? Thanks.
> 
> Regards,
> Jan
> 

Libvtemm should fit your purpose. Using it as a display for some other
process (mostly shell) is one of its uses, but you can also steer
manualy what will be displayed there. To print whatever you want on the
terminal just use feed*() methods of Gnome::Vte::Terminal. For getting
text - see get_text*() methods.



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