changeset 1328 | a56f6e341b5b |
parent 1306 | afd1fcd217f4 |
child 1329 | b56172875855 |
1327:b0b482a84570 | 1328:a56f6e341b5b |
---|---|
11 " |
11 " |
12 |
12 |
13 |
13 |
14 Object subclass:#MenuItem |
14 Object subclass:#MenuItem |
15 instanceVariableNames:'activeHelpKey enabled label value nameKey adornment |
15 instanceVariableNames:'activeHelpKey enabled label value nameKey adornment |
16 translateLabel isButton startGroup isVisible' |
16 translateLabel isButton startGroup isVisible hideMenuOnActivated' |
17 classVariableNames:'' |
17 classVariableNames:'' |
18 poolDictionaries:'' |
18 poolDictionaries:'' |
19 category:'Views-Support' |
19 category:'Views-Support' |
20 ! |
20 ! |
21 |
21 |
163 |
163 |
164 auxValue:something |
164 auxValue:something |
165 "set the auxValue - an arbitrary user value |
165 "set the auxValue - an arbitrary user value |
166 " |
166 " |
167 self adornment auxValue:something |
167 self adornment auxValue:something |
168 ! |
|
169 |
|
170 hideMenuOnActivated |
|
171 "hide the menu when the item was activated; the default is true |
|
172 " |
|
173 ^ hideMenuOnActivated ? true |
|
174 |
|
175 ! |
|
176 |
|
177 hideMenuOnActivated:aBool |
|
178 "hide the menu when the item was activated; the default is true |
|
179 " |
|
180 hideMenuOnActivated := aBool ? true |
|
181 |
|
168 ! |
182 ! |
169 |
183 |
170 isVisible |
184 isVisible |
171 ^ isVisible ? true |
185 ^ isVisible ? true |
172 ! |
186 ! |
498 |
512 |
499 label notNil ifTrue:[ |
513 label notNil ifTrue:[ |
500 coll add:#label: ; add:(label literalArrayEncoding) |
514 coll add:#label: ; add:(label literalArrayEncoding) |
501 ]. |
515 ]. |
502 self translateLabel ifTrue:[ |
516 self translateLabel ifTrue:[ |
503 coll add:#translateLabel: ; add:(translateLabel literalArrayEncoding) |
517 coll add:#translateLabel: ; add:true |
504 ]. |
518 ]. |
505 self isButton ifTrue:[ |
519 self isButton ifTrue:[ |
506 coll add:#isButton:; add:(isButton literalArrayEncoding) |
520 coll add:#isButton:; add:true |
521 ]. |
|
522 hideMenuOnActivated == false ifTrue:[ |
|
523 coll add:#hideMenuOnActivated: ; add:false |
|
507 ]. |
524 ]. |
508 nameKey notNil ifTrue:[ |
525 nameKey notNil ifTrue:[ |
509 coll add:#nameKey: ; add:(nameKey literalArrayEncoding) |
526 coll add:#nameKey: ; add:(nameKey literalArrayEncoding) |
510 ]. |
527 ]. |
511 isVisible notNil ifTrue:[ |
528 isVisible notNil ifTrue:[ |
512 isVisible ~~ true ifTrue:[ |
529 isVisible ~~ true ifTrue:[ |
513 coll add:#isVisible: ; add:(isVisible literalArrayEncoding) |
530 coll add:#isVisible: ; add:(isVisible literalArrayEncoding) |
514 ] |
531 ] |
515 ]. |
532 ]. |
516 |
|
517 startGroup notNil ifTrue:[ |
533 startGroup notNil ifTrue:[ |
518 coll add:#startGroup: ; add:(startGroup literalArrayEncoding) |
534 coll add:#startGroup: ; add:(startGroup literalArrayEncoding) |
519 ]. |
535 ]. |
520 |
536 |
521 value notNil ifTrue:[ |
537 value notNil ifTrue:[ |
856 ! ! |
872 ! ! |
857 |
873 |
858 !MenuItem class methodsFor:'documentation'! |
874 !MenuItem class methodsFor:'documentation'! |
859 |
875 |
860 version |
876 version |
861 ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.32 2000-01-17 11:17:35 cg Exp $' |
877 ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.33 2000-02-02 14:45:09 ca Exp $' |
862 ! ! |
878 ! ! |