From asharma@netscape.com
Received: (qmail 2978 invoked from network); 3 Dec 1997 08:07:45 -0000
Received: from h-205-217-237-46.netscape.com (HELO netscape.com) (205.217.237.46)
  by mail2.redhat.com with SMTP; 3 Dec 1997 08:07:45 -0000
Received: from dredd.mcom.com (dredd.mcom.com [205.217.237.54])
	by netscape.com (8.8.5/8.8.5) with ESMTP id AAA29321
	for <gtk-list@redhat.com>; Wed, 3 Dec 1997 00:07:30 -0800 (PST)
Received: from zugzwang.mcom.com ([206.222.233.103]) by dredd.mcom.com
          (Netscape Messaging Server 3.0)  with ESMTP id AAA18204
          for <gtk-list@redhat.com>; Wed, 3 Dec 1997 00:07:28 -0800
Received: (from asharma@localhost)
	by zugzwang.mcom.com (8.8.5/8.8.5) id AAA04179
	for gtk-list@redhat.com; Wed, 3 Dec 1997 00:07:30 -0800
Date: Wed, 3 Dec 1997 00:07:30 -0800
From: Arun Sharma <asharma@netscape.com>
Message-Id: <199712030807.AAA04179@zugzwang.mcom.com>
To: gtk-list@redhat.com
Subject: gtktext anyone?


Looks like no one is working on the gtktext widget. One of the main
reasons why Gtk gets beaten up on the Usenet seems to be due to the
absence of a good text widget.

I'm hoping to be able to spend some time working on it. If you have
a wish list please send it to me.

	-Arun

From wille@kew.netlife.de
Received: (qmail 24852 invoked from network); 3 Dec 1997 19:37:21 -0000
Received: from public.uni-hamburg.de (134.100.41.1)
  by mail2.redhat.com with SMTP; 3 Dec 1997 19:37:21 -0000
Received: from [194.221.212.226] by public.uni-hamburg.de (AIX 4.1/UCB 5.64/4.03)
          id AA41854; Wed, 3 Dec 1997 20:37:05 +0100
Message-Id: <9712031937.AA41854@public.uni-hamburg.de>
Date: Wed, 3 Dec 1997 21:34:07 +0100 (MET)
From: Stefan_Wille@public.uni-hamburg.de
Sender: Stefan Wille <wille@kew.netlife.de>
Subject: Re: [gtk-list] gtktext anyone?
To: gtk-list@redhat.com
In-Reply-To: <199712030807.AAA04179@zugzwang.mcom.com>
Mime-Version: 1.0
Content-Type: TEXT/plain; CHARSET=US-ASCII

On  3 Dec, Arun Sharma wrote:
> 
> Looks like no one is working on the gtktext widget. One of the main
> reasons why Gtk gets beaten up on the Usenet seems to be due to the
> absence of a good text widget.

> I'm hoping to be able to spend some time working on it. If you have
> a wish list please send it to me.

cool! - here is my wish list:

- cut/copy/paste
- unlimited undo/redo - this probably is a bunch of work, but I always
  find it very annoying when I cannot use 'undo' in an email editor.
- custom definable key mappings would be nice, so that I can have
  undo on ctrl-z (win-style) and the emacs guys can have it on ctrl-_
  and so on
- drag and drop to move selected text around
- drag and drop to move/copy selected text in another widget
  - very nice to have

Bye bye
Stefan

From tromey@creche.cygnus.com
Received: (qmail 25064 invoked from network); 3 Dec 1997 20:45:03 -0000
Received: from creche.cygnus.com (192.203.188.26)
  by mail2.redhat.com with SMTP; 3 Dec 1997 20:45:03 -0000
Received: (from tromey@localhost) by creche.cygnus.com (8.7.6/8.7.3) 
id NAA04315; Wed, 3 Dec 1997 13:44:07 -0700
To: gtk-list@redhat.com
Subject: Re: [gtk-list] gtktext anyone?
References: <199712030807.AAA04179@zugzwang.mcom.com>
X-Zippy:  If I felt any more SOPHISTICATED I would DIE of EMBARRASSMENT!
X-Attribution:  Tom
BCC:
Reply-To: tromey@cygnus.com
From: Tom Tromey <tromey@creche.cygnus.com>
Date: 03 Dec 1997 13:44:04 -0700
In-Reply-To: Arun Sharma's message of Wed, 3 Dec 1997 00:07:30 -0800
Message-ID: <m190u217jf.fsf@creche.cygnus.com>
Lines: 23
X-Mailer: Red Gnus v0.34/Emacs 19.34

[ text widget ]

Arun> I'm hoping to be able to spend some time working on it. If you
Arun> have a wish list please send it to me.

Not a wish list per se, but a priority: the text widget's inability to
allow even simple user editing prevents me from writing a notepad-like
utility for Gnome.  So ideally I'd like to see this happen first.


Some other things I noticed:

* The text widget should generate "changed" signals when editing
happens.  (That way a notepad could know when a file needs to be
saved.)

* The current key handling doesn't look sufficient.  I'd like to see
something more like Emacs keymaps, so that multi-key sequences could
be given a meaning.  In an ideal world, the entry widget would do this
too, and both would use bindings discovered in ~/.inputrc somehow --
and idea from somebody (forgot who) on the Gnome list.

Tom

From kjahds@kjahds.com
Received: (qmail 29490 invoked from network); 3 Dec 1997 20:53:36 -0000
Received: from cc1003573-a.ewndsr1.nj.home.com (HELO kjahds.kjahds.com) (24.2.88.5)
  by mail2.redhat.com with SMTP; 3 Dec 1997 20:53:36 -0000
