ImageInspectorView.st
author Claus Gittinger <cg@exept.de>
Fri, 17 Apr 1998 21:00:31 +0200
changeset 1555 756ab2711237
parent 1379 9424d8fe85a7
child 1872 1c3c80a1973f
permissions -rw-r--r--
checkin from browser

"
 COPYRIGHT (c) 1993 by Claus Gittinger
	      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.
"

InspectorView subclass:#ImageInspectorView
	instanceVariableNames:'imageView'
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-Inspector'
!

!ImageInspectorView class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1993 by Claus Gittinger
	      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
"
    this class allows better inspection of images,
    by adding another subView, which displays the image.
"
! !

!ImageInspectorView methodsFor:'accessing'!

inspect:anObject
    super inspect:anObject.
    realized ifFalse:[^ self].
    imageView image:anObject

    "
     ImageInspectorView inspect:(Image fromScreen:(0@0 corner:800@800))
    "
! !

!ImageInspectorView methodsFor:'initialization'!

initialize
    |v newPanel sub|

    super initialize.

    newPanel := VariableVerticalPanel in:self.
    newPanel origin:0.0 @ 0.0 corner:1.0 @ 1.0.

    "
     wrap my existing subview into the new
     variable panel
    "
    sub := self subViews first.
    self removeSubView:sub.
    sub origin:0.0@0.0 corner:1.0@0.3.
    newPanel addSubView:sub.

    v := HVScrollableView for:ImageView in:newPanel.
    v origin:(0.0 @ 0.3) corner:(1.0 @ 1.0).
    imageView := v scrolledView.

    "
     ImageInspectorView new realize
     ImageInspectorView inspect:(Image fromFile:'bitmaps/claus.gif')
    "

    "Modified: 28.1.1997 / 17:51:08 / cg"
! !

!ImageInspectorView class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libtool/ImageInspectorView.st,v 1.12 1997-12-04 09:47:38 tz Exp $'
! !