TerminalView.st
changeset 1052 732fd3255894
parent 1021 c3963e925eb5
child 1055 eebff36e25e9
equal deleted inserted replaced
1051:a448c854fcbb 1052:732fd3255894
    24         VT52TerminalView openShell
    24         VT52TerminalView openShell
    25         VT100TerminalView openShell
    25         VT100TerminalView openShell
    26 "
    26 "
    27 ! !
    27 ! !
    28 
    28 
       
    29 !TerminalView class methodsFor:'defaults'!
       
    30 
       
    31 defaultIcon
       
    32     ^ Image fromFile:'bitmaps/xpmBitmaps/terminal_images/xterm-icon.xpm'
       
    33 
       
    34     "Created: / 4.8.1998 / 17:48:18 / cg"
       
    35     "Modified: / 4.8.1998 / 17:48:31 / cg"
       
    36 ! !
       
    37 
    29 !TerminalView class methodsFor:'opening'!
    38 !TerminalView class methodsFor:'opening'!
    30 
    39 
    31 open
    40 open
    32     ^ self openShell
    41     ^ self openShell
    33 
    42 
    90     ].
    99     ].
    91 
   100 
    92     top extent:(scr preferredExtent).
   101     top extent:(scr preferredExtent).
    93     top label:('executing: "' , aCommandString , '"').
   102     top label:('executing: "' , aCommandString , '"').
    94     top iconLabel:'command'.
   103     top iconLabel:'command'.
    95     top icon:(Image fromFile:'bitmaps/xpmBitmaps/terminal_images/xterm-blank.xpm').
   104     top icon:(self defaultIcon).
    96     top open.
   105     top open.
    97 
   106 
    98     ^ vt52
   107     ^ vt52
    99 
   108 
   100     "
   109     "
   101      VT100TerminalView openOnCommand:'ls -lR'
   110      VT100TerminalView openOnCommand:'ls -lR'
   102      VT100TerminalView openOnCommand:'vi /etc/hosts'
   111      VT100TerminalView openOnCommand:'vi /etc/hosts'
   103     "
   112     "
   104 
   113 
   105     "Created: / 9.7.1998 / 17:54:34 / cg"
   114     "Created: / 9.7.1998 / 17:54:34 / cg"
   106     "Modified: / 27.7.1998 / 13:47:44 / cg"
   115     "Modified: / 4.8.1998 / 17:49:02 / cg"
   107 !
   116 !
   108 
   117 
   109 openOnInput:inStream output:outStream
   118 openOnInput:inStream output:outStream
   110     "open a terminalView on the given streams (which are typically some
   119     "open a terminalView on the given streams (which are typically some
   111      kind of socket). Keys pressed are sent to inStream, text appearing
   120      kind of socket). Keys pressed are sent to inStream, text appearing
   126     vt52 startReaderProcess.
   135     vt52 startReaderProcess.
   127 
   136 
   128     top extent:(scr preferredExtent).
   137     top extent:(scr preferredExtent).
   129     top label:'shell'.
   138     top label:'shell'.
   130     top iconLabel:'shell'.
   139     top iconLabel:'shell'.
   131     top icon:(Image fromFile:'bitmaps/xpmBitmaps/terminal_images/xterm-blank.xpm').
   140     top icon:(self defaultIcon).
   132     top open.
   141     top open.
   133     ^ top
   142     ^ top
   134 
   143 
   135     "Modified: / 27.7.1998 / 13:47:21 / cg"
   144     "Modified: / 4.8.1998 / 17:48:59 / cg"
   136 !
   145 !
   137 
   146 
   138 openShell
   147 openShell
   139     "start a shell on a pseudo-TTY, open a terminalView on it
   148     "start a shell on a pseudo-TTY, open a terminalView on it
   140      (i.e. this is kind of an xterm)"
   149      (i.e. this is kind of an xterm)"
   163     vt52 shellTerminateAction:[top destroy].
   172     vt52 shellTerminateAction:[top destroy].
   164 
   173 
   165     top extent:(scr preferredExtent).
   174     top extent:(scr preferredExtent).
   166     top label:'shell'.
   175     top label:'shell'.
   167     top iconLabel:'shell'.
   176     top iconLabel:'shell'.
   168     top icon:(Image fromFile:'bitmaps/xpmBitmaps/terminal_images/xterm-blank.xpm').
   177     top icon:(self defaultIcon).
   169     top open.
   178     top open.
   170 
   179 
   171     ^ vt52
   180     ^ vt52
   172 
   181 
   173     "
   182     "
   174      VT100TerminalView openShellIn:'/etc'
   183      VT100TerminalView openShellIn:'/etc'
   175     "
   184     "
   176 
   185 
   177     "Created: / 20.7.1998 / 18:28:15 / cg"
   186     "Created: / 20.7.1998 / 18:28:15 / cg"
   178     "Modified: / 27.7.1998 / 13:47:16 / cg"
   187     "Modified: / 4.8.1998 / 17:48:54 / cg"
   179 ! !
   188 ! !
   180 
   189 
   181 !TerminalView class methodsFor:'queries'!
   190 !TerminalView class methodsFor:'queries'!
   182 
   191 
   183 isVisualStartable
   192 isVisualStartable
  1180 ! !
  1189 ! !
  1181 
  1190 
  1182 !TerminalView class methodsFor:'documentation'!
  1191 !TerminalView class methodsFor:'documentation'!
  1183 
  1192 
  1184 version
  1193 version
  1185     ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.55 1998-07-28 10:08:10 cg Exp $'
  1194     ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.56 1998-08-04 15:49:29 cg Exp $'
  1186 ! !
  1195 ! !