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