ListEntry.st
author Claus Gittinger <cg@exept.de>
Thu, 23 Nov 1995 00:25:21 +0100
changeset 94 169802ee9a6e
parent 86 4d7dbb5f1719
child 97 306cb0aa67be
permissions -rw-r--r--
*** empty log message ***

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

'From Smalltalk/X, Version:2.10.5 on 15-may-1995 at 9:37:01 am'!

Object subclass:#ListEntry
	 instanceVariableNames:''
	 classVariableNames:''
	 poolDictionaries:''
	 category:'Views-Support'
!

!ListEntry class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1995 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.
"
!

version
    ^ '$Header: /cvs/stx/stx/libwidg2/ListEntry.st,v 1.3 1995-11-22 23:25:21 cg Exp $'
!

documentation
"
    ListEntry is an abstract superclass for objects which can be used
    in place of strings in ListViews or SelectionInListViews.

    If you want to create new subclasses, implement (at least) the methods
    found in the 'required protocol' category.
"
! !

!ListEntry methodsFor:'queries'!

includes:aCharacter 
    ^ self string includes:aCharacter
!

string
    ^ self asString
! !

!ListEntry methodsFor:'required protocol'!

displayOn:aGC x:x y:y
    "display the receiver on a GC"

    ^ self subclassResponsibility
!

asString
    "return the receiver as a string (for example, to store it in a file)"

    ^ self subclassResponsibility
!

widthIn:aGC
    "return the width (in device units) of the receiver when displayed in aGC"

    ^ self subclassResponsibility
!

heightIn:aGC
    "return the height of the receiver when displayed in aGC.
     Assume the GC's font is taken. If that is not the case in a
     particular subclass, this method is to be redefined there."

    ^ aGC font height

    "Created: 23.11.1995 / 00:19:45 / cg"
! !