Received: from localhost (kjahds@localhost) by kjahds.kjahds.com (8.7.5/8.7.3) 
with SMTP id PAA03951 for <gtk-list@redhat.com>; Wed, 3 Dec 1997 15:52:13 -0500
Date: Wed, 3 Dec 1997 15:52:13 -0500 (EST)
From: Kenneth Albanowski <kjahds@kjahds.com>
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: gtktext anyone?
In-Reply-To: <9712031937.AA41854@public.uni-hamburg.de>
Message-ID: <Pine.LNX.3.93.971203154547.772H-100000@kjahds.kjahds.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Wed, 3 Dec 1997 Stefan_Wille@public.uni-hamburg.de wrote:

> On  3 Dec, Arun Sharma wrote:
> > 
> > Looks like no one is working on the gtktext widget. One of the main
> > reasons why Gtk gets beaten up on the Usenet seems to be due to the
> > absence of a good text widget.
> 
> > I'm hoping to be able to spend some time working on it. If you have
> > a wish list please send it to me.
> 
> cool! - here is my wish list:
> 
> - cut/copy/paste
> - unlimited undo/redo - this probably is a bunch of work, but I always
>   find it very annoying when I cannot use 'undo' in an email editor.

Actually, with the proper model this can be very simple. The basic idea is
that every function performed on the text widget should add another
function to a list that undoes the function. With sufficient ingenuity,
this one concept gives you unlimited undo/redo with little extra work.

The basic model looks like:

  gtk_text_insert(GtkText * widget, char * theText)
  {
    gtk_text_add_undo(widget, gtk_text_delete, startPos, endPos);
    // Deal with insertion
  }

  gtk_text_delete(GtkText * widget, int startPos, int endPos)
  {
    gtk_text_add_undo(widget, gtk_text_insert, startPos, theText);
    // Deal with deletion
  }

Of course, this is _much_ easier in a language other then C, where you
have closures, garbage collected strings, etc. Getting this technique
operating in Gtk is, unfortunately, left as an exercise for the reader. 

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)

From asharma@netscape.com
Received: (qmail 8414 invoked from network); 3 Dec 1997 23:00:07 -0000
Received: from h-205-217-237-46.netscape.com (HELO netscape.com) (205.217.237.46)
  by mail2.redhat.com with SMTP; 3 Dec 1997 23:00:07 -0000
Received: from dredd.mcom.com (dredd.mcom.com [205.217.237.54])
	by netscape.com (8.8.5/8.8.5) with ESMTP id PAA03373
	for <gtk-list@redhat.com>; Wed, 3 Dec 1997 15:00:05 -0800 (PST)
Received: from zugzwang.mcom.com ([206.222.233.103]) by dredd.mcom.com
          (Netscape Messaging Server 3.0)  with ESMTP id AAA22085
          for <gtk-list@redhat.com>; Wed, 3 Dec 1997 15:00:05 -0800
Received: (from asharma@localhost)
	by zugzwang.mcom.com (8.8.5/8.8.5) id PAA09040;
	Wed, 3 Dec 1997 15:00:04 -0800
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: gtktext anyone?
References: <Pine.LNX.3.93.971203154547.772H-100000@kjahds.kjahds.com>
From: Arun Sharma <asharma@netscape.com>
Mime-Version: 1.0 (generated by tm-edit 7.103)
Content-Type: text/plain; charset=US-ASCII
Date: 03 Dec 1997 15:00:04 -0800
In-Reply-To: Kenneth Albanowski's message of Wed, 3 Dec 1997 15:52:13 -0500 (EST)
Message-ID: <sn04t4qjamj.fsf@zugzwang.mcom.com>
Lines: 15
X-Mailer: Gnus v5.5/Emacs 20.2

On Wed, 3 Dec 1997 15:52:13 -0500 (EST), Kenneth Albanowski wrote:

	k> Of course, this is _much_ easier in a language other then
	k> C, where you have closures, garbage collected strings,
	k> etc. Getting this technique operating in Gtk is,
	k> unfortunately, left as an exercise for the reader.

My idea is that the text widget would provide the basic infrastructure
on which scripting languages would build more complex functionality.

A minimal amount of functionality would also be provided as a default
implementation. 

	-Arun

From owt1@cornell.edu
Received: (qmail 18786 invoked from network); 3 Dec 1997 23:12:57 -0000
Received: from cu-dialup-0112.cit.cornell.edu (qmailr@132.236.236.128)
  by mail2.redhat.com with SMTP; 3 Dec 1997 23:12:57 -0000
