2695 doStepUp |
2696 doStepUp |
2696 "shift selected menu item one step up" |
2697 "shift selected menu item one step up" |
2697 |
2698 |
2698 treeView selectedNodeChangeSequenceOrder:-1. |
2699 treeView selectedNodeChangeSequenceOrder:-1. |
2699 modified := true. |
2700 modified := true. |
|
2701 ! ! |
|
2702 |
|
2703 !MenuEditor::Item class methodsFor:'constants'! |
|
2704 |
|
2705 separatorList |
|
2706 "get the list of available separator types" |
|
2707 |
|
2708 ^#('blank' 'single line' 'double line') |
|
2709 ! |
|
2710 |
|
2711 separatorSlices |
|
2712 "get the list of menu spec values of the corresponding separator types" |
|
2713 |
|
2714 ^ #( |
|
2715 ( #blank '' ) |
|
2716 ( #single '-' ) |
|
2717 ( #double '=' ) |
|
2718 ) |
|
2719 ! ! |
|
2720 |
|
2721 !MenuEditor::Item class methodsFor:'documentation'! |
|
2722 |
|
2723 documentation |
|
2724 " |
|
2725 implements the contents assigned to a TreeItem. An instance |
|
2726 is associated with one item and keeps all its information |
|
2727 |
|
2728 [see also:] |
|
2729 TreeItem |
|
2730 MenuEditor |
|
2731 |
|
2732 [author:] |
|
2733 Claus Atzkern |
|
2734 " |
|
2735 |
|
2736 |
|
2737 ! ! |
|
2738 |
|
2739 !MenuEditor::Item methodsFor:'accessing'! |
|
2740 |
|
2741 activeHelpKey |
|
2742 "get the help key of the menu item" |
|
2743 |
|
2744 ^activeHelpKey |
|
2745 ! |
|
2746 |
|
2747 activeHelpKey:aKey |
|
2748 "set the help key of the menu item" |
|
2749 |
|
2750 activeHelpKey := aKey |
|
2751 ! |
|
2752 |
|
2753 label |
|
2754 "get the value of the menu item" |
|
2755 |
|
2756 ^label |
|
2757 ! |
|
2758 |
|
2759 label:something |
|
2760 "set the value of the menu item" |
|
2761 |
|
2762 label := something ? '-' |
|
2763 ! |
|
2764 |
|
2765 separatorType |
|
2766 "get the separator type assigned to item or nil" |
|
2767 |
|
2768 label size > 1 |
|
2769 ifFalse: |
|
2770 [ |
|
2771 label size == 0 ifTrue:[^#blank]. |
|
2772 label first == $- ifTrue:[^#single]. |
|
2773 label first == $= ifTrue:[^#double]. |
|
2774 ]. |
|
2775 ^nil |
|
2776 |
|
2777 ! |
|
2778 |
|
2779 startGroup:aSymbolOrNil |
|
2780 "set the startGroup attribute" |
|
2781 |
|
2782 startGroup := aSymbolOrNil |
|
2783 |
|
2784 "Created: / 23.8.1998 / 15:56:03 / cg" |
|
2785 ! |
|
2786 |
|
2787 submenuChannel |
|
2788 "return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2789 |
|
2790 ^submenuChannel |
|
2791 ! |
|
2792 |
|
2793 submenuChannel:aChannel |
|
2794 "get the submenuChannel" |
|
2795 |
|
2796 submenuChannel := aChannel |
|
2797 ! |
|
2798 |
|
2799 translateLabel:aBoolean |
|
2800 "set/clear the translate to national-language flag" |
|
2801 |
|
2802 translateLabel := aBoolean |
|
2803 |
|
2804 "Created: / 6.6.1998 / 17:23:33 / cg" |
|
2805 ! |
|
2806 |
|
2807 value:aSymbol |
|
2808 "set the value attribute" |
|
2809 |
|
2810 value := aSymbol |
|
2811 |
|
2812 "Created: / 23.8.1998 / 16:02:10 / cg" |
|
2813 ! ! |
|
2814 |
|
2815 !MenuEditor::Item methodsFor:'building'! |
|
2816 |
|
2817 buildFromAspects:aspects |
|
2818 "read the values of the aspects into my values" |
|
2819 |
|
2820 |name| |
|
2821 self isSeparator |
|
2822 ifFalse: |
|
2823 [ |
|
2824 name := label. |
|
2825 label := (aspects at:#label) value. |
|
2826 |
|
2827 (label isNil or:[self isSeparator]) ifTrue:[ |
|
2828 (aspects at:#label) value:(label := name) |
|
2829 ]. |
|
2830 |
|
2831 enabled := (aspects at:#enabled) value. |
|
2832 value := (aspects at:#value) value. |
|
2833 nameKey := (aspects at:#nameKey) value. |
|
2834 indication := (aspects at:#indication) value. |
|
2835 choice := (aspects at:#choice) value. |
|
2836 choiceValue := (aspects at:#choiceValue) value. |
|
2837 shortcutKey := (aspects at:#shortcutKey) value. |
|
2838 startGroup := (aspects at:#startGroup) value. |
|
2839 accessCharacterPos := (aspects at:#accessCharacterPos) value. |
|
2840 argument := (aspects at:#argument) value. |
|
2841 translateLabel := (aspects at:#translateLabel) value. |
|
2842 isButton := (aspects at:#isButton) value. |
|
2843 auxValue := (aspects at:#auxValue) value. |
|
2844 |
|
2845 argument isString ifTrue:[ |
|
2846 argument size > 1 ifTrue:[ |
|
2847 (argument at:1) == $# ifTrue:[ |
|
2848 argument := (argument copyFrom:2) asSymbol |
|
2849 ] |
|
2850 ] |
|
2851 ]. |
|
2852 submenuChannel := (aspects at:#submenuChannel) value. |
|
2853 retriever := (aspects at:#retriever) value. |
|
2854 icon := (aspects at:#icon) value. |
|
2855 iconAndLabel := (aspects at:#iconAndLabel) value. |
|
2856 ] |
|
2857 ifTrue: |
|
2858 [ |
|
2859 name := (aspects at:#seperatorSelection) selectionIndex. |
|
2860 label := (self class separatorSlices at:name) last. |
|
2861 ]. |
|
2862 isVisible := (aspects at:#isVisible) value. |
|
2863 hideMenuOnActivated := (aspects at:#hideMenuOnActivated) value. |
|
2864 |
|
2865 "Modified: / 14.8.1998 / 15:36:38 / cg" |
|
2866 ! |
|
2867 |
|
2868 buildFromMenuItem:anItem |
|
2869 "read the attributes of anItem into my values" |
|
2870 |
|
2871 |rtv| |
|
2872 |
|
2873 self label:(anItem rawLabel). |
|
2874 activeHelpKey := anItem activeHelpKey. |
|
2875 |
|
2876 (enabled := anItem enabled) isSymbol ifFalse:[ |
|
2877 enabled := nil |
|
2878 ]. |
|
2879 (value := anItem value) isSymbol ifFalse:[ |
|
2880 value := nil. |
|
2881 ]. |
|
2882 (indication := anItem indication) isSymbol ifFalse:[ |
|
2883 indication := nil |
|
2884 ]. |
|
2885 (choice := anItem choice) isSymbol ifFalse:[ |
|
2886 choice := nil |
|
2887 ]. |
|
2888 choiceValue := anItem choiceValue. |
|
2889 nameKey := anItem nameKey. |
|
2890 shortcutKey := anItem shortcutKeyCharacter. |
|
2891 startGroup := anItem startGroup. |
|
2892 accessCharacterPos := anItem accessCharacterPosition. |
|
2893 argument := anItem argument. |
|
2894 |
|
2895 submenuChannel := anItem submenuChannel. |
|
2896 translateLabel := anItem translateLabel. |
|
2897 isButton := anItem isButton. |
|
2898 isVisible := anItem isVisible. |
|
2899 hideMenuOnActivated := anItem hideMenuOnActivated. |
|
2900 auxValue := anItem auxValue. |
|
2901 |
|
2902 (((rtv := anItem adornment) notNil) |
|
2903 and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
2904 ifTrue: |
|
2905 [ |
|
2906 retriever := rtv className. |
|
2907 icon := rtv selector. |
|
2908 (iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
2909 label := rtv labelText. |
|
2910 ] |
|
2911 ] |
|
2912 |
|
2913 "Modified: / 29.9.1998 / 11:18:25 / cg" |
|
2914 ! ! |
|
2915 |
|
2916 !MenuEditor::Item methodsFor:'conversion'! |
|
2917 |
|
2918 asMenuItem |
|
2919 "converts self to a menu item" |
|
2920 |
|
2921 |item rcv| |
|
2922 |
|
2923 item := MenuItem labeled:label. |
|
2924 item isVisible:isVisible. |
|
2925 item hideMenuOnActivated:hideMenuOnActivated. |
|
2926 |
|
2927 self isSeparator ifFalse:[ |
|
2928 item activeHelpKey:activeHelpKey. |
|
2929 item enabled:enabled. |
|
2930 item accessCharacterPosition:accessCharacterPos. |
|
2931 item argument:argument. |
|
2932 item submenuChannel:submenuChannel. |
|
2933 item nameKey:nameKey. |
|
2934 item shortcutKeyCharacter:shortcutKey. |
|
2935 item startGroup:startGroup. |
|
2936 item value:value. |
|
2937 item indication:indication. |
|
2938 item choice:choice. |
|
2939 item choiceValue:choiceValue. |
|
2940 item translateLabel: translateLabel. |
|
2941 item isButton: isButton. |
|
2942 item auxValue: auxValue. |
|
2943 |
|
2944 icon notNil ifTrue:[ |
|
2945 rcv := ResourceRetriever new. |
|
2946 rcv className:retriever. |
|
2947 rcv selector:icon. |
|
2948 iconAndLabel == true ifTrue:[ |
|
2949 rcv labelText:label |
|
2950 ]. |
|
2951 item labelImage:rcv |
|
2952 ] |
|
2953 ]. |
|
2954 ^item |
|
2955 |
|
2956 "Modified: / 14.8.1998 / 15:36:35 / cg" |
|
2957 ! |
|
2958 |
|
2959 toAspects:aspects |
|
2960 "put my values into the values of aspects" |
|
2961 |
|
2962 |type| |
|
2963 (type := self separatorType) notNil ifTrue: [ |
|
2964 type := self class separatorSlices findFirst:[:el| el first == type ]. |
|
2965 (aspects at:#seperatorSelection) selectionIndex:type. |
|
2966 ] ifFalse: [ |
|
2967 (aspects at:#label) value:label. |
|
2968 (aspects at:#enabled) value:enabled. |
|
2969 (aspects at:#value) value:value. |
|
2970 (aspects at:#nameKey) value:nameKey. |
|
2971 (aspects at:#indication) value:indication. |
|
2972 (aspects at:#choice) value:choice. |
|
2973 (aspects at:#choiceValue) value:choiceValue. |
|
2974 (aspects at:#shortcutKey) value:shortcutKey. |
|
2975 (aspects at:#startGroup) value:startGroup. |
|
2976 (aspects at:#accessCharacterPos) value:accessCharacterPos. |
|
2977 (aspects at:#translateLabel) value:translateLabel. |
|
2978 (aspects at:#submenuChannel) value:submenuChannel. |
|
2979 (aspects at:#retriever) value:retriever. |
|
2980 (aspects at:#icon) value:icon. |
|
2981 (aspects at:#iconAndLabel) value:iconAndLabel. |
|
2982 (aspects at:#isButton) value:isButton. |
|
2983 (aspects at:#auxValue) value:auxValue. |
|
2984 |
|
2985 (aspects at:#argument) |
|
2986 value:(argument isSymbol |
|
2987 ifTrue: ['#', argument] |
|
2988 ifFalse:[argument]). |
|
2989 ]. |
|
2990 (aspects at:#isVisible) value:isVisible. |
|
2991 (aspects at:#hideMenuOnActivated) value:hideMenuOnActivated. |
|
2992 |
|
2993 "Modified: / 14.8.1998 / 15:37:29 / cg" |
|
2994 ! ! |
|
2995 |
|
2996 !MenuEditor::Item methodsFor:'queries'! |
|
2997 |
|
2998 iconFor: aNode |
|
2999 "get the icon of the menu item for the tree view" |
|
3000 |
|
3001 (aNode hasChildren or: [aNode parent isNil]) |
|
3002 ifTrue: |
|
3003 [ |
|
3004 ^MenuEditor submenuImage |
|
3005 ] |
|
3006 ifFalse: |
|
3007 [ |
|
3008 submenuChannel notNil |
|
3009 ifTrue: |
|
3010 [ |
|
3011 ^MenuEditor linkSubmenuImage |
|
3012 ] |
|
3013 ifFalse: |
|
3014 [ |
|
3015 self isSeparator |
|
3016 ifTrue: [^MenuEditor menuSeparatorImage] |
|
3017 ifFalse: [^MenuEditor menuItemImage] |
|
3018 ] |
|
3019 ] |
|
3020 ! |
|
3021 |
|
3022 isSeparator |
|
3023 "return true if item is a seperator" |
|
3024 |
|
3025 ^self separatorType notNil |
|
3026 ! |
|
3027 |
|
3028 treeViewLabel |
|
3029 "get the label of the menu item for the tree view" |
|
3030 |
|
3031 ^label |
|
3032 " asBoldText, |
|
3033 (value notNil ifTrue: [': [', |
|
3034 value , |
|
3035 (argument isString ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']), |
|
3036 ']'] ifFalse: ['']) |
|
3037 |
|
3038 |
|
3039 " |
2700 ! ! |
3040 ! ! |
2701 |
3041 |
2702 !MenuEditor::TreeView class methodsFor:'documentation'! |
3042 !MenuEditor::TreeView class methodsFor:'documentation'! |
2703 |
3043 |
2704 documentation |
3044 documentation |
3162 |
3502 |
3163 (app := self topView application) modified: true. |
3503 (app := self topView application) modified: true. |
3164 app updateChannels |
3504 app updateChannels |
3165 ! ! |
3505 ! ! |
3166 |
3506 |
3167 !MenuEditor::Item class methodsFor:'constants'! |
|
3168 |
|
3169 separatorList |
|
3170 "get the list of available separator types" |
|
3171 |
|
3172 ^#('blank' 'single line' 'double line') |
|
3173 ! |
|
3174 |
|
3175 separatorSlices |
|
3176 "get the list of menu spec values of the corresponding separator types" |
|
3177 |
|
3178 ^ #( |
|
3179 ( #blank '' ) |
|
3180 ( #single '-' ) |
|
3181 ( #double '=' ) |
|
3182 ) |
|
3183 ! ! |
|
3184 |
|
3185 !MenuEditor::Item class methodsFor:'documentation'! |
|
3186 |
|
3187 documentation |
|
3188 " |
|
3189 implements the contents assigned to a TreeItem. An instance |
|
3190 is associated with one item and keeps all its information |
|
3191 |
|
3192 [see also:] |
|
3193 TreeItem |
|
3194 MenuEditor |
|
3195 |
|
3196 [author:] |
|
3197 Claus Atzkern |
|
3198 " |
|
3199 |
|
3200 |
|
3201 ! ! |
|
3202 |
|
3203 !MenuEditor::Item methodsFor:'accessing'! |
|
3204 |
|
3205 activeHelpKey |
|
3206 "get the help key of the menu item" |
|
3207 |
|
3208 ^activeHelpKey |
|
3209 ! |
|
3210 |
|
3211 activeHelpKey:aKey |
|
3212 "set the help key of the menu item" |
|
3213 |
|
3214 activeHelpKey := aKey |
|
3215 ! |
|
3216 |
|
3217 label |
|
3218 "get the value of the menu item" |
|
3219 |
|
3220 ^label |
|
3221 ! |
|
3222 |
|
3223 label:something |
|
3224 "set the value of the menu item" |
|
3225 |
|
3226 label := something ? '-' |
|
3227 ! |
|
3228 |
|
3229 separatorType |
|
3230 "get the separator type assigned to item or nil" |
|
3231 |
|
3232 label size > 1 |
|
3233 ifFalse: |
|
3234 [ |
|
3235 label size == 0 ifTrue:[^#blank]. |
|
3236 label first == $- ifTrue:[^#single]. |
|
3237 label first == $= ifTrue:[^#double]. |
|
3238 ]. |
|
3239 ^nil |
|
3240 |
|
3241 ! |
|
3242 |
|
3243 startGroup:aSymbolOrNil |
|
3244 "set the startGroup attribute" |
|
3245 |
|
3246 startGroup := aSymbolOrNil |
|
3247 |
|
3248 "Created: / 23.8.1998 / 15:56:03 / cg" |
|
3249 ! |
|
3250 |
|
3251 submenuChannel |
|
3252 "return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
3253 |
|
3254 ^submenuChannel |
|
3255 ! |
|
3256 |
|
3257 submenuChannel:aChannel |
|
3258 "get the submenuChannel" |
|
3259 |
|
3260 submenuChannel := aChannel |
|
3261 ! |
|
3262 |
|
3263 translateLabel:aBoolean |
|
3264 "set/clear the translate to national-language flag" |
|
3265 |
|
3266 translateLabel := aBoolean |
|
3267 |
|
3268 "Created: / 6.6.1998 / 17:23:33 / cg" |
|
3269 ! |
|
3270 |
|
3271 value:aSymbol |
|
3272 "set the value attribute" |
|
3273 |
|
3274 value := aSymbol |
|
3275 |
|
3276 "Created: / 23.8.1998 / 16:02:10 / cg" |
|
3277 ! ! |
|
3278 |
|
3279 !MenuEditor::Item methodsFor:'building'! |
|
3280 |
|
3281 buildFromAspects:aspects |
|
3282 "read the values of the aspects into my values" |
|
3283 |
|
3284 |name| |
|
3285 self isSeparator |
|
3286 ifFalse: |
|
3287 [ |
|
3288 name := label. |
|
3289 label := (aspects at:#label) value. |
|
3290 |
|
3291 (label isNil or:[self isSeparator]) ifTrue:[ |
|
3292 (aspects at:#label) value:(label := name) |
|
3293 ]. |
|
3294 |
|
3295 enabled := (aspects at:#enabled) value. |
|
3296 value := (aspects at:#value) value. |
|
3297 nameKey := (aspects at:#nameKey) value. |
|
3298 indication := (aspects at:#indication) value. |
|
3299 choice := (aspects at:#choice) value. |
|
3300 choiceValue := (aspects at:#choiceValue) value. |
|
3301 shortcutKey := (aspects at:#shortcutKey) value. |
|
3302 startGroup := (aspects at:#startGroup) value. |
|
3303 accessCharacterPos := (aspects at:#accessCharacterPos) value. |
|
3304 argument := (aspects at:#argument) value. |
|
3305 translateLabel := (aspects at:#translateLabel) value. |
|
3306 isButton := (aspects at:#isButton) value. |
|
3307 auxValue := (aspects at:#auxValue) value. |
|
3308 |
|
3309 argument isString ifTrue:[ |
|
3310 argument size > 1 ifTrue:[ |
|
3311 (argument at:1) == $# ifTrue:[ |
|
3312 argument := (argument copyFrom:2) asSymbol |
|
3313 ] |
|
3314 ] |
|
3315 ]. |
|
3316 submenuChannel := (aspects at:#submenuChannel) value. |
|
3317 retriever := (aspects at:#retriever) value. |
|
3318 icon := (aspects at:#icon) value. |
|
3319 iconAndLabel := (aspects at:#iconAndLabel) value. |
|
3320 ] |
|
3321 ifTrue: |
|
3322 [ |
|
3323 name := (aspects at:#seperatorSelection) selectionIndex. |
|
3324 label := (self class separatorSlices at:name) last. |
|
3325 ]. |
|
3326 isVisible := (aspects at:#isVisible) value. |
|
3327 hideMenuOnActivated := (aspects at:#hideMenuOnActivated) value. |
|
3328 |
|
3329 "Modified: / 14.8.1998 / 15:36:38 / cg" |
|
3330 ! |
|
3331 |
|
3332 buildFromMenuItem:anItem |
|
3333 "read the attributes of anItem into my values" |
|
3334 |
|
3335 |rtv| |
|
3336 |
|
3337 self label:(anItem rawLabel). |
|
3338 activeHelpKey := anItem activeHelpKey. |
|
3339 |
|
3340 (enabled := anItem enabled) isSymbol ifFalse:[ |
|
3341 enabled := nil |
|
3342 ]. |
|
3343 (value := anItem value) isSymbol ifFalse:[ |
|
3344 value := nil. |
|
3345 ]. |
|
3346 (indication := anItem indication) isSymbol ifFalse:[ |
|
3347 indication := nil |
|
3348 ]. |
|
3349 (choice := anItem choice) isSymbol ifFalse:[ |
|
3350 choice := nil |
|
3351 ]. |
|
3352 choiceValue := anItem choiceValue. |
|
3353 nameKey := anItem nameKey. |
|
3354 shortcutKey := anItem shortcutKeyCharacter. |
|
3355 startGroup := anItem startGroup. |
|
3356 accessCharacterPos := anItem accessCharacterPosition. |
|
3357 argument := anItem argument. |
|
3358 |
|
3359 submenuChannel := anItem submenuChannel. |
|
3360 translateLabel := anItem translateLabel. |
|
3361 isButton := anItem isButton. |
|
3362 isVisible := anItem isVisible. |
|
3363 hideMenuOnActivated := anItem hideMenuOnActivated. |
|
3364 auxValue := anItem auxValue. |
|
3365 |
|
3366 (((rtv := anItem adornment) notNil) |
|
3367 and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
3368 ifTrue: |
|
3369 [ |
|
3370 retriever := rtv className. |
|
3371 icon := rtv selector. |
|
3372 (iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
3373 label := rtv labelText. |
|
3374 ] |
|
3375 ] |
|
3376 |
|
3377 "Modified: / 29.9.1998 / 11:18:25 / cg" |
|
3378 ! ! |
|
3379 |
|
3380 !MenuEditor::Item methodsFor:'conversion'! |
|
3381 |
|
3382 asMenuItem |
|
3383 "converts self to a menu item" |
|
3384 |
|
3385 |item rcv| |
|
3386 |
|
3387 item := MenuItem labeled:label. |
|
3388 item isVisible:isVisible. |
|
3389 item hideMenuOnActivated:hideMenuOnActivated. |
|
3390 |
|
3391 self isSeparator ifFalse:[ |
|
3392 item activeHelpKey:activeHelpKey. |
|
3393 item enabled:enabled. |
|
3394 item accessCharacterPosition:accessCharacterPos. |
|
3395 item argument:argument. |
|
3396 item submenuChannel:submenuChannel. |
|
3397 item nameKey:nameKey. |
|
3398 item shortcutKeyCharacter:shortcutKey. |
|
3399 item startGroup:startGroup. |
|
3400 item value:value. |
|
3401 item indication:indication. |
|
3402 item choice:choice. |
|
3403 item choiceValue:choiceValue. |
|
3404 item translateLabel: translateLabel. |
|
3405 item isButton: isButton. |
|
3406 item auxValue: auxValue. |
|
3407 |
|
3408 icon notNil ifTrue:[ |
|
3409 rcv := ResourceRetriever new. |
|
3410 rcv className:retriever. |
|
3411 rcv selector:icon. |
|
3412 iconAndLabel == true ifTrue:[ |
|
3413 rcv labelText:label |
|
3414 ]. |
|
3415 item labelImage:rcv |
|
3416 ] |
|
3417 ]. |
|
3418 ^item |
|
3419 |
|
3420 "Modified: / 14.8.1998 / 15:36:35 / cg" |
|
3421 ! |
|
3422 |
|
3423 toAspects:aspects |
|
3424 "put my values into the values of aspects" |
|
3425 |
|
3426 |type| |
|
3427 (type := self separatorType) notNil ifTrue: [ |
|
3428 type := self class separatorSlices findFirst:[:el| el first == type ]. |
|
3429 (aspects at:#seperatorSelection) selectionIndex:type. |
|
3430 ] ifFalse: [ |
|
3431 (aspects at:#label) value:label. |
|
3432 (aspects at:#enabled) value:enabled. |
|
3433 (aspects at:#value) value:value. |
|
3434 (aspects at:#nameKey) value:nameKey. |
|
3435 (aspects at:#indication) value:indication. |
|
3436 (aspects at:#choice) value:choice. |
|
3437 (aspects at:#choiceValue) value:choiceValue. |
|
3438 (aspects at:#shortcutKey) value:shortcutKey. |
|
3439 (aspects at:#startGroup) value:startGroup. |
|
3440 (aspects at:#accessCharacterPos) value:accessCharacterPos. |
|
3441 (aspects at:#translateLabel) value:translateLabel. |
|
3442 (aspects at:#submenuChannel) value:submenuChannel. |
|
3443 (aspects at:#retriever) value:retriever. |
|
3444 (aspects at:#icon) value:icon. |
|
3445 (aspects at:#iconAndLabel) value:iconAndLabel. |
|
3446 (aspects at:#isButton) value:isButton. |
|
3447 (aspects at:#auxValue) value:auxValue. |
|
3448 |
|
3449 (aspects at:#argument) |
|
3450 value:(argument isSymbol |
|
3451 ifTrue: ['#', argument] |
|
3452 ifFalse:[argument]). |
|
3453 ]. |
|
3454 (aspects at:#isVisible) value:isVisible. |
|
3455 (aspects at:#hideMenuOnActivated) value:hideMenuOnActivated. |
|
3456 |
|
3457 "Modified: / 14.8.1998 / 15:37:29 / cg" |
|
3458 ! ! |
|
3459 |
|
3460 !MenuEditor::Item methodsFor:'queries'! |
|
3461 |
|
3462 iconFor: aNode |
|
3463 "get the icon of the menu item for the tree view" |
|
3464 |
|
3465 (aNode hasChildren or: [aNode parent isNil]) |
|
3466 ifTrue: |
|
3467 [ |
|
3468 ^MenuEditor submenuImage |
|
3469 ] |
|
3470 ifFalse: |
|
3471 [ |
|
3472 submenuChannel notNil |
|
3473 ifTrue: |
|
3474 [ |
|
3475 ^MenuEditor linkSubmenuImage |
|
3476 ] |
|
3477 ifFalse: |
|
3478 [ |
|
3479 self isSeparator |
|
3480 ifTrue: [^MenuEditor menuSeparatorImage] |
|
3481 ifFalse: [^MenuEditor menuItemImage] |
|
3482 ] |
|
3483 ] |
|
3484 ! |
|
3485 |
|
3486 isSeparator |
|
3487 "return true if item is a seperator" |
|
3488 |
|
3489 ^self separatorType notNil |
|
3490 ! |
|
3491 |
|
3492 treeViewLabel |
|
3493 "get the label of the menu item for the tree view" |
|
3494 |
|
3495 ^label |
|
3496 " asBoldText, |
|
3497 (value notNil ifTrue: [': [', |
|
3498 value , |
|
3499 (argument isString ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']), |
|
3500 ']'] ifFalse: ['']) |
|
3501 |
|
3502 |
|
3503 " |
|
3504 ! ! |
|
3505 |
|
3506 !MenuEditor class methodsFor:'documentation'! |
3507 !MenuEditor class methodsFor:'documentation'! |
3507 |
3508 |
3508 version |
3509 version |
3509 ^ '$Header$' |
3510 ^ '$Header$' |
3510 ! ! |
3511 ! ! |