VDBAbstractUnixConsoleApplication.st
author Jan Vrany <jan.vrany@labware.com>
Mon, 30 May 2022 14:18:03 +0100
changeset 264 23960fcb9dac
parent 169 807f5f62c910
permissions -rw-r--r--
Relicense under MIT license.

"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2022 LabWare

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"
"{ Package: 'jv:vdb' }"

"{ NameSpace: Smalltalk }"

VDBAbstractConsoleApplication subclass:#VDBAbstractUnixConsoleApplication
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-UI-Console-Unix'
!

!VDBAbstractUnixConsoleApplication class methodsFor:'documentation'!

copyright
"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2022 LabWare

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"
! !

!VDBAbstractUnixConsoleApplication class methodsFor:'accessing - defaults'!

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:'startup-web applications'!

initialPageSpec
    "this is only required for web-applications"

    ^ self shouldImplement
!

pageSpecs
    "this is only required for web-applications"

    ^ self shouldImplement
! !

!VDBAbstractUnixConsoleApplication class methodsFor:'testing'!

isAbstract
    ^ self == VDBAbstractUnixConsoleApplication
! !

!VDBAbstractUnixConsoleApplication methodsFor:'accessing'!

consoleInput
    ^ self subclassResponsibility

    "Modified (comment): / 20-05-2019 / 11:53:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

consoleOutput
    ^ self subclassResponsibility

    "Modified (comment): / 20-05-2019 / 11:53:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBAbstractUnixConsoleApplication methodsFor:'aspects'!

consoleViewClass
    ^ VDBTerminalView

    "Created: / 21-01-2019 / 14:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 12-06-2019 / 12:58:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBAbstractUnixConsoleApplication methodsFor:'initialization & release'!

initializeConsoleView: aTerminalView forDebugger: aGDBDebugger
    aGDBDebugger notNil ifTrue:[
        aTerminalView inStream: self consoleInput.
        aTerminalView outStream: self consoleOutput. 
        aTerminalView startReaderProcessWhenVisible.
        aTerminalView addDependent: self.  
    ].

    "Created: / 25-01-2019 / 12:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 20-05-2019 / 11:53:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBAbstractUnixConsoleApplication class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !