Inset (of Code)

class Inset

Defined in Inset.sc.

An Inset lets you create a small window on the screen which can contain its own cast, and respond to its own events and such.

Properties

Inherited from Code:

Property Description
name  

Defined in Inset:

Property Description
picture  
anOverlay  
style  
view  
loop  
cel  
x  
y  
priority  
register  
hideTheCast  
caller  
owner  
script  
oldCast  
oldFeatures  
oldATPs  
oldMH  
oldKH  
oldDH  
oldWH  
oldObstacles  
oldStyle  
inset  
disposeNotOnMe  
modNum  
noun  
insetView  

Methods

init(theCaller theOwner theRegister)

Initializes the Inset. Generally you would override this to initialize your Inset with the necessary Props and such. Then call (super:init(rest params)).

Parameters:
  • theCaller (heapPtr) – Object that gets cue()’d when the Inset is disposed.
  • theOwner (heapPtr) – Generally a room.
doit()
dispose(param1)
setScript(theScript sendParams)
handleEvent(pEvent)
doVerb(theVerb)
hideCast(param1)
drawInset()
restore()
refresh()
setInset([theInset theCaller theRegister])

Sets an Inset on this Inset! To clear the inset, pass no parameters.

Parameters:
  • theInset (heapPtr) – The Inset instance.
  • theCaller (heapPtr) – An object that will get cue()’d when the Inset is disposed.

Example usage:

(send myInset:setInset(anotherSubInset))
onMe(theObj)
onMe(x y)

If the Inset has a view, return true if the object is on that view.

param heapPtr theObj:
 An object with x and y properties.
param number x:The x coordinate.
param number y:The y coordinate.
returns:TRUE if the object is on the Inset’s view. If there is no view, returns TRUE.