Commits

Ryan Macnak committed 201beb8

Allow error to surface if cannot instaniate vcs; missed use of 'blackmarket class'

  • Participants
  • Parent commits 46ade58

Comments (0)

Files changed (2)

-Newspeak3
   
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
 
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
 |
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
 
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
 	objectsHolder ::= MappableHolder with: Array new.
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0" 
   Copyright 2008 Cadence Design Systems, Inc.
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
   Copyright 2008 Cadence Design Systems, Inc.
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0" 
   Copyright 2008 Cadence Design Systems, Inc.
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"
   Copyright 2008 Cadence Design Systems, Inc.
   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"
+Newspeak3
+'Brazil'
+class Brazil usingPlatform: platform = NewspeakObject (
+
+"Brazil, which is the foundation of Newspeak UI (and is indeed named after the movie), could be best described as a multi-platform logical UI and layout framework. It provides the familiar widgets ('visuals') such as Labels, Buttons, and ListBoxes, and container visuals for combining widgets and managing their layout. Unlike the UI frameworks of Squeak or VisualWorks, Brazil does not attempt to actually implement the widgets by emulating them. Instead it functions as a 'logical UI' layer that builds and drives the equivalent 'physical UI' made of native artifacts of the host platform.
+
+Copyright 2008 Cadence Design Systems, Inc.
+Copyright 2009 Ryan Macnak and other contributors.
+   
+Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"|
+	"module state"
+	private defaultFontMapperS
+	private theDesktopS
+	private lastVisitedDirectoryS
+
+	"imports"
+	private Dictionary = platform collections Dictionary.
+	private OrderedCollection = platform collections OrderedCollection.
+	private IdentityDictionary = platform collections IdentityDictionary.
+	private WeakArray = platform collections WeakArray.
+	private Color = platform graphics Color.
+	private Rectangle = platform graphics Rectangle.
+	private SeqCltnReadStream = platform streams SeqCltnReadStream.
+	private CharacterReadWriteStream = platform streams CharacterReadWriteStream.
+	private Transcript = platform streams TempTranscript new. "for SpyingWrapper, InformationRetriever"
+
+	private SmallInteger = platform blackMarket Kernel SmallInteger.	
+	private GradientFillStyle = platform blackMarket Balloon GradientFillStyle.
+	private FileDirectory = platform blackMarket Files FileDirectory.
+	private DosFileDirectory = platform blackMarket Files DosFileDirectory.
+	private TimeStamp = platform blackMarket Kernel TimeStamp.
+	private ZeroDivide = platform blackMarket Exceptions ZeroDivide.
+	private MorphicFontMapper = platform blackMarket BrazilForMorphic MorphicFontMapper.
+	private WorldState = platform blackMarket Morphic WorldState.
+	private World = platform blackMarket World.
+	private BlackMarket = platform blackMarket .	
+			
+	private MorphicAgentFactory = platform blackMarket BrazilForMorphic MorphicAgentFactory.
+	private BrazilMappingForWin32 = platform blackMarket BrazilForWindows BrazilMappingForWin32.
+
+	"public interfacing"
+	public plumbing = PlumbingClasses new.
+	public areas = AreaClasses new. "uses plumbing"
+	public abilities = AbilityClasses new.
+	public manipulation = ManipulationClasses new.
+	public mapping = MappingClasses new.
+	public menus = MenuClasses new.
+	public text = TextClasses new.
+	public visuals = VisualClasses new. "uses plumbing, areas, containers,visuals, but hooked up with postInit"
+	public widgets = WidgetClasses new. "uses visuals"
+	public containers = ContainerClasses new. "uses visual,widgets,plmbing,areas"
+	public tools = ToolClasses new. "uses containers, widgets, areas"
+|visuals postInit)
+(
+class AbilityClasses = (
+"*** EXPERIMENTAL/WORK IN PROGRESS: This code is not yet used by the core system, and may be significantly revised or removed *** This module implements and manages Abilities. Abilities are low-level input event interpreters that translate sequences of events such as mouse presse, releases and moves, into higher-level gestures such as button clicks and drag attempts.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"|
+	"private Dictionary = platform Collections Dictionary.
+	private OrderedCollection = platform Collections OrderedCollection.
+	
+	clickability = Clickability new.
+	draggability = Draggability new.
+	clickabilityAndDraggability = ClickabilityAndDraggability new."
+|)
+(
+class Ability = (
+"This is the abstract superclass of abilities. Any ability is attached to the owner, which is the source of the low-level events it interprets. The owner is often a Visual"|
+	owner
+|)
+('as yet unclassified'
+atttachTo: newOwner = (
+	owner:: newOwner
+)
+detachFrom: presumedOwner = (
+	"A subclass may reimplement this to do the real detaching, provided the presumedOwner is the same as the current owner."
+))
+class Clickability = Mousability (
+"Clickability translates low-level events into click gestures. A click gesture follows the standard behavior of push buttons, where a button is clicked on a mouse up event that occurs within the button's bounds after a prior mouse down event within the bounds. Moving the mouse outside the bounds and then releasing the mouse button effectively cancels the click in progress.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"|
+	clickResponse
+	pressResponse
+	releaseResponse
+|)
+('as yet unclassified'
+defineBehavior = (
+	| normal down outside |
+	normal:: behavior newState.
+	down:: behavior newState.
+	outside:: behavior newState.
+	normal
+		exitAction: [owner grabMouse];
+		entryAction: [owner releaseMouse];
+		on: #mouseDown do:
+			[[invokePressResponse]
+				ensure: [down enter]].
+	down
+		on: #mouseUp do:
+			[[invokeReleaseResponse.
+			invokeClickResponse]
+				ensure: [normal enter]];
+		on: #mouseMove do:
+			[hasMouse ifFalse: 
+				[[invokeReleaseResponse]
+					ensure: [outside enter]]].
+	outside
+		on: #mouseUp do:
+			[[invokeReleaseResponse]
+				ensure: [normal enter]];
+		on: #mouseMove do:
+			[hasMouse ifTrue:
+				[[invokePressResponse]
+					ensure: [down enter]]].
+)
+hasMouse = (
+	^owner localBounds containsPoint: owner mousePoint
+)
+invokeClickResponse = (
+	clickResponse ifNotNil: [:it | it reentrant value]
+)
+invokePressResponse = (
+	pressResponse ifNotNil: [:it | it reentrant value]
+)
+invokeReleaseResponse = (
+	releaseResponse ifNotNil: [:it | it reentrant value]
+)
+resetResponses = (
+	clickResponse: nil.
+	pressResponse: nil.
+	releaseResponse: nil.
+))
+class ClickabilityAndDraggability = Mousability (
+"This class aggregates the two other abilities by becoming the owner of their instances and coordinating their actions and requests.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"|
+	mouseGrabLevel ::= 0.
+|)
+('as yet unclassified'
+attachTo: newOwner = (
+	super attachTo: newOwner.
+	mouseGrabLevel:: 0.
+	attachClickability.
+	attachDraggability.
+)
+grabMouse = (
+	mouseGrabLevel: mouseGrabLevel + 1.
+	mouseGrabLevel = 1 ifTrue: [owner grabMouse].
+)
+releaseMouse = (
+	mouseGrabLevel: mouseGrabLevel - 1.
+	mouseGrabLevel = 0 ifTrue: [owner releaseMouse].
+)
+resetResponses = (
+	clickability detachFrom: self.
+	draggability detachFrom: self.
+)'notifications'
+respondToMouseDownLeft = (
+	clickability respondToMouseDownLeft.
+	draggability respondToMouseDownLeft.
+)
+respondToMouseEntry = (
+	clickability respondToMouseEntry.
+	draggability respondToMouseEntry.
+)
+respondToMouseExit = (
+	clickability respondToMouseExit.
+	draggability respondToMouseExit.
+)
+respondToMouseMove = (
+	clickability respondToMouseMove.
+	draggability respondToMouseMove.
+)
+respondToMouseUpLeft = (
+	clickability respondToMouseUpLeft.
+	draggability respondToMouseUpLeft.
+)'private'
+attachClickability = (
+	clickability attachTo: self.
+	clickability
+		pressResponse: [respondToPress];
+		releaseResponse: [respondToRelease];
+		clickResponse: [respondToClick]
+)
+attachDraggability = (
+	draggability attachTo: self.
+))
+class Draggability = Mousability (
+"Draggability is the ability of a visual to initiate a drag once the mouse button has been pressed over it and then the mouse moved further than a certain threshold distance."|
+	dragStartResponse
+	dragContinueResponse
+	dropResponse
+|)
+('as yet unclassified'
+defineBehavior = (
+	| normalState activatedState draggingState downPoint |
+	normalState:: behavior newState.
+	activatedState:: behavior newState.
+	draggingState:: behavior newState.
+	normalState
+		entryAction: [owner releaseMouse];
+		exitAction: [owner grabMouse];
+		on: #mouseDown do:
+			[downPoint:: owner mousePoint.
+			activatedState enter].
+	activatedState 
+		on: #mouseMove do:
+			[(is: owner mousePoint beyondDragThresholdFrom: downPoint)
+				ifTrue: [draggingState enter]];
+		on: #mouseUp do:
+			[normalState enter].
+	draggingState
+		entryAction: [invokeDragStartResponse];
+		on: #mouseMove do:
+			[invokeDragContinueResponse];
+		on: #mouseUp do:
+			[invokeDropResponse.
+			normalState enter].
+)
+dragThreshold ^<Number> = (
+	^5
+)
+invokeDragContinueResponse = (
+	dragContinueResponse ifNotNil: [:it | it reentrant value]
+)
+invokeDragStartResponse = (
+	dragStartResponse ifNotNil: [:it | it reentrant value]
+)
+invokeDropResponse = (
+	dropResponse ifNotNil: [:it | it reentrant value]
+)
+is: point1 beyondDragThresholdFrom: point2 = (
+	^(point1 x - point2 x) abs > dragThreshold or:
+		[(point1 y - point2 y) abs > dragThreshold]
+)
+resetResponses = (
+	dragStartResponse: nil.
+	dragContinueResponse: nil.
+	dropResponse: nil.
+))
+class FSM = (
+"Finite state machines are used by abilities to describe the interpretation of input they perform."|
+	protected states = OrderedCollection new.
+	protected initialState
+	protected currentState
+|)
+(
+class State = (
+""|
+	eventResponses = Dictionary new.
+	entryAction
+	exitAction
+|)
+('as yet unclassified'
+enter = (
+	enterState: self
+)
+enterState: newCurrentState = (
+	outer FSM enterState: newCurrentState
+)
+on: event <Symbol> do: action <Block> = (
+	^eventResponses at: event put: action
+)
+processEvent: event <Symbol> = (
+	(eventResponses at: event ifAbsent: [^self]) value
+)
+respondToEntry = (
+	entryAction ifNotNil: [:it | it reentrant value]
+)
+respondToExit = (
+	exitAction ifNotNil: [:it | it reentrant value]
+))'as yet unclassified'
+enterState: newCurrentState = (
+	currentState = newCurrentState ifFalse:
+		[currentState respondToExit.
+		currentState:: newCurrentState.
+		currentState respondToEntry].
+)
+newState = (
+	"Create a new state associated with this machine. The first state created is the initial state."
+	| state |
+	state:: State new.
+	states add: state.
+	initialState isNil ifTrue: [setInitialState: state].
+	^state
+)
+processEvent: event <Symbol> = (
+	currentState processEvent: event
+)
+reset = (
+	currentState: initialState
+)
+setInitialState: state = (
+	initialState:: state.
+	currentState:: state
+))
+class Mousability = (
+""|
+	protected behavior = FSM new.
+|defineBehavior)
+('as yet unclassified'
+attachTo: newOwner = (
+	super attachTo: newOwner.
+	behavior reset.
+	owner
+		mouseDownLeftResponse: [respondToMouseDownLeft];
+		mouseUpLeftResponse: [respondToMouseUpLeft];
+		mouseMoveResponse: [respondToMouseMove];
+		mouseEntryResponse: [respondToMouseEntry];
+		mouseExitResponse: [respondToMouseExit]
+)
+defineBehavior = (
+	subclassResponsibility
+)
+detachFrom: presumedOwner = (
+	presumedOwner == owner ifTrue:
+		[owner
+			mouseDownLeftResponse: nil;
+			mouseUpLeftResponse: nil;
+			mouseMoveResponse: nil;
+			mouseEntryResponse: nil;
+			mouseExitResponse: nil.
+		resetResponses.
+		owner:: nil]
+)
+resetResponses = (
+	"No responses here; subclasses with responses should redefine this to nil them all out."
+)
+respondToMouseDownLeft = (
+	behavior processEvent: #mouseDown
+)
+respondToMouseEntry = (
+	behavior processEvent: #mouseEntry
+)
+respondToMouseExit = (
+	behavior processEvent: #mouseExit
+)
+respondToMouseMove = (
+	behavior processEvent: #mouseMove
+)
+respondToMouseUpLeft = (
+	behavior processEvent: #mouseUp
+)))
+class AreaClasses = ("The former category Brazil-Areas"|
+	private MessageRecorder = plumbing MessageRecorder.
+	|)
+(
+class Anchor = Area ("An Anchor is an Area that dictates the placement but not the size of its visual within the parent. The visual is always as large as it wants to be.
+
+The position of the visual is determined using a fraction/offset scheme similar to that used by Frame. Each of the dimensions of the parent is multiplied by the corresponding fraction, and the the offset is added to obtain the anchor position within the current bounds of the parent. For example, an Anchor with the following set of parameters:
+
+	xFraction = 0.5; xOffset = 10
+	yFraction = 0; yOffset = 20
+	
+is positioned at the location 100 @ 20 inside a parent visual of size 200 @ 200, and at the location 150 @ 20 inside a parent of size 300 @ 300.
+
+An additional pair of fraction values, anchor fractions, defines what point of the child is positioned at the anchor location. If the anchor fractions are 0 and 0 it is the top left. If the fractions are 1 and 1, it is the bottom right.
+
+A number of methods of the 'initialize-release' protocol, such as #beCentered or #offset:, cover the common usage scenarios. Refer to those methods for further configuration examples.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	xFractionS xOffsetS yFractionS yOffsetS xAnchorFractionS yAnchorFractionS cachedSuggestedParentExtent lastSuggestedExtentKnownToParent
+	|)
+('accessing'
+boundsWithin: referenceBounds <Rectangle>	^<Rectangle> = (
+
+	| parentOrigin parentExtent width height naturalExtent anchorX anchorY |
+	parentExtent: referenceBounds extent.
+	width: parentExtent x.
+	height: parentExtent y.
+	naturalExtent: visual naturalExtent.
+	anchorX:: (width * xFraction) + xOffset - (naturalExtent x * xAnchorFraction).
+	anchorY:: (height * yFraction) + yOffset - (naturalExtent y * yAnchorFraction).
+	^Rectangle
+		origin: anchorX rounded @ anchorY rounded + referenceBounds origin
+		extent: naturalExtent
+)
+flushLayoutCaches = (
+
+	cachedSuggestedParentExtent: nil
+)
+origin: newOrigin <Point> = (
+	"Configure the receiver so that its visual's top left corner is positioned at the specified offset from the parent's top left corner."
+
+	xFractionS:: 0.
+	xOffsetS:: newOrigin x.
+	yFractionS:: 0.
+	yOffsetS:: newOrigin y.
+	xAnchorFractionS: 0.
+	yAnchorFractionS: 0.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+suggestedParentExtent ^<Point> = (
+	"Answer the minimum extent the parent should have in order for the visual of this area to appear fully visible. In the general case this value depends both on the natural extent of the visual and on the parameters of the area."
+
+	cachedSuggestedParentExtent == nil ifTrue:
+		[cachedSuggestedParentExtent: computeSuggestedParentExtent].
+	^cachedSuggestedParentExtent
+)
+xAnchorFraction ^<Number> = (
+
+	^xAnchorFractionS
+)
+xAnchorFraction: fraction <Number> = (
+
+	xAnchorFractionS:: fraction.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+xFraction ^<Number> = (
+
+	^xFractionS
+)
+xFraction: fraction <Number> = (
+
+	xFractionS:: fraction.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+xOffset ^<Number> = (
+
+	^xOffsetS
+)
+xOffset: offset <Number> = (
+
+	xOffsetS:: offset.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+yAnchorFraction ^<Number> = (
+
+	^yAnchorFractionS
+)
+yAnchorFraction: fraction <Number> = (
+
+	yAnchorFractionS:: fraction.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+yFraction ^<Number> = (
+
+	^yFractionS
+)
+yFraction: fraction <Number> = (
+
+	yFractionS:: fraction.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+yOffset ^<Number> = (
+
+	^yOffsetS
+)
+yOffset: offset <Number> = (
+
+	yOffsetS:: offset.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)'initialize-release'
+anchorPosition: newOrigin <Point> = (
+	"Configure the receiver so that its visual's top left corner is positioned at the specified offset from the parent's top left corner."
+
+	xFractionS:: 0.
+	xOffsetS:: newOrigin x.
+	yFractionS:: 0.
+	yOffsetS:: newOrigin y.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beBottomCenter = (
+	"Configure the receiver to position its visual so that the center of its bottom side is at the center of the bottom side of the visual's parent."
+
+	xFractionS: 0.5.
+	yFractionS: 1.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 0.5.
+	yAnchorFractionS: 1.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beBottomLeft = (
+	"Configure the receiver to position its visual so that its bottom left corner is at the bottom left corner of the visual's parent."
+
+	xFractionS: 0.
+	yFractionS: 1.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 0.
+	yAnchorFractionS: 1.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beBottomRight = (
+	"Configure the receiver to position its visual so that its bottom right corner is at the bottom right corner of the visual's parent."
+
+	xFractionS: 1.
+	yFractionS: 1.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 1.
+	yAnchorFractionS: 1.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beCentered = (
+	"Configure the receiver to position its visual so that its center is at the center of the visual's parent."
+
+	xFractionS: 0.5.
+	yFractionS: 0.5.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 0.5.
+	yAnchorFractionS: 0.5.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beLeftCenter = (
+	"Configure the receiver to position its visual so that the center of its left side is at the center of the left side of the visual's parent."
+
+	xFractionS: 0.
+	yFractionS: 0.5.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 0.
+	yAnchorFractionS: 0.5.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beRightCenter = (
+	"Configure the receiver to position its visual so that the center of its right side is at the center of the right side of the visual's parent."
+
+	xFractionS: 1.
+	yFractionS: 0.5.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 1.
+	yAnchorFractionS: 0.5.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beTopCenter = (
+	"Configure the receiver to position its visual so that the center of its top side is at the center of the top side of the visual's parent."
+
+	xFractionS: 0.5.
+	yFractionS: 0.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 0.5.
+	yAnchorFractionS: 0.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beTopLeft = (
+	"Configure the receiver to position its visual so that its top left corner is at the top left corner of the visual's parent."
+
+	xFractionS: 0.
+	yFractionS: 0.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 0.
+	yAnchorFractionS: 0.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+beTopRight = (
+	"Configure the receiver to position its visual so that its top right corner is at the top right corner of the visual's parent."
+
+	xFractionS: 1.
+	yFractionS: 0.
+	xOffsetS: 0.
+	yOffsetS: 0.
+	xAnchorFractionS: 1.
+	yAnchorFractionS: 0.
+	flushLayoutCaches.
+	requestBoundsUpdate
+)
+visual: aVisual = (
+
+	super visual: aVisual.
+	resetLastSuggestedExtentKnownToParent.
+	xFraction: 0.
+	yFraction: 0.
+	xOffset: 0.
+	yOffset: 0.
+	xAnchorFraction: 0.
+	yAnchorFraction: 0.
+)'private'
+computeSuggestedParentExtent ^<Point> = (
+	"Answer the minimum extent the parent should have in order for the visual of this area to appear fully visible. In the general case this value depends both on the natural extent of the visual and on the parameters of the area."
+
+	| naturalExtent |
+	naturalExtent:: visual naturalExtent.
+	^(suggestedParentSizeForFraction: xFraction 
+		offset: xOffset 
+		size: naturalExtent x 
+		anchorFraction: xAnchorFraction)
+	@ (suggestedParentSizeForFraction: yFraction 
+		offset: yOffset 
+		size: naturalExtent y 
+		anchorFraction: yAnchorFraction)
+)
+suggestedParentSizeForFraction: fraction <Number> offset: offset <Number> size: size <Number> anchorFraction: anchorFraction <Number> = (
+	"Used internally by #suggestedParentExtent to compute the suggested parent's size given all the relevant layout parameters along one of the axes. The suggested size is the minimum size of the parent such that the entire child will appear unobscured inside it."
+	
+	| size1 size2 |
+	size1:: fraction ~= 1
+		ifTrue: [(1 - anchorFraction) * size + offset / (1 - fraction)]
+		ifFalse: [0].
+	size2:: fraction ~= 0
+		ifTrue: [anchorFraction * size - offset / fraction]
+		ifFalse: [0].
+	^size1 rounded max: size2 rounded
+)'restricted'
+copyConfigurationFromAnchor: another <Anchor> = (
+
+	xFraction:: another xFraction.
+	xOffset:: another yOffset.
+	yFraction:: another yFraction.
+	yOffset:: another yOffset.
+)
+copyConfigurationTo: another <Area> = (
+
+	another copyConfigurationFromAnchor: self
+)
+resetLastSuggestedExtentKnownToParent = (
+
+	lastSuggestedExtentKnownToParent:: -1 @ -1
+	"we need a value that's a legal Point but cannot equal any legal extent"
+)
+suggestedParentHeightForWidth: width <Number> = (
+
+	^suggestedParentExtent y
+)'testing'
+isRelative ^<Boolean> = (
+	"True if the final bounds depend on the size of the parent."
+	
+	^xFraction ~= 0
+		or: [yFraction ~= 0]
+)
+isSqueezing ^<Boolean> = (
+
+	^false
+)
+isVisualSquishy ^<Boolean> = (
+	^false "no matter what the visual is, an anchored one has no chance to exhibit its squishiness"
+)
+mayAccommodateVisualsNaturalHeightChange ^<Boolean> = (
+	^true "An anchor is accommodating by definition."
+)
+mayAccommodateVisualsNaturalWidthChange ^<Boolean> = (
+	^true "An anchor is accommodating by definition."
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class Area = ("An Area is an object associated with a visual to capture the visual's positioning properties. The Area class itself is abstract. 
+
+When a visual is added to a parent, the visual automatically installs an area most appropriate for the particular parent. 
+
+Slots:
+	visualS <Visual> -- The visual this area is attached to.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0"|
+	visualS
+	|)
+('accessing'
+flushLayoutCaches = (
+	"Subclasses that cache state in order to speed things up must redefine this method to discard the cached data when requested."
+)
+visual = (
+	^visualS
+)'as yet unclassified'
+isVisualSquishy ^<Boolean> = (
+	"When containers compute their squishiness, they rely on this method to determine if the combination of a child's squishiness together with the area settings would in fact make the parent squishy."	
+	subclassResponsibility
+)
+mayAccommodateVisualsNaturalHeightChange ^<Boolean> = (
+	^visual parent mayAccommodateNaturalHeightChangeOf: visual 
+)
+mayAccommodateVisualsNaturalWidthChange ^<Boolean> = (
+	^visual parent mayAccommodateNaturalWidthChangeOf: visual 
+)'initialize-release'
+visual: aVisual <Visual> = (
+
+	visualS:: aVisual
+)'restricted'
+copyConfigurationFromAnchor: anchor <Anchor> = (
+	"No configuration here; nothing to copy to."
+)
+copyConfigurationFromFrame: frame <Frame> = (
+	"No configuration here; nothing to copy to."
+)
+copyConfigurationTo: another <Position> = (
+	"No configuration; nothing to copy."
+)
+requestBoundsUpdate = (
+
+	(visual area == self and: [visual updateLockLevel < 1]) ifTrue:
+		[visual parent
+			child: visual
+			requestsBoundsUpdateUsing:
+				[:newBounds | visual occupyBounds: newBounds]]
+)
+visualRequestsBoundsUpdateUsing: aBlock = (
+	"An area receives this message when the visual wants to receive a bounds update, meaning its natural extent has changed. A subclass may redefine this method to filter requests in cases when the area  dictates a fixed size of the child and therefore the child's natural extent is known to have no effect on the parent. NOTE that the area must invoke the block with the final bounds of the visual, regardless of whether they have changed or not."
+
+	visual parent
+		child: visual
+		requestsBoundsUpdateUsing: aBlock
+)'testing'
+isFuture = (
+
+	^false
+)
+isSqueezing ^<Boolean> = (
+	"This method complements the one named the same in Visual, since some areas may override the squeezing behavior of their parents."
+
+	^visual parent isSqueezing
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class CellWidthEqualizer = ("Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	cellsX ::= OrderedCollection new.
+	indexX
+	cachedNaturalExtentX
+	|)
+('accessing'
+equalize: collection at: index = (
+
+	indexX:: index.
+	collection do:
+		[:each | | visual |
+		visual:: each at: index.
+		visual areaClass: WidthEqualizingRowCell.
+		cellsX add: visual area.
+		visual area equalizer: self].
+)
+equalizeRowElements: visuals = (
+
+	visuals do:
+		[:each |
+		each areaClass: WidthEqualizingRowCell.
+		cellsX add: each area.
+		each area equalizer: self].
+)'protected'
+commonNaturalWidth = (
+
+	^cellsX 
+		inject: 0
+		into: 
+			[:max :each |
+			max max: each visual naturalExtent x]
+)) : ('as yet unclassified'
+equalize: collection at: index = (
+
+	^self new equalize: collection at: index
+)
+equalizeRowElements: visuals = (
+
+	^self new equalizeRowElements: visuals
+))
+class ColumnCell = SequenceCell ("Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+")
+('accessing'
+height = (
+
+	^principalSize
+)
+height: pixels <Integer> = (
+
+	principalSize:: pixels
+)
+naturalExtent = (
+
+	^visual naturalExtent x @ height
+)'as yet unclassified'
+mayAccommodateVisualsNaturalHeightChange ^<Boolean> = (
+	^imposesSize not and:
+		[visual parent mayAccommodateNaturalHeightChangeOf: visual]
+)'geometry'
+naturalHeightForWidth: size <Number> ^<Number> = (
+	"Answer the size the visual should take along the principal axis within a parent of the given size along the orthogonal axis."
+
+	^principalSizeS ifNil: [visual naturalHeightForWidth: size]
+)'private'
+naturalOrthogonalSize = (
+
+	^visual naturalExtent x
+)
+naturalPrincipalSize = (
+
+	^visual naturalExtent y
+)'testing'
+isSqueezing ^<Boolean> = (
+	^imposesSize not and: [super isSqueezing]
+)
+isVisualSquishy ^<Boolean> = (
+	^imposesSize not and: [visual isSquishy]
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class Frame = Area ("Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	leftFractionS leftOffsetS topFractionS topOffsetS rightFractionS rightOffsetS bottomFractionS bottomOffsetS lastSuggestedExtentKnownToParent
+|)
+('accessing'
+boundsWithin: compositionBounds <Rectangle> = (
+
+	| parentOrigin parentExtent width height left top right bottom |
+	parentOrigin:: compositionBounds origin.
+	parentExtent:: compositionBounds extent.
+	width:: parentExtent x.
+	height:: parentExtent y.
+	left:: (width * leftFraction) rounded + leftOffset.
+	top:: (height * topFraction) rounded + topOffset.
+	right:: (width * rightFraction) rounded + rightOffset.
+	bottom:: (height * bottomFraction) rounded + bottomOffset.
+	^Rectangle
+		origin: left @ top + parentOrigin
+		corner: right @ bottom + parentOrigin
+)
+suggestedParentExtent ^<Point> = (
+
+	isElastic ifFalse:
+		[^rightOffset @ bottomOffset].
+	isFramedByParent ifTrue:
+		[^visual naturalExtent
+			+ ((leftOffset - rightOffset) @ (topOffset - bottomOffset))].
+	#BOGUS yourself. 
+	^0 @ 0 "Should do more in some of the remaining cases; see Anchor"
+)
+suggestedParentHeightForWidth: width <Number> = (
+
+	| left right imposedCompositionWidth heightFromVisual |
+	(topFraction = 0 and: [bottomFraction = 1]) ifTrue:
+		[left:: (width * leftFraction) + leftOffset.
+		right:: (width * rightFraction) + rightOffset.
+		imposedCompositionWidth:: right - left.
+		heightFromVisual:: visual naturalHeightForWidth: imposedCompositionWidth.
+		^heightFromVisual + topOffset - bottomOffset].
+	#BOGUS yourself. "the code below doesn't handle all cases"
+	^bottomOffset
+)'acessing-components'
+bottomFraction = (
+
+	^bottomFractionS
+)
+bottomFraction: fraction <Number> = (
+
+	bottomFractionS:: fraction.
+	requestBoundsUpdate
+)
+bottomOffset = (
+
+	^bottomOffsetS
+)
+bottomOffset: offset <Integer> = (
+
+	bottomOffsetS:: offset.
+	requestBoundsUpdate
+)
+leftFraction = (
+
+	^leftFractionS
+)
+leftFraction: fraction <Number> = (
+
+	leftFractionS:: fraction.
+	requestBoundsUpdate
+)
+leftOffset = (
+
+	^leftOffsetS
+)
+leftOffset: offset <Integer> = (
+
+	leftOffsetS:: offset.
+	requestBoundsUpdate
+)
+rightFraction = (
+
+	^rightFractionS
+)
+rightFraction: fraction <Number> = (
+
+	rightFractionS:: fraction.
+	requestBoundsUpdate
+)
+rightOffset = (
+
+	^rightOffsetS
+)
+rightOffset: offset <Integer> = (
+
+	rightOffsetS:: offset.
+	requestBoundsUpdate
+)
+topFraction = (
+
+	^topFractionS
+)
+topFraction: fraction <Number> = (
+
+	topFractionS:: fraction.
+	requestBoundsUpdate
+)
+topOffset = (
+
+	^topOffsetS
+)
+topOffset: offset <Integer> = (
+
+	topOffsetS:: offset.
+	requestBoundsUpdate
+)'as yet unclassified'
+mayAccommodateVisualsNaturalHeightChange ^<Boolean> = (
+	^isElasticY and: [super mayAccommodateVisualsNaturalHeightChange]
+)
+mayAccommodateVisualsNaturalWidthChange ^<Boolean> = (
+	^isElasticX and: [super mayAccommodateVisualsNaturalWidthChange]
+)'configuring'
+bounds: aRectangle = (
+	"Occupy the given rectangle; no elasticity."
+	
+	self 
+		offsetsLeft: aRectangle left
+		top: aRectangle top
+		right: aRectangle right
+		bottom: aRectangle bottom
+)
+extent: newExtent <Point> = (
+
+	rightOffsetS:: leftOffsetS + newExtent x.
+	bottomOffsetS:: topOffsetS + newExtent y.
+	requestBoundsUpdate
+)
+fractionsLeft: left top: top right: right bottom: bottom = (
+
+	self
+		leftFraction: left
+		offset: 0
+		topFraction: top
+		offset: 0
+		rightFraction: right
+		offset: 0
+		bottomFraction: bottom
+		offset: 0
+)
+fullyCoverParent = (
+	"Be elastic by fully covering the parent and resizing with it."
+
+	padding: 0
+)
+leftFraction: lf offset: lo
+topFraction: tf offset: to
+rightFraction: rf offset: ro
+bottomFraction: bf offset: bo = (
+
+	leftFractionS:: lf.
+	leftOffsetS:: lo.
+	topFractionS:: tf.
+	topOffsetS:: to.
+	rightFractionS:: rf.
+	rightOffsetS:: ro.
+	bottomFractionS:: bf.
+	bottomOffsetS:: bo.
+	requestBoundsUpdate
+)
+offsetsLeft: left top: top right: right bottom: bottom = (
+
+	self 
+		leftFraction: 0
+		offset: left
+		topFraction: 0
+		offset: top
+		rightFraction: 0
+		offset: right
+		bottomFraction: 0
+		offset: bottom
+)
+padding: padding <Integer | Point> = (
+	"Set up the receiver so that its visual fully covers its parent and padded according to the argument. The argument is either the number of pixels to leave on all sides of the parent or a Point with separate settings used for for the left/right and top/bottom sides."
+
+	padding isInteger
+		ifTrue:
+			[offsetsLeft: padding 
+				top: padding 
+				right: padding negated 
+				bottom: padding negated.]
+		ifFalse:
+			[offsetsLeft: padding x 
+				top: padding y 
+				right: padding x negated 
+				bottom: padding y negated.].
+	rightFraction: 1.
+	bottomFraction: 1
+)'initialize-release'
+visual: aVisual = (
+
+	super visual: aVisual.
+	resetLastSuggestedExtentKnownToParent.
+	bounds: (0@0 corner: 0@0)
+)'restricted'
+copyConfigurationFromFrame: another <Frame> = (
+
+	leftFraction:: another leftFraction.
+	leftOffset:: another leftOffset.
+	topFraction:: another topFraction.
+	topOffset:: another topOffset.
+	rightFraction:: another rightFraction.
+	rightOffset:: another rightOffset.
+	bottomFraction:: another bottomFraction.
+	bottomOffset:: another bottomOffset
+)
+copyConfigurationTo: another <Position> = (
+
+	another copyConfigurationFromFrame: self
+)
+resetLastSuggestedExtentKnownToParent = (
+
+	lastSuggestedExtentKnownToParent:: -1 @ -1
+	"we need a value that's a legal Point but cannot equal any legal extent"
+)
+visualRequestsBoundsUpdateUsing: aBlock = (
+	"If the frame is not elastic, i.e. has a fixed size, the change in the visual's natural extent that initiated this request has no chance of making any difference in the final layout."
+
+	isElastic
+		ifTrue: [super visualRequestsBoundsUpdateUsing: aBlock]
+		ifFalse: [aBlock value: visual bounds]
+)'testing'
+isElastic ^<Boolean> = (
+	"A frame is elastic if the bounds it computes for its visual depend on the size of the parent."
+	
+	^leftFraction ~= 0
+		or: [topFraction ~= 0
+			or: [rightFraction ~= 0
+				or: [bottomFraction ~= 0]]]
+)
+isElasticX ^<Boolean> = (
+	"True if the final bounds along the X axis depend on the size of the parent."
+	
+	^rightFraction ~= 0 or: [leftFraction ~= 0]
+)
+isElasticY ^<Boolean> = (
+	"True if the final bounds along the Y axis depend on the size of the parent."
+	
+	^bottomFraction ~= 0 or: [topFraction ~= 0]
+)
+isFramedByParent ^<Boolean> = (
+	"This is an even stronger condition than isElastic: a Frame with the four sides rigidly attached to the corresponding sides of the parent."
+	
+	^leftFraction = 0
+		and: [topFraction = 0
+			and: [rightFraction = 1
+				and: [bottomFraction = 1]]]
+)
+isSqueezing ^<Boolean> = (
+	"The parent will only be able to exhibit its squeezing behavior if the frame is able to grow vertically."
+	^super isSqueezing and: [isElasticY]
+)
+isVisualSquishy ^<Boolean> = (
+	"A squishy visual contained by a frame can only manifest its squishiness if the frame allows it to grow vertically."
+	^isElasticY and: 
+		[visual isSquishy]
+)
+isZero ^<Boolean> = (
+
+	^isElastic not
+		and: [leftOffset = 0
+		and: [rightOffset = 0
+		and: [topOffset = 0
+		and: [bottomOffset = 0]]]]
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class FutureArea = MessageRecorder ("Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	|)
+('accessing'
+copyConfigurationTo: area <Area> = (
+
+	self playRecordedMessagesTo: area
+)
+flushLayoutCaches = (
+	"Understand but do nothing."
+)
+visualRequestsBoundsUpdateUsing: continuation = (
+	"Understand but do nothing."
+)'testing'
+isFuture = (
+
+	^true
+)
+isSqueezing = (
+	^false
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class GridRowCell = RowCell ("A GridRowCell is a specialized area used by children of GridRowXs. GridRowCells keeps track of a number of layout parameters in addition to those inherited from the regular RowCell.
+
+By default, the extent a cell will request from its row is equal to the natural extent of the cell content. This can be overridden by 'forcedExtent'. However, the concept of the natural extent of a cell is further complicated by the fact that the cell is part of the larger context of its grid.
+
+Natural extent (fixed in the cell or passed through from the visual) is the extent the cell would prefer to be *on its own*. Principal and orthogonal sizes of a cell define the extent *the grid* would like it to be. They are set with consideration of sizes of other cells in the same row or column.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	orthogonalSizeS
+	forcedExtentX
+	|)
+('accessing'
+extent ^<Point> = (
+
+	^width @ height
+)
+extent: extent <Point> = (
+
+	principalSizeS:: extent x.
+	orthogonalSizeS:: extent y.
+	requestBoundsUpdate
+)
+forcedExtent: newExtent <Point | nil> = (
+	"Sending a Point with this message causes this cell to try assuming this extent instead of whatever the visual itself wants."
+
+	forcedExtentX:: newExtent.
+	"grid flushLayoutCaches."
+	#BOGUS yourself.  "remove the above when it's verified not needed"
+	requestBoundsUpdate
+)
+height ^<Number> = (
+
+	^orthogonalSize
+)
+height: newHeight <Number> = (
+
+	orthogonalSize:: newHeight
+)
+naturalExtent ^<Point> = (
+
+	^forcedExtentX ifNil: [visual naturalExtent]
+)
+naturalHeightForWidth: width <Number> ^ <Number> = (
+
+	^forcedExtentX
+		ifNil: [super naturalHeightForWidth: width]
+		ifNotNil: [forcedExtentX y]
+)
+orthogonalSize = (
+
+	^orthogonalSizeS == nil
+		ifTrue: [forcedExtentX == nil
+			ifTrue: [naturalOrthogonalSize]
+			ifFalse: [forcedExtentX y]]
+		ifFalse: [orthogonalSizeS]
+)
+orthogonalSize: size <Number> = (
+
+	orthogonalSizeS:: size.
+	requestBoundsUpdate
+)'private'
+grid ^<Grid> = (
+	"Answer the grid. The grid is known to the grid row, which is the parent of our visual."
+
+	^visual parent grid
+)
+naturalPrincipalSize = (
+
+	^naturalExtent x
+)
+quietlySetWidth: newWidth <Integer> = (
+
+	principalSizeS:: newWidth
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class LineArea = Area ("The area class used for lines, to keep track of their start and end point positions.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	startPointS ::= 0@0.
+	 endPointS ::= 0@0.
+	 lastSuggestedExtentKnownToParent
+	|)
+('as yet unclassified'
+boundsWithin: referenceBounds <Rectangle> = (
+
+	| width |
+	width:: visual width.
+	^Rectangle
+		left: (startPointS x min: endPointS x) - width
+		right: (startPointS x max: endPointS x) + width
+		top: (startPointS y min: endPointS y) - width
+		bottom: (startPointS y max: endPointS y) + width
+)
+endPoint ^<Point> = (
+	^endPointS
+)
+endPoint: newEndPoint <Point> = (
+
+	endPointS:: newEndPoint.
+	requestBoundsUpdate
+)
+isVisualSquishy ^<Boolean> = (
+	^false
+)
+resetLastSuggestedExtentKnownToParent = (
+
+	lastSuggestedExtentKnownToParent:: -1 @ -1
+	"we need a value that's a legal Point but cannot equal any legal extent"
+)
+startPoint ^<Point> = (
+	^startPointS
+)
+startPoint: newStartPoint <Point> = (
+
+	startPointS:: newStartPoint.
+	requestBoundsUpdate
+)
+startPoint: newStartPoint <Point> endPoint: newEndPoint <Point> = (
+
+	startPointS:: newStartPoint.
+	endPointS:: newEndPoint.
+	requestBoundsUpdate
+)
+suggestedParentExtent ^<Point> = (
+
+	^(endPointS - startPointS) abs
+)
+suggestedParentHeightForWidth: ignored <Number> ^<Number> = (
+	^suggestedParentExtent y
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class PolygonArea = Area ("The area used for polygons. It holds onto a collection of points for the vertices. Each vertex is a simple Point value in absolute coordinates, as usual relative to the polygon's parent.
+"|
+	verticesS ::= {0 @ 0}.
+	lastSuggestedExtentKnownToParent
+	cachedEnclosingRectangle
+	|)
+('accessing'
+boundsWithin: referenceBounds <Rectangle> ^<Rectangle> = (
+	^enclosingRectangle
+)
+computeEnclosingRectangle ^<Rectangle> = (
+	| minX maxX minY maxY |
+	minX:: SmallInteger maxVal.
+	maxX:: SmallInteger minVal.
+	minY:: minX.
+	maxY:: maxX.
+	vertices do: 
+		[:each | | x y |
+		x:: each x.
+		y:: each y.
+		minX:: minX min: x.
+		maxX:: maxX max: x.
+		minY:: minY min: y.
+		maxY:: maxY max: y].
+	^minX @ minY corner: maxX @ maxY
+)
+enclosingRectangle ^<Rectangle> = (
+	^cachedEnclosingRectangle ifNil:
+		[cachedEnclosingRectangle:: computeEnclosingRectangle.
+		cachedEnclosingRectangle]
+)
+suggestedParentExtent ^<Point> = (
+	^enclosingRectangle corner
+)
+suggestedParentHeightForWidth: ignored <Number> ^<Number> = (
+	^suggestedParentExtent y
+)
+vertices ^<Collection[Point]> = (
+	^verticesS
+)
+vertices: newValue <Collection[Point]> = (
+	verticesS:: newValue.
+	cachedEnclosingRectangle:: nil.
+	requestBoundsUpdate
+)'restricted'
+resetLastSuggestedExtentKnownToParent = (
+
+	lastSuggestedExtentKnownToParent:: -1 @ -1
+	"we need a value that's a legal Point but cannot equal any legal extent"
+)'testing'
+isVisualSquishy ^<Boolean> = (
+	^false
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class RowCell = SequenceCell ("Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	|)
+('accessing'
+naturalExtent = (
+
+	^width @ visual naturalExtent y
+)
+naturalHeightForWidth: width <Number> ^<Number> = (
+
+	^visual naturalHeightForWidth: width
+)
+width = (
+
+	^principalSize
+)
+width: pixels <Integer> = (
+
+	principalSize:: pixels
+)'as yet unclassified'
+isVisualSquishy ^<Boolean> = (
+	^imposesSize or: [isElastic and: [visual isSquishy]]
+)
+mayAccommodateVisualsNaturalWidthChange ^<Boolean> = (
+	^imposesSize not and:
+		[visual parent mayAccommodateNaturalWidthChangeOf: visual]
+)'private'
+naturalOrthogonalSize = (
+
+	^visual naturalExtent y
+)
+naturalPrincipalSize = (
+
+	^visual naturalExtent x
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class SequenceCell = Area ("A SequenceCell is the abstract superclass of areas used by elements of visual sequences such as Rows and Columns.
+
+Instance Variables
+	principalSizeS:		<Number> -- The size of the visual along the principal dimension of the visual sequence (e.g. width for a Row).
+	elasticityS:		<Number> -- For sequences that support elasticity of children, this value is considered when reallocating space.
+	lastNaturalExtentKnownToParent:	<Point> -- Used by the parent to store properties it based its current layout on, in order to decide later if an update is needed.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	principalSizeS
+	elasticityS
+	currentLayoutBasis
+	lastKnownNaturalExtent
+	|)
+('accessing'
+elasticity	^<Number> = (
+
+	^elasticityS
+)
+elasticity: newElasticity <Number> = (
+
+	| oldElasticity |
+	oldElasticity:: elasticityS.
+	elasticityS:: newElasticity.
+	requestBoundsUpdate
+)
+naturalExtent ^<Point> = (
+	"Answer the size the visual of this cell should ideally be given by its parent, based on the properties of both the area and the visual. For example, a Row cell with no explicitly set width would prefer to be sized to the width of its visual's natural extent, while a cell with an explicit width would prefer to have the visual sized to that width."
+	
+	subclassResponsibility
+)
+naturalHeightForWidth: size <Number> ^<Number> = (
+	"Answer the size the visual should take along the principal axis within a parent of the given size along the orthogonal axis."
+
+	subclassResponsibility
+)
+principalSize	^<Number> = (
+
+	^principalSizeS ifNil: [naturalPrincipalSize]
+)
+principalSize: newSize <Number> = (
+
+	principalSizeS:: newSize.
+	requestBoundsUpdate
+)'as yet unclassified'
+flushLayoutCaches = (
+	currentLayoutBasis:: nil.
+	lastKnownNaturalExtent:: nil.
+)'initialize-release'
+visual: aVisual <Visual> = (
+
+	super visual: aVisual.
+	elasticityS: 0
+)'printing'
+printOn: aStream = (
+
+	super printOn: aStream.
+	aStream
+		nextPutAll: ' size: '; print: principalSizeS;
+		nextPutAll: ' elasticity: '; print: elasticityS
+)'private'
+naturalOrthogonalSize	^<Number> = (
+	"A subclass should implement this to fetch the value to be reported as its orthogonal size from the visual's natural extent properties."
+
+	self subclassResponsibility
+)
+naturalPrincipalSize	^<Number> = (
+	"A subclass should implement this to fetch the value to be reported as its principal size from the visual's natural extent properties."
+
+	self subclassResponsibility
+
+)'testing'
+imposesSize ^<Boolean> = (
+	"True if the cell is configured so that it ignores the contents natural extent and instead imposes its own size."
+
+	^principalSizeS notNil
+)
+isElastic = (
+
+	^elasticity > 0
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class ShapeArea = Area ("A ShapeArea is an area intended for Shapes positioned inside a free-form parent such as a CompositeVisual. It keeps track of the origin the shape is to have inside the parent's bounds, while the shape keeps track of its own extent. The area always grants the visual the bounds with the origin it keeps track of and the extent equal to the visual's natural extent.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	originS
+	lastSuggestedExtentKnownToParent
+	|)
+('accessing'
+bounds: newBounds <Rectangle> = (
+
+	originS:: newBounds origin.
+	visual size: newBounds extent.
+	"Setting the extent of the visual takes care of requesting layout update"
+)
+boundsWithin: referenceBounds <Rectangle> = (
+
+	^originS extent: visual naturalExtent
+)
+moveBy: delta <Point> = (
+
+	originS:: origin + delta.
+	requestBoundsUpdate
+)
+moveTo: newOrigin <Point> = (
+	"A synonym of #origin:, for the cases when it's more natural."
+
+	self origin: newOrigin
+)
+origin ^<Point> = (
+
+	^originS
+)
+origin: newOrigin <Point> = (
+
+	originS:: newOrigin.
+	requestBoundsUpdate
+)
+suggestedParentExtent ^<Point> = (
+
+	^originS + visual naturalExtent
+)'as yet unclassified'
+isSqueezing ^<Boolean> = (
+	^false
+)'initialize-release'
+visual: aVisual = (
+
+	super visual: aVisual.
+	resetLastSuggestedExtentKnownToParent.
+	origin: 0 @ 0
+)'restricted'
+resetLastSuggestedExtentKnownToParent = (
+
+	lastSuggestedExtentKnownToParent:: -1 @ -1
+	"we need a value that's a legal Point but cannot equal any legal extent"
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+))
+class WidthEqualizingRowCell = RowCell (|
+	equalizer
+	|)
+('as yet unclassified'
+naturalPrincipalSize = (
+	^equalizer commonNaturalWidth
+)) : ('as yet unclassified'
+visual: aVisual <Visual> = (
+	^self new visual: aVisual; yourself
+)))
+class ContainerClasses = ("Formerly the category Brazil-Visuals-Containers"|
+	private ContainerVisual = visuals ContainerVisual.
+	private VerticalVisualSequence = visuals VerticalVisualSequence.
+	private VisualCollection = visuals VisualCollection.
+	private HorizontalVisualSequence = visuals HorizontalVisualSequence.
+	private Anchor = areas Anchor.
+	private Frame = areas Frame.
+	private ModifierKeyState = plumbing ModifierKeyState.
+	private Attribute = plumbing Attribute.
+	private Blank = widgets Blank.
+	private MappableHolder = plumbing MappableHolder.
+	|)
+(
+class Column = VerticalVisualSequence ("A Column positions its children vertically one after another.
+
+The Y component of a Columns's own natural extent is the sum of natural extents of its children. The X component of a Column natural extent is equal to the largest of the X components of its children's natural extents. If a Column is sized to its natural extent, each child is allocated a parcel of the height equal to the Y component of the child's natural extent and the width equal to the width of the Column. If a Column size is different from its natural extent and there are no elastic children (see below),  then either the bottom-most children are hidden from view or there is empty space at the bottom end of the Column.
+
+By default each child gets a ColumnCell as its area. A ColumnCell can be given an explicit height by sending to it the #height: message. If set, an explicit height overrides the height of the corresponding child naturalExtent in determining the layout of the child.
+
+A ColumnCell can also be made _elastic_ by sending it the #elasiticity: message with a numeric argument. (The default elasticity value is 0). Elasticity affects the layout as follows. If the size of a Column is different from its naturalExtent, the excess or the lack of vertical room is distributed equally to elastic children, proportionally to their elasticity.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	|)
+('as yet unclassified'
+setupAreaIn: child <Visual> = (
+
+	child setupAreaForColumn
+))
+class CompositeVisual = VisualCollection ("A CompositeVisual is a simple container visual that can hold any number of children (including none). The children are expected to use an Area that responds to ''bounded'' positioning protocol, most importantly the #boundWithin: and #suggestedParentExtent messages. The three most commonly used such Areas are Anchor, Frame and ShapeArea. The first two are generic, the third can only be used with Shapes.
+
+A CompositeVisual is a concrete class, but it also a superclass of a few classes the utilize different layout schemes, most importantly subclasses of VisualSequence such as Row and Column.
+
+Instance Variables
+	colorA:			<Attribute> The background color of the visual. Transparent by default.
+	children:		<OrderedCollection [Visual]> The children of the receiver, arranged in the order of the increasing Z value (the topmost last).
+	cachedNaturalExtent:		<Point | nil> If set, the last known value of the natural extent of the receiver, defined as the smallest rectangle that contains all the children and the 0 @ 0 point.
+
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	cachedNaturalHeightForWidth
+	|)
+('accessing'
+add: newChild <Visual> = (
+	"Add a new child to the recevier. The child becomes the topmost and will obscure any sibling it overlaps."
+
+	^restructuring:
+		[self privateAdd: newChild using: [children add: newChild]]
+)
+add: newChild <Visual> inFrontOf: existingChild <Visual> = (
+	"Add a new child to the recevier. The child is the next one (on top of) the existing child passed as the second argument."
+
+	^restructuring:
+		[self privateAdd: newChild using: 
+			[children add: newChild after: existingChild]]
+)
+addAtBack: newChild <Visual> = (
+	"Add a new child to the recevier. The child becomes the bottommost and will be obscured by any sibling it overlaps."
+
+	^restructuring:
+		[self privateAdd: newChild using: [children addFirst: newChild]]
+)
+remove: child <Visual> = (
+
+	| oldNaturalExtent |
+	restructuring:
+		[children remove: child.
+		child unlinkFromParent.
+		(mayRemovingAffectNaturalExtent: child) ifTrue:
+			[oldNaturalExtent:: naturalExtent.
+			updateGeometricProperties.
+			naturalExtent = oldNaturalExtent
+				ifFalse: 
+					[requestBoundsUpdate.
+					announceNaturalExtentChange]]]
+)'as yet unclassified'
+computeNaturalHeightForWidth: width <Number> ^<Number> = (
+	| maxHeight |
+	maxHeight:: 0.
+	childrenDo: 
+		[:each |
+		maxHeight:: maxHeight max: (each area suggestedParentHeightForWidth: width)].
+	^maxHeight
+)
+naturalHeightForWidth: width = (
+
+	cachedNaturalHeightForWidth = width ifFalse:
+		[cachedNaturalHeightForWidth:: width.
+		cachedNaturalHeightForWidth:: computeNaturalHeightForWidth: width].
+	^cachedNaturalHeightForWidth
+)'private'
+adviseBoundsFor: child <Visual> = (
+
+	child occupyBounds: (computeBoundsFor: child)
+)
+computeBoundsFor: child <Visual> = (
+
+	^child area boundsWithin: innerBounds
+)
+computeNaturalExtent = (
+	"Compute and answer the natural extent of the receiver as defined by the current parameters of its children. A composite wants to be just large enough to accommodate all suggested extents of all children."
+
+	| max |
+	max:: (0@0).
+	self childrenDo:
+		[:each | | suggestion |
+		suggestion: each area suggestedParentExtent.
+		each area lastSuggestedExtentKnownToParent: suggestion.
+		max:: max max: suggestion].
+	^max
+)
+mayAffectNaturalExtent: child <Visual> = (
+	"The argument is a child that is currently requesting a layout update due to changes in its parameters. Determine if there is a chance that the composite visual's natural extent has been affected by the change. If there is any doubt or there is no answer, say yes."
+
+	| oldSuggestion newSuggestion |
+	oldSuggestion:: child area lastSuggestedExtentKnownToParent.
+	newSuggestion:: child area suggestedParentExtent.
+	newSuggestion = oldSuggestion ifTrue: [^false].
+	child area lastSuggestedExtentKnownToParent: newSuggestion.
+"The change in the child may have affected the parent's natural extent if either the parent extent previously suggested by this child touches the current natural extent of the parent along one of the axes (so shrinking or growing the child can shrink or grow the parent), or if the new suggested parent extent is larger than the current one, so we definitely know the parent's natural extent has been grown by the change."
+	^oldSuggestion x = currentNaturalExtent x 
+		or: [oldSuggestion y = currentNaturalExtent y
+		or: [newSuggestion x > currentNaturalExtent x
+		or: [newSuggestion y > currentNaturalExtent y]]]
+)
+mayRemovingAffectNaturalExtent: child <Visual> = (
+	"The argument is a child that has just been removed. Determine if there is a chance that the composite visual's natural extent has been affected by that. If there is any doubt or there is no answer, say yes."
+
+	| oldSuggestion |
+	oldSuggestion:: child area lastSuggestedExtentKnownToParent.
+	^oldSuggestion x = currentNaturalExtent x 
+		or: [oldSuggestion y = currentNaturalExtent y]
+)
+privateAdd: newChild <Visual> using: childCollectionUpdateBlock <Block> = (
+	"The common private logic for adding a new child to the recevier. The collection update block takes care of actually adding the new child at the proper location in the collection of children. After the initial setup is complete and before the child may be mapped, we need to set its layout. The correct update behavior depends of whether the new child may have affected the receiver's natural extent, and whether it actually has. All of the branches are detected and handled independently because that often eliminates much redundant processing."
+
+	| oldNaturalExtent |
+	childCollectionUpdateBlock value.
+	newChild linkToParent: self.
+	isMapped ifTrue:
+		[(mayAddingAffectNaturalExtent: newChild)
+			ifTrue:
+				[oldNaturalExtent:: naturalExtent.
+				updateGeometricProperties.
+				naturalExtent = oldNaturalExtent
+					ifTrue:
+						[adviseBoundsFor: newChild]
+					ifFalse:
+						[requestBoundsUpdateUsing:
+							[:newBounds |
+							newBounds = bounds
+								ifTrue: [adviseBoundsFor: newChild]
+								ifFalse: [occupyBounds: newBounds]]].
+				announceNaturalExtentChange]
+			ifFalse:
+				[adviseBoundsFor: newChild].
+		newChild mapSubtree]
+)
+setupAreaIn: child <Visual> = (
+
+	child setupAreaForCompositeVisual
+)
+updateLayoutByRequestFrom: child <Visual> using: continuation <Block> = (
+	"In the course of processing a bounds request from the child, we determined we need to request a bounds update for ourselves from the parent. The following scenarios are possible:
+	1. If the bounds received from the parents are unchanged, only update the affected child using the continuation it provided for the update.
+	2. If our bounds have changed, update all children if the new bounds' extent is different from the old.
+	For any child updates, use the continuation for the requestor child since this update is solicited by it. Use #occupyBounds: for the others since for them the update is unsolicited."
+
+	| playground |
+	requestBoundsUpdateUsing:
+		[:newBounds | | extentChanged |
+		newBounds = bounds
+			ifTrue: 
+				[continuation value: (computeBoundsFor: child)]
+			ifFalse:
+				[extentChanged:: newBounds extent ~= bounds extent.
+				boundsH value: newBounds.
+				extentChanged ifTrue:
+					[playground:: innerBounds.
+					childrenDo:
+						[:each | | eachBounds |
+						eachBounds:: each area boundsWithin: playground.
+						each == child
+							ifTrue: 
+								[continuation value: eachBounds]
+							ifFalse: 
+								[each occupyBounds: eachBounds]]]]]
+)'restricted'
+child: child <Visual> requestsBoundsUpdateUsing: continuation <Block> = (
+	"Process a layout update request coming from the child."
+
+	| oldNaturalExtent |
+	(mayAffectNaturalExtent: child)
+		ifTrue:
+			[oldNaturalExtent:: naturalExtent.
+			updateGeometricProperties.
+			naturalExtent = oldNaturalExtent
+				ifTrue:
+					[continuation value: (child area boundsWithin: innerBounds)]
+				ifFalse:
+					[updateLayoutByRequestFrom: child using: continuation.
+					announceNaturalExtentChange]]
+		ifFalse:
+			[continuation value: (child area boundsWithin: innerBounds)].
+	announceLayoutChange
+)
+createAgentUsing: aMapping = (
+	"Mapping a tree of widgets often generates a stream on natural extent change notifications from the children as they discover their true natural extents after being mapped. To avoid constant recomputations we block incremental updates for the duration of mapping."
+
+	aMapping createAgentForCompositeVisual: self
+)
+flushLayoutCaches = (
+	"Also flush a layout note in each area, which is the last parent extent suggested by the area."
+
+	super flushLayoutCaches.
+	childrenDo: [:each | each area resetLastSuggestedExtentKnownToParent].
+	updateGeometricProperties
+)
+forceBoundsResponse: newBounds <Rectangle> = (
+
+	| playground |
+	super forceBoundsResponse: newBounds.
+	playground: innerBounds.
+	childrenDo: 
+		[:each |
+		each forceBounds: (each area boundsWithin: playground)].
+	announceLayoutChange
+)
+legalAreaClassesFor: child <Visual> = (
+
+	^child legalAreaClassesInCompositeVisual
+)
+mayAddingAffectNaturalExtent: child <Visual> = (
+	"The child is being added to the receiver, and we need to know if adding it will affect the receiver's natural extent. If this can't be determined without computing the receiver's current natural extent (i.e. if there is no cached value), just say it may."
+
+	| suggestion myNaturalExtent |
+	suggestion:: child area suggestedParentExtent.
+	child area lastSuggestedExtentKnownToParent: suggestion.
+	myNaturalExtent:: naturalExtent.
+	^suggestion x > myNaturalExtent x or:
+		[suggestion y > myNaturalExtent y]
+)
+occupyBoundsResponse: newBounds <Rectangle> = (
+	"An unsolicited layout update: see superclass methods for a detailed discussion. In this class, the layout of the children can only change if the extent changes, therefore we only update the children if that is the case."
+
+	| oldExtent playground |
+	oldExtent: extent.
+	super occupyBoundsResponse: newBounds.
+	oldExtent = extent
+		ifTrue:
+			[childrenDo: [:each | each reiterateBounds]]
+		ifFalse:
+			[playground:: innerBounds.
+			childrenDo: 
+				[:each | 
+				each occupyBounds: (each area boundsWithin: playground)].
+			announceLayoutChange]
+))
+class Desktop withMapping: aMapping  <BrazilMapping> = (
+"Desktop is the root of the tree of visuals. It is the parent of any open window.
+
+   Copyright 2008 Cadence Design Systems, Inc.
+   
+   Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+"|
+	agent
+	windows ::= OrderedCollection new.
+	updateLockLevel ::= 0.
+	windowClosePermission
+	|mapUsing: aMapping)
+('accessing'
+add: aWindow <Window> = (
+
+	windows add: aWindow.
+	aWindow linkToParent: self.
+	isMapped ifTrue:
+		"It is important to advise the bounds first and only then map, because
+		advising the bounds forces all the visuals under the window, and first of all
+		the window itself, to assume the correct bounds as dictated by their areas."
+		[adviseBoundsFor: aWindow.
+		aWindow mapSubtree].
+)
+add: aWindow <Window> in: areaClass <Class> = (
+
+	aWindow areaClass: areaClass.
+	self add: aWindow
+)
+createAgentUsing: aMapping <BrazilMapping> = (
+
+	unmap.
+	agent:: aMapping createAgentForDesktop: self.
+	windows do: [:each | each mapSubtreeUsing: aMapping]
+)
+createWindow = (
+
+	| window |
+	window:: Window new.
+	add: window.
+	^window
+)
+desktop = (
+
+	^self
+)
+ensureUpToDateAppearance = (
+
+	agent ensureUpToDateAppearance
+)
+isMapped = (
+
+	^agent notNil
+)
+mapUsing: aMapping <BrazilMapping> = (
+
+	unmap.
+	agent:: aMapping createAgentForDesktop: self.
+	windows do: [:each | each mapSubtree]
+)
+mapping = (
+
+	^agent mapping
+)
+mousePoint ^<Point> = (
+	"Answer the current location of the mouse in the global desktop coordinates."
+
+	^agent mousePoint
+)
+positionWindowsWithinVisibleScreenArea = (
+	#BOGUS yourself. "Unclear if this is a Morphic only problem. For now, assume it is."
+	WorldState addDeferredUIMessage:
+		[World fullRepaintNeeded]
+)
+remove: aWindow <Window> = (
+
+	windows remove: aWindow.
+	aWindow unlinkFromParent
+)
+scheduleUIAction: aBlock <Block> = (
+	"Schedule an action to be spliced into the normal UI activity (this is presumably sent on a thread different from the UI thread)."
+
+	agent scheduleUIAction: aBlock
+)
+scheduleUIInstallment: aBlock <Block> = (
+	"Schedule an action to be spliced into the normal UI activity (this is presumably sent on a thread different from the UI thread)."
+
+	agent scheduleUIInstallment: aBlock
+)
+unmap = (
+ 
+	agent ifNotNil:
+		[windows do: [:each | each unmapSubtree].
+		agent: nil]
+)
+windowAtPoint: point <Point> ^<Window | nil> = (
+
+	^agent windowAtPoint: point
+)'as yet unclassified'
+clearDraggedImage = (
+	agent clearDraggedImage
+)
+disableUserInputDuring: action <[^T]> ^<T> = (
+	"Disable U/I events during evaluation of the given action. Return the result of the evaluation.
+	Example usage:
+		[
+			Desktop theDesktop disableUserInputDuring:
+				[anObject performLongOperation]
+		] forkAt: Processor userBackgroundPriority.
+	"
+	^agent disableUserInputDuring: action
+)
+discardMappings = (
+	agent:: nil.
+	windows copy do: [:each | each discardMappings]
+)
+isMorphic ^<Boolean> = (
+	^agent isMorphic
+)
+isWindows ^<Boolean> = (
+	^agent isWindows
+)
+mayAccommodateNaturalHeightChangeOf: child <Visual> ^<Boolean> = (
+	^true
+)
+mayAccommodateNaturalWidthChangeOf: child <Visual> ^<Boolean> = (
+	^true
+)
+setDraggedImage: image <Form> = (
+	agent setDraggedImage: image
+)
+systemIsIdle = (
+	"Answers if the system is idle, that is, the user has generated no events recently."
+	"If the agent is nil we assume this is during image startup and pretend that system is idle.
+	This default makes sense if clients of this method should be quiescent when the system is idle."
+	^(agent ifNil: [^true]) systemIsIdle
+)
+updateDraggedImagePosition = (
+	agent updateDraggedImagePosition
+)
+windowHasPermissionToClose: window <Window> ^<Boolean> = (
+	"The window is about to be closed, and its regular code has already given permission to do so. The decision is delegated to a client-supplied windowClosePermission block, if present."
+	^windowClosePermission isNil or:
+		[windowClosePermission reentrant fixTemps value: window]
+)'debugging'
+printHierarchyLayoutReportOn: aStream = (
+	aStream nextPutAll: '-- desktop --'
+)'geometry'
+bounds ^<Rectangle> = (
+	"Answer the entire area of the desktop, i.e. the rectangle as large as the screen with the origin at 0@0. 0@0 being the origin is an important invariant to allow the layout framework work properly."
+
+	^agent desktopBounds
+)
+centeredRectangleOfExtent: rectExtent <Point> ^<Rectangle> = (
+	"Answer a rectangle of the specified extent centered within the desktop."
+
+	^(extent - rectExtent) // 2 extent: rectExtent
+)
+child: child <Window> requestsBoundsUpdateUsing: aBlock = (
+
+	self adviseBoundsFor: child using: aBlock
+)
+extent ^<Point> = (
+	"Answer the extent of the entire desktop (including the areas that cannot host windows, such as the Windows taskbar or the Mac menu bar)."
+
+	^bounds extent
+)
+globalOrigin = (
+
+	^0 @ 0
+)
+modifierKeyStateForCurrentEvent = (
+	^agent
+		ifNil: [ModifierKeyState new]
+		ifNotNil: [:it | it modifierKeyStateForCurrentEvent]
+)
+usableBounds ^<Rectangle> = (
+	"Answer the usable area of the desktop, i.e. the portion of #bounds excluding the areas that should not normally host windows, such as the Windows taskbar or the Mac menu bar."
+
+	^agent usableDesktopBounds
+)'restricted'
+adviseBoundsFor: window <Window> = (
+
+	window occupyBounds:
+		(window area boundsWithin: self bounds)
+)
+adviseBoundsFor: window <Window> using: aBlock <Block> = (
+
+	aBlock value: 
+		(window area boundsWithin: self bounds)
+)
+legalAreaClassesFor: child = (
+
+	^{Anchor. Frame}
+)
+setupAreaIn: child <Window> = (
+
+	child setupAreaForDesktop
+)'testing'
+effectivelyVisible ^<Boolean> = (
+
+	^true
+)
+isDescendantOf: anything = (
+	^false
+)
+isSqueezing ^<Boolean> = (
+
+	^false
+))