changed: #helpSpec expeccoNET_1_5_0rc1 expecco_1_8_2rc1
authorClaus Gittinger <cg@exept.de>
Mon, 20 Sep 2010 13:33:51 +0200
changeset 279706bae3d05b78
parent 2796 f589f0efbaaf
child 2798 dac473a7fcdf
changed: #helpSpec
MenuEditor.st
     1.1 --- a/MenuEditor.st	Mon Sep 20 11:32:08 2010 +0200
     1.2 +++ b/MenuEditor.st	Mon Sep 20 13:33:51 2010 +0200
     1.3 @@ -382,6 +382,9 @@
     1.4  #imageImageEditor
     1.5  'Open an Image Editor on the resource method defined by retriever and selector.'
     1.6  
     1.7 +#imageBrowseImageClass
     1.8 +'Open a Browser on the resource retriever class.'
     1.9 +
    1.10  #imageImageList
    1.11  'Currently existing image resources.'
    1.12  
    1.13 @@ -408,7 +411,7 @@
    1.14  
    1.15  )
    1.16  
    1.17 -    "Modified: / 16-10-2006 / 13:20:38 / cg"
    1.18 +    "Modified: / 20-09-2010 / 13:24:49 / cg"
    1.19  !
    1.20  
    1.21  localFlyHelpSpecStrings
    1.22 @@ -5069,120 +5072,131 @@
    1.23  
    1.24      <resource: #canvas>
    1.25  
    1.26 -    ^
    1.27 +    ^ 
    1.28       #(FullSpec
    1.29 -	name: windowSpec
    1.30 -	window:
    1.31 +        name: windowSpec
    1.32 +        window: 
    1.33         (WindowSpec
    1.34 -	  label: 'Image Item'
    1.35 -	  name: 'Image Item'
    1.36 -	  min: (Point 10 10)
    1.37 -	  bounds: (Rectangle 0 0 288 295)
    1.38 -	)
    1.39 -	component:
    1.40 +          label: 'Image Item'
    1.41 +          name: 'Image Item'
    1.42 +          min: (Point 10 10)
    1.43 +          bounds: (Rectangle 0 0 303 304)
    1.44 +        )
    1.45 +        component: 
    1.46         (SpecCollection
    1.47 -	  collection: (
    1.48 -	   (LabelSpec
    1.49 -	      label: 'Retriever:'
    1.50 -	      name: 'retrieverLabel'
    1.51 -	      layout: (AlignmentOrigin 107 0 26 0 1 0.5)
    1.52 -	      activeHelpKey: imageRetriever
    1.53 -	      translateLabel: true
    1.54 -	      resizeForLabel: true
    1.55 -	      adjust: right
    1.56 -	    )
    1.57 -	   (ComboBoxSpec
    1.58 -	      name: 'retrieverHolder'
    1.59 -	      layout: (LayoutFrame 110 0 15 0 -20 1.0 37 0)
    1.60 -	      activeHelpKey: imageRetriever
    1.61 -	      tabable: true
    1.62 -	      model: retrieverHolder
    1.63 -	      type: symbolOrNil
    1.64 -	      immediateAccept: true
    1.65 -	      acceptOnReturn: false
    1.66 -	      acceptOnTab: false
    1.67 -	      acceptOnPointerLeave: false
    1.68 -	      entryCompletionBlock: entryCompletionForRetriever
    1.69 -	      comboList: retrieverList
    1.70 -	      isFilenameBox: false
    1.71 -	    )
    1.72 -	   (LabelSpec
    1.73 -	      label: 'Selector:'
    1.74 -	      name: 'iconLabel'
    1.75 -	      layout: (AlignmentOrigin 107 0 51 0 1 0.5)
    1.76 -	      activeHelpKey: imageSelector
    1.77 -	      translateLabel: true
    1.78 -	      resizeForLabel: true
    1.79 -	      adjust: right
    1.80 -	    )
    1.81 -	   (InputFieldSpec
    1.82 -	      name: 'selectorHolder'
    1.83 -	      layout: (LayoutFrame 110 0 40 0 -42 1.0 62 0)
    1.84 -	      activeHelpKey: imageSelector
    1.85 -	      tabable: true
    1.86 -	      model: selectorHolder
    1.87 -	      group: inputGroup
    1.88 -	      type: symbolOrNil
    1.89 -	      immediateAccept: true
    1.90 -	      acceptOnReturn: false
    1.91 -	      acceptOnTab: false
    1.92 -	      modifiedChannel: modifiedChannel
    1.93 -	      acceptOnPointerLeave: false
    1.94 -	    )
    1.95 -	   (ActionButtonSpec
    1.96 -	      label: '...'
    1.97 -	      name: 'browseButton'
    1.98 -	      layout: (LayoutFrame -40 1 40 0 -20 1 62 0)
    1.99 -	      activeHelpKey: browseResource
   1.100 -	      tabable: true
   1.101 -	      model: doBrowseForImageResource
   1.102 -	    )
   1.103 -	   (HierarchicalListViewSpec
   1.104 -	      name: 'imageList'
   1.105 -	      layout: (LayoutFrame 20 0.0 67 0 -20 1.0 -30 1.0)
   1.106 -	      activeHelpKey: imageImageList
   1.107 -	      model: imageHolder
   1.108 -	      menu: menuEditImage
   1.109 -	      hasHorizontalScrollBar: true
   1.110 -	      hasVerticalScrollBar: true
   1.111 -	      miniScrollerHorizontal: true
   1.112 -	      listModel: imageList
   1.113 -	      useIndex: false
   1.114 -	      highlightMode: label
   1.115 -	      postBuildCallback: postBuildImageViewer:
   1.116 -	    )
   1.117 -	   (ViewSpec
   1.118 -	      name: 'Box1'
   1.119 -	      layout: (LayoutFrame 20 0.0 -30 1.0 -20 1.0 0 1.0)
   1.120 -	      level: 0
   1.121 -	      component:
   1.122 -	     (SpecCollection
   1.123 -		collection: (
   1.124 -		 (CheckBoxSpec
   1.125 -		    label: 'Image & Label'
   1.126 -		    name: 'iconAndLabelCheckBox'
   1.127 -		    layout: (AlignmentOrigin 0 0 0 0.5 0 0.5)
   1.128 -		    activeHelpKey: imageImageAndLabel
   1.129 -		    tabable: true
   1.130 -		    model: iconAndLabelHolder
   1.131 -		    translateLabel: true
   1.132 -		  )
   1.133 -		 (ActionButtonSpec
   1.134 -		    label: 'Image Editor'
   1.135 -		    name: 'imageEditorButton'
   1.136 -		    layout: (AlignmentOrigin 0 1.0 0 0.5 1 0.5)
   1.137 -		    activeHelpKey: imageImageEditor
   1.138 -		    hasCharacterOrientedLabel: false
   1.139 -		    tabable: true
   1.140 -		    model: doEditImage
   1.141 -		  )
   1.142 -		 )
   1.143 -
   1.144 -	      )
   1.145 -	    )
   1.146 -	   )
   1.147 -
   1.148 -	)
   1.149 +          collection: (
   1.150 +           (LabelSpec
   1.151 +              label: 'Retriever:'
   1.152 +              name: 'retrieverLabel'
   1.153 +              layout: (AlignmentOrigin 107 0 26 0 1 0.5)
   1.154 +              activeHelpKey: imageRetriever
   1.155 +              translateLabel: true
   1.156 +              resizeForLabel: true
   1.157 +              adjust: right
   1.158 +            )
   1.159 +           (ComboBoxSpec
   1.160 +              name: 'retrieverHolder'
   1.161 +              layout: (LayoutFrame 110 0 15 0 -20 1.0 37 0)
   1.162 +              activeHelpKey: imageRetriever
   1.163 +              tabable: true
   1.164 +              model: retrieverHolder
   1.165 +              type: symbolOrNil
   1.166 +              immediateAccept: true
   1.167 +              acceptOnReturn: false
   1.168 +              acceptOnTab: false
   1.169 +              acceptOnPointerLeave: false
   1.170 +              entryCompletionBlock: entryCompletionForRetriever
   1.171 +              comboList: retrieverList
   1.172 +              isFilenameBox: false
   1.173 +            )
   1.174 +           (LabelSpec
   1.175 +              label: 'Selector:'
   1.176 +              name: 'iconLabel'
   1.177 +              layout: (AlignmentOrigin 107 0 51 0 1 0.5)
   1.178 +              activeHelpKey: imageSelector
   1.179 +              translateLabel: true
   1.180 +              resizeForLabel: true
   1.181 +              adjust: right
   1.182 +            )
   1.183 +           (InputFieldSpec
   1.184 +              name: 'selectorHolder'
   1.185 +              layout: (LayoutFrame 110 0 40 0 -42 1.0 62 0)
   1.186 +              activeHelpKey: imageSelector
   1.187 +              tabable: true
   1.188 +              model: selectorHolder
   1.189 +              group: inputGroup
   1.190 +              type: symbolOrNil
   1.191 +              immediateAccept: true
   1.192 +              acceptOnReturn: false
   1.193 +              acceptOnTab: false
   1.194 +              modifiedChannel: modifiedChannel
   1.195 +              acceptOnPointerLeave: false
   1.196 +            )
   1.197 +           (ActionButtonSpec
   1.198 +              label: '...'
   1.199 +              name: 'browseButton'
   1.200 +              layout: (LayoutFrame -40 1 40 0 -20 1 62 0)
   1.201 +              activeHelpKey: browseResource
   1.202 +              tabable: true
   1.203 +              model: doBrowseForImageResource
   1.204 +            )
   1.205 +           (HierarchicalListViewSpec
   1.206 +              name: 'imageList'
   1.207 +              layout: (LayoutFrame 20 0.0 67 0 -20 1.0 -60 1.0)
   1.208 +              activeHelpKey: imageImageList
   1.209 +              model: imageHolder
   1.210 +              menu: menuEditImage
   1.211 +              hasHorizontalScrollBar: true
   1.212 +              hasVerticalScrollBar: true
   1.213 +              miniScrollerHorizontal: true
   1.214 +              listModel: imageList
   1.215 +              useIndex: false
   1.216 +              highlightMode: label
   1.217 +              postBuildCallback: postBuildImageViewer:
   1.218 +            )
   1.219 +           (ViewSpec
   1.220 +              name: 'Box1'
   1.221 +              layout: (LayoutFrame 20 0.0 -60 1.0 -20 1.0 0 1.0)
   1.222 +              level: 0
   1.223 +              component: 
   1.224 +             (SpecCollection
   1.225 +                collection: (
   1.226 +                 (CheckBoxSpec
   1.227 +                    label: 'Image & Label'
   1.228 +                    name: 'iconAndLabelCheckBox'
   1.229 +                    layout: (AlignmentOrigin 0 0 17 0 0 0.5)
   1.230 +                    activeHelpKey: imageImageAndLabel
   1.231 +                    tabable: true
   1.232 +                    model: iconAndLabelHolder
   1.233 +                    translateLabel: true
   1.234 +                  )
   1.235 +                 (ActionButtonSpec
   1.236 +                    label: 'Image Editor'
   1.237 +                    name: 'imageEditorButton'
   1.238 +                    layout: (AlignmentOrigin -69 1.0 17 0 0 0.5)
   1.239 +                    activeHelpKey: imageImageEditor
   1.240 +                    hasCharacterOrientedLabel: false
   1.241 +                    foregroundColor: (Color 0.0 0.0 66.9993133440146)
   1.242 +                    tabable: true
   1.243 +                    model: doEditImage
   1.244 +                  )
   1.245 +                 (ActionButtonSpec
   1.246 +                    label: 'Browse'
   1.247 +                    name: 'Button1'
   1.248 +                    layout: (AlignmentOrigin -69 1.0 45 0 0 0.5)
   1.249 +                    activeHelpKey: imageBrowseImageClass
   1.250 +                    hasCharacterOrientedLabel: false
   1.251 +                    foregroundColor: (Color 0.0 0.0 66.9993133440146)
   1.252 +                    tabable: true
   1.253 +                    model: doBrowseImageClass
   1.254 +                  )
   1.255 +                 )
   1.256 +               
   1.257 +              )
   1.258 +            )
   1.259 +           )
   1.260 +         
   1.261 +        )
   1.262        )
   1.263  ! !
   1.264  
   1.265 @@ -5263,6 +5277,25 @@
   1.266      selectorHolder  value:(classAndSelector methodSelector).
   1.267  !
   1.268  
   1.269 +doBrowseImageClass
   1.270 +    |cls sel|
   1.271 +
   1.272 +    (cls := retrieverHolder value) isNil ifTrue:[
   1.273 +        Dialog warn:'No resource retriever is defined.'.
   1.274 +    ] ifFalse:[
   1.275 +        sel := selectorHolder value.
   1.276 +
   1.277 +        cls := Smalltalk classNamed:cls.
   1.278 +        cls isNil ifTrue:[
   1.279 +            Dialog warn:'No such resource retriever class.'.
   1.280 +        ] ifFalse:[
   1.281 +            UserPreferences current systemBrowserClass openInClass:cls class selector:sel
   1.282 +        ]
   1.283 +    ]
   1.284 +
   1.285 +    "Created: / 20-09-2010 / 13:27:34 / cg"
   1.286 +!
   1.287 +
   1.288  doEditImage
   1.289      |sel cls item|
   1.290