ApplicationSubView.st
author frank
Tue, 13 Feb 2001 20:17:58 +0100
changeset 1460 58678f806f0a
parent 1433 527262f8f026
child 1715 4fa58bb9c615
permissions -rw-r--r--
send #release to app, when destroyed

"
 COPYRIGHT (c) 1999 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.
"


"{ Package: 'stx:libview2' }"

View subclass:#ApplicationSubView
	instanceVariableNames:'application'
	classVariableNames:''
	poolDictionaries:''
	category:'Views-Basic'
!

!ApplicationSubView class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1999 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
"
    needed sometimes, when a full application is embeded into an ExtendedComboBox
    or subcanvas AND you want to avoid, that this application accesses the outer
    applications aspects (by returning a private application instance).

    Notice: you may have to manually set this views application to be the embedded app
           (i.e. via #application:) unless it is set by #client:....

    see self-embedding example in CodingExamples_GUI::GUIDemoExtendedComboBox
"
!

examples
"
    see self-embedding example in CodingExamples_GUI::GUIDemoExtendedComboBox
"
! !

!ApplicationSubView methodsFor:'accessing'!

application
    "return the value of the instance variable 'application' (automatically generated)"

    ^ application
!

application:something
    "set the value of the instance variable 'application' (automatically generated)"

    application := something.
!

client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder
    self application:anApplication.
    ^ super client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder


! !

!ApplicationSubView methodsFor:'events'!

destroy
    |app|

    (app := self application) notNil ifTrue:[
        app ~~ self topView application ifTrue:[
            app release
        ]
    ].
    super destroy.

!

realize
    |app|

    super realize.
    (app := self application) notNil ifTrue:[
        app postOpenAsSubcanvasWith:app builder
    ]
! !

!ApplicationSubView class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libview2/ApplicationSubView.st,v 1.5 2001-02-13 19:17:58 frank Exp $'
! !