[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xwidget branch
From: |
joakim |
Subject: |
Re: xwidget branch |
Date: |
Thu, 01 Jul 2010 21:28:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Jan Djärv <address@hidden> writes:
> address@hidden skrev 2010-06-30 15.09:
>> Jan Djärv<address@hidden> writes:
>>
>>> This sounds like fun. How do you handle multiple windows, that is the
>>> same buffer with widgets displayed in different frames/windows?
>>
>> There are some notes in the readme. I paste it below so we can discuss it
>> and improve it. This is as you might imagine the really tricky part.
>>
>>
>
> I guess it takes some kind of proxy object that keeps track of
> creating the real widget for each window. GtkAction:s can help here.
> You can have a GtkAction instead of the real widget. When redisplay
> is done, check all proxy widgets for the GtkAction, and if no one is
> present for the window, create one. The window can be saved in the
> real widget as widget data.
Ill have to look into that idea. Would it really work for all sorts of
widgets, like sliders? Maybe you can elaborate a bit more, it sounds
interesting.
> I think the "don't display cursor over widget"-problem should have
> some precedence, it really looks awful :-).
Its not spectacularily beautiful no. But doesnt images have the same
issues? Maybe images have some cursor handling code that can be reused?
> I see lots of redisplay-problems with widgets, but that is to expected
> as Emacs doesn't use the Gtk+ event loop. It took a while before Gtk+
> scrollbars displayed nicely, and even now bugs show up. You have to
> request redraw on widgets and flush the Gdk event queue manually at
> appropriate places.
Do you have any example pointers in the Emacs source handy?
>>> Does the widgets always flow with the text or can you anchor them at
>>> fixed positions? I was thinking of per window toolbars.
>>
>> They work like images. It ought to be possible to bind them to a margin
>> or something like images, but I havent tested this. Also like images
>> they are not tied to a window but to a buffer. OTOH xwidgets have,
>> unlike images, their own identity, and I have been thinking of letting
>> an xwidget be able to replace an entire window, etc.
>>
>
> I'll give it a try.
>
> Jan D.
>
>
--
Joakim Verona