Received: (qmail 16658 invoked by uid 504); 3 Dec 1997 23:15:02 -0000
To: Arun Sharma <asharma@netscape.com>
Cc: gtk-list@redhat.com
Subject: Re: [gtk-list] gtktext anyone?
References: <199712030807.AAA04179@zugzwang.mcom.com>
From: Owen Taylor <owt1@cornell.edu>
Date: 03 Dec 1997 18:15:02 -0500
In-Reply-To: Arun Sharma's message of Wed, 3 Dec 1997 00:07:30 -0800
Message-ID: <lzg1oaf289.fsf@cu-dialup-0909.cit.cornell.edu>
Lines: 22
X-Mailer: Gnus v5.5/Emacs 20.2
X-Emacs: Emacs 20.2, MULE 3.0 (MOMIJINOGA)
MIME-Version: 1.0 (generated by SEMI MIME-Edit 0.98 - =?ISO-8859-4?Q?"D=F2?=
  =?ISO-8859-4?Q?h=F2ji"?=)
Content-Type: text/plain; charset=US-ASCII


Arun Sharma <asharma@netscape.com> writes:

> Looks like no one is working on the gtktext widget. One of the main
> reasons why Gtk gets beaten up on the Usenet seems to be due to the
> absence of a good text widget.
> 
> I'm hoping to be able to spend some time working on it. If you have
> a wish list please send it to me.

As well as the obvious "get insertion working", I'd like to
see selection handling and internationalized input via XIM.

The entry widget does these reasonably well right now - and could
serve as an example (I still need to add cut/copy/paste via
the clipboard). I'd also be happy to provide assistance with
getting this stuff working.

Regards,
                                        Owen

From tromey@creche.cygnus.com
Received: (qmail 18812 invoked from network); 4 Dec 1997 03:57:37 -0000
Received: from creche.cygnus.com (192.203.188.26)
  by mail2.redhat.com with SMTP; 4 Dec 1997 03:57:37 -0000
Received: (from tromey@localhost) by creche.cygnus.com (8.7.6/8.7.3) id UAA05273; 
Wed, 3 Dec 1997 20:55:54 -0700
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: gtktext anyone?
References: <sn04t4qjamj.fsf@zugzwang.mcom.com>
X-Zippy:  Edwin Meese made me wear CORDOVANS!!
X-Attribution:  Tom
BCC:
Reply-To: tromey@cygnus.com
From: Tom Tromey <tromey@creche.cygnus.com>
Date: 03 Dec 1997 20:55:53 -0700
In-Reply-To: Arun Sharma's message of 03 Dec 1997 15:00:04 -0800
Message-ID: <m1wwhlzrqu.fsf@creche.cygnus.com>
Lines: 12
X-Mailer: Red Gnus v0.34/Emacs 19.34

Arun> My idea is that the text widget would provide the basic
Arun> infrastructure on which scripting languages would build more
Arun> complex functionality.

Arun> A minimal amount of functionality would also be provided as a
Arun> default implementation.

I agree.  For instance, not every text widget needs undo.  But if the
signals are right, you could implement undo as an add-on library
(perhaps this should even come with GTk, I don't know).

Tom

From adam@uunet.pipex.com
Received: (qmail 31879 invoked from network); 10 Dec 1997 14:34:40 -0000
Received: from sierra.sci-park.uunet.pipex.com (194.130.1.24)
  by mail2.redhat.com with SMTP; 10 Dec 1997 14:34:40 -0000
Received: (from adam@localhost) by sierra.sci-park.uunet.pipex.com (8.6.11/8.6.9) 
id OAA28322; Wed, 10 Dec 1997 14:36:54 GMT
Date: Wed, 10 Dec 1997 14:36:54 GMT
Message-Id: <199712101436.OAA28322@sierra.sci-park.uunet.pipex.com>
From: "Adam D. Moss" <adam@uunet.pipex.com>
To: gtk-list@redhat.com
Subject: [gtk-list] gtktext anyone?
In-Reply-To: <199712030807.AAA04179@zugzwang.mcom.com>
References: <199712030807.AAA04179@zugzwang.mcom.com>
X-Face: (nkA7Jo"mh0eeI5Dm>hh$A3MbBl(g(*H=<>eY5o}>u}}=eY~8k)/pW^sT+vNd%qT=f"m1'V
	@I/:hn=<pY-GHP#b9/NZPZt2yYyO6u2jq?@"3|W4H97aRTd,+;"e4)#bOkx


Arun Sharma writes:
 > Looks like no one is working on the gtktext widget. One of the main
 > reasons why Gtk gets beaten up on the Usenet seems to be due to the
 > absence of a good text widget.
 > 
 > I'm hoping to be able to spend some time working on it. If you have
 > a wish list please send it to me.

Only that, as Josh requested, you don't throw away his existing
text-widget work which is very well thought out.  Just needs building
upon.:)

--Adam

From asharma@netscape.com
Received: (qmail 27302 invoked from network); 13 Jan 1998 07:34:59 -0000
Received: from h-208-12-32-80.netscape.com (HELO zugzwang.mcom.com) (208.12.32.80)
  by mail2.redhat.com with SMTP; 13 Jan 1998 07:34:59 -0000
Received: (from asharma@localhost)
	by zugzwang.mcom.com (8.8.7/8.8.7) id XAA22595;
	Mon, 12 Jan 1998 23:34:36 -0800
To: gtk-list@redhat.com
Subject: gtktext and other stuff
From: Arun Sharma <asharma@netscape.com>
Date: 12 Jan 1998 23:34:36 -0800
Message-ID: <sn0afd07roz.fsf@zugzwang.mcom.com>
Lines: 44
X-Mailer: Gnus v5.5/Emacs 20.2

Hi,

I've been spending the last couple of days looking at ways to make
gtktext work. After reading the code a couple of times, I have a rough
idea of how the widget works.

Here's is what I think about it:

1. As things stand now, one needs to call gtk_widget_realize before
   calling gtk_text_insert (at least testgtk.c does). I've removed
   this unnecessary restriction. In my book, the widget should be as
   easy to use as:

	gtk_text_new()
	gtk_text_insert()
	gtk_widget_show()

2. The scroll bars should be automatic from the widget user's point of
   view i.e. one doesn't have to explicitly create and attach them.

3. Is there a reason why text->cursor_mark exists ? I think it's
   duplicating text->point. Am I missing something here ?

Also, I tried integrating Python-gtk bindings with gnome. I have a
Makefile that works (attached) and am unable to write a Makefile.am
that does the same. Can someone help ? Having a leading underscore in
"_gtkmodule.so" seems to be a problem with automake.

	-Arun

From jpaint@serv.net
Received: (qmail 27061 invoked from network); 13 Jan 1998 14:54:32 -0000
Received: from itchy.serv.net (205.153.153.233)
  by mail2.redhat.com with SMTP; 13 Jan 1998 14:54:32 -0000
Received: from localhost (jpaint@localhost)
	by itchy.serv.net (8.8.5/8.8.5) with SMTP id GAA29594
	for <gtk-list@redhat.com>; Tue, 13 Jan 1998 06:54:33 -0800 (PST)
Date: Tue, 13 Jan 1998 06:54:33 -0800 (PST)
From: Jay Painter <jpaint@serv.net>
To: gtk-list@redhat.com
Subject: Re: [gtk-list] gtktext and other stuff
In-Reply-To: <sn0afd07roz.fsf@zugzwang.mcom.com>
Message-ID: <Pine.BSI.3.95.980113063045.29438A-100000@itchy.serv.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Arun,
  I started working on the Text widget last week.  I've already got it
editing, and I'm now working on line cache pruning.  The best way to
do the scrollbars is to write a container widget which contains the text
widget, and two scrollbars.  It's important to do it this way because you
can directly control the size request, eliminating those "all the way up
the container chain" resizes when you hide the scrollbar.  

  I have run into a few problems with the background pixmap
implimentation.  When a line changes size, or you hit "enter", the lines
below are moved down with a gdk_draw_pixmap.  Background pixmaps are
handled specially for the text widget, with it's own pixmap tileing
routine.  This is done so the pixmap will scroll with the text, instead of
the text scrolling over a fixed pixmap.  This works until you want to
reduce flickering and redraws using the pixmap drawing, destroying the
tileing.  However, this whole technique leaves somthing to be desired.  I
think the best thing to do is replace this code.  By creating a extra
parent window, the text window can be allocated exatly one tile wider and
longer than the displayed size, and placed inside the parent window.  Then
a background pixmap can be set for the window, and a combination of
gdk_window_move(s) and gdk_draw_pixmap(s) can be used to scroll with the
same effect.  I think it would probably even be faster, and less work to
code.

-----------------------------------------------------------------------
Jay Painter -- jpaint@serv.net -- jpaint@gimp.org -- jpaint@real.com
http://www.serv.net/~jpaint

On 12 Jan 1998, Arun Sharma wrote:

> Hi,
> 
> I've been spending the last couple of days looking at ways to make
> gtktext work. After reading the code a couple of times, I have a rough
> idea of how the widget works.
> 
> Here's is what I think about it:
> 
> 1. As things stand now, one needs to call gtk_widget_realize before
>    calling gtk_text_insert (at least testgtk.c does). I've removed
>    this unnecessary restriction. In my book, the widget should be as
>    easy to use as:
> 
> 	gtk_text_new()
> 	gtk_text_insert()
> 	gtk_widget_show()
> 
> 2. The scroll bars should be automatic from the widget user's point of
>    view i.e. one doesn't have to explicitly create and attach them.
> 
> 3. Is there a reason why text->cursor_mark exists ? I think it's
>    duplicating text->point. Am I missing something here ?
> 
> Also, I tried integrating Python-gtk bindings with gnome. I have a
> Makefile that works (attached) and am unable to write a Makefile.am
> that does the same. Can someone help ? Having a leading underscore in
> "_gtkmodule.so" seems to be a problem with automake.
> 
> 	-Arun
> 
> ----
> SWIG=swig -nocomment -python -I swig
> CC=gcc
> CFLAGS=-s -pipe -fPIC -I/usr/include/python1.4
> LIBS=-L/usr/X11/lib -lglib -lgdk -lgtk -lX11 -lm -lXext
> INTERFACES=gtk.i swig/*.i
> 
> all: _gtkmodule.so
> 
> gtk_wrap.c: $(INTERFACES)
>         $(SWIG) gtk.i
> 
> _gtkmodule.so: gtk_wrap.o
>         $(CC) -shared gtk_wrap.o -o _gtkmodule.so $(LIBS)
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 

From starsend@interlog.com
Received: (qmail 1067 invoked from network); 14 Jan 1998 17:24:42 -0000
Received: from smtp.interlog.com (root@198.53.145.6)
  by mail2.redhat.com with SMTP; 14 Jan 1998 17:24:42 -0000
Received: from gold.interlog.com (gold.interlog.com [198.53.145.2])
	by smtp.interlog.com (8.8.3/8.8.5) with ESMTP id MAA26265;
	Wed, 14 Jan 1998 12:24:41 -0500 (EST)
Received: from interlog.com (starsend@ip220-29.cc.interlog.com [207.34.220.29])
	by gold.interlog.com (8.8.5/8.8.5) with ESMTP id MAA29771;
	Wed, 14 Jan 1998 12:24:38 -0500 (EST)
Received: (from starsend@localhost) by interlog.com (8.8.3/8.8.3) id LAA00364; 
Wed, 14 Jan 1998 11:49:31 -0500
From: "Star's End" <starsend@interlog.com>
Message-Id: <199801141649.LAA00364@interlog.com>
Subject: Re: [gtk-list] Re: gtktext and other stuff
To: gtk-list@redhat.com
Date: Wed, 14 Jan 1998 11:48:31 -0500 (EST)
Cc: starsend@interlog.com, jpaint@real.com
In-Reply-To: <Pine.BSI.3.95.980113063045.29438A-100000@itchy.serv.net> 
from "Jay Painter" at Jan 13, 98 06:54:33 am
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit


I have been working on a editor using gtk. I got to the point where
I need to use gtktext and found out how broken it is. I was going 
through its internals, and found out how little I understood of the
gdk.

If you need someone to test the widget, I have a ready made app in the
alpha stages to drop the widget in.

> 
> Arun,
>   I started working on the Text widget last week.  I've already got it
> editing, and I'm now working on line cache pruning.  The best way to
> do the scrollbars is to write a container widget which contains the text
> widget, and two scrollbars.  It's important to do it this way because you
> can directly control the size request, eliminating those "all the way up
> the container chain" resizes when you hide the scrollbar.  

I agree on the approach you suggested. 

> 
>   I have run into a few problems with the background pixmap
> implimentation.  When a line changes size, or you hit "enter", the lines
> below are moved down with a gdk_draw_pixmap.  Background pixmaps are
> handled specially for the text widget, with it's own pixmap tileing
> routine.  This is done so the pixmap will scroll with the text, instead of
> the text scrolling over a fixed pixmap.  This works until you want to
> reduce flickering and redraws using the pixmap drawing, destroying the
> tileing.  However, this whole technique leaves somthing to be desired.  I
> think the best thing to do is replace this code.  By creating a extra
> parent window, the text window can be allocated exatly one tile wider and
> longer than the displayed size, and placed inside the parent window.  Then
> a background pixmap can be set for the window, and a combination of
> gdk_window_move(s) and gdk_draw_pixmap(s) can be used to scroll with the
> same effect.  I think it would probably even be faster, and less work to
> code.
> 

From Patrice.Fortier@aquarel.fr
Received: (qmail 19611 invoked from network); 15 Jan 1998 08:40:47 -0000
Received: from dufy.aquarel.fr (193.51.11.1)
  by mail2.redhat.com with SMTP; 15 Jan 1998 08:40:47 -0000
Received: by dufy.aquarel.fr; Thu, 15 Jan 1998 09:40:15 +0100 (MET)
From: Patrice Fortier <Patrice.Fortier@aquarel.fr>
Message-Id: <199801150840.JAA19837@dufy.aquarel.fr>
Subject: Re: [gtk-list] Re: gtktext and other stuff
To: gtk-list@redhat.com
Date: Thu, 15 Jan 1998 09:40:15 +0100 (MET)
In-Reply-To: <199801141649.LAA00364@interlog.com> from "Star's End" at 
Jan 14, 98 11:48:31 am
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

> > Arun,
> >   I have run into a few problems with the background pixmap
> > implimentation.  When a line changes size, or you hit "enter", the lines
> > below are moved down with a gdk_draw_pixmap.  Background pixmaps are
> > handled specially for the text widget, with it's own pixmap tileing
> > routine.  This is done so the pixmap will scroll with the text, instead of
> > the text scrolling over a fixed pixmap.  This works until you want to
> > reduce flickering and redraws using the pixmap drawing, destroying the
> > tileing.  However, this whole technique leaves somthing to be desired.  I
> > think the best thing to do is replace this code.  By creating a extra
> > parent window, the text window can be allocated exatly one tile wider and
> > longer than the displayed size, and placed inside the parent window.  Then
> > a background pixmap can be set for the window, and a combination of
> > gdk_window_move(s) and gdk_draw_pixmap(s) can be used to scroll with the
> > same effect.  I think it would probably even be faster, and less work to
> > code.

I do agree with you on this. less code, faster, and less flickering.
I don't understand why you want to allocate the text window one tile
wider and longer than the parent window (in which you have the pixmap)
though.

Anyway, this is the way to go.

Patrice.

From asharma@netscape.com
Received: (qmail 12413 invoked from network); 19 Jan 1998 07:40:28 -0000
Received: from h-208-12-32-80.netscape.com (HELO zugzwang.mcom.com) (208.12.32.80)
  by mail2.redhat.com with SMTP; 19 Jan 1998 07:40:28 -0000
Received: (from asharma@localhost)
	by zugzwang.mcom.com (8.8.7/8.8.7) id XAA07509;
	Sun, 18 Jan 1998 23:39:25 -0800
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: gtktext and other stuff
References: <Pine.BSI.3.95.980113063045.29438A-100000@itchy.serv.net>
From: Arun Sharma <asharma@netscape.com>
Date: 18 Jan 1998 23:39:25 -0800
In-Reply-To: Jay Painter's message of Tue, 13 Jan 1998 06:54:33 -0800 (PST)
Message-ID: <sn0btx8q5ea.fsf@zugzwang.mcom.com>
Lines: 23
X-Mailer: Gnus v5.5/Emacs 20.2

Jay Painter <jpaint@serv.net> writes:

Jay,

> Arun,
>   I started working on the Text widget last week.  I've already got it
> editing, and I'm now working on line cache pruning.

I was looking at the text widgets of other toolkits (Motif, Qt and Tk)
and it appears that both Motif and Qt do not support multiple colors
and fonts in the text widget.

To me the line cache, text property list etc seem to be an overkill
for most applications. A simple text widget with good default editing
functions would satisfy the needs of 90% of the applications.

As far as supporting multiple fonts and colors goes - Tk has
mechanisms for inserting arbitrary widgets inside the text widget -
which I found interesting.

	-Arun

PS: What exactly is line cache pruning ?

From jpaint@serv.net
Received: (qmail 23483 invoked from network); 29 Jan 1998 21:21:38 -0000
Received: from itchy.serv.net (205.153.153.233)
  by mail2.redhat.com with SMTP; 29 Jan 1998 21:21:38 -0000
Received: from localhost (jpaint@localhost)
	by itchy.serv.net (8.8.5/8.8.5) with SMTP id NAA09258
	for <gtk-list@redhat.com>; Thu, 29 Jan 1998 13:21:43 -0800 (PST)
Date: Thu, 29 Jan 1998 13:21:43 -0800 (PST)
From: Jay Painter <jpaint@serv.net>
To: gtk-list@redhat.com
Subject: Text Widget
Message-ID: <Pine.BSI.3.95.980129131732.6940A-100000@itchy.serv.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

This is a heads-up message that I'm going to rip the pixmap support out of
the GtkText widget for now and just concentrate on getting it working.  My
reasons are:

1) The current pixmap support has some fundamental design problems, which
I have come up with a solution for.

2) The solution for pixmap support in GtkText can be implimented later
without too many problems.

I'm going to start this weekend, so you have some time to voice
objections.

Regards,
Jay

From henrik@studentit.hv.se
Received: (qmail 18084 invoked from network); 23 Feb 1998 12:02:37 -0000
Received: from hkjadm.hv.se (root@194.47.71.73)
  by mail2.redhat.com with SMTP; 23 Feb 1998 12:02:37 -0000
Received: from studentit.hv.se (henrik@localhost [127.0.0.1])
	by hkjadm.hv.se (8.8.5/8.8.5) with ESMTP id NAA20128;
	Mon, 23 Feb 1998 13:02:14 +0100
Message-Id: <199802231202.NAA20128@hkjadm.hv.se>
Date: Mon, 23 Feb 1998 13:02:04 +0100 (CET)
From: henrik@studentit.hv.se
Reply-To: henrik@studentit.hv.se
Subject: Text widget problems.
To: gtk-list@redhat.com
cc: jmacd@cs.berkley.edu
MIME-Version: 1.0
Content-Type: MULTIPART/signed; micalg=pgp-md5; protocol="application/pgp-signature"; 
BOUNDARY="801261895-1169529124-888235337=:20051"

--801261895-1169529124-888235337=:20051
Content-Type: TEXT/plain; CHARSET=US-ASCII


Hi.

I've been playing around with gtk for awhile now, and yesterday I
discovered that I couldnt type swedish characters to a gtktext widget.
Is there any way to do this?

A second question: How do I bind a certain keypress to a button?

/Henrik


--801261895-1169529124-888235337=:20051
Content-Type: APPLICATION/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: 2.6.3i

iQB1AwUBNPFlQYvaZpK9ad99AQF4OgL8DLUOLNAtL+PVH4Z6Wqcg6bzJAJKJ0HPz
n+7E0qPjgTaHpnrgDNn7qCrY6MWJsVjtnPAOPo/UgNwrG0SXxmw6TG334F4daNWH
U/epb7kjnhVYLBFbhBqKx9jyRj6UAdy0
=OCD3
-----END PGP MESSAGE-----

--801261895-1169529124-888235337=:20051--

From timg@means.net
Received: (qmail 7540 invoked from network); 23 Feb 1998 16:40:47 -0000
Received: from halstad-26.dialup.means.net (HELO Camille) (root@206.10.30.30)
  by mail2.redhat.com with SMTP; 23 Feb 1998 16:40:47 -0000
Received: from timg by Camille with local (Exim 1.58 #1)
	id 0y70wI-0000gb-00; Mon, 23 Feb 1998 10:41:10 -0600
Message-ID: <19980223104110.56407@Camille.gerla.org>
Date: Mon, 23 Feb 1998 10:41:10 -0600
From: "Tim P. Gerla" <timg@means.net>
To: timg@means.net
Cc: gtk-list@redhat.com
Subject: Re: [gtk-list] Text widget problems.
References: <199802231202.NAA20128@hkjadm.hv.se>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.81
In-Reply-To: <199802231202.NAA20128@hkjadm.hv.se>; from henrik@studentit.hv.se on 
Mon, Feb 23, 1998 at 01:02:04PM +0100
Sender: RHS Linux User <timg@Camille>

On Mon, Feb 23, 1998 at 01:02:04PM +0100, henrik@studentit.hv.se wrote:
> 
> Hi.
> 
> I've been playing around with gtk for awhile now, and yesterday I
> discovered that I couldnt type swedish characters to a gtktext widget.
> Is there any way to do this?
> 
> A second question: How do I bind a certain keypress to a button?
> 
> /Henrik
> 
I'm having a completely different problem..I can't type anything into my
text boxes! The program segfaults as soon as I press a key. Cursor movement
keys (home, end, arrows), work fine, but letters, etc, don't. Any ideas?

Sorry Henrik..I don't have an answer to your question. :/

-- 
-Tim
timg@means.net | http://flow.ml.org/

From ulric@edu.stockholm.se
Received: (qmail 25702 invoked from network); 23 Feb 1998 17:37:18 -0000
Received: from unknown (HELO ns.edu.stockholm.se) (ulric@195.198.0.10)
  by mail2.redhat.com with SMTP; 23 Feb 1998 17:37:18 -0000
Received: from localhost (ulric@localhost) by ns.edu.stockholm.se (8.8.5/8.7.3) 
with SMTP id SAA21090; Mon, 23 Feb 1998 18:31:41 +0100
Date: Mon, 23 Feb 1998 18:31:40 +0100 (MET)
From: Ulric Eriksson <ulric@edu.stockholm.se>
To: henrik@studentit.hv.se
cc: gtk-list@redhat.com, jmacd@cs.berkley.edu
Subject: Re: [gtk-list] Text widget problems.
In-Reply-To: <199802231202.NAA20128@hkjadm.hv.se>
Message-ID: <Pine.LNX.3.95.980223181857.20938A-100000@ns.edu.stockholm.se>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Mon, 23 Feb 1998 henrik@studentit.hv.se wrote:

> I've been playing around with gtk for awhile now, and yesterday I
> discovered that I couldnt type swedish characters to a gtktext widget.
> Is there any way to do this?

Apparently, as Swedish characters work fine in the Gtk version of Siag.

I don't remember doing anything special. You are welcome to scrutinize the
sources at

	ftp://ftp.edu.stockholm.se/pub/siag/

but I think it should work out of the box.

Hmm, there seems to be some code to handle the key presses after all.

Ulric

From owt1@cornell.edu
Received: (qmail 9558 invoked from network); 23 Feb 1998 19:20:07 -0000
Received: from cu-dialup-0820.cit.cornell.edu (mail@132.236.155.66)
  by mail2.redhat.com with SMTP; 23 Feb 1998 19:20:07 -0000
Received: from otaylor by cu-dialup-0820.cit.cornell.edu with local (Exim 1.82 #1)
	id 0y73SC-0006mh-00; Mon, 23 Feb 1998 14:22:16 -0500
To: henrik@studentit.hv.se
Cc: gtk-list@redhat.com
Subject: Re: Text widget problems.
References: <199802231202.NAA20128@hkjadm.hv.se>
From: Owen Taylor <owt1@cornell.edu>
Date: 23 Feb 1998 14:22:16 -0500
In-Reply-To: henrik@studentit.hv.se's message of Mon, 23 Feb 1998 13:02:04 +0100 (CET)
Message-ID: <lzbtvyxh1z.fsf@cu-dialup-0820.cit.cornell.edu>
Lines: 25
X-Mailer: Gnus v5.5/Emacs 20.2
X-Emacs: Emacs 20.2, MULE 3.0 (MOMIJINOGA)
MIME-Version: 1.0 (generated by SEMI MIME-Edit 0.98 - =?ISO-8859-4?Q?"D=F2?=
  =?ISO-8859-4?Q?h=F2ji"?=)
Content-Type: text/plain; charset=US-ASCII


henrik@studentit.hv.se writes:

> I've been playing around with gtk for awhile now, and yesterday I
> discovered that I couldnt type swedish characters to a gtktext widget.
> Is there any way to do this?

The problem is that the Text widget isn't properly internationalized yet.
You can type the Swedish characters into a entry widget (or another
program) and copy them over...

> A second question: How do I bind a certain keypress to a button?

You can't actually make the keypress visually press the button, but
to get the key to call the button's "clicked" signal, you can
create an accelerator table for the window. (See the menu examples
in the tutorial)

Then, you can do:

 gtk_accelerator_table_install (accelerator_table, GTK_OBJECT(button),
                                clicked, key, modifiers);

Hope this helps,
                                        Owen

From henrik@studentit.hv.se
Received: (qmail 14550 invoked from network); 24 Feb 1998 07:33:48 -0000
Received: from hkjadm.hv.se (root@194.47.71.73)
  by mail2.redhat.com with SMTP; 24 Feb 1998 07:33:48 -0000
Received: from studentit.hv.se (henrik@localhost [127.0.0.1])
	by hkjadm.hv.se (8.8.5/8.8.5) with ESMTP id IAA20717;
	Tue, 24 Feb 1998 08:33:17 +0100
Message-Id: <199802240733.IAA20717@hkjadm.hv.se>
Date: Tue, 24 Feb 1998 08:33:10 +0100 (CET)
From: henrik@studentit.hv.se
Reply-To: henrik@studentit.hv.se
Subject: Re: Text widget problems.
To: owt1@cornell.edu
cc: gtk-list@redhat.com
In-Reply-To: <lzbtvyxh1z.fsf@cu-dialup-0820.cit.cornell.edu>
MIME-Version: 1.0
Content-Type: MULTIPART/signed; micalg=pgp-md5; protocol="application/pgp-signature"; 
BOUNDARY="801261895-1254073978-888305601=:20682"

--801261895-1254073978-888305601=:20682
Content-Type: TEXT/plain; CHARSET=US-ASCII


> The problem is that the Text widget isn't properly internationalized yet.
> You can type the Swedish characters into a entry widget (or another
> program) and copy them over...

Are there anyone out there working on making it internationalized?? 


> Then, you can do:
> 
>  gtk_accelerator_table_install (accelerator_table, GTK_OBJECT(button),
>                                 clicked, key, modifiers);
> 
> Hope this helps,

Thanks it did :)

/Henrik


--801261895-1254073978-888305601=:20682
Content-Type: APPLICATION/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: 2.6.3i

iQB1AwUBNPJ3uovaZpK9ad99AQG2EwMAoFvRReX8Gs5LLOXZywdXxkwHHa0R6pKs
NDWxOz84D1bUvv/0MoJNkMDyw1tHG2/ILHMkveQhr6GvdzInHtcezF32lETYTiPg
WC5lgLLwbMgRm/GAq/DWbZqWkcDzGG/u
=5xaE
-----END PGP MESSAGE-----

--801261895-1254073978-888305601=:20682--

From owt1@cornell.edu
Received: (qmail 31770 invoked from network); 24 Feb 1998 18:56:11 -0000
Received: from cu-dialup-0921.cit.cornell.edu (mail@132.236.155.99)
  by mail2.redhat.com with SMTP; 24 Feb 1998 18:56:11 -0000
Received: from otaylor by cu-dialup-0921.cit.cornell.edu with local (Exim 1.82 #1)
	id 0y7PYi-0001TV-00; Tue, 24 Feb 1998 13:58:29 -0500
To: henrik@studentit.hv.se
Cc: gtk-list@redhat.com
Subject: Re: Text widget problems.
References: <199802240733.IAA20717@hkjadm.hv.se>
From: Owen Taylor <owt1@cornell.edu>
Date: 24 Feb 1998 13:58:25 -0500
In-Reply-To: henrik@studentit.hv.se's message of Tue, 24 Feb 1998 08:33:10 +0100 (CET)
Message-ID: <lzzpjgx226.fsf@cu-dialup-0820.cit.cornell.edu>
Lines: 27
X-Mailer: Gnus v5.5/Emacs 20.2
X-Emacs: Emacs 20.2, MULE 3.0 (MOMIJINOGA)
MIME-Version: 1.0 (generated by SEMI MIME-Edit 0.98 - =?ISO-8859-4?Q?"D=F2?=
  =?ISO-8859-4?Q?h=F2ji"?=)
Content-Type: text/plain; charset=US-ASCII


henrik@studentit.hv.se writes:

> [1  <text/plain; US-ASCII (7bit)>]
> 
> > The problem is that the Text widget isn't properly internationalized yet.
> > You can type the Swedish characters into a entry widget (or another
> > program) and copy them over...
> 
> Are there anyone out there working on making it internationalized?? 

In the long term, yes. One of my goals for GTK 2.0 is to make it
work internally with Unicode, and to properly internationalize all
the widgets.

Short term, maybe, maybe not. It would be quite easy to modify the
Text widget to allow Swedish (etc.) characters to be
entered. Unfortunately, that change would also make it possible to
enter characters from the Asian CJK languages. 

While that may sound good, the problem is that the text widget has the
implicit assumption that one byte = one character, and the CJK
languages use variable width encodings. So, the result would be
display corruption, and possibly data corruption or core dumps.

Regards,
                                        Owen

From henrik@studentit.hv.se
Received: (qmail 23613 invoked from network); 25 Feb 1998 08:26:50 -0000
Received: from hkjadm.hv.se (root@194.47.71.73)
  by mail2.redhat.com with SMTP; 25 Feb 1998 08:26:50 -0000
Received: from studentit.hv.se (henrik@localhost [127.0.0.1])
	by hkjadm.hv.se (8.8.5/8.8.5) with ESMTP id JAA23831
	for <gtk-list@redhat.com>; Wed, 25 Feb 1998 09:26:31 +0100
Message-Id: <199802250826.JAA23831@hkjadm.hv.se>
Date: Wed, 25 Feb 1998 09:26:21 +0100 (CET)
From: henrik@studentit.hv.se
Reply-To: henrik@studentit.hv.se
Subject: Re: [gtk-list] Re: Text widget problems.
To: gtk-list@redhat.com
In-Reply-To: <lzzpjgx226.fsf@cu-dialup-0820.cit.cornell.edu>
MIME-Version: 1.0
Content-Type: MULTIPART/signed; micalg=pgp-md5; protocol="application/pgp-signature"; 
BOUNDARY="801261895-1169529124-888395193=:23777"

--801261895-1169529124-888395193=:23777
Content-Type: TEXT/plain; CHARSET=US-ASCII

On 24 Feb, Owen Taylor wrote:

> In the long term, yes. One of my goals for GTK 2.0 is to make it
> work internally with Unicode, and to properly internationalize all
> the widgets.

Sounds very nice, what are the timetables here, I havent been on this
list long enough to get a grasp on when GTK 1.0 is going to be released
and what is going to happen after that ...

> Short term, maybe, maybe not. It would be quite easy to modify the
> Text widget to allow Swedish (etc.) characters to be
> entered. Unfortunately, that change would also make it possible to
> enter characters from the Asian CJK languages. 

Please make these changes :) I need it :)

> While that may sound good, the problem is that the text widget has the
> implicit assumption that one byte = one character, and the CJK
> languages use variable width encodings. So, the result would be
> display corruption, and possibly data corruption or core dumps.

So its not possible to limit the damages of such changes to just allow
latin1 characters?

/Henrik


--801261895-1169529124-888395193=:23777
Content-Type: APPLICATION/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: 2.6.3i

iQB1AwUBNPPVs4vaZpK9ad99AQHrzAL/WoeAlILSUEHk+OH57d8N26VUGyCwgxKQ
TWIdXk4tZupzt07VPAAt2kCvWH3JWGA4Ffd6S8GhhgElXC+E3kWW74nLAPp5uEeI
UdAYNdQQQSANTMYgzLOzC6Jy17Fq672/
=Fpc3
-----END PGP MESSAGE-----

--801261895-1169529124-888395193=:23777--

From owt1@cornell.edu
Received: (qmail 26547 invoked from network); 25 Feb 1998 15:20:07 -0000
Received: from cu-dialup-0207.cit.cornell.edu (mail@132.236.236.147)
  by mail2.redhat.com with SMTP; 25 Feb 1998 15:20:07 -0000
Received: from otaylor by cu-dialup-0207.cit.cornell.edu with local (Exim 1.82 #1)
	id 0y7ifK-00016S-00; Wed, 25 Feb 1998 10:22:34 -0500
To: henrik@studentit.hv.se
Cc: gtk-list@redhat.com
Subject: Re: Text widget problems.
References: <199802250826.JAA23831@hkjadm.hv.se>
From: Owen Taylor <owt1@cornell.edu>
Date: 25 Feb 1998 10:22:34 -0500
In-Reply-To: henrik@studentit.hv.se's message of Wed, 25 Feb 1998 09:26:21 +0100 (CET)
Message-ID: <lzhg5n4slh.fsf@cu-dialup-0108.cit.cornell.edu>
Lines: 47
X-Mailer: Gnus v5.5/Emacs 20.2
X-Emacs: Emacs 20.2, MULE 3.0 (MOMIJINOGA)
MIME-Version: 1.0 (generated by SEMI MIME-Edit 0.98 - =?ISO-8859-4?Q?"D=F2?=
  =?ISO-8859-4?Q?h=F2ji"?=)
Content-Type: text/plain; charset=US-ASCII


henrik@studentit.hv.se writes:

> [1  <text/plain; US-ASCII (7bit)>]
> On 24 Feb, Owen Taylor wrote:
> 
> > In the long term, yes. One of my goals for GTK 2.0 is to make it
> > work internally with Unicode, and to properly internationalize all
> > the widgets.
> 
> Sounds very nice, what are the timetables here, I havent been on this
> list long enough to get a grasp on when GTK 1.0 is going to be released
> and what is going to happen after that ...

  0.99.4 - this Saturday
  0.99.5 - Mar. 6
  1.0    - Mar. 13

After that, ????

> > Short term, maybe, maybe not. It would be quite easy to modify the
> > Text widget to allow Swedish (etc.) characters to be
> > entered. Unfortunately, that change would also make it possible to
> > enter characters from the Asian CJK languages. 
> 
> Please make these changes :) I need it :)

I did it last night - it's in CVS now and will be in 0.99.4.
Didn't want to look like the ugly American... ;-)
(accents? who needs accents?)


> > While that may sound good, the problem is that the text widget has the
> > implicit assumption that one byte = one character, and the CJK
> > languages use variable width encodings. So, the result would be
> > display corruption, and possibly data corruption or core dumps.
> 
> So its not possible to limit the damages of such changes to just allow
> latin1 characters?

That's what I've done. (Well - a bit more general than that - I've
just limited input methods to inserting one byte at a time; so
it should work with Greek, Cyrillic, etc. The preediting support
for CJK is there and looks nice - but just won't insert anything...)

Regards,
                                        Owen