equal
deleted
inserted
replaced
1 'From Smalltalk/X, Version:2.8.2 on 29-nov-1993 at 15:22:58'! |
1 " |
|
2 COPYRIGHT (c) 1993 by Claus Gittinger |
|
3 All Rights Reserved |
|
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 " |
2 |
12 |
3 Object subclass:#WindowGroup |
13 Object subclass:#WindowGroup |
4 instanceVariableNames:'views topViews myProcess mySensor' |
14 instanceVariableNames:'views topViews myProcess mySensor' |
5 classVariableNames:'ActiveGroup' |
15 classVariableNames:'ActiveGroup' |
6 poolDictionaries:'' |
16 poolDictionaries:'' |
8 ! |
18 ! |
9 |
19 |
10 !WindowGroup class methodsFor:'instance creation'! |
20 !WindowGroup class methodsFor:'instance creation'! |
11 |
21 |
12 new |
22 new |
|
23 "create and return a new WindowGroup object" |
|
24 |
13 ^ self basicNew initialize |
25 ^ self basicNew initialize |
14 ! ! |
26 ! ! |
15 |
27 |
|
28 !WindowGroup class methodsFor:'accessing'! |
|
29 |
|
30 activeGroup |
|
31 "return the currently active windowGroup" |
|
32 |
|
33 ^ ActiveGroup |
|
34 ! ! |
|
35 |
16 !WindowGroup methodsFor:'accessing'! |
36 !WindowGroup methodsFor:'accessing'! |
17 |
37 |
|
38 sensor |
|
39 "return the windowGroups sensor" |
|
40 |
|
41 ^ mySensor |
|
42 ! |
|
43 |
18 addView:aView |
44 addView:aView |
|
45 "add aView to the windowGroup" |
|
46 |
19 views isNil ifTrue:[ |
47 views isNil ifTrue:[ |
20 views := OrderedCollection new. |
48 views := OrderedCollection new. |
21 ]. |
49 ]. |
22 views add:aView |
50 views add:aView |
23 ! |
51 ! |
24 |
52 |
25 sensor |
|
26 ^ mySensor |
|
27 ! |
|
28 |
|
29 removeView:aView |
53 removeView:aView |
|
54 "remove aView from the windowGroup; |
|
55 if this was the last view in this group, |
|
56 also shut down the corresponding process" |
|
57 |
30 views notNil ifTrue:[ |
58 views notNil ifTrue:[ |
31 views remove:aView ifAbsent:[]. |
59 views remove:aView ifAbsent:[]. |
32 views isEmpty ifTrue:[ |
60 views isEmpty ifTrue:[ |
33 views := nil |
61 views := nil |
34 ] |
62 ] |
50 ]. |
78 ]. |
51 mySensor eventSemaphore signal |
79 mySensor eventSemaphore signal |
52 ! |
80 ! |
53 |
81 |
54 views |
82 views |
|
83 "return the views accociated to this windowGroup" |
|
84 |
55 ^ views |
85 ^ views |
56 ! |
86 ! |
57 |
87 |
58 process |
88 process |
|
89 "return the windowGroups process" |
|
90 |
59 ^ myProcess |
91 ^ myProcess |
60 ! |
92 ! |
61 |
93 |
62 sensor:aSensor |
94 sensor:aSensor |
|
95 "set the windowGroups sensor" |
|
96 |
63 mySensor := aSensor |
97 mySensor := aSensor |
64 ! |
98 ! |
65 |
99 |
66 addTopView:aView |
100 addTopView:aView |
67 topViews isNil ifTrue:[ |
101 topViews isNil ifTrue:[ |