VDBAbstractUnixConsoleApplication.st
changeset 139 c619cc458fb1
parent 94 e76206d071fc
child 143 df7f89efd39d
--- a/VDBAbstractUnixConsoleApplication.st	Mon Jan 21 11:41:14 2019 +0000
+++ b/VDBAbstractUnixConsoleApplication.st	Mon Jan 21 14:43:03 2019 +0000
@@ -10,8 +10,8 @@
 
 "{ NameSpace: Smalltalk }"
 
-VDBAbstractApplication subclass:#VDBAbstractUnixConsoleApplication
-	instanceVariableNames:'consoleView'
+VDBAbstractConsoleApplication subclass:#VDBAbstractUnixConsoleApplication
+	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
 	category:'VDB-UI-Console-Unix'
@@ -30,69 +30,29 @@
 "
 ! !
 
-!VDBAbstractUnixConsoleApplication class methodsFor:'interface specs'!
-
-windowSpec
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:VDBAbstractConsoleApplication andSelector:#windowSpec
-     VDBAbstractConsoleApplication new openInterface:#windowSpec
-     VDBAbstractConsoleApplication open
-    "
-
-    <resource: #canvas>
+!VDBAbstractUnixConsoleApplication class methodsFor:'accessing - defaults'!
 
-    ^ 
-    #(FullSpec
-       name: windowSpec
-       window: 
-      (WindowSpec
-         label: 'Console'
-         name: 'Console'
-         min: (Point 10 10)
-         bounds: (Rectangle 0 0 782 332)
-       )
-       component: 
-      (SpecCollection
-         collection: (
-          (ArbitraryComponentSpec
-             name: 'Console'
-             layout: (LayoutFrame 0 0 0 0 0 1 0 1)
-             hasHorizontalScrollBar: true
-             hasVerticalScrollBar: true
-             miniScrollerHorizontal: true
-             autoHideScrollBars: false
-             hasBorder: false
-             component: consoleView
-           )
-          )
-        
-       )
-     )
+defaultWindowTitle
+    "Returns default window title for this application. By default,
+     extracts the title from #windowSpec.
+     
+     Subclasses may (must) override this method."
+
+    ^ self shouldImplement:'Override #defaultWindowTitle in concrete classes'
 ! !
 
-!VDBAbstractUnixConsoleApplication class methodsFor:'plugIn spec'!
+!VDBAbstractUnixConsoleApplication class methodsFor:'startup-web applications'!
 
-aspectSelectors
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this. If it is corrupted,
-     the UIPainter may not be able to read the specification."
+initialPageSpec
+    "this is only required for web-applications"
 
-    "Return a description of exported aspects;
-     these can be connected to aspects of an embedding application
-     (if this app is embedded in a subCanvas)."
+    ^ self shouldImplement
+!
 
-    ^ #(
-        #debuggerHolder
-      ).
+pageSpecs
+    "this is only required for web-applications"
 
+    ^ self shouldImplement
 ! !
 
 !VDBAbstractUnixConsoleApplication class methodsFor:'testing'!
@@ -101,71 +61,12 @@
     ^ self == VDBAbstractUnixConsoleApplication
 ! !
 
-!VDBAbstractUnixConsoleApplication methodsFor:'accessing'!
-
-consoleInput
-    self subclassResponsibility
-
-    "Created: / 01-06-2017 / 09:43:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-consoleOutput
-    self subclassResponsibility
-
-    "Created: / 01-06-2017 / 09:44:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
 !VDBAbstractUnixConsoleApplication methodsFor:'aspects'!
 
-consoleView
-    consoleView isNil ifTrue:[ 
-        consoleView :=VT100TerminalView new.
-        consoleView font: self textFont;
-                    cursorType: #block;  
-                    foregroundColor: Color white
-                    backgroundColor: Color black;
-                    cursorForegroundColor: Color white
-                          backgroundColor: Color white.
-        debugger notNil ifTrue:[ 
-            consoleView inStream: self consoleInput.
-            consoleView outStream: self consoleOutput.
-            consoleView startReaderProcessWhenVisible.
-        ].
-    ].
-    ^ consoleView
-
-    "Created: / 06-06-2014 / 21:33:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 20-08-2018 / 10:18:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBAbstractUnixConsoleApplication methodsFor:'initialization & release'!
+consoleViewClass
+    ^ VT100TerminalView
 
-subscribe   
-    "Register for debugger events. To be overrided by subclasses"
-
-    super subscribe.
-    (debugger notNil and:[consoleView notNil]) ifTrue:[
-        consoleView stopReaderProcess.
-        consoleView inStream: self consoleInput.
-        consoleView outStream: self consoleOutput.            
-        consoleView startReaderProcessWhenVisible.
-    ].
-
-    "Created: / 10-06-2014 / 21:02:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 01-06-2017 / 09:47:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-unsubscribe
-    "Unsubscribe myself fo debugger events"
-
-    super unsubscribe.
-    consoleView notNil ifTrue:[ 
-        consoleView stopReaderProcess.
-        consoleView inStream: nil.
-        consoleView outStream: nil.
-    ].
-
-    "Created: / 09-06-2014 / 10:09:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 21-01-2019 / 14:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !VDBAbstractUnixConsoleApplication class methodsFor:'documentation'!