[ENH] Halo policy (Take 2)

Chris Reuter cgreuter at calum.csclub.uwaterloo.ca
Sat Oct 23 07:31:44 UTC 1999


--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii



Hi all,

Here's an enhancement that allows individual Morphs to decide when/if
they will display halos.  Each morph has a halo policy--a flag
indicating one of five possible behaviours.  

The flags are:

                #normal indicates a halo should be added unless the
                  'disableHalos' preference is set.

                #always will always bring up a halo, ignoring the
                 preference.

                #never will disable halos completely.

                #reluctant will bring up a halo only if this morph is
                 a WorldMorph or a child of one (i.e. it's a toplevel
		 window).

                #sameAsOwner will use the owner's policy (or #normal if
                 this morph is a MorphicWorld).

The method #addHalo now also honours the preference #disableHalos, so
that you can turn them all off when you're ready to ship.  (If your
shrink-wrapped application needs to display halos on some morphs,
simply give them the policy #always.)

Using lazy accessors and morphic extension data, only morphs that have
their policies explicitly set will actually have to store them.
Otherwise, they just return the default, #sameAsOwner.  Thus, general
policies can be set by setting a policy in the current world.  Complex
morphs (e.g. browser windows, inspectors, IRC clients) can be
protected by putting "self haloPolicy: #never" in the #initialize
method.



				--Chris


--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; name="NiceHalo.23Oct243am.cs"
 ; x-mac-type="54455854"
 ; x-mac-creator="522A6368"
Content-Disposition: attachment; filename="NiceHalo.23Oct243am.cs"
Content-Transfer-Encoding: imap_stub

0,437,2,2638,2,

--fUYQa+Pmc3FrFX/N--





More information about the Squeak-dev mailing list