Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
HaloMorph
Last updated at 4:59 pm UTC on 16 January 2006
HaloMorph provides a Halo of handles for its target morph. Dragging, duplicating, rotating, and resizing to be done by mousing down on the appropriate handle. There are also handles for help and for a menu of infrequently used operations.

To create you own custom halo selection and layout evaluate the following in a Workspace.

 Preferences editCustomHalos

Then edit the method to for example (a minimal solution)

 customHaloSpecs
 	"Intended for you to modify to suit your personal preference.  What is implemented in the default here is just a skeleton; in comment at the bottom of this method are some useful lines you may wish to paste in to the main body here, possibly modifying positions, colors, etc.."
 	^ #(
 	(addDismissHandle:		left			top				(red		muchLighter)			'Halo-Dismiss')
 	(addGrowHandle:		right		bottom			(yellow)						'Halo-Scale')
 	(addScaleHandle:		right		bottom			(lightOrange)					'Halo-Scale')
 	(addDupHandle:			right		top				(green)							'Halo-Dup')	
 	(addRecolorHandle:		left			bottom			(green muchLighter lighter)		'Halo-Recolor')



)

Choose "accept" and evaluate in the Workspace:

 Preferences installCustomHaloSpecs


To check which specs are installed do evaluate

 Preferences haloSpecifications


The above may be done as well through Preferences halos.

To change the size of the halos change the class method #initialize

From
 initialize
	"HaloMorph initialize"
  	HandleSize _ 16

to for example

 initialize
	"HaloMorph initialize"
  	HandleSize _ 32

And evaluate

 HaloMorph initialize



Note on the implementation:

The method #installHaloSpecsFromArray: uses the class HaloSpec.


Hannes Hirzel