UIPainter.st
changeset 2284 4116d91b6dda
parent 2280 d9a56ee79c70
child 2293 b8149118f0af
equal deleted inserted replaced
2283:b14becb50aac 2284:4116d91b6dda
   518 
   518 
   519     ^ ToolbarIconLibrary startUIPainterIcon
   519     ^ ToolbarIconLibrary startUIPainterIcon
   520 
   520 
   521     "Created: / 10-02-2007 / 14:45:56 / cg"
   521     "Created: / 10-02-2007 / 14:45:56 / cg"
   522     "Modified: / 17-09-2007 / 11:36:33 / cg"
   522     "Modified: / 17-09-2007 / 11:36:33 / cg"
       
   523 !
       
   524 
       
   525 editTableIcon
       
   526     <resource: #programImage>
       
   527 
       
   528     ^ SystemBrowser tableColumnsIcon
       
   529 !
       
   530 
       
   531 helpIcon
       
   532     <resource: #programImage>
       
   533 
       
   534     ^ Icon helpIcon
   523 !
   535 !
   524 
   536 
   525 iconAlignB
   537 iconAlignB
   526     "This resource specification was automatically generated
   538     "This resource specification was automatically generated
   527      by the ImageEditor of ST/X."
   539      by the ImageEditor of ST/X."
  2520 
  2532 
  2521 hasUndoHistoryHolder
  2533 hasUndoHistoryHolder
  2522     ^ self painter hasUndoHistoryHolder
  2534     ^ self painter hasUndoHistoryHolder
  2523 !
  2535 !
  2524 
  2536 
  2525 helpIcon
       
  2526 
       
  2527     ^Icon helpIcon
       
  2528 !
       
  2529 
       
  2530 installAsWebPageVisible
  2537 installAsWebPageVisible
  2531     ^ true
  2538     ^ true
  2532 
  2539 
  2533     "Created: / 14-01-2008 / 17:46:05 / cg"
  2540     "Created: / 14-01-2008 / 17:46:05 / cg"
  2534 !
  2541 !
  4211     ].
  4218     ].
  4212     UserPreferences current systemBrowserClass openInClass:cls selector:aspect
  4219     UserPreferences current systemBrowserClass openInClass:cls selector:aspect
  4213 !
  4220 !
  4214 
  4221 
  4215 doBrowseAspectMethod:aspectSelector
  4222 doBrowseAspectMethod:aspectSelector
  4216     "browse or create the aspect method as entered in the field (button beside input filed pressed)"
  4223     "browse or create the aspect method as entered in the field (button beside input fieled pressed)"
  4217 
  4224 
  4218     self acceptOrIgnoreSectionModification.
  4225     self acceptOrIgnoreSectionModification.
  4219 
       
  4220     self doBrowseAspectMethod:aspectSelector nameAs:aspectSelector
  4226     self doBrowseAspectMethod:aspectSelector nameAs:aspectSelector
  4221 
  4227 
  4222     "Modified: / 12-01-2008 / 10:32:15 / cg"
  4228     "Modified: / 12-01-2008 / 10:32:15 / cg"
  4223 !
  4229 !
  4224 
  4230 
  4234     ].
  4240     ].
  4235 
  4241 
  4236     spec := painter specForSelection.
  4242     spec := painter specForSelection.
  4237     spec isNil ifTrue:[^ self].
  4243     spec isNil ifTrue:[^ self].
  4238     aspect := spec perform:aspectSelector.
  4244     aspect := spec perform:aspectSelector.
  4239     aspect isNil ifTrue:[
  4245     aspect isString ifFalse:[
  4240         Dialog information:(resources 
  4246         "ignore non-strings (list may be an Array)"
  4241                                 string:'Please enter a Method name for "%1" first.'
  4247         aspect isNil ifTrue:[
  4242                                 with:(resources string:aspectNameShown) allBold).
  4248             Dialog information:(resources 
       
  4249                                     string:'Please enter a Method name for "%1" first.'
       
  4250                                     with:(resources string:aspectNameShown) allBold).
       
  4251         ].
  4243         ^ self
  4252         ^ self
  4244     ].
  4253     ].
  4245         
  4254         
  4246     (cls implements:aspect asSymbol) ifFalse:[
  4255     (cls implements:aspect asSymbol) ifFalse:[
  4247         (Dialog confirm:(resources 
  4256         (Dialog confirm:(resources 
  4409     settings at: #HGridSpace put: hspace.
  4418     settings at: #HGridSpace put: hspace.
  4410     settings at: #VGridSpace put: vspace.
  4419     settings at: #VGridSpace put: vspace.
  4411     painter clearView.
  4420     painter clearView.
  4412 
  4421 
  4413     "Modified: / 4.2.1999 / 15:36:34 / cg"
  4422     "Modified: / 4.2.1999 / 15:36:34 / cg"
       
  4423 !
       
  4424 
       
  4425 doEditList:listSelector
       
  4426     "browse or create the aspect method as entered in the field (button beside input fieled pressed)"
       
  4427 
       
  4428     |spec list editor|
       
  4429 
       
  4430     self acceptOrIgnoreSectionModification.
       
  4431 
       
  4432     spec := painter specForSelection.
       
  4433     spec isNil ifTrue:[^ self].
       
  4434 
       
  4435     "Kludge: subject - fetch the AspectAdaptor behind the TypeConverter"
       
  4436     list := (specTool aspectFor:listSelector) subject value.
       
  4437     list isNil ifTrue:[
       
  4438         list := #()
       
  4439     ].
       
  4440 
       
  4441     editor := UIListEditor new.
       
  4442     editor
       
  4443         informationLabel:'Edit List';
       
  4444         list:list;
       
  4445         useSymbols:(list notEmpty and:[list conform:[:e| e isSymbol]]);    "set use symbols, if all elements are symbols"
       
  4446         open.
       
  4447 
       
  4448 
       
  4449     editor accepted ifTrue:[
       
  4450         "Kludge: subject - fetch the AspectAdaptor behind the TypeConverter"
       
  4451         (specTool aspectFor:listSelector) subject value:editor list.
       
  4452     ].
  4414 !
  4453 !
  4415 
  4454 
  4416 doGenerateAspectMethodFor
  4455 doGenerateAspectMethodFor
  4417     |cls code aspectList displayedList selectorsToGenerateCode 
  4456     |cls code aspectList displayedList selectorsToGenerateCode 
  4418      doBrowse methods|
  4457      doBrowse methods|