author | Claus Gittinger <cg@exept.de> |
Thu, 23 Nov 1995 03:29:00 +0100 | |
changeset 97 | 306cb0aa67be |
parent 94 | 169802ee9a6e |
child 98 | de14b996ee80 |
permissions | -rw-r--r-- |
58 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
86
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
58
diff
changeset
|
3 |
All Rights Reserved |
58 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Object subclass:#ListEntry |
|
14 |
instanceVariableNames:'' |
|
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Views-Support' |
|
18 |
! |
|
19 |
||
20 |
!ListEntry class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
86
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
58
diff
changeset
|
25 |
All Rights Reserved |
58 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
ListEntry is an abstract superclass for objects which can be used |
|
39 |
in place of strings in ListViews or SelectionInListViews. |
|
40 |
||
41 |
If you want to create new subclasses, implement (at least) the methods |
|
42 |
found in the 'required protocol' category. |
|
43 |
" |
|
97 | 44 |
! |
45 |
||
46 |
version |
|
47 |
^ '$Header: /cvs/stx/stx/libwidg2/ListEntry.st,v 1.4 1995-11-23 02:28:22 cg Exp $' |
|
58 | 48 |
! ! |
49 |
||
50 |
!ListEntry methodsFor:'queries'! |
|
51 |
||
52 |
includes:aCharacter |
|
53 |
^ self string includes:aCharacter |
|
54 |
! |
|
55 |
||
56 |
string |
|
57 |
^ self asString |
|
58 |
! ! |
|
59 |
||
60 |
!ListEntry methodsFor:'required protocol'! |
|
61 |
||
62 |
asString |
|
63 |
"return the receiver as a string (for example, to store it in a file)" |
|
64 |
||
65 |
^ self subclassResponsibility |
|
66 |
! |
|
67 |
||
97 | 68 |
displayOn:aGC x:x y:y |
69 |
"display the receiver on a GC" |
|
58 | 70 |
|
71 |
^ self subclassResponsibility |
|
94 | 72 |
! |
58 | 73 |
|
94 | 74 |
heightIn:aGC |
75 |
"return the height of the receiver when displayed in aGC. |
|
76 |
Assume the GC's font is taken. If that is not the case in a |
|
77 |
particular subclass, this method is to be redefined there." |
|
78 |
||
79 |
^ aGC font height |
|
80 |
||
81 |
"Created: 23.11.1995 / 00:19:45 / cg" |
|
97 | 82 |
! |
83 |
||
84 |
widthIn:aGC |
|
85 |
"return the width (in device units) of the receiver when displayed in aGC" |
|
86 |
||
87 |
^ self subclassResponsibility |
|
58 | 88 |
! ! |
89 |