links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 2:40 pm UTC on 3 October 2020
Form is an important class in Squeak which is used everywhere. It is a subclass of DisplayMedium.

part of the class hierarchy
 Object #()
      DisplayObject #()
 	DisplayMedium #()
 		Form #('bits' 'width' 'height' 'depth' 'offset')
 			B3DTexture #('wrap' 'interpolate' 'envMode')
 			ColorForm #('colors' 'cachedDepth' 'cachedColormap')
 			Cursor #()
 				CursorWithMask #('maskForm')
 			DisplayScreen #('clippingBox')		
 					B3DDisplayScreen #()
 			StaticForm #()

Examples to be executed in Morphic



f := Form extent: 5@5 depth: 32.
"f extent 5@5"
"f width 5"

 f colorAt: 0@0 put: Color red.
 f colorAt: 0@4 put: Color green.

 f colorAt: 4@4 put: Color blue.
 f colorAt: 4@0 put: Color yellow.

 (f magnifyBy: 16) asMorph openInHand.


If you add
 InspectorBrowser openOn: f

at the end you get a browser showing the instance variables of the form object together with the methods the object has:



The graphic added under point 1. was done with

 Form fromUser asMorph openInWorld
gives you an ImageMorph

See also