equal
deleted
inserted
replaced
1 TextCollector subclass:#TerminalView |
1 TextCollector subclass:#TerminalView |
2 instanceVariableNames:'inStream outStream readerProcess shellPid kbdSequences |
2 instanceVariableNames:'inStream outStream readerProcess shellPid kbdSequences |
3 escapeSequenceTree currentSequence currentTree kbdMap |
3 escapeSequenceTree currentSequence currentTree kbdMap |
4 escapeLeadingChars numberOfColumns numberOfLines' |
4 escapeLeadingChars numberOfColumns numberOfLines' |
5 classVariableNames:'' |
5 classVariableNames:'' |
6 poolDictionaries:'' |
6 poolDictionaries:'' |
7 category:'Views-TerminalViews' |
7 category:'Views-TerminalViews' |
8 ! |
8 ! |
9 |
9 |
10 !TerminalView class methodsFor:'documentation'! |
10 !TerminalView class methodsFor:'documentation'! |
11 |
11 |
12 documentation |
12 documentation |
68 openShell |
68 openShell |
69 |in top scr vt52| |
69 |in top scr vt52| |
70 |
70 |
71 top := StandardSystemView new. |
71 top := StandardSystemView new. |
72 scr := HVScrollableView for:self in:top. |
72 scr := HVScrollableView for:self in:top. |
73 scr autoHideHorizontalScrollBar:true. |
73 "/ scr autoHideHorizontalScrollBar:true. |
74 scr horizontalMini:true. |
74 scr horizontalMini:true. |
75 scr origin:0.0@0.0 corner:1.0@1.0. |
75 scr origin:0.0@0.0 corner:1.0@1.0. |
76 vt52 := scr scrolledView. |
76 vt52 := scr scrolledView. |
77 |
77 |
78 top extent:(scr preferredExtent). |
78 top extent:(scr preferredExtent). |
83 |
83 |
84 |
84 |
85 " |
85 " |
86 VT100TerminalView openShell |
86 VT100TerminalView openShell |
87 " |
87 " |
88 |
|
89 "Modified: / 11.6.1998 / 18:11:19 / cg" |
|
90 ! ! |
88 ! ! |
91 |
89 |
92 !TerminalView methodsFor:'accessing'! |
90 !TerminalView methodsFor:'accessing'! |
93 |
91 |
94 inStream |
92 inStream |
225 ! |
223 ! |
226 |
224 |
227 shellTerminated |
225 shellTerminated |
228 self warn:'shell terminated'. |
226 self warn:'shell terminated'. |
229 self closeDownShell. |
227 self closeDownShell. |
|
228 ! |
|
229 |
|
230 sizeChanged:how |
|
231 super sizeChanged:how. |
|
232 |
|
233 OperatingSystem |
|
234 setWindowSizeOnFileDescriptor:(inStream fileDescriptor) |
|
235 width:(innerWidth // font width) |
|
236 height:(nFullLinesShown). |
|
237 |
|
238 shellPid notNil ifTrue:[ |
|
239 OperatingSystem sendSignal:OperatingSystem sigWINCH to:shellPid |
|
240 ] |
|
241 |
|
242 "Modified: / 11.6.1998 / 22:43:31 / cg" |
230 ! ! |
243 ! ! |
231 |
244 |
232 !TerminalView methodsFor:'functions'! |
245 !TerminalView methodsFor:'functions'! |
233 |
246 |
234 doBackspace |
247 doBackspace |
292 |
305 |
293 doCursorLeft |
306 doCursorLeft |
294 super cursorLeft |
307 super cursorLeft |
295 ! |
308 ! |
296 |
309 |
|
310 doCursorLeft:n |
|
311 n timesRepeat:[ |
|
312 super cursorLeft |
|
313 ] |
|
314 |
|
315 "Created: / 11.6.1998 / 22:30:00 / cg" |
|
316 ! |
|
317 |
297 doCursorNewLine |
318 doCursorNewLine |
298 super cursorDown:1 |
319 super cursorDown:1 |
299 |
320 |
300 "Modified: / 10.6.1998 / 16:55:57 / cg" |
321 "Modified: / 10.6.1998 / 16:55:57 / cg" |
301 ! |
322 ! |
314 "Created: / 10.6.1998 / 15:10:08 / cg" |
335 "Created: / 10.6.1998 / 15:10:08 / cg" |
315 ! |
336 ! |
316 |
337 |
317 doCursorUp |
338 doCursorUp |
318 super cursorUp |
339 super cursorUp |
|
340 ! |
|
341 |
|
342 doCursorUp:n |
|
343 n timesRepeat:[ |
|
344 super cursorUp |
|
345 ] |
|
346 |
|
347 "Created: / 11.6.1998 / 22:29:46 / cg" |
319 ! |
348 ! |
320 |
349 |
321 doSendInterrupt |
350 doSendInterrupt |
322 OperatingSystem sendSignal:(OperatingSystem sigINT) to:shellPid negated. |
351 OperatingSystem sendSignal:(OperatingSystem sigINT) to:shellPid negated. |
323 |
352 |
539 |
568 |
540 shellPid := Processor |
569 shellPid := Processor |
541 monitor:[ |
570 monitor:[ |
542 |e| |
571 |e| |
543 |
572 |
544 e := IdentityDictionary new. |
573 e := Dictionary new. |
545 e at:#TERM put:(self terminalType). |
574 e at:'TERM' put:(self terminalType). |
|
575 e at:'LINES' put:nil. |
|
576 e at:'COLUMNS' put:nil. |
546 |
577 |
547 OperatingSystem |
578 OperatingSystem |
548 exec:'/bin/sh' |
579 exec:'/bin/sh' |
549 withArguments:#('sh') |
580 withArguments:#('sh') |
550 environment:e |
581 environment:e |
580 |
611 |
581 " |
612 " |
582 VT100TerminalView openShell |
613 VT100TerminalView openShell |
583 " |
614 " |
584 |
615 |
585 "Modified: / 10.6.1998 / 18:42:23 / cg" |
616 "Modified: / 11.6.1998 / 22:28:53 / cg" |
586 ! ! |
617 ! ! |
587 |
618 |
588 !TerminalView methodsFor:'menu'! |
619 !TerminalView methodsFor:'menu'! |
589 |
620 |
590 editMenu |
621 editMenu |
669 ! ! |
700 ! ! |
670 |
701 |
671 !TerminalView class methodsFor:'documentation'! |
702 !TerminalView class methodsFor:'documentation'! |
672 |
703 |
673 version |
704 version |
674 ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.21 1998-06-11 17:11:45 cg Exp $' |
705 ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.22 1998-06-11 20:49:21 cg Exp $' |
675 ! ! |
706 ! ! |