home *** CD-ROM | disk | FTP | other *** search
- global gHoldSearchInfo, gLastWinLeft, gLastWinTop, gActiveWin, gWinOffSet, gInputField, gTimeRunningF, gWinLocRootT, gWinLocRootL, gWinLocCounter
-
- on birth me
- global gComputerModel
- set gComputerModel to #mpc
- return me
- end
-
- on mSetBasicMouseUp me, pWindow
- tell pWindow
- set the mouseUpScript to "mWinMouseUP(oWinKey)"
- end tell
- end
-
- on mWinMouseUp me
- if the shiftDown then
- set gLastWinLeft to getAt(the rect of window gActiveWin, 1) + gWinOffSet
- set gLastWinTop to getAt(the rect of window gActiveWin, 2) + gWinOffSet
- set gWinLocRootL to getAt(the rect of window gActiveWin, 1)
- set gWinLocRootT to getAt(the rect of window gActiveWin, 2)
- set gWinLocCounter to 1
- end if
- end
-
- on mSetbasicWinKeys me, pWindow
- tell pWindow
- set the keyDownScript to "mWinKeyClicked(oWinKey)"
- end tell
- end
-
- on mWinKeyClicked me
- global gComputerModel, gInputField
- set vKey to the key
- set vwhat to charToNum(vKey)
- if the commandDown and (vKey = "W") then
- closeWindow()
- exit
- end if
- if gHoldSearchInfo then
- if vwhat = 8 then
- if the shiftDown then
- tell the stage
- put EMPTY into field gInputField
- end tell
- else
- tell the stage
- set t to the selStart
- end tell
- tell the stage
- delete char the selStart of field gInputField
- end tell
- if t > 0 then
- tell the stage
- set the selStart to t - 1
- end tell
- end if
- tell the stage
- set the selEnd to the selStart
- end tell
- end if
- tell the stage
- set x to the number of chars in field gInputField
- end tell
- if x > 1 then
- set gTimeRunningF to 0
- tell the stage
- hKeyTimeMgr()
- end tell
- else
- tell the stage
- set the timeoutScript to EMPTY
- end tell
- end if
- dontPassEvent()
- else
- if (vwhat = 28) and not (the commandDown) then
- tell the stage
- set y to the selStart
- end tell
- if y > 0 then
- tell the stage
- set the selStart to the selStart - 1
- end tell
- end if
- tell the stage
- set the selEnd to the selStart
- end tell
- else
- if (vwhat = 29) and not (the commandDown) then
- tell the stage
- set y to the selEnd
- end tell
- tell the stage
- set z to the number of chars in field gInputField
- end tell
- if y < z then
- tell the stage
- set the selEnd to the selEnd + 1
- end tell
- end if
- tell the stage
- set the selStart to the selEnd
- end tell
- else
- tell the stage
- hKeyCheck(the key)
- end tell
- end if
- end if
- dontPassEvent()
- end if
- else
- tell the stage
- hKeyCheck(the key)
- end tell
- dontPassEvent()
- end if
- end
-