Native Windows - was RE: Squeak Team plans

jim benson jb at speed.net
Wed Jun 3 03:43:50 UTC 1998


How do I hook up Squeak windows to native windows --

Maloney wrote:

> It's not really very complex. Currently, BitBlt notices if its
> destination is the Display object, and if so it tells the VM that
> which rectangle of the Display has changed. The VM then copies this
> to the screen.
>
> To handle multiple windows, you'd have multiple DisplayScreen objects,

>
> one per native window. You'd need to make BitBlt check to see if
> the destination was any of the DisplayScreen objects associated with
> a window and do a similar copy-to-the-real-window if so.
>
> Look at the implementation and callers of ioShowDisplay().
>
>         -- John

And, of course, John was right. A day and couple of primitives later,
move the Squeak views to the origin of the  window, and voila -- There
be Squeak in native windows. Alas, I still need one more push.

I have brought Squeak events internal to the image, I do my message
dispatching, etc. Here is where I am stuck. Should each of the native
windows maintain their own ControlManager? As I understand it...

Each project has its own ControlManager instance, which keeps track of
all the View/Controllers in the project. Thjs instance is stored in the
global variable ScheduledControllers. When you run Squeak there is only
one native window into which each view is displayed. I 'll call this the

SqueakWindow.  Switching projects switches the ControlManager instance,
and you get a different view list for each project.

So with my newfound empowerment, I open a native window browser, and
schedule it in ScheduledControllers. I reset the native window to be the

window on the screen and a new DisplayScreen becomes the place where the

associated view is projected. However, all of the scheduled views still
want to display onto the global variable Display. Fortunately, in the
native window only the new browser shows, because it is on top.

All looks good until...   You try to update the original native window.
The new browser shows up there too, at the origin. ( Smiley/Frowny faces

omitted / expletives deleted ).

So here are the questions --

How do I fix this?
Should I maintain a ControlManager for each native window and hop back
and modify Project to keep track of multiple control managers?
Should I make the ControlManager instance screenController change when a

native window takes control?
Associate a display with a view, and make the view only display on its
associated view.

Any insights would be appreciated.

jim
 
 
 
 





More information about the Squeak-dev mailing list