author | Claus Gittinger <cg@exept.de> |
Mon, 11 Dec 1995 18:05:14 +0100 | |
changeset 108 | b228b94be590 |
parent 98 | de14b996ee80 |
child 109 | 88467c13bf31 |
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 |
" |
|
44 |
! ! |
|
45 |
||
46 |
!ListEntry methodsFor:'queries'! |
|
47 |
||
48 |
includes:aCharacter |
|
49 |
^ self string includes:aCharacter |
|
50 |
! |
|
51 |
||
52 |
string |
|
53 |
^ self asString |
|
54 |
! ! |
|
55 |
||
108 | 56 |
!ListEntry methodsFor:'drawing'! |
57 |
||
58 |
displayOpaqueOn:aGC x:x y:y |
|
59 |
"display the receiver on a GC" |
|
60 |
||
61 |
^ self displayOn:aGC x:x y:y opaque:true |
|
62 |
! |
|
63 |
||
64 |
displayOn:aGC x:x y:y |
|
65 |
"display the receiver on a GC" |
|
66 |
||
67 |
^ self displayOn:aGC x:x y:y opaque:false |
|
68 |
! ! |
|
69 |
||
58 | 70 |
!ListEntry methodsFor:'required protocol'! |
71 |
||
72 |
asString |
|
73 |
"return the receiver as a string (for example, to store it in a file)" |
|
74 |
||
75 |
^ self subclassResponsibility |
|
76 |
! |
|
77 |
||
108 | 78 |
displayOn:aGC x:x y:yopaque:opaque |
97 | 79 |
"display the receiver on a GC" |
58 | 80 |
|
81 |
^ self subclassResponsibility |
|
94 | 82 |
! |
58 | 83 |
|
94 | 84 |
heightIn:aGC |
85 |
"return the height of the receiver when displayed in aGC. |
|
86 |
Assume the GC's font is taken. If that is not the case in a |
|
87 |
particular subclass, this method is to be redefined there." |
|
88 |
||
89 |
^ aGC font height |
|
90 |
||
91 |
"Created: 23.11.1995 / 00:19:45 / cg" |
|
97 | 92 |
! |
93 |
||
94 |
widthIn:aGC |
|
95 |
"return the width (in device units) of the receiver when displayed in aGC" |
|
96 |
||
97 |
^ self subclassResponsibility |
|
58 | 98 |
! ! |
99 |
||
98 | 100 |
!ListEntry class methodsFor:'documentation'! |
101 |
||
102 |
version |
|
108 | 103 |
^ '$Header: /cvs/stx/stx/libwidg2/ListEntry.st,v 1.6 1995-12-11 17:05:13 cg Exp $' |
98 | 104 |
! ! |