UIPainter.st
changeset 3256 175d2d7e95c5
parent 3251 b5188e3ab24f
child 3296 9a42d2d7ff05
equal deleted inserted replaced
3255:aa71a6bedaee 3256:175d2d7e95c5
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1995-1998 by eXept Software AG
     4  COPYRIGHT (c) 1995-1998 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
  5418 "/    ].
  5420 "/    ].
  5419 "/    self wrapWidgetIntoClass:widgetClass
  5421 "/    self wrapWidgetIntoClass:widgetClass
  5420 !
  5422 !
  5421 
  5423 
  5422 doBrowseActionMethod:aspectSelector
  5424 doBrowseActionMethod:aspectSelector
  5423     "browse or create the action method as entered in the field (button beside input filed pressed)"
  5425     "browse or create the action method as entered in the field 
       
  5426      (button beside input field in ui-slice pressed)"
  5424 
  5427 
  5425     self acceptOrIgnoreSectionModification.
  5428     self acceptOrIgnoreSectionModification.
  5426 
  5429 
  5427     self doBrowseActionMethod:aspectSelector nameAs:aspectSelector
  5430     self doBrowseActionMethod:aspectSelector nameAs:aspectSelector
  5428 
  5431 
  5429     "Modified: / 12-01-2008 / 10:32:12 / cg"
  5432     "Modified: / 12-01-2008 / 10:32:12 / cg"
  5430 !
  5433 !
  5431 
  5434 
  5432 doBrowseActionMethod:aspectSelector nameAs:aspectNameShown
  5435 doBrowseActionMethod:aspectSelector nameAs:aspectNameShown
  5433     "browse or create the action method as entered in the field"
  5436     "browse or create the action method as entered in the field.
       
  5437      sent by embedded ui-slice's browse class button."
  5434 
  5438 
  5435     |cls spec aspect code|
  5439     |cls spec aspect code|
  5436 
  5440 
  5437     cls := self specClass.
  5441     cls := self specClass.
  5438     cls isNil ifTrue:[
  5442     cls isNil ifTrue:[
  5476 
  5480 
  5477     "Modified: / 28-01-2014 / 21:55:56 / cg"
  5481     "Modified: / 28-01-2014 / 21:55:56 / cg"
  5478 !
  5482 !
  5479 
  5483 
  5480 doBrowseAspectClass: aspect
  5484 doBrowseAspectClass: aspect
       
  5485     "sent by embedded ui-slice's 'browse'-class button (for example, subcanvasSpec)."
       
  5486 
  5481     | spec className class |
  5487     | spec className class |
  5482 
  5488 
  5483     spec := painter specForSelection.
  5489     spec := painter specForSelection.
  5484     spec isNil ifTrue:[ self error: 'No spec!!'.].      
  5490     spec isNil ifTrue:[ self error: 'No spec!!'.].      
  5485     className := spec perform: aspect.
  5491     className := spec perform: aspect.
  5492 
  5498 
  5493     "Created: / 24-02-2014 / 17:20:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  5499     "Created: / 24-02-2014 / 17:20:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  5494 !
  5500 !
  5495 
  5501 
  5496 doBrowseAspectClassAndSelector:classAspectAndSelectorAspect
  5502 doBrowseAspectClassAndSelector:classAspectAndSelectorAspect
       
  5503     "sent by embedded ui-slice's browse class button (for example, subcanvasSpec)."
       
  5504 
  5497     | classAspect selector selectorAspect spec className class |
  5505     | classAspect selector selectorAspect spec className class |
  5498 
  5506 
  5499     classAspect := classAspectAndSelectorAspect first. "/ #(#majorKey #minorKey)
  5507     classAspect := classAspectAndSelectorAspect first. "/ #(#majorKey #minorKey)
  5500     selectorAspect := classAspectAndSelectorAspect second. "/ #(#majorKey #minorKey)
  5508     selectorAspect := classAspectAndSelectorAspect second. "/ #(#majorKey #minorKey)
  5501 
  5509 
  5512         browseInClass: (self resolveName: className inClass: specClass) theMetaclass
  5520         browseInClass: (self resolveName: className inClass: specClass) theMetaclass
  5513         selector:selector
  5521         selector:selector
  5514 !
  5522 !
  5515 
  5523 
  5516 doBrowseAspectMethod:aspectSelector
  5524 doBrowseAspectMethod:aspectSelector
  5517     "browse or create the aspect method as entered in the field (button beside input fieled pressed)"
  5525     "browse or create the aspect method as entered in the field 
       
  5526     (button beside input field pressed)"
  5518 
  5527 
  5519     self isModified ifTrue:[ self accept ].
  5528     self isModified ifTrue:[ self accept ].
  5520     "/ self acceptOrIgnoreSectionModification.
  5529     "/ self acceptOrIgnoreSectionModification.
  5521     self doBrowseAspectMethod:aspectSelector nameAs:aspectSelector
  5530     self doBrowseAspectMethod:aspectSelector nameAs:aspectSelector
  5522 
  5531 
  6068     treeView selectedNode changed.
  6077     treeView selectedNode changed.
  6069     self tabModel value: self tabList value first.
  6078     self tabModel value: self tabList value first.
  6070     self updateInfoLabel.
  6079     self updateInfoLabel.
  6071 
  6080 
  6072     "Modified: / 31-08-2006 / 10:14:10 / cg"
  6081     "Modified: / 31-08-2006 / 10:14:10 / cg"
       
  6082 !
       
  6083 
       
  6084 doOpenAspectClassChooserFor: aspect
       
  6085     "open a class chooser; when ok, set the aspect to its name
       
  6086      sent by embedded ui-slice's '...'-class button (for example, subcanvasSpec)."
       
  6087 
       
  6088     | spec className class choice|
       
  6089 
       
  6090     spec := painter specForSelection.
       
  6091     spec isNil ifTrue:[ self error: 'No spec!!'.].      
       
  6092     className := spec perform: aspect.
       
  6093     class := self resolveName: className inClass: specClass.
       
  6094     choice := Dialog requestClassName:'Choose class' initialAnswer:(class isNil ifTrue:nil ifFalse:[class name]).
       
  6095     choice isEmptyOrNil ifTrue:[^ self ].
       
  6096 
       
  6097     spec perform: (aspect asMutator) with:choice.
       
  6098     (specTool aspectFor:aspect) value:choice.
  6073 !
  6099 !
  6074 
  6100 
  6075 doOpenWidgetDocumentation
  6101 doOpenWidgetDocumentation
  6076     "opens documentation for the selected widget"
  6102     "opens documentation for the selected widget"
  6077 
  6103