TerminalView.st
changeset 1359 c571a792c5b0
parent 1358 ec94a03e4585
child 1360 fb843effdaea
equal deleted inserted replaced
1358:ec94a03e4585 1359:c571a792c5b0
   380 
   380 
   381     "Created: / 12.6.1998 / 22:34:39 / cg"
   381     "Created: / 12.6.1998 / 22:34:39 / cg"
   382     "Modified: / 20.6.1998 / 19:45:28 / cg"
   382     "Modified: / 20.6.1998 / 19:45:28 / cg"
   383 !
   383 !
   384 
   384 
       
   385 contentsChanged
       
   386     super contentsChanged.
       
   387     self defineWindowSize.
       
   388 
       
   389     "Modified: / 11.6.1998 / 22:51:48 / cg"
       
   390     "Created: / 5.5.1999 / 16:30:15 / cg"
       
   391 !
       
   392 
   385 defineWindowSize
   393 defineWindowSize
   386     |fd delta|
   394     |fd delta prevNumCols prevNumLines|
       
   395 
       
   396     prevNumCols := numberOfColumns.
       
   397     prevNumLines := numberOfLines.
   387 
   398 
   388     numberOfColumns := (innerWidth // font width).
   399     numberOfColumns := (innerWidth // font width).
   389     delta := numberOfLines - rangeEndLine.
   400     delta := numberOfLines - rangeEndLine.
   390     numberOfLines := nFullLinesShown.
   401     numberOfLines := nFullLinesShown.
       
   402 
       
   403     ((prevNumCols == numberOfColumns)
       
   404     and:[prevNumLines == numberOfLines]) ifTrue:[
       
   405         ^ self
       
   406     ].
       
   407 
   391     rangeEndLine notNil ifTrue:[
   408     rangeEndLine notNil ifTrue:[
   392         rangeEndLine := numberOfLines - delta.
   409         rangeEndLine := numberOfLines - delta.
   393     ].
   410     ].
       
   411 
       
   412     "/ any idea, how to do this under windows ?
   394 
   413 
   395     OperatingSystem isUNIXlike ifTrue:[
   414     OperatingSystem isUNIXlike ifTrue:[
   396         "/
   415         "/
   397         "/ tell the pty;
   416         "/ tell the pty;
   398         "/ tell the shell;
   417         "/ tell the shell;
   414             OperatingSystem sendSignal:OperatingSystem sigWINCH to:shellPid
   433             OperatingSystem sendSignal:OperatingSystem sigWINCH to:shellPid
   415         ]
   434         ]
   416     ].
   435     ].
   417 
   436 
   418     "Created: / 11.6.1998 / 22:51:39 / cg"
   437     "Created: / 11.6.1998 / 22:51:39 / cg"
   419     "Modified: / 5.5.1999 / 11:54:34 / cg"
   438     "Modified: / 5.5.1999 / 16:32:22 / cg"
   420 !
   439 !
   421 
   440 
   422 keyPress:aKey x:x y:y
   441 keyPress:aKey x:x y:y
   423     |rest event rawKey seq|
   442     |rest event rawKey seq|
   424 
   443 
  1468 ! !
  1487 ! !
  1469 
  1488 
  1470 !TerminalView class methodsFor:'documentation'!
  1489 !TerminalView class methodsFor:'documentation'!
  1471 
  1490 
  1472 version
  1491 version
  1473     ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.78 1999-05-05 14:40:43 cg Exp $'
  1492     ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.79 1999-05-05 14:50:01 cg Exp $'
  1474 ! !
  1493 ! !