ImageInspectorView.st
author claus
Mon, 10 Oct 1994 04:16:24 +0100
changeset 45 950b84ba89e6
parent 30 205d53e91c52
child 52 7b48409ae088
permissions -rw-r--r--
*** empty log message ***

"{ Package: 'Programming Tools' }"

"
 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 comment:'
COPYRIGHT (c) 1993 by Claus Gittinger
	      All Rights Reserved

this class allows better inspection of images

$Header: /cvs/stx/stx/libtool/ImageInspectorView.st,v 1.2 1994-10-10 03:15:45 claus Exp $
'!

!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 panel 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 := subViews first.
    self removeSubView:sub.
    sub origin:0.0@0.0 corner:1.0@0.3.
    newPanel addSubView:sub.

    v := HVScrollableView for:ImageEditView 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')
    "
! !