ExternalTopView.st
author Claus Gittinger <cg@exept.de>
Mon, 15 Feb 1999 18:43:27 +0100
changeset 1097 b3ba1a593ce7
parent 1088 63cd295128e2
child 1098 bcd7b099bac8
permissions -rw-r--r--
comment

"
 COPYRIGHT (c) 1999 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"


TopView subclass:#ExternalTopView
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Graphics-Support'
!

!ExternalTopView class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1999 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

!

documentation
"
    Represents a view as created by some other application.
    This is a support-class to allow ST/X views to be created
    inside other applications.

    A simple demoApplication is found in goodies/stxInExternalWindow.

    [author:]
        Claus Gittinger (cg@exept.de)

    [see also:]

    [instance variables:]

    [class variables:]
"
! !

!ExternalTopView class methodsFor:'instance creation'!

newWithID:anAlienWindowID
    ^ self new setWindowID:anAlienWindowID
! !

!ExternalTopView methodsFor:'private'!

checkWindowStillAlive
    "/ check for a destroyed topView (since we do not get any events from X)

    Transcript showCR:'check ...'.
    Processor 
        addTimedBlock:[self sensor pushUserEvent:#checkWindowStillAlive for:self]
        afterMilliseconds:2000
! !

!ExternalTopView methodsFor:'private accessing'!

setWindowID:aWindowID
    drawableId := aWindowID.
    realized := shown := true.
! !

!ExternalTopView methodsFor:'queries'!

isExternalTopView
    ^ true
!

isExternalWindow
    ^ true
! !

!ExternalTopView methodsFor:'redefined'!

destroyView
    "never destroyed by ST/X - instead, the view is under
     control of the host application ..."

    realized := false.
    drawableId := nil.
!

open
    super open.
    self checkWindowStillAlive
!

unmap
    "never unmapped by ST/X - instead, the view is under
     control of the host application ..."


! !

!ExternalTopView class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libview2/ExternalTopView.st,v 1.5 1999-02-15 17:43:27 cg Exp $'
! !