Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Form
Last updated at 9:06 pm UTC on 28 March 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 #()


Example (to be executed in Morphic)

 f := Form extent: 10@10 depth: 32.
 f extent 10@10
 f width 10

 f colorAt: 0@0 put: Color red.
 f colorAt: 0@1 put: Color red.
 f colorAt: 1@1 put: Color red.
 f colorAt: 1@0 put: Color red.

 f colorAt: 9@9 put: Color blue.
 f colorAt: 8@9 put: Color blue.
 f colorAt: 9@8 put: Color blue.
 f colorAt: 8@8 put: Color blue.
 

 (f magnifyBy: 4) asMorph openInHand_



see also