home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
mac
/
FILES
/
SHARED.CST
/
00024_Script_AreaManagerObject
< prev
next >
Wrap
Text File
|
1997-07-24
|
4KB
|
135 lines
--o: AreaMgr
--pState can be: #Active, #Inactive
--pCurrentArea can be: #DESK, #KINETOSCOPE, #BENCH, #TICKER, #LAB, #NONE
--INSTANTIATED AS gAreaManagerObj
property pAreaList, pState, pActiveArea, pAreaMaster
property pCurrArea
global gPictObj, gInterfaceMgrObj, gModeManager
global gWHSobjIndexedLst, gBHSobjIndexedLst, gEHSobjIndexedLst, gGHSobjIndexedLst
global gInventorIndexNum, gGeneralCastIndex, gMstrObjIndexedLst, gInventorOrder, gUtilityObj
----------------------------------------------------------------------------ò
on mInit me, HSdatapaksIndex, invNum
set AreaScript = script (getprop(gGeneralCastIndex,#AreaObjectScript)) -- AreaObjectParentScript
set AreaDBcastLst = getprop(gGeneralCastIndex,#AreaDbs)
set pAreaList = []
set pAreaMaster = [[],[],[]]
repeat with invNum = 1 to 4
set whatinventor = getat(gInventorOrder, invNum) -- Returns #Edison,#Bell,#Watt,#Gallery...ect
set whatinvIndex = getprop(gMstrObjIndexedLst,whatinventor) -- gEHSobjIndexedLst ...
set AreaDB = the text of cast (getprop( AreaDBcastLst, whatinventor)) -- "EDISON Area DB", .....
set pAreaList = [:]
set done = false
repeat while not done
if (line 1 of AreaDB contains "~") then set done = true
delete line 1 of AreaDB
end repeat
set NumOfDBlines = the number of lines in AreaDB
repeat with DBline = 1 to NumOfDBlines
set CurrAreaDBline = value(line DBline of AreaDB )
set AreaCreating = getat( CurrAreaDBline, 2)
addProp(pAreaList, AreaCreating, birth(AreaScript ,whatinvIndex, CurrAreaDBline))
end repeat
setat(pAreaMaster,invNum,pAreaList)
MoveBar( 5 )
end repeat
set pState = #Inactive
set pActiveArea = 0
return ( me )
end mInit
----------------------------------------------------------------------------ò
on mChangeInventor me, whatInventor
set pAreaList = getat(pAreaMaster,gInventorIndexNum)
set pActiveArea = 0
end mChangeInventor
----------------------------------------------------------------------------ò
on mPerform me
mPassPerform (pActiveArea)
end mPerform
----------------------------------------------------------------------------ò
on mAreaHSevent me, argHS
if mGetCurrentMode(gModeManager) = #AREA then mDistributeHS(me, argHS)
end mAreaHSevent
----------------------------------------------------------------------------ò
on mDistributeHS me, argHotSpotNumber
-- Locate Hotspot in areas... should use indexed list and eliminate the repeat
set newFunctType = false
if objectp(pActiveArea) then
set newFunctType = mContainsHS(pActiveArea, argHotSpotNumber)
end if
set AreaToCheck = 1
if (newFunctType = false) then
repeat while newFunctType = false
set pActiveArea = getAt(pAreaList, AreaToCheck)
set newFunctType = mContainsHS(pActiveArea, argHotSpotNumber)
set AreaToCheck = AreaToCheck + 1
end repeat
end if
--/ Gallery Swing "Addition".....
if (gInventorIndexNum = 4) and (newFunctType = #FRAME) then
if argHotSpotNumber = 3 then set NewViewStr = "5,-8,70" -- Edison
else if argHotSpotNumber = 5 then set NewViewStr = "275,-8,70.0" -- Watt
else if argHotSpotNumber = 1 then set NewViewStr = "95,-8,70.0" -- Bell
else if argHotSpotNumber = 7 then set NewViewStr = "180,0,60" -- quit
mSwingToView( gQTVRobj, NewViewStr,"5" )
end if
--/
if (newFunctType <> #TEXT) then mChangeMode(gModeManager, newFunctType)
end mDistributeHS
----------------------------------------------------------------------------ò
on mPassActivateEvent me, argFunctType
mTriggerFunctionality(pActiveArea, argFunctType)
end mPassActivateEvent
----------------------------------------------------------------------------ò
on mClickEvent me
mDenyClicks( gUtilityObj )
mClickEvent( pActiveArea )
end mClickEvent
----------------------------------------------------------------------------ò
on mActivate me
--this manager should NEVER be inactive
end mActivate
----------------------------------------------------------------------------ò
on mClose me
--this manager should NEVER be inactive
end mClose
----------------------------------------------------------------------------ò