focus tricks.


Subject: focus tricks.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Mon Apr 03 2000 - 00:10:52 CDT


Hi Paul,
        I've been thinking through your objection to my suggestion for
using focus change events to track the most recently focussed document
view. I'm very new to GUI based development but I don't see why my
suggestion wouldn't work, for modeless dialogs, at least on the GTK
version.

A modeless GTK dialog forks off a seperate gtk_main loop in a sperate
window. Events associated with the dialog are forwarded to the dialog,
events associated with the main abiword view are forwarded to that view.
You guys have already solved the problem of many simultaneous views of
even the same document. Abiword is a really beautiful piece of work and
this is just another example of how well designed and implemented it is.
Events associated with these different views go to the views correctly,
modulo last weeks POW. This all basically works.

These seperate views can communicate via common memory. A modeless dialog
is just one more process that can communicate via the shared memory. The
gotcha you pulled on me before about which window should receive "Insert
Symbol" characters is solved by just tracking focus events within the
event logic associated with each view. Every time a view receives a focus
event its pointer is put in the front of a queue of "most recently
focussed" views. In gtk it is quite easy to intercept and pass on events.
Havoc's book explains how to do this. I'll write some toy programs to test
that this concept works too bit I don't see why it wouldn't. Surely
Windows has a similar scheme? We only have to look specifically for focus
events and we can just ignore (for this piece of code) everything else. I
don't understand your objection to do with a "mess" of event handlers. We
write one simple extra event handler in platform specific code. Everything
else is cross platform.

What have I missed?

Martin



This archive was generated by hypermail 2b25 : Mon Apr 03 2000 - 00:10:58 CDT