3298 "get the icon used for presentation" |
3298 "get the icon used for presentation" |
3299 |
3299 |
3300 |specClass model| |
3300 |specClass model| |
3301 |
3301 |
3302 menuItem notNil ifTrue:[ |
3302 menuItem notNil ifTrue:[ |
3303 menuItem label isImage ifTrue:[ |
3303 menuItem isSeparator ifTrue:[ |
3304 ^ menuItem label magnifiedTo:20@20. |
3304 (parent widget perform:#isVerticalLayout ifNotUnderstood:[^ DividerSpec icon]) ifTrue:[ |
3305 ]. |
3305 ^ DividerSpec horizontalIcon. |
|
3306 ]. |
|
3307 ^ DividerSpec verticalIcon. |
|
3308 ]. |
|
3309 menuItem label isImage ifTrue:[ |
|
3310 ^ menuItem label magnifiedTo:20@20. |
|
3311 ]. |
3306 ]. |
3312 ]. |
3307 |
3313 |
3308 specClass := self specClass. |
3314 specClass := self specClass. |
3309 specClass isNil ifTrue:[^ nil]. |
3315 specClass isNil ifTrue:[^ nil]. |
3310 |
3316 |
3311 model := self treeModel. |
3317 model := self treeModel. |
3312 model notNil ifTrue:[ |
3318 model notNil ifTrue:[ |
3313 ^ model iconAt:specClass ifNonePut:[specClass icon] |
3319 ^ model iconAt:specClass ifNonePut:[specClass icon] |
3314 ]. |
3320 ]. |
3315 ^ specClass icon |
3321 ^ specClass icon |
3316 |
3322 |
3317 "Modified: / 16-08-2017 / 13:00:35 / cg" |
3323 "Modified: / 16-08-2017 / 13:00:35 / cg" |
|
3324 "Modified: / 27-05-2019 / 13:27:28 / Claus Gittinger" |
3318 ! |
3325 ! |
3319 |
3326 |
3320 label |
3327 label |
3321 "get the label used for presentation |
3328 "get the label used for presentation |
3322 " |
3329 " |
4762 !ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'accessing look'! |
4769 !ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'accessing look'! |
4763 |
4770 |
4764 additionalLabelForItem:anItem |
4771 additionalLabelForItem:anItem |
4765 "answer the additional lable for an item or nil" |
4772 "answer the additional lable for an item or nil" |
4766 |
4773 |
4767 |widget l applClass applClassName key| |
4774 |widget l applClass applClassName key label| |
4768 |
4775 |
4769 l := nil. |
4776 l := nil. |
4770 showWidgetNames == true ifTrue:[ |
4777 showWidgetNames == true ifTrue:[ |
4771 (widget := anItem widget) notNil ifTrue:[ |
4778 (widget := anItem widget) notNil ifTrue:[ |
4772 l := '"', widget name, '"' |
4779 l := '"', widget name, '"' |
4773 ] ifFalse:[ |
4780 ] ifFalse:[ |
4774 l := '"', anItem menuItem label asString, '"' |
4781 "/ a menuItem |
4775 ]. |
4782 anItem menuItem isSeparator ifTrue:[ |
|
4783 ] ifFalse:[ |
|
4784 label := anItem menuItem label. |
|
4785 label isImage ifTrue:[ |
|
4786 l := '' |
|
4787 ] ifFalse:[ |
|
4788 l := '"', label asString, '"' |
|
4789 ]. |
|
4790 l := l , ' value: ',anItem menuItem itemValue printString. |
|
4791 ]. |
|
4792 ]. |
4776 ]. |
4793 ]. |
4777 |
4794 |
4778 anItem isApplicationClass ifTrue:[ |
4795 anItem isApplicationClass ifTrue:[ |
4779 applClass := anItem applicationClass. |
4796 applClass := anItem applicationClass. |
4780 applClass notNil ifTrue:[ |
4797 applClass notNil ifTrue:[ |
4781 applClassName := '[', applClass name allBold, ']'. |
4798 applClassName := '[', applClass name allBold, ']'. |
4782 l := (l isNil ifTrue:[''] ifFalse:[l , ' ']) , applClassName |
4799 l := (l isNil ifTrue:[''] ifFalse:[l , ' ']) , applClassName |
4783 ]. |
4800 ]. |
4784 ]. |
4801 ]. |
4785 |
4802 |
4786 application notNil ifTrue:[ |
4803 application notNil ifTrue:[ |
4787 key := application builder namedComponents keyAtValue:widget ifAbsent:nil. |
4804 key := application builder namedComponents keyAtValue:widget ifAbsent:nil. |
4788 key notNil ifTrue:[ |
4805 key notNil ifTrue:[ |
4789 l := l , ' #',key |
4806 l := l , ' #',key |
4790 ]. |
4807 ]. |
4791 ]. |
4808 ]. |
4792 |
4809 |
4793 ^ l |
4810 ^ l |
4794 |
4811 |
4795 "Modified: / 16-08-2017 / 12:47:12 / cg" |
4812 "Modified: / 16-08-2017 / 12:47:12 / cg" |
|
4813 "Modified: / 27-05-2019 / 13:19:35 / Claus Gittinger" |
4796 ! |
4814 ! |
4797 |
4815 |
4798 showWidgetNames |
4816 showWidgetNames |
4799 "answer true if the additional text is the widget name |
4817 "answer true if the additional text is the widget name |
4800 otherwise the name of the application" |
4818 otherwise the name of the application" |