# HG changeset patch # User ca # Date 1020766018 -7200 # Node ID 0833cfacf787eba079a3e42c2578025f7eaf0fb3 # Parent bf3439f7e277873dabd18b9e57eb2b59e12a9b79 menuBuilder: support of horizontal/vertical layout of submenu diff -r bf3439f7e277 -r 0833cfacf787 MenuEditor.st --- a/MenuEditor.st Fri May 03 19:59:24 2002 +0200 +++ b/MenuEditor.st Tue May 07 12:06:58 2002 +0200 @@ -26,7 +26,7 @@ instanceVariableNames:'activeHelpKey enabled label value nameKey indication shortcutKey accessCharacterPos retriever icon iconAndLabel submenuChannel startGroup argument translateLabel isButton isVisible choice - choiceValue auxValue hideMenuOnActivated font + choiceValue auxValue hideMenuOnActivated font horizontalLayout showBusyCursorWhilePerforming keepLinkedMenu triggerOnDown' classVariableNames:'' poolDictionaries:'' @@ -160,6 +160,7 @@ label accessCharacterPos showBusyCursorWhilePerforming + horizontalLayout triggerOnDown font argument @@ -355,6 +356,9 @@ #triggerOnDown 'If on, the items action is performed on mouse-button press (default is on button-release).' +#horizontalLayout +'If on, the submenu organizes its items horizontal insteat of vertical (default).' + ) ! ! @@ -796,9 +800,17 @@ #model: #translateLabel ) #(#CheckBoxSpec + #label: 'Has Horizontal Layout' + #name: 'horizontalLayout' + #layout: #(#Point 20 217) + #activeHelpKey: #horizontalLayout + #tabable: true + #model: #horizontalLayout + ) + #(#CheckBoxSpec #label: 'Do not destroy linked Menu' #name: 'keepLinkedMenu' - #layout: #(#Point 20 217) + #layout: #(#Point 20 244) #tabable: true #activeHelpKey: #keepLinkedMenu #model: #keepLinkedMenu @@ -887,6 +899,15 @@ #tabable: true #model: #translateLabel ) + #(#CheckBoxSpec + #label: 'Has Horizontal Orientation' + #name: 'horizontalLayout' + #layout: #(#Point 20 217) + #activeHelpKey: #horizontalLayout + #tabable: true + #model: #horizontalLayout + ) + ) ) @@ -2956,6 +2977,7 @@ translateLabel := (aspects at:#translateLabel) value. isButton := (aspects at:#isButton) value. auxValue := (aspects at:#auxValue) value. + horizontalLayout := (aspects at:#horizontalLayout) value. argument isString ifTrue:[ argument size > 1 ifTrue:[ @@ -3017,6 +3039,7 @@ isVisible := anItem isVisible. hideMenuOnActivated := anItem hideMenuOnActivated. auxValue := anItem auxValue. + horizontalLayout := anItem horizontalLayout. (((rtv := anItem adornment) notNil) and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) @@ -3064,6 +3087,10 @@ item isButton: isButton. item auxValue: auxValue. + horizontalLayout == true ifTrue:[ + item horizontalLayout:true. + ]. + icon notNil ifTrue:[ rcv := ResourceRetriever new. rcv className:retriever. @@ -3108,6 +3135,7 @@ (aspects at:#iconAndLabel) value:iconAndLabel. (aspects at:#isButton) value:isButton. (aspects at:#auxValue) value:auxValue. + (aspects at:#horizontalLayout) value:(horizontalLayout ? false). (aspects at:#argument) value:(argument isSymbol