Re: Simple terminal widget



On Wed, 2004-01-21 at 18:45 -0500, George M. Gallant wrote:
> I am looking to embed a simple command line console in a
> GTK application. I have been able to use gtk_text_view with
> limited success by trapping every key-stroke event. My app
> gets the correct characters but the screen gets out of sync
> quickly. What is the mechanism to extract a line of characters
> when the user enters a CR? I am using the stock gtk+-2.0 that
> comes with an up2date RedHat 9.0.

You could take a look at vte. There are examples in included in its
source, and there is gnome-terminal which uses it.

-- m

-- 
-----------------------------------------------------------------------
Mariano Suárez-Alvarez
Departamento de Matemática - FCEyN - Universidad de Buenos Aires
Ciudad Universitaria, Pab. I. (1428) Ciudad de Buenos Aires, Argentina
http://mate.dm.uba.ar/~aldoc9

        De la observación de la irreductibilidad de las creencias
        últimas he sacado la mayor lección de mi vida. Aprendí a
        respetar las ideas ajenas, a detenerme ante el secreto de las
        conciencias, a entender antes de discutir, a discutir antes de
        condenar. Y como estoy en vena de confesiones, hago una más,
        quizás superflua: detesto con toda mi alma a los fanáticos.
        
          Norberto Bobbio, Italia civil.
        
-----------------------------------------------------------------------




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