[squeak-dev] Re: Looking for HostWindowPlugin usage code

Igor Stasenko siguctua at gmail.com
Sun Sep 14 23:29:56 UTC 2008


2008/9/15 Andreas Raab <andreas.raab at gmx.de>:
> Igor Stasenko wrote:
>>
>> I think that same could be applied to morphic without much pain.
>> The point why i asking, i want to try to completely replace core VM
>> functionality with HostWindow plugin. To make all stuff concerning
>> windowing / display will be governed by HostWindowPlugin.
>
> As long as you're only planning to support a single window, it's pretty
> simple. As a matter of fact, check out the new Squeakland image - it
> includes a zoom mode which virtualizes all of the Display operations and
> something similar could easily be hooked into a Ffenestri backend.
>
Thanks for pointers.
I'm looking forward for virtualizing a Display part to make it easier
to use multiple Displays, and, of course, use it in Hydra.

> It gets much more tricky once you're trying to support more than one Morphic
> world though, since the assumption that there's only ever a single active
> Morphic world is so widely distributed in the code. Check this out, for
> example:
>
> SystemNavigation new browseAllSelect:[:cm|
>  (cm hasLiteral: (Smalltalk associationAt: #World))
>    or:[cm hasLiteral: (Smalltalk associationAt: #ActiveWorld)]]
>
> There are literally *hundreds* of references all over the places that
> require fixing, plus their senders, the senders of their senders etc. And
> there is even more to it than only those globals - text editing for example
> uses a single shared undo buffer which gets screwed up if you ever have more
> than a single editing context.
>
> BTW, when I wrote Tweak I had this scenario specifically in mind (i.e.,
> potentially support multiple windows from within it) which is why it has all
> of these references localized. Fixing this in Morphic is going to be  a
> major job.
>

Right. I don't plan to go deep with that now (any brave soul here?).
As initial refactoring, i guess that it can be started by replacing
all references to World with message 'self world' or 'self
morphicWorld' , if first is ambiguous.
Then there can be two basic implementations:
Object>>morphicWorld
   ^ self defaultMorphicWorld

Morph>>morphicWorld
  ^ self topmostParent ifNil: [ self defaultMorphicWorld ]

or something like that.

> Cheers,
>  - Andreas



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list