Tools__ViewTreeApplication.st
author Claus Gittinger <cg@exept.de>
Fri, 19 Jul 2019 21:33:44 +0200
changeset 3714 d3314ff81424
parent 3693 1b69c8dcdfe0
child 3745 286a4b165f0b
permissions -rw-r--r--
#FEATURE by cg class: ShowMeHowItWorks added: #show:for: comment/format in: #show: #showing:do: changed: #doStream:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
     1
"{ Encoding: utf8 }"
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
     2
2748
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     3
"
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     4
 COPYRIGHT (c) 2007 by eXept Software AG
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
     5
	      All Rights Reserved
2748
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     6
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     7
 This software is furnished under a license and may be used
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     8
 only in accordance with the terms of that license and with the
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    10
 be provided or otherwise made available to, or used by, any
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    11
 other person.  No title to or ownership of the software is
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    12
 hereby transferred.
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    13
"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    14
"{ Package: 'stx:libtool2' }"
87bb1815460b initial checkin
ca
parents:
diff changeset
    15
87bb1815460b initial checkin
ca
parents:
diff changeset
    16
"{ NameSpace: Tools }"
87bb1815460b initial checkin
ca
parents:
diff changeset
    17
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    18
ToolApplicationModel subclass:#ViewTreeInspectorApplication
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    19
	instanceVariableNames:'model treeView hasSingleSelectionHolder clickedItem clickedPoint
2770
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
    20
		motionAction process followFocusChannel showNamesHolder
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
    21
		inspectorView inspectorModeIndexHolder path
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
    22
		isCatchingEventsChannel browser'
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    23
	classVariableNames:''
87bb1815460b initial checkin
ca
parents:
diff changeset
    24
	poolDictionaries:''
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    25
	category:'Interface-Smalltalk'
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    26
!
87bb1815460b initial checkin
ca
parents:
diff changeset
    27
87bb1815460b initial checkin
ca
parents:
diff changeset
    28
Object subclass:#MenuDesc
87bb1815460b initial checkin
ca
parents:
diff changeset
    29
	instanceVariableNames:'title value action'
87bb1815460b initial checkin
ca
parents:
diff changeset
    30
	classVariableNames:''
87bb1815460b initial checkin
ca
parents:
diff changeset
    31
	poolDictionaries:''
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    32
	privateIn:ViewTreeInspectorApplication
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    33
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    34
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    35
HierarchicalItem subclass:#ViewTreeItem
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
    36
	instanceVariableNames:'widget menuItem isDrawnShown exists xOffsetAdditionalName'
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    37
	classVariableNames:'HandleExtent'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    38
	poolDictionaries:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    39
	privateIn:ViewTreeInspectorApplication
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    40
!
87bb1815460b initial checkin
ca
parents:
diff changeset
    41
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    42
ValueModel subclass:#ViewTreeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    43
	instanceVariableNames:'lockSema selectedSuperItems selection hiddenLevel listOfItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    44
		inputEventAction mappedViewAction beforeSelectionChangedAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    45
		icons timedUpdateTask selectOnClickHolder testModeChannel
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
    46
		hasTargetWidgetChannel catchEvents'
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    47
	classVariableNames:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    48
	poolDictionaries:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    49
	privateIn:ViewTreeInspectorApplication
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    50
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    51
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    52
HierarchicalList subclass:#ItemList
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    53
	instanceVariableNames:'treeModel eventHook eventHookInitialized showWidgetNames'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    54
	classVariableNames:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    55
	poolDictionaries:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    56
	privateIn:ViewTreeInspectorApplication::ViewTreeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    57
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    58
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    59
!ViewTreeInspectorApplication class methodsFor:'documentation'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    60
2748
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    61
copyright
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    62
"
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    63
 COPYRIGHT (c) 2007 by eXept Software AG
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    64
	      All Rights Reserved
2748
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    65
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    66
 This software is furnished under a license and may be used
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    67
 only in accordance with the terms of that license and with the
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    68
 inclusion of the above copyright notice.   This software may not
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    69
 be provided or otherwise made available to, or used by, any
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    70
 other person.  No title to or ownership of the software is
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    71
 hereby transferred.
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    72
"
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    73
!
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    74
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    75
documentation
87bb1815460b initial checkin
ca
parents:
diff changeset
    76
"
87bb1815460b initial checkin
ca
parents:
diff changeset
    77
     Small application showing a ViewTreeModel use.
87bb1815460b initial checkin
ca
parents:
diff changeset
    78
87bb1815460b initial checkin
ca
parents:
diff changeset
    79
     It displays a hierarchical list of a selected TopView and
87bb1815460b initial checkin
ca
parents:
diff changeset
    80
     all its contained subViews.
87bb1815460b initial checkin
ca
parents:
diff changeset
    81
     Useful to have a look at subcomponents - to see how views
87bb1815460b initial checkin
ca
parents:
diff changeset
    82
     are structured.
87bb1815460b initial checkin
ca
parents:
diff changeset
    83
87bb1815460b initial checkin
ca
parents:
diff changeset
    84
87bb1815460b initial checkin
ca
parents:
diff changeset
    85
    [Instance variables:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    86
	model           <ViewTreeModel>      the used ViewTreeModel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    87
	clickedItem     <ViewTreeItem>       item under the clickedPoint (motion action)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    88
	clickedPoint    <Point>              point where the motion action started from.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    89
	motionAction    <Action>             (oneArg-) action called durring buttonMotion.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    90
87bb1815460b initial checkin
ca
parents:
diff changeset
    91
87bb1815460b initial checkin
ca
parents:
diff changeset
    92
    [author:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    93
	Claus Atzkern
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    94
87bb1815460b initial checkin
ca
parents:
diff changeset
    95
    [see also:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    96
	ViewTreeModel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
    97
	ViewTreeItem
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    98
"
87bb1815460b initial checkin
ca
parents:
diff changeset
    99
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   100
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   101
!ViewTreeInspectorApplication class methodsFor:'initialization'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   102
87bb1815460b initial checkin
ca
parents:
diff changeset
   103
initialize
87bb1815460b initial checkin
ca
parents:
diff changeset
   104
    "add myself to the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   105
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   106
    self installInLauncher.
87bb1815460b initial checkin
ca
parents:
diff changeset
   107
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   108
87bb1815460b initial checkin
ca
parents:
diff changeset
   109
installInLauncher
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   110
    "add myself to the launcher menu"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   111
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   112
    |menuItem icon|
87bb1815460b initial checkin
ca
parents:
diff changeset
   113
87bb1815460b initial checkin
ca
parents:
diff changeset
   114
    NewLauncher isNil ifTrue:[^ self].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   115
    "/ cg - disabled. the icon is too ugly.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   116
    ^ self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   117
3341
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   118
"/    icon := ToolbarIconLibrary inspectLocals20x20Icon magnifiedTo:28@28.
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   119
"/
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   120
"/    menuItem := MenuItem new
3341
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   121
"/                    label: 'View Tree Inspector';
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   122
"/                    value: [ ViewTreeInspectorApplication open];
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   123
"/                    isButton: true;
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   124
"/                    icon: icon;
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   125
"/                    nameKey: #viewInspect.
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   126
"/
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   127
"/    menuItem startGroup:#right.
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   128
"/    NewLauncher addMenuItem:menuItem in:'toolbar'
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   129
"/                   position:#( #before #help)
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   130
"/                      space:false.
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   131
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   132
    "
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   133
     self installInLauncher
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   134
     self removeFromLauncher
2089a2debb66 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3319
diff changeset
   135
    "
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   136
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   137
87bb1815460b initial checkin
ca
parents:
diff changeset
   138
postAutoload
87bb1815460b initial checkin
ca
parents:
diff changeset
   139
    "add myself to the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   140
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   141
    self installInLauncher.
87bb1815460b initial checkin
ca
parents:
diff changeset
   142
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   143
self installInLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   144
self removeFromLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   145
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   146
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   147
87bb1815460b initial checkin
ca
parents:
diff changeset
   148
removeFromLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   149
    "remove myself from the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   150
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   151
    NewLauncher isNil ifTrue:[^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
   152
    NewLauncher removeUserTool:#viewInspect
87bb1815460b initial checkin
ca
parents:
diff changeset
   153
87bb1815460b initial checkin
ca
parents:
diff changeset
   154
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   155
self installInLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   156
self removeFromLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   157
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   158
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   159
87bb1815460b initial checkin
ca
parents:
diff changeset
   160
unload
87bb1815460b initial checkin
ca
parents:
diff changeset
   161
    "class is about to be unloaded - remove myself from the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   162
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   163
    self removeFromLauncher.
87bb1815460b initial checkin
ca
parents:
diff changeset
   164
    super unload.
87bb1815460b initial checkin
ca
parents:
diff changeset
   165
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   166
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   167
!ViewTreeInspectorApplication class methodsFor:'help specs'!
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   168
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   169
helpSpec
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   170
    <resource: #help>
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   171
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   172
    ^super helpSpec addPairsFrom:#(
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   173
3186
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   174
#doRedraw
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   175
'Force the application to redraw its windows'
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   176
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   177
#doUncatchEvents
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   178
'Release picked view and uncatch events\(currently locked for widget selection)'
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   179
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   180
#doCatchEvents
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   181
'Lock view and catch events for widget selection\(currently unlocked)'
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   182
3186
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   183
#doInspectApplication
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   184
'Inspect the selected view''s application'
3186
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   185
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   186
#doBrowseApplication
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   187
'Browse the selected view''s application'
3186
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   188
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   189
#doPickView
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   190
'Pick a widget with the mouse and inspect its view hierarchy'
3186
80a20e5881a5 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3185
diff changeset
   191
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   192
)
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   193
! !
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   194
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   195
!ViewTreeInspectorApplication class methodsFor:'image specs'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   196
2759
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   197
crossHairIcon
3185
3592ea3afb9e class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   198
    ^ ToolbarIconLibrary bigCrossHairIcon
2759
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   199
!
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   200
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   201
lockViewIcon
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   202
    "This resource specification was automatically generated
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   203
     by the ImageEditor of ST/X."
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   204
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   205
    "Do not manually edit this!! If it is corrupted,
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   206
     the ImageEditor may not be able to read the specification."
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   207
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   208
    "
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   209
     self lockViewIcon inspect
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   210
     ImageEditor openOnClass:self andSelector:#lockViewIcon
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   211
     Icon flushCachedIcons
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   212
    "
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   213
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   214
    <resource: #image>
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   215
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   216
    ^Icon
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   217
	constantNamed:'Tools::ViewTreeInspectorApplication lockViewIcon'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   218
	ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   219
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   220
@@@@@@@@@@@@@@A8^G!!7O3ACP5*P@@A8^G @@@@@@@@@@@A8^@@@OE0/!!P0S#0@@^G @@@@@@@@@@@B (@D''D#48"1.CX5H@(J@@@@@@@@@@@@B (B(>SAT"
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   221
''%!!/P7,@(J@@@@@@@@@@@@@%IB0#M"H%IRTQV5P@IRT@@@@@@@@@@@ANSX:U]PANS$8:T80@S$8@@@@@@@@@@@AN&UYWK(EYQ@\FUPQHXT8@@@@@@@@@@@AN
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   222
HC2!!TVY:Y#-%I*IKMD8@@@@@@@@@@@A$\@83XBEG%).GGX _!!&P@@@@@@@@@@@AO[P5+ &(WPYN@["!!E\$<@@@@@@@@@@@B_F''FQPAXX_!!&TGH4HB9<@@@@@
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   223
@@@@@@B_%3HCJ7=BKPU,Q)01B9<@@@@@@@@@@@@PBP8T_F!!''JPI)_Y"D&!!@@@@@@@@@@@@@$B)I9TGXO''WQIWQ93W0@@@@@@@@@@@@@$"U=JR$)JR$)JR$)_
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   224
"P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   225
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[132 141 152 147 150 154 250 223 1 246 214 0 205 172 133 238 195 0 213 180 146 217 186 150 188 136 0 206 151 0 183 125 9 208 208 202 196 204 214 255 255 210 255 255 219 210 178 65 242 242 235 106 112 117 96 107 126 250 255 255 255 241 0 154 154 151 255 227 0 67 35 0 52 17 0 253 211 0 208 159 0 167 178 193 222 168 0 248 231 45 208 174 26 199 152 26 225 184 36 255 249 75 220 220 215 77 88 108 241 241 235 245 245 239 255 250 109 242 249 255 255 255 142 255 237 1 142 148 162 242 212 1 143 154 176 174 133 0 222 189 144 169 179 192 177 184 193 184 129 0 255 255 194 253 241 60 210 210 205 214 214 209 77 83 92 230 230 225 98 106 114 243 243 238 117 117 114 255 252 115 255 255 255 115 123 147 130 140 156 152 156 159 241 210 0 53 18 0 151 116 0 162 170 184 218 187 150 193 143 4 220 165 0 206 188 46 181 130 21 204 173 44 206 206 201 208 167 44 72 84 108 240 240 234 244 244 238 243 243 237 212 182 79 255 255 126 131 135 141 119 133 159 132 141 163 195 162 126 219 188 133 218 185 135 180 180 176 221 190 150 175 181 191 176 183 196 181 189 201 202 170 38 209 209 204 207 207 202 251 241 74 229 229 224 238 238 233 226 234 245 244 244 237 255 251 113 255 255 124 255 241 2 255 234 3 249 219 0 255 249 29 252 243 30 227 181 0 212 165 5 222 170 0 173 179 194 216 171 19 255 255 198 208 208 203 156 90 7 206 175 50 91 91 95 211 180 71 242 242 237 246 246 241 212 182 80 255 255 123 129 137 152 255 239 8 251 223 0 59 25 0 251 215 0 228 183 0 222 191 149 249 238 43 177 186 197 187 129 0 186 194 206 209 209 203 249 238 67 255 255 211 226 226 221 235 235 229 100 103 111 76 93 127 255 255 112 88 104 139 130 135 148 149 155 158 247 218 0 224 194 126 255 217 0 228 184 0 13 30 68 161 138 32 204 152 0 255 255 53 206 155 18 207 207 201 255 250 72 255 255 82 209 176 59 232 232 227 243 243 236 245 245 240 255 255 115 255 255 251]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@G8@@O<@@_>@@^^@@\N@@\N@@?? @?? @?? @?? @?? @?? @?? @?? @_?@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   226
!
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
   227
3000
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   228
releaseViewIcon
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   229
    "This resource specification was automatically generated
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   230
     by the ImageEditor of ST/X."
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   231
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   232
    "Do not manually edit this!! If it is corrupted,
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   233
     the ImageEditor may not be able to read the specification."
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   234
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   235
    "
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   236
     self releaseViewIcon inspect
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   237
     ImageEditor openOnClass:self andSelector:#releaseViewIcon
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   238
     Icon flushCachedIcons
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   239
    "
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   240
    <resource: #image>
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   241
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   242
    ^Icon
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   243
	constantNamed:'Tools::ViewTreeInspectorApplication releaseViewIcon'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   244
	ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
3000
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   245
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   246
@@@@@@@@@@@@@@A8^G!!7O3ACP5*P@@A8^G @@@@@@@@@@@A8^@@@OE0/!!P0S#0@@^G @@@@@@@@@@@B (@@''D#48"1.CX5H@(J@@@@@@@@@@@@B (@@@@@@"
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   247
''%!!/P7,@(J@@@@@@@@@@@@@%I@@@@BH%IRTQV5P@IRT@@@@@@@@@@@ANSP@@@@ANS$8:T80@S$8@@@@@@@@@@@AN&UYWK(EYQ@\FUPQHXT8@@@@@@@@@@@AN
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   248
HC2!!TVY:Y#-%I*IKMD8@@@@@@@@@@@A$\@83XBEG%).GGX _!!&P@@@@@@@@@@@AO[P5+ &(WPYN@["!!E\$<@@@@@@@@@@@B_F''FQPAXX_!!&TGH4HB9<@@@@@
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   249
@@@@@@B_%3HCJ7=BKPU,Q)01B9<@@@@@@@@@@@@PBP8T_F!!''JPI)_Y"D&!!@@@@@@@@@@@@@$B)I9TGXO''WQIWQ93W0@@@@@@@@@@@@@$"U=JR$)JR$)JR$)_
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   250
"P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   251
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[132 141 152 147 150 154 250 223 1 246 214 0 205 172 133 238 195 0 213 180 146 217 186 150 188 136 0 206 151 0 183 125 9 208 208 202 196 204 214 255 255 210 255 255 219 210 178 65 242 242 235 106 112 117 96 107 126 250 255 255 255 241 0 154 154 151 255 227 0 67 35 0 52 17 0 253 211 0 208 159 0 167 178 193 222 168 0 248 231 45 208 174 26 199 152 26 225 184 36 255 249 75 220 220 215 77 88 108 241 241 235 245 245 239 255 250 109 242 249 255 255 255 142 255 237 1 142 148 162 242 212 1 143 154 176 174 133 0 222 189 144 169 179 192 177 184 193 184 129 0 255 255 194 253 241 60 210 210 205 214 214 209 77 83 92 230 230 225 98 106 114 243 243 238 117 117 114 255 252 115 255 255 255 115 123 147 130 140 156 152 156 159 241 210 0 53 18 0 151 116 0 162 170 184 218 187 150 193 143 4 220 165 0 206 188 46 181 130 21 204 173 44 206 206 201 208 167 44 72 84 108 240 240 234 244 244 238 243 243 237 212 182 79 255 255 126 131 135 141 119 133 159 132 141 163 195 162 126 219 188 133 218 185 135 180 180 176 221 190 150 175 181 191 176 183 196 181 189 201 202 170 38 209 209 204 207 207 202 251 241 74 229 229 224 238 238 233 226 234 245 244 244 237 255 251 113 255 255 124 255 241 2 255 234 3 249 219 0 255 249 29 252 243 30 227 181 0 212 165 5 222 170 0 173 179 194 216 171 19 255 255 198 208 208 203 156 90 7 206 175 50 91 91 95 211 180 71 242 242 237 246 246 241 212 182 80 255 255 123 129 137 152 255 239 8 251 223 0 59 25 0 251 215 0 228 183 0 222 191 149 249 238 43 177 186 197 187 129 0 186 194 206 209 209 203 249 238 67 255 255 211 226 226 221 235 235 229 100 103 111 76 93 127 255 255 112 88 104 139 130 135 148 149 155 158 247 218 0 224 194 126 255 217 0 228 184 0 13 30 68 161 138 32 204 152 0 255 255 53 206 155 18 207 207 201 255 250 72 255 255 82 209 176 59 232 232 227 243 243 236 245 245 240 255 255 115 255 255 251]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@G8@@O<@@O>@@@^@@@N@@@N@@?? @?? @?? @?? @?? @?? @?? @?? @_?@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   252
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   253
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   254
!ViewTreeInspectorApplication class methodsFor:'interface specs'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   255
87bb1815460b initial checkin
ca
parents:
diff changeset
   256
windowSpec
87bb1815460b initial checkin
ca
parents:
diff changeset
   257
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   258
     by the UIPainter of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   259
87bb1815460b initial checkin
ca
parents:
diff changeset
   260
    "Do not manually edit this!! If it is corrupted,
87bb1815460b initial checkin
ca
parents:
diff changeset
   261
     the UIPainter may not be able to read the specification."
87bb1815460b initial checkin
ca
parents:
diff changeset
   262
87bb1815460b initial checkin
ca
parents:
diff changeset
   263
    "
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   264
     UIPainter new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#windowSpec
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   265
     Tools::ViewTreeInspectorApplication new openInterface:#windowSpec
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   266
     Tools::ViewTreeInspectorApplication open
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   267
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   268
87bb1815460b initial checkin
ca
parents:
diff changeset
   269
    <resource: #canvas>
87bb1815460b initial checkin
ca
parents:
diff changeset
   270
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   271
    ^
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   272
    #(FullSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   273
       name: windowSpec
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   274
       window:
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   275
      (WindowSpec
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   276
	 label: 'View Tree Inspector'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   277
	 name: 'View Tree Inspector'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   278
	 min: (Point 10 10)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   279
	 max: (Point 1024 9999)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   280
	 bounds: (Rectangle 0 0 693 643)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   281
	 menu: menu
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   282
       )
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   283
       component:
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   284
      (SpecCollection
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   285
	 collection: (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   286
	  (MenuPanelSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   287
	     name: 'toolbarMenu'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   288
	     layout: (LayoutFrame 0 0.0 0 0 0 1.0 40 0)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   289
	     menu: toolbarMenu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   290
	     textDefault: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   291
	   )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   292
	  (VariableVerticalPanelSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   293
	     name: 'VariableVerticalPanel1'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   294
	     layout: (LayoutFrame 0 0.0 40 0.0 0 1.0 0 1.0)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   295
	     component:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   296
	    (SpecCollection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   297
	       collection: (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   298
		(ViewSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   299
		   name: 'PathAndListPane'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   300
		   component:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   301
		  (SpecCollection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   302
		     collection: (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   303
		      (ViewSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   304
			 name: 'PathPane'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   305
			 layout: (LayoutFrame 0 0 0 0 0 1 25 0)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   306
			 component:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   307
			(SpecCollection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   308
			   collection: (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   309
			    (InputFieldSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   310
			       name: 'Path'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   311
			       layout: (LayoutFrame 0 0 0 0 0 1 0 1)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   312
			       model: path
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   313
			       acceptOnReturn: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   314
			       acceptOnTab: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   315
			       acceptOnPointerLeave: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   316
			       emptyFieldReplacementText: 'No View Selected'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   317
			     )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   318
			    )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   319
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   320
			 )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   321
		       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   322
		      (HierarchicalListViewSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   323
			 name: 'List'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   324
			 layout: (LayoutFrame 0 0 25 0 0 1 0 1)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   325
			 level: 1
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   326
			 model: model
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   327
			 menu: middleButtonMenu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   328
			 hasHorizontalScrollBar: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   329
			 hasVerticalScrollBar: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   330
			 miniScrollerHorizontal: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   331
			 miniScrollerVertical: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   332
			 listModel: listOfItems
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   333
			 multipleSelectOk: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   334
			 useIndex: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   335
			 highlightMode: label
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   336
			 showLeftIndicators: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   337
			 indicatorSelector: indicatorClicked:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   338
			 useDefaultIcons: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   339
			 postBuildCallback: postBuildTree:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   340
		       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   341
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   342
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   343
		   )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   344
		 )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   345
		(ViewSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   346
		   name: 'Box2'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   347
		   component:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   348
		  (SpecCollection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   349
		     collection: (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   350
		      (TabViewSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   351
			 name: 'TabHeader1'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   352
			 layout: (LayoutFrame 0 0.0 0 0 0 1.0 25 0)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   353
			 model: inspectorModeIndexHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   354
			 menu: inspectorModes
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   355
			 useIndex: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   356
			 translateLabel: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   357
		       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   358
		      (SubCanvasSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   359
			 name: 'Browser'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   360
			 layout: (LayoutFrame 0 0 26 0 0 1 0 1)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   361
			 visibilityChannel: browserVisibleHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   362
			 hasHorizontalScrollBar: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   363
			 hasVerticalScrollBar: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   364
			 majorKey: #'Tools::NewSystemBrowser'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   365
			 minorKey: singleClassWithoutVariableListBrowserSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   366
			 createNewApplication: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   367
			 createNewBuilder: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   368
			 postBuildCallback: postBuildBrowserCanvas:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   369
		       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   370
		      (ViewSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   371
			 name: 'Inspector'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   372
			 layout: (LayoutFrame 0 0 26 0 0 1 0 1)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   373
			 visibilityChannel: inspectorVisibleHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   374
			 postBuildCallback: postBuildInspectorView:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   375
			 viewClassName: 'InspectorView'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   376
		       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   377
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   378
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   379
		   )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   380
		 )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   381
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   382
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   383
	     )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   384
	     handles: (Any 0.5 1.0)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   385
	   )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   386
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   387
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   388
       )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   389
     )
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   390
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   391
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   392
!ViewTreeInspectorApplication class methodsFor:'menu specs'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   393
87bb1815460b initial checkin
ca
parents:
diff changeset
   394
menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   395
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   396
     by the MenuEditor of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   397
87bb1815460b initial checkin
ca
parents:
diff changeset
   398
    "Do not manually edit this!! If it is corrupted,
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   399
     the MenuEditor may not be able to read the specification."
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   400
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   401
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   402
    "
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   403
     MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#menu
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   404
     (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication menu)) startUp
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   405
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   406
87bb1815460b initial checkin
ca
parents:
diff changeset
   407
    <resource: #menu>
87bb1815460b initial checkin
ca
parents:
diff changeset
   408
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   409
    ^
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   410
     #(Menu
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   411
	(
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   412
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   413
	    label: 'File'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   414
	    submenu:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   415
	   (Menu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   416
	      (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   417
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   418
		  label: 'Pick a View'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   419
		  itemValue: doPickView
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   420
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   421
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   422
		  enabled: hasTargetWidgetChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   423
		  label: 'Release Picked View'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   424
		  itemValue: doUnpick
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   425
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   426
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   427
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   428
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   429
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   430
		  label: 'Settings'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   431
		  submenu:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   432
		 (Menu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   433
		    (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   434
		     (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   435
			label: 'Test Mode'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   436
			hideMenuOnActivated: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   437
			indication: testModeChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   438
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   439
		     (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   440
			enabled: testModeChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   441
			label: 'Follow Focus'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   442
			hideMenuOnActivated: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   443
			indication: followFocusChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   444
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   445
		     (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   446
			label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   447
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   448
		     (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   449
			label: 'Select on Click'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   450
			hideMenuOnActivated: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   451
			indication: selectOnClickHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   452
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   453
		     (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   454
			label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   455
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   456
		     (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   457
			label: 'Show Name of Widgets'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   458
			hideMenuOnActivated: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   459
			indication: showNamesHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   460
		      )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   461
		     )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   462
		    nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   463
		    nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   464
		  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   465
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   466
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   467
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   468
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   469
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   470
		  label: 'Exit'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   471
		  itemValue: closeRequest
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   472
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   473
	       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   474
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   475
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   476
	    )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   477
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   478
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   479
	    enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   480
	    label: 'Selection'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   481
	    submenuChannel: middleButtonMenu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   482
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   483
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   484
	    label: 'Widget'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   485
	    submenu:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   486
	   (Menu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   487
	      (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   488
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   489
		  enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   490
		  label: 'Browse'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   491
		  itemValue: doBrowse:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   492
		  argument: view
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   493
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   494
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   495
		  enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   496
		  label: 'Inspect'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   497
		  itemValue: doInspect:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   498
		  argument: view
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   499
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   500
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   501
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   502
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   503
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   504
		  enabled: hasTargetWidgetChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   505
		  label: 'All Components'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   506
		  startGroup: right
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   507
		  submenuChannel: submenuComponents:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   508
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   509
	       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   510
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   511
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   512
	    )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   513
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   514
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   515
	    label: 'Application'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   516
	    submenu:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   517
	   (Menu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   518
	      (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   519
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   520
		  label: 'Redraw'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   521
		  itemValue: doRedraw
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   522
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   523
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   524
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   525
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   526
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   527
		  enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   528
		  label: 'Browse'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   529
		  itemValue: doBrowse:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   530
		  argument: application
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   531
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   532
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   533
		  enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   534
		  label: 'Inspect'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   535
		  itemValue: doInspect:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   536
		  argument: application
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   537
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   538
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   539
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   540
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   541
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   542
		  enabled: canBrowseWindowSpecMethod
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   543
		  label: 'Browse Window Spec Method'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   544
		  itemValue: doBrowseWindowSpecMethod
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   545
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   546
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   547
		  enabled: canEditWindowSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   548
		  label: 'Edit Window Spec'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   549
		  itemValue: doEditWindowSpec
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   550
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   551
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   552
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   553
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   554
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   555
		  enabled: hasTargetWidgetChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   556
		  label: 'All Applications'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   557
		  submenuChannel: submenuApplications:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   558
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   559
	       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   560
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   561
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   562
	    )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   563
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   564
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   565
	    label: 'Process'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   566
	    submenu:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   567
	   (Menu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   568
	      (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   569
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   570
		  enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   571
		  label: 'Debug'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   572
		  itemValue: doDebugProcess
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   573
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   574
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   575
		  enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   576
		  label: 'Inspect'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   577
		  itemValue: doInspect:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   578
		  argument: process
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   579
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   580
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   581
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   582
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   583
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   584
		  label: 'Open Process Monitor'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   585
		  itemValue: doOpenProcessMonitor
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   586
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   587
	       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   588
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   589
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   590
	    )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   591
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   592
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   593
	    label: 'Help'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   594
	    startGroup: conditionalRight
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   595
	    submenu:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   596
	   (Menu
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   597
	      (
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   598
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   599
		  label: 'Documentation'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   600
		  itemValue: openDocumentation
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   601
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   602
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   603
		  label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   604
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   605
	       (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   606
		  label: 'About this Application...'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   607
		  itemValue: openAboutThisApplication
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   608
		)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   609
	       )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   610
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   611
	      nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   612
	    )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   613
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   614
	 )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   615
	nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   616
	nil
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   617
      )
87bb1815460b initial checkin
ca
parents:
diff changeset
   618
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   619
87bb1815460b initial checkin
ca
parents:
diff changeset
   620
middleButtonMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
   621
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   622
     by the MenuEditor of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   623
87bb1815460b initial checkin
ca
parents:
diff changeset
   624
    "Do not manually edit this!! If it is corrupted,
87bb1815460b initial checkin
ca
parents:
diff changeset
   625
     the MenuEditor may not be able to read the specification."
87bb1815460b initial checkin
ca
parents:
diff changeset
   626
3213
33e1f779fa15 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3210
diff changeset
   627
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   628
    "
3213
33e1f779fa15 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3210
diff changeset
   629
     MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#middleButtonMenu
33e1f779fa15 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3210
diff changeset
   630
     (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication middleButtonMenu)) startUp
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   631
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   632
87bb1815460b initial checkin
ca
parents:
diff changeset
   633
    <resource: #menu>
87bb1815460b initial checkin
ca
parents:
diff changeset
   634
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   635
    ^
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   636
     #(Menu
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   637
        (
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   638
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   639
            label: 'Browse View Class'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   640
            itemValue: doBrowse:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   641
            argument: view
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   642
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   643
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   644
            label: 'Browse Model Class'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   645
            itemValue: doBrowse:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   646
            isVisible: hasModel
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   647
            argument: model
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   648
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   649
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   650
            label: 'Browse Application Class'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   651
            itemValue: doBrowse:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   652
            isVisible: hasApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   653
            argument: application
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   654
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   655
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   656
            label: 'Browse Master Application Class'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   657
            itemValue: doBrowse:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   658
            isVisible: hasApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   659
            enabled: hasMasterApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   660
            argument: masterApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   661
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   662
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   663
            label: 'Browse Controller Class'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   664
            itemValue: doBrowse:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   665
            isVisible: hasController
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   666
            argument: controller
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   667
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   668
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   669
            label: '-'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   670
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   671
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   672
            label: 'Inspect View'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   673
            itemValue: doInspect:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   674
            argument: view
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   675
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   676
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   677
            label: 'Inspect Window Group'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   678
            itemValue: doInspect:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   679
            argument: group
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   680
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   681
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   682
            label: 'Inspect Model'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   683
            itemValue: doInspect:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   684
            isVisible: hasModel
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   685
            argument: model
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   686
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   687
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   688
            label: 'Inspect Application'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   689
            itemValue: doInspect:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   690
            isVisible: hasApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   691
            argument: application
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   692
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   693
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   694
            label: 'Inspect Master Application'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   695
            itemValue: doInspect:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   696
            isVisible: hasApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   697
            enabled: hasMasterApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   698
            argument: masterApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   699
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   700
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   701
            label: 'Inspect Controller'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   702
            itemValue: doInspect:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   703
            isVisible: hasController
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   704
            argument: controller
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   705
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   706
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   707
            label: '-'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   708
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   709
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   710
            label: 'Edit Language Resources'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   711
            itemValue: doEditLanguageResources
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   712
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   713
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   714
            label: '-'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   715
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   716
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   717
            label: 'Flash'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   718
            itemValue: doFlash
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   719
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   720
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   721
            label: '-'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   722
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   723
         (MenuItem
3689
d0440cfff708 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
   724
            label: 'Destroy View'
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   725
            itemValue: doDestroy
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   726
            labelImage: (ResourceRetriever ToolbarIconLibrary erase16x16Icon 'Destroy')
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   727
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   728
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   729
            label: '-'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   730
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   731
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   732
            label: 'Geometry'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   733
            submenuChannel: submenuGeometry:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   734
            keepLinkedMenu: true
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   735
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   736
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   737
            label: 'Interface'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   738
            submenuChannel: submenuInterface:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   739
            keepLinkedMenu: true
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   740
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   741
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   742
            label: 'Visibility'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   743
            submenuChannel: submenuVisibility:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   744
            keepLinkedMenu: true
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   745
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   746
         (MenuItem
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
   747
            label: 'Presentation'
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
   748
            submenuChannel: submenuPresentation:
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
   749
            keepLinkedMenu: true
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
   750
          )
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
   751
         (MenuItem
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   752
            label: 'Instance Variables'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   753
            submenuChannel: submenuInspector:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   754
            keepLinkedMenu: true
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   755
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   756
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   757
            label: '='
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   758
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   759
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   760
            label: ''
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   761
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   762
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   763
            enabled: selectedComponentHasChildren
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   764
            label: 'Applications'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   765
            nameKey: single
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   766
            submenuChannel: submenuApplications:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   767
            keepLinkedMenu: true
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   768
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   769
         (MenuItem
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   770
            enabled: selectedComponentHasChildren
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   771
            label: 'Components'
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   772
            nameKey: single
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   773
            submenuChannel: submenuComponents:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   774
            keepLinkedMenu: true
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   775
          )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   776
         )
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   777
        nil
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   778
        nil
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   779
      )
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
   780
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
   781
    "Modified: / 18-07-2019 / 12:22:06 / Claus Gittinger"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   782
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   783
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   784
middleButtonMenuForMenuItems
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   785
    "This resource specification was automatically generated
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   786
     by the MenuEditor of ST/X."
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   787
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   788
    "Do not manually edit this!! If it is corrupted,
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   789
     the MenuEditor may not be able to read the specification."
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   790
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   791
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   792
    "
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   793
     MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#middleButtonMenu
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   794
     (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication middleButtonMenu)) startUp
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   795
    "
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   796
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   797
    <resource: #menu>
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   798
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   799
    ^
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   800
     #(Menu
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   801
	(
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   802
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   803
	    label: 'Browse Menu Item''s Class'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   804
	    itemValue: doBrowse:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   805
	    argument: menuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   806
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   807
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   808
	    label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   809
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   810
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   811
	    label: 'Inspect Menu Item'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   812
	    itemValue: doInspect:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   813
	    argument: menuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   814
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   815
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   816
	    label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   817
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   818
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   819
	    label: 'Interface'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   820
	    submenuChannel: submenuMenuItemInterface:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   821
	    keepLinkedMenu: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   822
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   823
	 )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   824
	nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   825
	nil
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   826
      )
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   827
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   828
    "Created: / 16-08-2017 / 13:48:49 / cg"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   829
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
   830
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   831
toolbarMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
   832
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   833
     by the MenuEditor of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   834
87bb1815460b initial checkin
ca
parents:
diff changeset
   835
    "Do not manually edit this!! If it is corrupted,
87bb1815460b initial checkin
ca
parents:
diff changeset
   836
     the MenuEditor may not be able to read the specification."
87bb1815460b initial checkin
ca
parents:
diff changeset
   837
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   838
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   839
    "
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   840
     MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#toolbarMenu
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   841
     (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication toolbarMenu)) startUp
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   842
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   843
87bb1815460b initial checkin
ca
parents:
diff changeset
   844
    <resource: #menu>
87bb1815460b initial checkin
ca
parents:
diff changeset
   845
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   846
    ^
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   847
     #(Menu
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   848
	(
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   849
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   850
	    enabled: hasTargetWidgetChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   851
	    label: 'Redraw'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   852
	    itemValue: doRedraw
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   853
	    isButton: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   854
	    labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   855
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   856
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   857
	    label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   858
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   859
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   860
	    label: 'Pick a View and Catch Events'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   861
	    itemValue: doPickView
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   862
	    translateLabel: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   863
	    isButton: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   864
	    hideMenuOnActivated: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   865
	    labelImage: (ResourceRetriever ToolbarIconLibrary pickWindowIcon)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   866
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   867
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   868
	    enabled: hasTargetWidgetChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   869
	    isVisible: isNotCatchingEventsChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   870
	    label: 'Catch Events of Picked View'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   871
	    activeHelpKey: doCatchEvents
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   872
	    itemValue: doCatchEvents
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   873
	    nameKey: doCatchEvents
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   874
	    isButton: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   875
	    labelImage: (ResourceRetriever nil releaseViewIcon)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   876
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   877
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   878
	    enabled: hasTargetWidgetChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   879
	    isVisible: isCatchingEventsChannel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   880
	    label: 'Release Picked View and Uncatch Events'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   881
	    activeHelpKey: doUncatchEvents
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   882
	    itemValue: doUncatchEvents
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   883
	    nameKey: doUncatchEvents
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   884
	    isButton: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   885
	    labelImage: (ResourceRetriever nil lockViewIcon)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   886
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   887
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   888
	    label: '-'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   889
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   890
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   891
	    activeHelpKey: doBrowseApplication
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   892
	    enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   893
	    label: 'Browse Application'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   894
	    itemValue: doBrowse:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   895
	    translateLabel: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   896
	    isButton: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   897
	    hideMenuOnActivated: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   898
	    labelImage: (ResourceRetriever ToolbarIconLibrary systemBrowser24x24Icon2)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   899
	    argument: application
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   900
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   901
	 (MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   902
	    activeHelpKey: doInspectApplication
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   903
	    enabled: hasSingleSelectionHolder
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   904
	    label: 'Inspect Application'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   905
	    itemValue: doInspect:
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   906
	    translateLabel: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   907
	    isButton: true
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   908
	    hideMenuOnActivated: false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   909
	    labelImage: (ResourceRetriever ToolbarIconLibrary inspect22x24Icon)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   910
	    argument: application
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   911
	  )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   912
	 )
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   913
	nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   914
	nil
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   915
      )
87bb1815460b initial checkin
ca
parents:
diff changeset
   916
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   917
2747
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   918
!ViewTreeInspectorApplication class methodsFor:'startup'!
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   919
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   920
openInPickMode
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   921
    |app|
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   922
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   923
    app := self new.
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   924
    app open.
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
   925
    app doPickView.
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   926
    ^ app
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   927
!
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   928
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   929
openInPickModeAndRelease
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   930
    "release the pick-lock after picking"
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   931
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   932
    |app|
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   933
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   934
    app := self openInPickMode.
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   935
    app doUncatchEvents.
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   936
    ^ app
3014
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   937
!
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   938
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   939
openOn:aView
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   940
    "show a particular window's topView hierarchy,
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   941
     select the given view"
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   942
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   943
    |app|
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   944
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   945
    app := self new.
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   946
    app open.
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   947
    app showWindow:aView.
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
   948
    ^ app
2747
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   949
! !
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   950
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   951
!ViewTreeInspectorApplication methodsFor:'actions'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   952
87bb1815460b initial checkin
ca
parents:
diff changeset
   953
indicatorClicked:anIndex
87bb1815460b initial checkin
ca
parents:
diff changeset
   954
    |item sensor|
87bb1815460b initial checkin
ca
parents:
diff changeset
   955
87bb1815460b initial checkin
ca
parents:
diff changeset
   956
    item := model listOfItems at:anIndex ifAbsent:nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
   957
87bb1815460b initial checkin
ca
parents:
diff changeset
   958
    item notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   959
	(     (sensor := self window sensor) notNil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   960
	 and:[(sensor ctrlDown or:[sensor shiftDown])]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   961
	) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   962
	    item recursiveToggleExpand
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   963
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   964
	    item toggleExpand
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   965
	]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   966
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
   967
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   968
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   969
!ViewTreeInspectorApplication methodsFor:'aspects'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   970
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   971
browserVisibleHolder
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   972
    "what is shown in the inspector:
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   973
     1->Widget
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   974
     2->Application
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   975
     3->WindowGroup
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   976
     4->Sensor
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   977
     5->Model
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   978
     6->Widget Class
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   979
     7->Application Class
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   980
    "
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   981
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   982
    ^ BlockValue
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   983
	with:[:v | self inspectorMode == #widgetClass or:[self inspectorMode == #applicationClass] ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
   984
	argument:self inspectorModeIndexHolder
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   985
!
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
   986
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   987
canBrowseWindowSpecMethod
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   988
    ^ self hasSingleSelectionHolder value and:[ self windowSpecMethodOfSelection notNil ]
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   989
!
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   990
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   991
canEditWindowSpec
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   992
    ^ self hasSingleSelectionHolder value and:[ self windowSpecMethodOfSelection notNil ]
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   993
!
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
   994
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   995
followFocusChannel
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   996
    "boolean holder, which indicates whether selection changed dependend on the focus view"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   997
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   998
    ^ followFocusChannel
87bb1815460b initial checkin
ca
parents:
diff changeset
   999
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1000
87bb1815460b initial checkin
ca
parents:
diff changeset
  1001
hasSingleSelectionHolder
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1002
    "boolean holder, true if one item is selected"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1003
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1004
    ^ hasSingleSelectionHolder
87bb1815460b initial checkin
ca
parents:
diff changeset
  1005
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1006
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1007
hasTargetWidgetChannel
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1008
    "answer the channel which is set to true if a target widget exists"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1009
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1010
    ^ model hasTargetWidgetChannel
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1011
!
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1012
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1013
inspectorMode
3049
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1014
    "what is shown in the inspector:
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1015
     1->widget
3049
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1016
     2->application
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1017
     3->WindowGroup
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1018
     4->Sensor
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1019
     5->Model
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1020
     6->Widget Class
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1021
     7->Application Class
3574
ea4dce86360d #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
  1022
     8 -> Resources
3049
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1023
    "
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1024
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1025
    |mode|
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1026
    mode := inspectorModeIndexHolder value.
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1027
    ^ #( widget application group sensor model widgetClass applicationClass resources) at:mode ifAbsent:#widget
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1028
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1029
    "Created: / 30-07-2013 / 07:44:59 / cg"
3574
ea4dce86360d #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
  1030
    "Modified (comment): / 17-07-2018 / 09:27:13 / Claus Gittinger"
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1031
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1032
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1033
inspectorModeIndexHolder
3049
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1034
    "what is shown in the inspector:
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1035
     1->Widget
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1036
     2->Application
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1037
     3->WindowGroup
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1038
     4->Sensor
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1039
     5->Model
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1040
     6->Widget Class
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1041
     7->Application Class
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1042
     8->Resources
3049
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  1043
    "
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1044
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1045
    ^ inspectorModeIndexHolder
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1046
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1047
    "Created: / 30-07-2013 / 07:44:07 / cg"
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1048
    "Modified (comment): / 17-07-2018 / 08:46:12 / Claus Gittinger"
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1049
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1050
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1051
inspectorModes
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1052
    "/ labels of tabs
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1053
    ^ #('Widget' 'Application' 'WindowGroup' 'Sensor' 'Model' 'Widget Class' 'App Class' 'Resources')
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1054
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1055
    "Created: / 30-07-2013 / 09:42:16 / cg"
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1056
    "Modified: / 17-07-2018 / 08:45:56 / Claus Gittinger"
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1057
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1058
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1059
inspectorVisibleHolder
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1060
    "what is shown in the inspector:
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1061
     1->Widget
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1062
     2->Application
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1063
     3->WindowGroup
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1064
     4->Sensor
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1065
     5->Model
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1066
     6->Widget Class
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1067
     7->Application Class
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1068
    "
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1069
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1070
    ^ BlockValue
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1071
	with:[:v | v not ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1072
	argument:self browserVisibleHolder
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1073
!
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1074
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1075
isCatchingEventsChannel
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1076
    ^ isCatchingEventsChannel
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1077
!
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1078
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1079
isNotCatchingEventsChannel
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1080
    ^ BlockValue forLogicalNot:self isCatchingEventsChannel
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1081
!
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1082
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1083
listOfItems
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1084
    "returns the hierarchical list of items"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1085
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1086
    ^ model listOfItems
87bb1815460b initial checkin
ca
parents:
diff changeset
  1087
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1088
87bb1815460b initial checkin
ca
parents:
diff changeset
  1089
model
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1090
    "returns my selection model, a ViewTreeModel"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1091
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1092
    ^ model
87bb1815460b initial checkin
ca
parents:
diff changeset
  1093
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1094
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1095
path
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1096
    <resource: #uiAspect>
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1097
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1098
    path isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1099
	path := PluggableAdaptor
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1100
		    on: self model
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1101
		    getter:[ :model | model path ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1102
		    setter:[ :model :newValue |  ]
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1103
    ].
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1104
    ^ path.
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1105
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1106
    "Modified: / 19-05-2014 / 18:40:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1107
!
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  1108
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1109
selectOnClickHolder
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1110
    "boolean holder, which indicates whether the selection will change on click"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1111
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1112
    ^ model selectOnClickHolder
87bb1815460b initial checkin
ca
parents:
diff changeset
  1113
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1114
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1115
showNamesHolder
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1116
    "boolean holder, which indicates whether application names or widget names
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1117
     as additional text are shown for the items"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1118
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1119
    ^ showNamesHolder
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1120
!
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1121
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1122
testModeChannel
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1123
    "answer a boolean channel which describes the behaviour how to process
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1124
     events on the target view.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1125
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1126
     false: all input events are eaten and the selection is shown on the target view.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1127
     true:  no  input events are eaten and no  selection is shown on the target view."
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1128
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1129
    ^ model testModeChannel
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1130
!
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1131
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1132
windowSpecMethodOfSelection
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1133
    |item view app nonMeta meta masterApp
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1134
     spec builder specSelector implementors|
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1135
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1136
    item := model selectedItem.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1137
    item isNil ifTrue:[^ nil].
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1138
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1139
    view := item widget.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1140
    view isNil ifTrue:[^ nil].
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1141
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1142
    app := view application.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1143
    app isNil ifTrue:[^ nil].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1144
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1145
    builder := app builder.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1146
    builder isNil ifTrue:[^ nil].
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1147
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1148
    spec := builder spec.
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1149
    spec isNil ifTrue:[^ nil].
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1150
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1151
    specSelector := spec name.
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1152
    specSelector isNil ifTrue:[^ nil].
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1153
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1154
    ((nonMeta := app class theNonMetaclass) canUnderstand:specSelector) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1155
	^ nonMeta lookupMethodFor:specSelector.
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1156
    ].
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1157
    ((meta := app class theMetaclass) canUnderstand:specSelector) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1158
	^ meta lookupMethodFor:specSelector.
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1159
    ].
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1160
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1161
    "/ maybe a simple dialog given a spec
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1162
    (masterApp := app masterApplication) notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1163
	((nonMeta := masterApp class theNonMetaclass) canUnderstand:specSelector) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1164
	    ^ nonMeta lookupMethodFor:specSelector.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1165
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1166
	((meta := masterApp class theMetaclass) canUnderstand:specSelector) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1167
	    ^ meta lookupMethodFor:specSelector.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1168
	].
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1169
    ].
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1170
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1171
    implementors := Smalltalk allImplementorsOf: specSelector.
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1172
    implementors size == 1 ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1173
	^ implementors first compiledMethodAt:specSelector.
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1174
    ].
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1175
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  1176
    ^ nil
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1177
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1178
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1179
!ViewTreeInspectorApplication methodsFor:'change & update'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1180
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1181
inspectorModeIndexHolderChanged
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1182
    self updateInspector
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1183
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1184
    "Created: / 30-07-2013 / 09:21:51 / cg"
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1185
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1186
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1187
selectionChanged
87bb1815460b initial checkin
ca
parents:
diff changeset
  1188
    |info view item|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1189
87bb1815460b initial checkin
ca
parents:
diff changeset
  1190
    item := model selectedItem.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1191
    item notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1192
	|state|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1193
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1194
	view := item widget.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1195
	view isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1196
	    info := '%1 [%2]' bindWith:(item menuItem label asString)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1197
				  with:(item menuItem value asString).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1198
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1199
	    view id isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1200
		state := 'no ID'.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1201
	    ] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1202
		view shown ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1203
		    state := 'visible'.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1204
		] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1205
		    state := 'invisible'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1206
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1207
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1208
	    info := '%1 [%2] - %3' bindWith:(view class name)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1209
				       with:(view name ? '') with:state allBold.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1210
	]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1211
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1212
	info := ''
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1213
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1214
    hasSingleSelectionHolder value:(view notNil).
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1215
    self updateInspector
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1216
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1217
    "Modified: / 16-08-2017 / 13:44:59 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1218
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1219
87bb1815460b initial checkin
ca
parents:
diff changeset
  1220
update:something with:someArgument from:aModel
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
  1221
    |oldSelection|
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
  1222
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1223
    aModel == showNamesHolder ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1224
	oldSelection := model selectedItem.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1225
	model selectedItem:nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1226
	self listOfItems showWidgetNames:(aModel value).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1227
	model selectedItem:oldSelection.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1228
	^ self
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1229
    ].
2458
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1230
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1231
    aModel == model ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1232
	self selectionChanged.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1233
	^ self
2458
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1234
    ].
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1235
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1236
    super update:something with:someArgument from:aModel.
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1237
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1238
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1239
updateBrowser
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1240
    |cls widget|
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1241
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1242
    widget := self selectedView.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1243
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1244
    "/ update the browser
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1245
    self inspectorMode == #widgetClass ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1246
	cls := widget class.
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1247
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1248
	cls := widget application class
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1249
    ].
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1250
    browser switchToClass:cls selector:nil.
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1251
!
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1252
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1253
updateInspector
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1254
    |view mode obj|
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1255
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1256
    view := self selectedView.
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1257
    mode := self inspectorMode.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1258
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1259
    ((mode == #widgetClass) or:[(mode == #applicationClass)]) ifTrue:[
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1260
        "/ update the browser
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1261
        view notNil ifTrue:[
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1262
            self updateBrowser.
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1263
        ].
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1264
        ^ self.
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1265
    ].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1266
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1267
    (view isNil or:[mode == #widget]) ifTrue:[
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1268
        obj := view.
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1269
    ] ifFalse:[ (mode == #group) ifTrue:[
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1270
        obj := view windowGroup
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1271
    ] ifFalse:[ (mode == #sensor) ifTrue:[
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1272
        obj := view sensor
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1273
    ] ifFalse:[ (mode == #model) ifTrue:[
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1274
        obj := view model
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1275
    ] ifFalse:[ (mode == #resources) ifTrue:[
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1276
        obj := view resources
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1277
    ] ifFalse:[
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1278
        obj := view application.
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1279
    ]]]]].
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1280
    inspectorView inspect:obj.
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1281
    inspectorView headLineLabel:(obj class nameWithoutPrefix)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1282
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1283
    "Created: / 30-07-2013 / 09:21:16 / cg"
3573
fc569c283368 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3568
diff changeset
  1284
    "Modified: / 17-07-2018 / 08:46:40 / Claus Gittinger"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1285
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1286
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1287
!ViewTreeInspectorApplication methodsFor:'event processing'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1288
87bb1815460b initial checkin
ca
parents:
diff changeset
  1289
processButtonMotionEvent:ev
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1290
    |click rootView|
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1291
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1292
    motionAction isNil ifTrue:[^ self].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1293
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1294
    (rootView := model rootView) isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1295
	clickedItem := motionAction := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1296
	^ self
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1297
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1298
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1299
    click := rootView device
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1300
	    translatePoint:((ev x)@ (ev y))
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1301
	    fromView:(ev view)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1302
	    toView:rootView.
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1303
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1304
    click = clickedPoint ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1305
	(clickedItem isNil or:[(click dist:clickedPoint) > 5.0]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1306
	    motionAction value:click
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1307
	]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1308
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1309
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1310
87bb1815460b initial checkin
ca
parents:
diff changeset
  1311
processButtonPressEvent:ev
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1312
    |rootView sensor lastRectangle|
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1313
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1314
    rootView    := model rootView.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1315
    sensor      := model rootView sensor.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1316
    clickedItem := model listOfItems detectItemRespondsToView:(ev view).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1317
87bb1815460b initial checkin
ca
parents:
diff changeset
  1318
    (sensor ctrlDown or:[sensor shiftDown]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1319
	clickedItem notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1320
	    self selectOnClickHolder value ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1321
		model toggleSelectItem:clickedItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1322
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1323
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1324
	clickedItem := motionAction := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1325
	^ self
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1326
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1327
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1328
    clickedPoint := rootView device translatePoint:((ev x)@ (ev y))  fromView:(ev view) toView:rootView.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1329
    lastRectangle := nil.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1330
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1331
    motionAction :=[:p|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1332
	rootView    := model rootView device rootView.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1333
	rootView    := model rootView.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1334
	clickedItem := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1335
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1336
	rootView xoring:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1337
	    lastRectangle notNil ifTrue:[ rootView displayRectangle:lastRectangle ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1338
				ifFalse:[ rootView clippedByChildren:false ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1339
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1340
	    p isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1341
		rootView clippedByChildren:true.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1342
		motionAction := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1343
	    ] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1344
		lastRectangle := Rectangle origin:(clickedPoint min:p) corner:(clickedPoint max:p).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1345
		rootView displayRectangle:lastRectangle.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1346
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1347
	    rootView flush.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1348
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1349
	lastRectangle
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1350
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1351
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1352
87bb1815460b initial checkin
ca
parents:
diff changeset
  1353
processButtonReleaseEvent:anEvent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1354
    |rootView rectangle newItems widget origin|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1355
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1356
    (rootView := model rootView) isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1357
	clickedItem := motionAction := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1358
	^ self
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1359
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1360
    motionAction isNil ifTrue:[ ^ self ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1361
    clickedItem notNil ifTrue:[ ^ model selectItem:clickedItem ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1362
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1363
    rectangle := motionAction value:nil.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1364
    rectangle isNil ifTrue:[^ self].
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1365
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1366
    newItems := OrderedCollection new.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1367
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1368
    model rootItem recursiveDo:[:anItem|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1369
	widget := anItem widget.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1370
	widget notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1371
	    origin := widget originRelativeTo:rootView.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1372
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1373
	    (rectangle containsRect:(Rectangle origin:origin extent:(widget extent))) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1374
		newItems add:anItem.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1375
	    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1376
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1377
    ].
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1378
    model value:newItems.
3500
51cbdcf5b2cb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3457
diff changeset
  1379
51cbdcf5b2cb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3457
diff changeset
  1380
    "Modified: / 11-11-2017 / 17:24:59 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1381
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1382
87bb1815460b initial checkin
ca
parents:
diff changeset
  1383
processEvent:anEvent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1384
    |button menu|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1385
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1386
    anEvent isKeyPressEvent ifTrue:[ self processKeyPressEvent:anEvent. ^ self  ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1387
    anEvent isButtonEvent  ifFalse:[ ^ self ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1388
87bb1815460b initial checkin
ca
parents:
diff changeset
  1389
    button := anEvent button.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1390
87bb1815460b initial checkin
ca
parents:
diff changeset
  1391
    (button == 2 or:[button == #menu]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1392
	motionAction isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1393
	    anEvent isButtonPressEvent ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1394
		self selectOnClickHolder value ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1395
		    menu := self middleButtonMenu value.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1396
		    menu notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1397
			menu := MenuPanel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1398
				    menu:(Menu new fromLiteralArrayEncoding:menu)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1399
				    receiver:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1400
			menu startUp.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1401
		    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1402
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1403
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1404
	    clickedItem := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1405
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1406
	^ self
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1407
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1408
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1409
    anEvent isButtonPressEvent  ifTrue:[ self processButtonPressEvent:anEvent. ^ self ].
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1410
    anEvent isButtonMotionEvent ifTrue:[ self processButtonMotionEvent:anEvent. ^ self ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1411
87bb1815460b initial checkin
ca
parents:
diff changeset
  1412
    anEvent isButtonReleaseEvent ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1413
	self selectOnClickHolder value ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1414
	    self processButtonReleaseEvent:anEvent
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1415
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1416
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1417
    clickedItem := motionAction := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1418
87bb1815460b initial checkin
ca
parents:
diff changeset
  1419
    anEvent type == #'buttonMultiPress:x:y:' ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1420
	self selectOnClickHolder value ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1421
	    self doInspect:#view.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1422
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1423
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1424
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1425
87bb1815460b initial checkin
ca
parents:
diff changeset
  1426
processKeyPressEvent:anEvent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1427
    |item prnt idx key max next|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1428
87bb1815460b initial checkin
ca
parents:
diff changeset
  1429
    key := anEvent key.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1430
    key isSymbol ifFalse:[^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1431
87bb1815460b initial checkin
ca
parents:
diff changeset
  1432
    key == #Delete    ifTrue:[ ^ self doDestroy ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1433
    key == #InspectIt ifTrue:[ ^ self doInspect:#view ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1434
87bb1815460b initial checkin
ca
parents:
diff changeset
  1435
    (   key == #CursorUp
87bb1815460b initial checkin
ca
parents:
diff changeset
  1436
    or:[key == #CursorDown
87bb1815460b initial checkin
ca
parents:
diff changeset
  1437
    or:[key == #CursorLeft
87bb1815460b initial checkin
ca
parents:
diff changeset
  1438
    or:[key == #CursorRight]]]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1439
    ) ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1440
	^ self
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1441
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1442
    item := model selectedItem.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1443
87bb1815460b initial checkin
ca
parents:
diff changeset
  1444
    item isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1445
	^ model selectedItem:(model first ? model rootItem)
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1446
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1447
87bb1815460b initial checkin
ca
parents:
diff changeset
  1448
    prnt := item parent.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1449
    prnt isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1450
	"/ is the root item
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1451
	(key == #CursorUp or:[key == #CursorLeft]) ifTrue:[item := model listOfItems last]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1452
						  ifFalse:[item := item at:1 ifAbsent:item].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1453
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1454
	^ model selectedItem:item
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1455
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1456
    key == #CursorLeft ifTrue:[ ^ model selectedItem:prnt ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1457
87bb1815460b initial checkin
ca
parents:
diff changeset
  1458
    key == #CursorRight ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1459
	next := item at:1 ifAbsent:nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1460
	next notNil ifTrue:[ model selectedItem:next ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1461
	^ self
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1462
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1463
87bb1815460b initial checkin
ca
parents:
diff changeset
  1464
    max := prnt size.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1465
87bb1815460b initial checkin
ca
parents:
diff changeset
  1466
    key == #CursorUp ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1467
	idx := prnt identityIndexOf:item.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1468
	idx == 1 ifTrue:[idx := max + 1].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1469
	model selectedItem:(prnt at:idx - 1).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1470
	^ self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1471
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1472
87bb1815460b initial checkin
ca
parents:
diff changeset
  1473
    key == #CursorDown ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1474
	idx := prnt identityIndexOf:item.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1475
	idx == max ifTrue:[idx := 0].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1476
	model selectedItem:(prnt at:idx + 1).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1477
	^ self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1478
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1479
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1480
87bb1815460b initial checkin
ca
parents:
diff changeset
  1481
processMappedView:aView
87bb1815460b initial checkin
ca
parents:
diff changeset
  1482
    |parent anchor|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1483
87bb1815460b initial checkin
ca
parents:
diff changeset
  1484
    parent := self listOfItems detectItemRespondsToView:aView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1485
    parent isNil ifTrue:[ ^ self ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1486
87bb1815460b initial checkin
ca
parents:
diff changeset
  1487
    NotFoundSignal handle:[:ex|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1488
	"contained subvies used by spec are not yet created;
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1489
	 thus we have to wait until last used subview is build
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1490
	"
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1491
	anchor := nil.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1492
    ] do:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1493
	anchor := parent class buildViewsFrom:(parent widget).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1494
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1495
    anchor notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1496
	parent updateFromChildren:anchor children.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1497
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1498
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1499
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1500
!ViewTreeInspectorApplication methodsFor:'initialization & release'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1501
87bb1815460b initial checkin
ca
parents:
diff changeset
  1502
closeDownViews
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1503
    "release the grapped application"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1504
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1505
    process := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1506
    super closeDownViews.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1507
    self doUnpick.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1508
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1509
87bb1815460b initial checkin
ca
parents:
diff changeset
  1510
initialize
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1511
    "setup my model and channels"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1512
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1513
    super initialize.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1514
87bb1815460b initial checkin
ca
parents:
diff changeset
  1515
    hasSingleSelectionHolder := false asValue.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1516
    followFocusChannel       := false asValue.
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  1517
    isCatchingEventsChannel  := false asValue.
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1518
    inspectorModeIndexHolder := 1 asValue.
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1519
    inspectorModeIndexHolder onChangeSend:#inspectorModeIndexHolderChanged to:self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1520
87bb1815460b initial checkin
ca
parents:
diff changeset
  1521
    model := ViewTreeModel new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1522
    model inputEventAction:[:ev| self processEvent:ev ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1523
    model mappedViewAction:[:vw| self processMappedView:vw ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1524
    model application:self.
2458
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1525
    model addDependent:self.
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1526
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1527
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1528
    showNamesHolder := false asValue.
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1529
    showNamesHolder addDependent:self.
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1530
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1531
    "Modified: / 30-07-2013 / 09:20:08 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1532
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1533
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1534
postBuildBrowserCanvas:aSubCanvas
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1535
    browser := aSubCanvas application.
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1536
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1537
    "/ browser navigationState meta onChangeEvaluate:(self updateBrowser).
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1538
    "/ self updateBrowser.
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1539
!
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  1540
2770
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1541
postBuildInspectorView:anInspector
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1542
    inspectorView := anInspector.
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1543
!
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1544
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1545
postBuildTree:aTree
87bb1815460b initial checkin
ca
parents:
diff changeset
  1546
    treeView := aTree scrolledView.
3105
b33e0b8e6038 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3104
diff changeset
  1547
    "/ treeView hasConstantHeight:true.
3104
59230707e466 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3079
diff changeset
  1548
!
59230707e466 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3079
diff changeset
  1549
59230707e466 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3079
diff changeset
  1550
release
59230707e466 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3079
diff changeset
  1551
    "release the grapped application"
59230707e466 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3079
diff changeset
  1552
59230707e466 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3079
diff changeset
  1553
    super release.
59230707e466 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3079
diff changeset
  1554
    self doUnpick.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1555
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1556
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1557
!ViewTreeInspectorApplication methodsFor:'menu queries'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1558
87bb1815460b initial checkin
ca
parents:
diff changeset
  1559
hasApplication
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1560
    "returns true if the current selected view has an application"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1561
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1562
    |view|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1563
87bb1815460b initial checkin
ca
parents:
diff changeset
  1564
    view := self selectedView.
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1565
    ^ (view notNil and:[view application notNil])
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1566
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1567
    "Modified (format): / 30-10-2018 / 16:20:26 / Claus Gittinger"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1568
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1569
87bb1815460b initial checkin
ca
parents:
diff changeset
  1570
hasController
87bb1815460b initial checkin
ca
parents:
diff changeset
  1571
    "returns true if the current selected item's view has a controller
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1572
     other than nil or the view itself"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1573
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1574
    |view controller|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1575
87bb1815460b initial checkin
ca
parents:
diff changeset
  1576
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1577
87bb1815460b initial checkin
ca
parents:
diff changeset
  1578
    view notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1579
	controller := view controller.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1580
      ^ (controller notNil and:[controller ~~ view])
87bb1815460b initial checkin
ca
parents:
diff changeset
  1581
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1582
    ^ false
87bb1815460b initial checkin
ca
parents:
diff changeset
  1583
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1584
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1585
hasMasterApplication
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1586
    "returns true if the current selected view has an application"
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1587
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1588
    |view|
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1589
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1590
    view := self selectedView.
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1591
    ^ (view notNil 
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1592
        and:[view application notNil
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1593
        and:[view application masterApplication notNil]])
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1594
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1595
    "Created: / 30-10-2018 / 16:20:23 / Claus Gittinger"
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1596
!
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  1597
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1598
hasModel
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1599
    "returns true if the current selected view has a model"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1600
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1601
    |view|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1602
87bb1815460b initial checkin
ca
parents:
diff changeset
  1603
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1604
  ^ (view notNil and:[view model notNil])
87bb1815460b initial checkin
ca
parents:
diff changeset
  1605
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1606
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1607
!ViewTreeInspectorApplication methodsFor:'menu specs'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1608
87bb1815460b initial checkin
ca
parents:
diff changeset
  1609
middleButtonMenu
3551
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1610
    "returns the middleButton menu for the single selected view tree item or nil"
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1611
3660
4b4a427f8976 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3658
diff changeset
  1612
    <resource: #programMenu >
4b4a427f8976 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3658
diff changeset
  1613
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1614
    ^ [
3551
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1615
        |viewTreeItem|
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1616
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1617
        (viewTreeItem := model selectedItem) notNil ifTrue:[
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1618
            viewTreeItem isView ifTrue:[
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1619
                self class middleButtonMenu
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1620
            ] ifFalse:[
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1621
                self class middleButtonMenuForMenuItems
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1622
            ].
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1623
        ] ifFalse:[
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1624
            nil
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  1625
        ]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1626
      ]
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1627
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1628
    "Modified: / 16-08-2017 / 13:48:31 / cg"
3660
4b4a427f8976 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3658
diff changeset
  1629
    "Modified: / 02-05-2019 / 22:39:49 / Claus Gittinger"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1630
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1631
87bb1815460b initial checkin
ca
parents:
diff changeset
  1632
submenuApplications:aMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
  1633
    |applications menu item list addBlock|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1634
87bb1815460b initial checkin
ca
parents:
diff changeset
  1635
    item := aMenu selection nameKey == #single ifTrue:[model selectedItem]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1636
					      ifFalse:[model rootItem].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1637
    item isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1638
87bb1815460b initial checkin
ca
parents:
diff changeset
  1639
    applications := IdentityDictionary new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1640
87bb1815460b initial checkin
ca
parents:
diff changeset
  1641
    addBlock := [:el| |cls ctr|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1642
	cls := self resolveApplicationClassFor:el.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1643
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1644
	cls notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1645
	    ctr := applications at:cls ifAbsent:0.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1646
	    applications at:cls put:(ctr + 1).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1647
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1648
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1649
    item recursiveDo:addBlock.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1650
    addBlock value:item.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1651
87bb1815460b initial checkin
ca
parents:
diff changeset
  1652
    applications isEmpty ifTrue:[^ nil ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1653
    list := SortedCollection sortBlock:[:a :b| a title < b title ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1654
87bb1815460b initial checkin
ca
parents:
diff changeset
  1655
    applications keysAndValuesDo:[:cls :ctr|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1656
       list add:(MenuDesc title:(cls name)
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1657
			  value:(ctr printString)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1658
			 action:[self doSelectNextOfApplicationClass:cls startingIn:item]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1659
		 ).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1660
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1661
87bb1815460b initial checkin
ca
parents:
diff changeset
  1662
    menu := MenuDesc buildFromList:list onGC:aMenu.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1663
    menu do:[:el|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1664
	el hideMenuOnActivated:false
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1665
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1666
    ^ menu
87bb1815460b initial checkin
ca
parents:
diff changeset
  1667
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1668
87bb1815460b initial checkin
ca
parents:
diff changeset
  1669
submenuComponents:aMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
  1670
    |widgets list total menu item|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1671
87bb1815460b initial checkin
ca
parents:
diff changeset
  1672
    item := aMenu selection nameKey == #single ifTrue:[model selectedItem]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1673
					      ifFalse:[model rootItem].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1674
    item isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1675
87bb1815460b initial checkin
ca
parents:
diff changeset
  1676
    widgets := IdentityDictionary new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1677
    total   := 0.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1678
87bb1815460b initial checkin
ca
parents:
diff changeset
  1679
    item recursiveDo:[:el| |cls ctr|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1680
	cls := el widget.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1681
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1682
	cls notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1683
	    cls := cls class.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1684
	    ctr := widgets at:cls ifAbsent:0.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1685
	    widgets at:cls put:(ctr + 1).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1686
	    total := total + 1.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1687
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1688
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1689
    total == 0 ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1690
    list := SortedCollection sortBlock:[:a :b| a title < b title ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1691
87bb1815460b initial checkin
ca
parents:
diff changeset
  1692
    widgets keysAndValuesDo:[:cls :ctr|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1693
	list add:(MenuDesc title:(cls name)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1694
			   value:(ctr printString)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1695
			  action:[self doSelectNextOfClass:cls startingIn:item]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1696
		 ).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1697
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1698
    list := list asOrderedCollection.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1699
    list add:(MenuDesc separator).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1700
    list add:(MenuDesc title:'Total' value:(total printString)).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1701
    menu := MenuDesc buildFromList:list onGC:aMenu.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1702
    menu do:[:el|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1703
	el hideMenuOnActivated:false
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1704
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1705
    ^ menu
87bb1815460b initial checkin
ca
parents:
diff changeset
  1706
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1707
87bb1815460b initial checkin
ca
parents:
diff changeset
  1708
submenuGeometry:aMenu
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1709
    "builds and returns the geometry submenu"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1710
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1711
    |view point inst list x y|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1712
87bb1815460b initial checkin
ca
parents:
diff changeset
  1713
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1714
    view isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1715
87bb1815460b initial checkin
ca
parents:
diff changeset
  1716
    list := OrderedCollection new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1717
87bb1815460b initial checkin
ca
parents:
diff changeset
  1718
    "/ origin
87bb1815460b initial checkin
ca
parents:
diff changeset
  1719
    point := view relativeOrigin.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1720
    point isNil ifTrue:[ point := view origin ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1721
87bb1815460b initial checkin
ca
parents:
diff changeset
  1722
    x := view left.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1723
    y := view top.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1724
87bb1815460b initial checkin
ca
parents:
diff changeset
  1725
    (x == point x and:[y == point y]) ifTrue:[ inst := point ]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1726
				     ifFalse:[ inst := '%1 --> (%2@%3)' bindWith:point with:x with:y ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1727
87bb1815460b initial checkin
ca
parents:
diff changeset
  1728
    list add:(MenuDesc title:'origin' value:inst).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1729
87bb1815460b initial checkin
ca
parents:
diff changeset
  1730
    "/ corner
87bb1815460b initial checkin
ca
parents:
diff changeset
  1731
    point := view relativeCorner.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1732
    point isNil ifTrue:[ point := view corner ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1733
87bb1815460b initial checkin
ca
parents:
diff changeset
  1734
    x := view right.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1735
    y := view bottom.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1736
87bb1815460b initial checkin
ca
parents:
diff changeset
  1737
    (x == point x and:[y == point y]) ifTrue:[ inst := point ]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1738
				     ifFalse:[ inst := '%1 --> (%2@%3)' bindWith:point with:x with:y ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1739
87bb1815460b initial checkin
ca
parents:
diff changeset
  1740
    list add:(MenuDesc title:'corner' value:inst).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1741
87bb1815460b initial checkin
ca
parents:
diff changeset
  1742
    "/ extent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1743
    (point := view relativeExtent) isNil ifTrue:[point := view extent].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1744
    list add:(MenuDesc title:'extent' value:point).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1745
87bb1815460b initial checkin
ca
parents:
diff changeset
  1746
    "/ preferred extent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1747
    list add:(MenuDesc title:'pref. extent' value:(view preferredExtent)).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1748
    list add:(MenuDesc separator).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1749
87bb1815460b initial checkin
ca
parents:
diff changeset
  1750
    "/ view insets
87bb1815460b initial checkin
ca
parents:
diff changeset
  1751
    inst := 'l:%1  r:%2  t:%3  b:%4' bindWith:(view leftInset)
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1752
					 with:(view rightInset)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1753
					 with:(view topInset)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1754
					 with:(view bottomInset).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1755
87bb1815460b initial checkin
ca
parents:
diff changeset
  1756
    list add:(MenuDesc title:'insets'      value:inst).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1757
    list add:(MenuDesc title:'borderWidth' value:(view borderWidth)).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1758
    list add:(MenuDesc title:'level'       value:(view level)).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1759
    list add:(MenuDesc separator).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1760
87bb1815460b initial checkin
ca
parents:
diff changeset
  1761
    (inst := view layout) notNil ifTrue:[ inst := inst displayString ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1762
    list add:(MenuDesc title:'layout' value:inst).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1763
87bb1815460b initial checkin
ca
parents:
diff changeset
  1764
    (inst := view transformation) notNil ifTrue:[ inst := inst displayString ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1765
    list add:(MenuDesc title:'transformation' value:inst).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1766
3183
cd02c3731897 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3174
diff changeset
  1767
    (view isKindOf:Label) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1768
	list add:(MenuDesc separator).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1769
	(inst := view adjust) notNil ifTrue:[ inst := inst displayString ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1770
	list add:(MenuDesc title:'adjust' value:inst).
3183
cd02c3731897 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3174
diff changeset
  1771
    ].
cd02c3731897 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3174
diff changeset
  1772
    (view isKindOf:PanelView) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1773
	list add:(MenuDesc separator).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1774
	(inst := view horizontalLayout ) notNil ifTrue:[ inst := inst displayString ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1775
	list add:(MenuDesc title:'horizontalLayout' value:inst).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1776
	(inst := view verticalLayout ) notNil ifTrue:[ inst := inst displayString ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1777
	list add:(MenuDesc title:'verticalLayout' value:inst).
3183
cd02c3731897 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3174
diff changeset
  1778
    ].
cd02c3731897 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3174
diff changeset
  1779
cd02c3731897 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3174
diff changeset
  1780
    ^ MenuDesc buildFromList:list onGC:aMenu
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1781
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1782
87bb1815460b initial checkin
ca
parents:
diff changeset
  1783
submenuInspector:aMenu
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1784
    "builds and returns the inspector submenu"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1785
3040
b62c4b71910c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3037
diff changeset
  1786
    |view list n names label value indices|
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1787
87bb1815460b initial checkin
ca
parents:
diff changeset
  1788
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1789
    view isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1790
87bb1815460b initial checkin
ca
parents:
diff changeset
  1791
    n := view class instSize.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1792
    n > 0 ifFalse:[^ nil ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1793
87bb1815460b initial checkin
ca
parents:
diff changeset
  1794
    list  := OrderedCollection new:n.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1795
    names := view class allInstVarNames.
3040
b62c4b71910c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3037
diff changeset
  1796
    indices := (1 to:names size) asArray.
b62c4b71910c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3037
diff changeset
  1797
    names sortWith:indices.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1798
87bb1815460b initial checkin
ca
parents:
diff changeset
  1799
    1 to:n do:[:i| |action|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1800
	label := (names at:i) printString.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1801
	value := view instVarAt:(indices at:i).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1802
	value isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1803
	    value  := '------'.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1804
	    action := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1805
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1806
	    value  := value displayString contractAtEndTo:40.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1807
	    action := [(view instVarAt:i) inspect].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1808
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1809
	list add:(MenuDesc title:label value:value action:action).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1810
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1811
87bb1815460b initial checkin
ca
parents:
diff changeset
  1812
    ^ MenuDesc buildFromList:list onGC:aMenu
3040
b62c4b71910c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3037
diff changeset
  1813
b62c4b71910c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3037
diff changeset
  1814
    "Modified: / 31-07-2013 / 13:12:52 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1815
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1816
87bb1815460b initial checkin
ca
parents:
diff changeset
  1817
submenuInterface:aMenu
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1818
    "builds and returns the interface submenu"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1819
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1820
    |view label inst value list|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1821
87bb1815460b initial checkin
ca
parents:
diff changeset
  1822
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1823
    view isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1824
87bb1815460b initial checkin
ca
parents:
diff changeset
  1825
    list := OrderedCollection new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1826
87bb1815460b initial checkin
ca
parents:
diff changeset
  1827
    inst  := view controller.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1828
    value := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1829
87bb1815460b initial checkin
ca
parents:
diff changeset
  1830
    inst isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1831
	label := nil
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1832
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1833
	inst == view ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1834
	    label := '== view itself'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1835
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1836
	    label := inst displayString.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1837
	    value := [view controller inspect].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1838
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1839
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1840
    list add:(MenuDesc title:'controller' value:label action:value).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1841
87bb1815460b initial checkin
ca
parents:
diff changeset
  1842
    inst := view delegate.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1843
    inst notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1844
	list add:(MenuDesc title:'delegate' value:(inst displayString) action:[ view delegate inspect ]).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1845
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1846
87bb1815460b initial checkin
ca
parents:
diff changeset
  1847
    inst := view application.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1848
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1849
    inst notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1850
	|topAppl|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1851
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1852
	list add:(MenuDesc title:'application' value:inst action:[ view application inspect ]).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1853
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1854
	topAppl := inst topApplication.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1855
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1856
	(topAppl notNil and:[topAppl ~~ inst]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1857
	    list add:(MenuDesc title:'topApplication' value:topAppl action:[ inst topApplication inspect ]).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1858
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1859
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1860
    list add:(MenuDesc separator).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1861
2888
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  1862
    (view respondsTo:#'model') ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1863
	inst := view model.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1864
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1865
	inst isNil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1866
	    ifTrue:[ label := value := nil ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1867
	    ifFalse:[ label := inst displayString.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1868
		      label := label,(self aspectLabelFor:inst inApplicationOf:view).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1869
		      value := [ view model inspect ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1870
		    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1871
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1872
	list add:(MenuDesc title:'model' value:label action:value).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1873
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1874
	(inst notNil and:[view respondsTo:#modelInterface]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1875
	    view modelInterface keysAndValuesDo:[:key : val|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1876
		val isNil ifTrue:[ label := nil ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1877
			 ifFalse:[ label := val displayString ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1878
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1879
		list add:(MenuDesc title:('      - ', key) value:label ).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1880
	    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1881
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1882
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1883
87bb1815460b initial checkin
ca
parents:
diff changeset
  1884
    (view respondsTo:#enableChannel) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1885
	inst := view enableChannel.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1886
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1887
	inst isNil ifTrue:[ label := value := nil ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1888
		  ifFalse:[ label := inst displayString.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1889
			    label := label,(self aspectLabelFor:inst inApplicationOf:view).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1890
			    value := [ view enableChannel inspect ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1891
			  ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1892
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1893
	list add:(MenuDesc title:'enableChannel' value:label action:value).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1894
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1895
2888
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  1896
    #( #action #pressAction #releaseAction ) do:[:actionSelector |
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1897
	(view respondsTo:actionSelector) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1898
	    inst := view perform:actionSelector.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1899
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1900
	    inst isNil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1901
		ifTrue:[ label := value := nil ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1902
		ifFalse:[ label := inst displayString.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1903
			    value := [ (view perform:actionSelector) inspect ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1904
			].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1905
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1906
	    list add:(MenuDesc title:actionSelector"'action'" value:label action:value).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1907
	].
2779
10fef360ad85 changed: #submenuInterface:
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  1908
    ].
10fef360ad85 changed: #submenuInterface:
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  1909
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1910
    list last isSeparator ifFalse:[ list add:(MenuDesc separator) ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1911
87bb1815460b initial checkin
ca
parents:
diff changeset
  1912
    (view respondsTo:#listHolder) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1913
	inst := view listHolder.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1914
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1915
	inst isNil ifTrue:[ label := value := nil ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1916
		  ifFalse:[ label := inst class printString.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1917
			    label := label,(self aspectLabelFor:inst inApplicationOf:view).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1918
			    value := [ view listHolder inspect ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1919
			  ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1920
	list add:(MenuDesc title:'listHolder' value:label action:value).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1921
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1922
87bb1815460b initial checkin
ca
parents:
diff changeset
  1923
    (view respondsTo:#list) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1924
	inst := view list.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1925
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1926
	inst isNil ifTrue:[ label := value := nil ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1927
		  ifFalse:[ label := '%1 [%2]' bindWith:(inst class printString) with:(inst size).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1928
			    label := label,(self aspectLabelFor:inst inApplicationOf:view).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1929
			    value := [ view list inspect ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1930
			  ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1931
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1932
	list add:(MenuDesc title:'list' value:label action:value).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1933
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1934
87bb1815460b initial checkin
ca
parents:
diff changeset
  1935
    list last isSeparator ifTrue:[ list removeLast ].
2888
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  1936
    ^ MenuDesc buildFromList:list onGC:aMenu
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  1937
3040
b62c4b71910c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3037
diff changeset
  1938
    "Modified: / 31-07-2013 / 13:09:55 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1939
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1940
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1941
submenuMenuItemInterface:aMenu
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1942
    "builds and returns the menuItem interface submenu"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1943
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1944
    |item list|
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1945
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1946
    item := self selectedMenuItem.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1947
    item isNil ifTrue:[^ nil].
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1948
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1949
    list := OrderedCollection new.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1950
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1951
    list add:(MenuDesc
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1952
		title:'itemValue'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1953
		value:(item itemValue)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1954
		action:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1955
		    UserPreferences systemBrowserClass
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1956
			browseImplementorsOf:item itemValue
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  1957
		]).
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1958
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1959
    ^ MenuDesc buildFromList:list onGC:aMenu
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1960
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1961
    "Created: / 16-08-2017 / 13:51:05 / cg"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1962
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  1963
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1964
submenuPresentation:aMenu
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1965
    "builds and returns the presentation submenu"
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1966
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1967
    |view list|
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1968
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1969
    view := self selectedView.
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1970
    view isNil ifTrue:[^ nil].
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1971
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1972
    list := OrderedCollection new.
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1973
3693
1b69c8dcdfe0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
  1974
    list add:(MenuDesc title:'fgColor'     value:(view foregroundColor displayString)).
1b69c8dcdfe0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
  1975
    list add:(MenuDesc title:'bgColor'     value:(view backgroundColor displayString)).
1b69c8dcdfe0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
  1976
    list add:(MenuDesc title:'viewBG'      value:(view viewBackground displayString)).
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1977
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1978
    list add:(MenuDesc separator).
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1979
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1980
    list add:(MenuDesc title:'font'        value:(view font printString)).
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1981
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1982
    ^ MenuDesc buildFromList:list onGC:aMenu
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1983
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1984
    "Created: / 18-07-2019 / 12:23:42 / Claus Gittinger"
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1985
!
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1986
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1987
submenuVisibility:aMenu
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1988
    "builds and returns the geometry submenu"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1989
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1990
    |view list value|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1991
87bb1815460b initial checkin
ca
parents:
diff changeset
  1992
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1993
    view isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1994
87bb1815460b initial checkin
ca
parents:
diff changeset
  1995
    list := OrderedCollection new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1996
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1997
    list add:(MenuDesc title:'device'     value:(view device printString) action:[view device inspect]).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1998
    list add:(MenuDesc title:'drawableId' value:(view id)).
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  1999
    list add:(MenuDesc title:'gcId'       value:(view gcId) action:[view graphicsContext inspect]).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2000
87bb1815460b initial checkin
ca
parents:
diff changeset
  2001
    list add:(MenuDesc separator).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2002
87bb1815460b initial checkin
ca
parents:
diff changeset
  2003
    list add:(MenuDesc title:'shown'    value:(view shown)).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2004
    list add:(MenuDesc title:'realized' value:(view realized)).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2005
87bb1815460b initial checkin
ca
parents:
diff changeset
  2006
    list add:(MenuDesc separator).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2007
87bb1815460b initial checkin
ca
parents:
diff changeset
  2008
    list add:(MenuDesc title:'hiddenOnRealize' value:(view isHiddenOnRealize)).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2009
87bb1815460b initial checkin
ca
parents:
diff changeset
  2010
    (value := view visibilityChannel) isNil ifTrue:[
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  2011
        list add:(MenuDesc title:'visibilityChannel' value:'------').
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2012
    ] ifFalse:[
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  2013
        list add:(MenuDesc title:'visibilityChannel'
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  2014
                           value:(value displayString)
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  2015
                          action:[view visibilityChannel inspect]).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2016
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2017
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  2018
    ^ MenuDesc buildFromList:list onGC:aMenu
3692
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  2019
b8a662f98f30 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3689
diff changeset
  2020
    "Modified: / 18-07-2019 / 12:25:39 / Claus Gittinger"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2021
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2022
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2023
!ViewTreeInspectorApplication methodsFor:'private'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2024
2888
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2025
aspectLabelFor:aModel inApplicationOf:aView
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2026
    |app|
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2027
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2028
    aModel isNil ifTrue:[^ ''].
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2029
    aView isNil ifTrue:[^ ''].
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2030
    (app := aView application) isNil ifTrue:[^ ''].
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2031
    app builder bindings keysAndValuesDo:[:aspect :value |
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2032
	value == aModel ifTrue:[^ ' [aspect: ',aspect,']'].
2888
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2033
    ].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2034
    app class allInstVarNames do:[:nm |
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2035
	(app instVarNamed:nm) == aModel ifTrue:[^ ' [instvar: ',nm,']']
2888
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2036
    ].
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2037
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2038
    ^ ''
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2039
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2040
    "Created: / 27-04-2012 / 14:22:09 / cg"
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2041
!
Claus Gittinger <cg@exept.de>
parents: 2779
diff changeset
  2042
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2043
selectFocusView
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2044
    |rootView focusView|
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2045
87bb1815460b initial checkin
ca
parents:
diff changeset
  2046
    rootView := model rootView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2047
87bb1815460b initial checkin
ca
parents:
diff changeset
  2048
    (rootView notNil and:[rootView shown]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2049
	focusView := rootView windowGroup focusView.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2050
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2051
    focusView isNil ifTrue:[^ self ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2052
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2053
    self selectView:focusView
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2054
!
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2055
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2056
selectView:aView
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2057
    |currentItem viewItem|
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2058
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2059
    currentItem := model selectedItem.
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2060
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2061
    (currentItem notNil and:[currentItem widget == aView]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2062
	^ self
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2063
    ].
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2064
    viewItem := model listOfItems recursiveDetect:[:el| el widget == aView ].
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2065
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2066
    viewItem notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2067
	model selectItem:viewItem.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2068
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2069
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2070
87bb1815460b initial checkin
ca
parents:
diff changeset
  2071
setRootItem:aRootItemOrNil
87bb1815460b initial checkin
ca
parents:
diff changeset
  2072
    |theProcess|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2073
87bb1815460b initial checkin
ca
parents:
diff changeset
  2074
    aRootItemOrNil isNil ifTrue:[
3658
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2075
        process := nil.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2076
    ] ifFalse:[
3658
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2077
        "/ expand tree to level 3
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2078
        aRootItemOrNil do:[:aRootChild|
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2079
            aRootChild do:[:aSubChild| aSubChild expand ].
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2080
            aRootChild expand.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2081
        ].
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2082
        aRootItemOrNil expand.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2083
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2084
        process isNil ifTrue:[
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2085
            "/ the focusFollower process terminates itself, when process is not longer theProcess
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2086
            theProcess := process :=
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2087
                Process
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2088
                    for:[
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2089
                        |update testModeChannel|
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2090
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2091
                        update := false.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2092
                        testModeChannel := model testModeChannel.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2093
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2094
                        [process == theProcess] whileTrue:[
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2095
                            Delay waitForSeconds:0.5.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2096
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2097
                            (treeView notNil and:[process == theProcess and:[treeView shown]]) ifTrue:[
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2098
                                (testModeChannel value == true and:[followFocusChannel value == true]) ifTrue:[
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2099
                                    self selectFocusView.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2100
                                ].
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2101
                                update ifTrue:[
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2102
                                    self updateShownStatus.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2103
                                ].
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2104
                                update := update not.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2105
                            ].
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2106
                        ].
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2107
                    ]
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2108
                    priority:(Processor userSchedulingPriority).
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2109
            theProcess name:'ViewTreeInspector - Focus Follower'.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2110
            theProcess resume.
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2111
        ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2112
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2113
    model rootItem:aRootItemOrNil.
3034
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2114
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2115
    "Modified: / 25-07-2013 / 12:03:44 / cg"
3658
18137fdc0f76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3628
diff changeset
  2116
    "Modified (format): / 30-04-2019 / 22:32:23 / Claus Gittinger"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2117
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2118
87bb1815460b initial checkin
ca
parents:
diff changeset
  2119
updateShownStatus
87bb1815460b initial checkin
ca
parents:
diff changeset
  2120
    |rootItem min max visState listIdx visY0 visY1 height damage|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2121
87bb1815460b initial checkin
ca
parents:
diff changeset
  2122
    rootItem := model rootItem.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2123
    (rootItem notNil and:[rootItem widget shown]) ifFalse:[^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2124
87bb1815460b initial checkin
ca
parents:
diff changeset
  2125
    max := 0.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2126
    min := 9999999.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2127
87bb1815460b initial checkin
ca
parents:
diff changeset
  2128
    rootItem recursiveEachVisibleItemDo:[:anItem|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2129
	anItem widget notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2130
	    visState := (anItem widget shown).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2131
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2132
	    visState ~~ anItem isDrawnShown ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2133
		anItem isDrawnShown:visState.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2134
		listIdx := treeView identityIndexOf:anItem.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2135
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2136
		listIdx > 0 ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2137
		    max := max max:listIdx.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2138
		    min := min min:listIdx.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2139
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2140
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2141
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2142
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2143
    max < min ifTrue:[^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2144
    max := max + 1.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2145
87bb1815460b initial checkin
ca
parents:
diff changeset
  2146
    visY0  := (treeView yVisibleOfLine:min) max:0.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2147
    visY1  := (treeView yVisibleOfLine:max) min:(treeView height).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2148
    height := visY1 - visY0.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2149
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2150
    height > 2 ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2151
	treeView shown ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2152
	    damage := Rectangle left:0 top:visY0 width:(treeView width) height:height.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2153
	    treeView invalidateDeviceRectangle:damage repairNow:false.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2154
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2155
    ].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2156
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2157
    "Modified: / 16-08-2017 / 12:29:15 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2158
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2159
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2160
!ViewTreeInspectorApplication methodsFor:'selection'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2161
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2162
selectedMenuItem
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2163
    "answer the selected menuItem or nil"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2164
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2165
    |item|
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2166
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2167
    item := model selectedItem.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2168
    item notNil ifTrue:[ ^ item menuItem ].
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2169
    ^ nil
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2170
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2171
    "Created: / 16-08-2017 / 13:50:35 / cg"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2172
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2173
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2174
selectedView
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2175
    "answer the selected view or nil"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2176
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2177
    |item|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2178
87bb1815460b initial checkin
ca
parents:
diff changeset
  2179
    item := model selectedItem.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2180
    item notNil ifTrue:[ ^ item widget ].
3457
3f3ea99e8af5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3456
diff changeset
  2181
    ^ nil
3f3ea99e8af5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3456
diff changeset
  2182
3f3ea99e8af5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3456
diff changeset
  2183
    "Modified (format): / 16-08-2017 / 13:57:30 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2184
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2185
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2186
!ViewTreeInspectorApplication methodsFor:'testing'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2187
87bb1815460b initial checkin
ca
parents:
diff changeset
  2188
resolveApplicationClassFor:aTreeItem
87bb1815460b initial checkin
ca
parents:
diff changeset
  2189
    aTreeItem isApplicationClass ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  2190
       ^ aTreeItem applicationClass
87bb1815460b initial checkin
ca
parents:
diff changeset
  2191
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2192
    ^ nil
87bb1815460b initial checkin
ca
parents:
diff changeset
  2193
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2194
87bb1815460b initial checkin
ca
parents:
diff changeset
  2195
selectedComponentHasChildren
87bb1815460b initial checkin
ca
parents:
diff changeset
  2196
    |item|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2197
87bb1815460b initial checkin
ca
parents:
diff changeset
  2198
    item := model selectedItem.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2199
    ^ (item notNil and:[item hasChildren])
87bb1815460b initial checkin
ca
parents:
diff changeset
  2200
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2201
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2202
!ViewTreeInspectorApplication methodsFor:'user operations'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2203
87bb1815460b initial checkin
ca
parents:
diff changeset
  2204
doBrowse:what
87bb1815460b initial checkin
ca
parents:
diff changeset
  2205
    "open browser on:
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2206
        #view           browse class
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2207
        #model          browse model class
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2208
        #application    browse application class
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2209
        #masterApplication    browse master application class
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2210
        #controller     browse controller class
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2211
    "
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2212
    |inst|
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2213
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2214
    (inst := self objectToInspectOrBrowse:what) isNil ifTrue:[^ self].
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2215
    inst class browserClass openInClass:(inst class) selector:nil
3049
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  2216
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  2217
    "Modified: / 28-08-2013 / 23:57:42 / cg"
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2218
    "Modified (comment): / 30-10-2018 / 16:21:25 / Claus Gittinger"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2219
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2220
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2221
doBrowseWindowSpecMethod
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2222
    |mthd|
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2223
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2224
    mthd := self windowSpecMethodOfSelection.
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2225
    NewSystemBrowser openInClass:mthd mclass selector:mthd selector
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2226
!
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2227
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2228
doCatchEvents
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2229
    model catchEvents:true.
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2230
    isCatchingEventsChannel value:true.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2231
"/    ((builder componentAt:'toolbarMenu') itemAt:#doUncatchEvents)
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2232
"/        enabled:true;
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2233
"/        label:(self class releaseViewIcon);
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2234
"/        activeHelpKey:#doUncatchEvents.
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2235
!
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2236
3171
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2237
doDebugProcess
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2238
    "open debugger on the window process"
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2239
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2240
    |view|
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2241
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2242
    view := self selectedView.
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2243
    view isNil ifTrue:[^ nil].
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2244
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2245
    Debugger openOn:view windowGroup process
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2246
!
16cec0f0e3b4 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3169
diff changeset
  2247
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2248
doDestroy
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2249
    "destroy the current selected view"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2250
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2251
    |item parent|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2252
87bb1815460b initial checkin
ca
parents:
diff changeset
  2253
    item := model selectedItem.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2254
    item isNil ifTrue:[ ^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2255
87bb1815460b initial checkin
ca
parents:
diff changeset
  2256
    parent := item parent.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2257
87bb1815460b initial checkin
ca
parents:
diff changeset
  2258
    parent isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2259
	"/ the root
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2260
	model withSelectionHiddenDo:[item deleteAll].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2261
      ^ self
87bb1815460b initial checkin
ca
parents:
diff changeset
  2262
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2263
87bb1815460b initial checkin
ca
parents:
diff changeset
  2264
    model withSelectionHiddenDo:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2265
	|idx nsel|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2266
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2267
	idx := parent identityIndexOf:item.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2268
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2269
	idx == parent size ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2270
	    nsel := parent at:(idx - 1) ifAbsent:parent
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2271
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2272
	    nsel := parent at:(idx + 1)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2273
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2274
	model setValue:nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2275
	item delete.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2276
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2277
	parent isLayoutContainer ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2278
	    parent widget sizeChanged:nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2279
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2280
	model value:nsel.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2281
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2282
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2283
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2284
doEditLanguageResources
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2285
    "open language editor on the application's resources:
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2286
    "
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2287
    |inst|
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2288
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2289
    (inst := self objectToInspectOrBrowse:#application) isNil ifTrue:[^ self].
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2290
    Tools::InternationalLanguageTranslationEditor 
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2291
        openOnPackage:inst class package
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2292
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2293
    "Created: / 30-10-2018 / 16:26:17 / Claus Gittinger"
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2294
!
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2295
3174
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2296
doEditWindowSpec
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2297
    |mthd|
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2298
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2299
    mthd := self windowSpecMethodOfSelection.
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2300
    UIPainter openOnClass:mthd mclass andSelector:mthd selector
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2301
!
cd45c49a0d63 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3171
diff changeset
  2302
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2303
doFlash
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2304
    "flash the selected view"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2305
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2306
    |view|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2307
87bb1815460b initial checkin
ca
parents:
diff changeset
  2308
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2309
    view isNil ifTrue:[ ^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2310
87bb1815460b initial checkin
ca
parents:
diff changeset
  2311
    view shown ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2312
	model withSelectionHiddenDo:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2313
	    view perform:#flash ifNotUnderstood:nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2314
	].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2315
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2316
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2317
87bb1815460b initial checkin
ca
parents:
diff changeset
  2318
doInspect:what
87bb1815460b initial checkin
ca
parents:
diff changeset
  2319
    "open inspector on:
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2320
	#view           inspect class
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2321
	#group          inspect windowGroup
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2322
	#model          inspect model
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2323
	#application    inspect application
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2324
	#controller     inspect controller
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2325
	#process        inspect application's process
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2326
    "
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2327
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2328
    |inst|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2329
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2330
    (inst := self objectToInspectOrBrowse:what) isNil ifTrue:[^ self].
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2331
    inst inspect.
3049
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  2332
292d06e8b7ae class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3040
diff changeset
  2333
    "Modified: / 28-08-2013 / 23:58:27 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2334
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2335
3034
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2336
doOpenProcessMonitor
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2337
    (ProcessMonitorV2 ? ProcessMonitor) open
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2338
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2339
    "Created: / 25-07-2013 / 12:34:23 / cg"
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2340
!
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
  2341
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2342
doPickView
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2343
    "pick a window's topView"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2344
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2345
    |screen clickedView topWindow cursor|
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2346
87bb1815460b initial checkin
ca
parents:
diff changeset
  2347
    self doUnpick.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2348
2759
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
  2349
    cursor := Cursor fromImage:(self class crossHairIcon).
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
  2350
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
  2351
    screen := Screen current.
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2352
    clickedView := screen viewFromPoint:(screen pointFromUserShowing:cursor).
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2353
    clickedView isNil ifTrue:[^ self].
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2354
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2355
    topWindow := clickedView topView.
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2356
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2357
    (    topWindow == Screen current rootView
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  2358
     or:[topWindow == self window topView]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2359
    ) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2360
	^ self
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2361
    ].
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2362
3070
648aad0e3777 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3049
diff changeset
  2363
    self showWindow:clickedView.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2364
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2365
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2366
doRedraw
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2367
    "redraw the app"
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2368
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2369
    |rootView|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2370
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2371
    (rootView := model rootView) notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2372
	rootView withAllSubViewsDo:[:v | v "redraw; "invalidate].
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2373
    ]
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2374
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2375
    "Modified: / 16-08-2017 / 12:02:11 / cg"
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2376
!
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2377
3168
894c517d8696 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3167
diff changeset
  2378
doSelectNextElementStartingIn:anItem forWhich:aBlock
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2379
    |startItem firstFound searchNext|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2380
87bb1815460b initial checkin
ca
parents:
diff changeset
  2381
    startItem  := model last.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2382
    searchNext := startItem notNil.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2383
    firstFound := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2384
87bb1815460b initial checkin
ca
parents:
diff changeset
  2385
    anItem recursiveDo:[:el|
3525
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2386
        el == startItem ifTrue:[
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2387
            searchNext := false
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2388
        ] ifFalse:[
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2389
            (aBlock value:el) ifTrue:[
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2390
                searchNext ifFalse:[^ model selectItem:el].
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2391
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2392
                firstFound isNil ifTrue:[
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2393
                    firstFound := el
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2394
                ]
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2395
            ]
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2396
        ]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2397
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2398
    firstFound notNil ifTrue:[
3525
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2399
        self beepInEditor.
5df4da794cd2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3524
diff changeset
  2400
        model selectItem:firstFound
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2401
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2402
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2403
3168
894c517d8696 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3167
diff changeset
  2404
doSelectNextOfApplicationClass:aClass startingIn:anItem
894c517d8696 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3167
diff changeset
  2405
    self doSelectNextElementStartingIn:anItem forWhich:[:el | (self resolveApplicationClassFor:el) == aClass].
894c517d8696 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3167
diff changeset
  2406
!
894c517d8696 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3167
diff changeset
  2407
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2408
doSelectNextOfClass:aClass startingIn:anItem
3168
894c517d8696 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3167
diff changeset
  2409
    self doSelectNextElementStartingIn:anItem forWhich:[:el | el widget class == aClass].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2410
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2411
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2412
doUncatchEvents
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2413
    "release the inspected window (no longer catch its events)"
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2414
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2415
    model catchEvents:false.
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2416
    isCatchingEventsChannel value:false.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2417
"/    ((builder componentAt:'toolbarMenu') itemAt:#doUncatchEvents)
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2418
"/        label:(self class releaseViewIcon);
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2419
"/        enabled:false;
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2420
"/        activeHelpKey:#doCatchEvents.
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2421
    self doRedraw
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2422
!
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  2423
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2424
doUnpick
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2425
    "release current picked window and contained subwindows"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  2426
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2427
    self setRootItem:nil.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2428
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2429
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2430
objectToInspectOrBrowse:what
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2431
    "return one of:
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2432
        #view           for inspect/browse view/widget
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2433
        #group          for inspect/browse windowGroup
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2434
        #model          for inspect/browse model
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2435
        #application    for inspect/browse application
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2436
        #masterApplication    for inspect/browse master application
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2437
        #controller     for inspect/browse controller
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2438
        #process        for inspect/browse application's process
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2439
        #widgetClass    for inspect/browse widget's class
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2440
        #menuItem       for inspect/browse menuItem
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2441
    "
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2442
    |view|
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2443
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2444
    what == #menuItem       ifTrue:[
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2445
        ^ model selectedItem menuItem
3457
3f3ea99e8af5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3456
diff changeset
  2446
    ].
3f3ea99e8af5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3456
diff changeset
  2447
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2448
    view := self selectedView.
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2449
    view isNil ifTrue:[^ nil].
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2450
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2451
    what == #group       ifTrue:[ ^ view windowGroup ].
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2452
    what == #model       ifTrue:[ ^ view model ].
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2453
    what == #controller  ifTrue:[ ^ view controller ].
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2454
    what == #process     ifTrue:[ ^ view windowGroup process ].
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2455
    what == #sensor      ifTrue:[ ^ view sensor ].
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2456
    what == #application ifTrue:[ ^ view application ? view topView ].
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2457
    what == #masterApplication ifTrue:[ ^ view application masterApplication ].
3302
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2458
    what == #applicationClass ifTrue:[ ^ view application ? view topView ].
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2459
413a225308d1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3217
diff changeset
  2460
    ^ view
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2461
3457
3f3ea99e8af5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3456
diff changeset
  2462
    "Modified: / 16-08-2017 / 13:57:36 / cg"
3628
dae68c3b50a6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3574
diff changeset
  2463
    "Modified: / 30-10-2018 / 16:22:13 / Claus Gittinger"
3167
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2464
!
95025cd0fbce class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
  2465
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2466
openDocumentation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2467
    HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#VIEWTREEINSPECTOR'
3014
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2468
!
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2469
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2470
showWindow:aView
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2471
    "show a particular window's topView hierarchy,
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2472
     select the given view"
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2473
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2474
    | topWindow |
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2475
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2476
    topWindow := aView topView.
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2477
3124
1973e28a2c75 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3123
diff changeset
  2478
    self doCatchEvents.
3014
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2479
    self setRootItem:(ViewTreeItem buildViewsFrom:topWindow).
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
  2480
    self selectView:aView.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2481
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2482
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2483
!ViewTreeInspectorApplication::MenuDesc class methodsFor:'building'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2484
87bb1815460b initial checkin
ca
parents:
diff changeset
  2485
buildFromList:aList onGC:aMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
  2486
    |tabSpec menu w menuPanel|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2487
87bb1815460b initial checkin
ca
parents:
diff changeset
  2488
    w := 0.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2489
    aList do:[:el| w := w max:(el widthOn:aMenu) ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2490
87bb1815460b initial checkin
ca
parents:
diff changeset
  2491
    tabSpec := TabulatorSpecification new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2492
    tabSpec unit:#pixel.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2493
    tabSpec positions:#(0     1.5 ).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2494
    tabSpec align:#(#left #left).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2495
87bb1815460b initial checkin
ca
parents:
diff changeset
  2496
    w := w + 15.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2497
    tabSpec positions:(Array with:0 with:w).
87bb1815460b initial checkin
ca
parents:
diff changeset
  2498
87bb1815460b initial checkin
ca
parents:
diff changeset
  2499
    menu := Menu new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2500
87bb1815460b initial checkin
ca
parents:
diff changeset
  2501
    aList do:[:el|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2502
	menu addItem:(el asMenuItemWithTabulatorSpecification:tabSpec).
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2503
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2504
    menuPanel := MenuPanel menu:menu.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2505
    ^ menuPanel
87bb1815460b initial checkin
ca
parents:
diff changeset
  2506
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2507
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2508
!ViewTreeInspectorApplication::MenuDesc class methodsFor:'instance creation'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2509
87bb1815460b initial checkin
ca
parents:
diff changeset
  2510
separator
87bb1815460b initial checkin
ca
parents:
diff changeset
  2511
    ^ self new
87bb1815460b initial checkin
ca
parents:
diff changeset
  2512
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2513
87bb1815460b initial checkin
ca
parents:
diff changeset
  2514
title:aTitle value:aValue
87bb1815460b initial checkin
ca
parents:
diff changeset
  2515
    ^ self title:aTitle value:aValue action:nil
87bb1815460b initial checkin
ca
parents:
diff changeset
  2516
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2517
87bb1815460b initial checkin
ca
parents:
diff changeset
  2518
title:aTitle value:aValue action:anAction
87bb1815460b initial checkin
ca
parents:
diff changeset
  2519
    ^ self new title:aTitle value:aValue action:anAction
87bb1815460b initial checkin
ca
parents:
diff changeset
  2520
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2521
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2522
!ViewTreeInspectorApplication::MenuDesc methodsFor:'accessing'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2523
87bb1815460b initial checkin
ca
parents:
diff changeset
  2524
title
87bb1815460b initial checkin
ca
parents:
diff changeset
  2525
    ^ title
87bb1815460b initial checkin
ca
parents:
diff changeset
  2526
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2527
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2528
!ViewTreeInspectorApplication::MenuDesc methodsFor:'building'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2529
87bb1815460b initial checkin
ca
parents:
diff changeset
  2530
asMenuItemWithTabulatorSpecification:aTabSpec
87bb1815460b initial checkin
ca
parents:
diff changeset
  2531
    |array|
87bb1815460b initial checkin
ca
parents:
diff changeset
  2532
87bb1815460b initial checkin
ca
parents:
diff changeset
  2533
    title isNil ifTrue:[ ^ MenuItem label:value ].     "/ separator
87bb1815460b initial checkin
ca
parents:
diff changeset
  2534
87bb1815460b initial checkin
ca
parents:
diff changeset
  2535
    array := Array with:(title, ':') with:'------'.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2536
87bb1815460b initial checkin
ca
parents:
diff changeset
  2537
    value notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2538
	array at:2 put:(value printString, ' ')
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2539
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2540
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2541
   ^ MenuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2542
	label:(MultiColListEntry fromStrings:array tabulatorSpecification:aTabSpec)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2543
	value:action
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2544
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2545
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2546
!ViewTreeInspectorApplication::MenuDesc methodsFor:'instance creation'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2547
87bb1815460b initial checkin
ca
parents:
diff changeset
  2548
title:aTitle value:aValue action:anAction
87bb1815460b initial checkin
ca
parents:
diff changeset
  2549
    "test for separator
87bb1815460b initial checkin
ca
parents:
diff changeset
  2550
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
  2551
    title  := aTitle withoutSeparators.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2552
    action := anAction.
87bb1815460b initial checkin
ca
parents:
diff changeset
  2553
87bb1815460b initial checkin
ca
parents:
diff changeset
  2554
    aValue notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2555
	value := aValue printString.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2556
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2557
	value size > 70 ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2558
	    value := value copyFrom:1 to:70.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2559
	    value := value, '...'
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2560
	]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2561
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  2562
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2563
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2564
!ViewTreeInspectorApplication::MenuDesc methodsFor:'queries'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2565
87bb1815460b initial checkin
ca
parents:
diff changeset
  2566
isSeparator
87bb1815460b initial checkin
ca
parents:
diff changeset
  2567
    ^ title isNil
87bb1815460b initial checkin
ca
parents:
diff changeset
  2568
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  2569
87bb1815460b initial checkin
ca
parents:
diff changeset
  2570
widthOn:aGC
87bb1815460b initial checkin
ca
parents:
diff changeset
  2571
    title isNil ifTrue:[^ 5].  "/ separator
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  2572
    ^ title widthOn:aGC
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2573
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2574
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2575
!ViewTreeInspectorApplication::ViewTreeItem class methodsFor:'building'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2576
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2577
buildMenuItemsFrom:aMenuItem
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2578
    "build the items starting from a source menu item;
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2579
     returns the anchor.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2580
    "
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2581
    |item subMenu subItems|
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2582
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2583
    aMenuItem isNil ifTrue:[^ nil].
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2584
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2585
    item     := self forMenuItem:aMenuItem.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2586
    subItems := OrderedCollection new.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2587
    (subMenu := aMenuItem submenuOrNil) notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2588
	subMenu items do:[:eachMenuItem |
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2589
	    subItems add:(self buildMenuItemsFrom:eachMenuItem)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2590
	].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2591
    ].
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2592
    item children:subItems.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2593
    ^ item
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2594
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2595
    "Created: / 16-08-2017 / 12:23:02 / cg"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2596
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2597
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2598
buildViewsFrom:aView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2599
    "build the items starting from a source view;
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2600
     returns the anchor.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2601
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2602
    |item subViews subItems|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2603
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2604
    aView isNil ifTrue:[^ nil].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2605
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2606
    item     := self forView:aView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2607
    subViews := aView subViews.
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2608
    subItems := OrderedCollection new.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2609
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2610
    subViews notEmptyOrNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2611
	subViews do:[:aSubView|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2612
	    subItems add:(self buildViewsFrom:aSubView).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2613
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2614
    ].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2615
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2616
    (aView isKindOf:MenuPanel) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2617
	(aView items ? #()) do:[:eachMenuItem |
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2618
	    subItems add:(self buildMenuItemsFrom:eachMenuItem)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2619
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2620
    ].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2621
    item children:subItems.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2622
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2623
    ^ item
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2624
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2625
    "Modified: / 16-08-2017 / 12:43:35 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2626
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2627
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2628
!ViewTreeInspectorApplication::ViewTreeItem class methodsFor:'documentation'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2629
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2630
documentation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2631
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2632
    ViewTreeItems represants a pickable object within a ViewTreeModel.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2633
    The class is used to build up the hierarchical tree.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2634
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2635
    [Instance variables:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2636
	widget        <View>            the widget represented by the item
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2637
	spec          <UISpecification> the UISpecification or nil
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2638
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2639
    [Class variables:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2640
	HandleExtent  <Point>           keeps the extent of a handle
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2641
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2642
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2643
    [author:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2644
	Claus Atzkern
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2645
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2646
    [see also:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2647
	HierarchicalItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2648
	ViewTreeModel
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2649
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2650
!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  2651
87bb1815460b initial checkin
ca
parents:
diff changeset
  2652
version
87bb1815460b initial checkin
ca
parents:
diff changeset
  2653
    ^ '$Header$'
87bb1815460b initial checkin
ca
parents:
diff changeset
  2654
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  2655
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2656
!ViewTreeInspectorApplication::ViewTreeItem class methodsFor:'initialization'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2657
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2658
initialize
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2659
    "set the extent of the Handle
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2660
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2661
    HandleExtent := 6@6.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2662
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2663
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2664
!ViewTreeInspectorApplication::ViewTreeItem class methodsFor:'instance creation'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2665
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2666
forMenuItem:aMenuItem
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2667
    |item|
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2668
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2669
    item := self basicNew initialize.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2670
    item forMenuItem:aMenuItem.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2671
    ^ item
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2672
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2673
    "Created: / 16-08-2017 / 12:07:55 / cg"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2674
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2675
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2676
forView:aView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2677
    |item|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2678
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2679
    item := self basicNew initialize.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2680
    item forView:aView.
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2681
    ^ item
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2682
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2683
    "Modified (format): / 16-08-2017 / 12:07:40 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2684
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2685
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2686
new
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2687
    self error:'not allowed'.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2688
  ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2689
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2690
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2691
on:aView withSpec:aSpec
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2692
    |item|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2693
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2694
    item := self basicNew initialize.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2695
    item on:aView withSpec:aSpec.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2696
  ^ item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2697
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2698
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2699
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'accessing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2700
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2701
applicationClass
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2702
    |appl|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2703
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2704
    widget notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2705
	appl := widget application.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2706
	appl notNil ifTrue:[^ appl class ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2707
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2708
    ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2709
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2710
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2711
isDrawnShown
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2712
    "returns true if the last display operations was done during the widget was shown
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2713
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2714
    ^ isDrawnShown
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2715
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2716
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2717
isDrawnShown:aBoolean
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2718
    isDrawnShown := aBoolean.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2719
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2720
3551
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  2721
isMenuItem
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  2722
    ^ menuItem notNil
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  2723
!
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  2724
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2725
menuItem
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2726
    ^ menuItem
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2727
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2728
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2729
parent:aParent
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2730
    super parent:aParent.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2731
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2732
    "Created: / 16-08-2017 / 12:40:26 / cg"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2733
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2734
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2735
rootView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2736
    "returns the widget assigned to the root or nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2737
    "
3216
41118d54b47c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3213
diff changeset
  2738
    parent isNil ifTrue:[^ nil].
41118d54b47c class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3213
diff changeset
  2739
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2740
    ^ parent rootView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2741
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2742
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2743
specClass
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2744
    "returns the spec-class assigned to the item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2745
    "
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2746
    widget isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2747
	^ MenuPanelSpec
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2748
    ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2749
    ^ widget specClass
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2750
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2751
    "Modified (format): / 16-08-2017 / 12:31:36 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2752
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2753
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2754
treeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2755
    "returns the assigned treeModel, an instance of ViewTreeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2756
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2757
    ^ parent treeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2758
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2759
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2760
widget
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2761
    "returns the widget assigned to the item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2762
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2763
    ^ widget
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2764
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2765
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2766
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'accessing layout'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2767
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2768
boundsRelativeToRoot
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2769
    "returns the bounds relative to the root widget
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2770
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2771
    ^ self originRelativeToRoot extent:(widget extent)
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2772
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2773
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2774
cornerRelativeToRoot
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2775
    "returns the corner relative to the root widget
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2776
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2777
    ^ self originRelativeToRoot + (widget extent)
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2778
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2779
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2780
extent
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2781
    "returns the extent of the widget
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2782
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2783
    ^ widget extent
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2784
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2785
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2786
layoutType
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2787
    "returns the type of layout assigned to the wiget; nil if the
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2788
     superView cannot resize its sub widgets
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2789
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2790
    |layout specClass superView|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2791
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2792
    (superView := widget superView) isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2793
	^ #Extent
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2794
    ].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2795
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2796
    specClass := superView specClass.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2797
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2798
    (specClass notNil and:[specClass isLayoutContainer]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2799
	^ specClass canResizeSubComponents ifTrue:[#Extent] ifFalse:[nil]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2800
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2801
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2802
    (layout := widget geometryLayout) isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2803
	^ #Extent
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2804
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2805
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2806
    layout isLayout ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2807
	layout isLayoutFrame        ifTrue:[ ^ #LayoutFrame ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2808
	layout isAlignmentOrigin    ifTrue:[ ^ #AlignmentOrigin ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2809
	layout isLayoutOrigin       ifTrue:[ ^ #LayoutOrigin ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2810
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2811
	layout isRectangle          ifTrue:[ ^ #Rectangle ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2812
	layout isPoint              ifTrue:[ ^ #Point ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2813
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2814
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2815
    Transcript showCR:'UNSUPPORTRD LAYOUT: ', layout printString.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2816
  ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2817
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2818
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2819
originRelativeToRoot
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2820
    "returns the origin relative to the root widget
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2821
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2822
    ^ widget originRelativeTo:(self rootView)
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2823
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2824
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2825
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'accessing optimize'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2826
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2827
children
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2828
    "redefined: optimize
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2829
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2830
    ^ children
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2831
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2832
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2833
hasChildren
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2834
    "not only a query; also builds"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2835
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2836
    |subViews list item subMenu|
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2837
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2838
    children isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2839
	isExpanded := false.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2840
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2841
	list := OrderedCollection new.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2842
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2843
	"/ it's either a widget or a menuItem
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2844
	widget notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2845
	    subViews := widget subViews.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2846
	    subViews notEmptyOrNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2847
		subViews do:[:aSubView|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2848
		    item := self class buildViewsFrom:aSubView.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2849
		    item parent:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2850
		    list add:item.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2851
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2852
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2853
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2854
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2855
	menuItem notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2856
	    (subMenu := menuItem submenuOrNil) notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2857
		subMenu items do:[:aSubItem|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2858
		    item := self class buildMenuItemsFrom:aSubItem.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2859
		    item parent:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2860
		    list add:item.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2861
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2862
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2863
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2864
	children := list.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2865
    ].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2866
    ^ children notEmpty
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2867
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2868
    "Modified: / 16-08-2017 / 12:27:23 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2869
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2870
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2871
size
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2872
    "redefined: returns list of children
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2873
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2874
    ^ children size
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2875
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2876
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2877
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'displaying'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2878
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2879
additionalLabelForItem:anItem
3017
d971763e5d03 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3014
diff changeset
  2880
    "answer an additional label for an Item"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2881
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2882
    parent notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2883
	^ parent additionalLabelForItem:anItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2884
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2885
    ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2886
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2887
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2888
displayIcon:anIcon atX:x y:y on:aGC
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2889
    |x0 y0 y1 w|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2890
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2891
    super displayIcon:anIcon atX:x y:y on:aGC.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2892
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2893
    self exists ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2894
	aGC paint:(Color red).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2895
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2896
	y0 := y + 1.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2897
	y1 := y + anIcon height - 2.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2898
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2899
	x0 := x - 1.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2900
	w  := anIcon width.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2901
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2902
	2 timesRepeat:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2903
	    aGC displayLineFromX:x0 y:y0 toX:(x0 + w) y:y1.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2904
	    aGC displayLineFromX:x0 y:y1 toX:(x0 + w) y:y0.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2905
	    x0 := x0 + 1.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2906
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2907
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2908
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2909
3184
7ff3f8fb0b79 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3183
diff changeset
  2910
displayOn:aGC x:x y:y h:h isHighlightedAsSelected:isHighlightedAsSelected
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2911
    |labelHeight additionalName label isValidAndShown|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2912
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2913
    label := self label.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2914
    label isEmptyOrNil ifTrue:[^ self].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2915
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2916
    widget isNil ifTrue:[
3674
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2917
        isValidAndShown := true.
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2918
    ] ifFalse:[
3674
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2919
        widget id isNil ifTrue:[
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2920
            isDrawnShown := false.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2921
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2922
            self exists ifFalse:[
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2923
                xOffsetAdditionalName := nil.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2924
            ].
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2925
            isValidAndShown := false.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2926
        ] ifFalse:[
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2927
            isValidAndShown := widget shown.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2928
        ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2929
    ].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2930
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2931
    isValidAndShown ifFalse:[
3674
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2932
        label := Text string:label emphasis:#italic.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2933
        label withColor:Color gray.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2934
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2935
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2936
    labelHeight := self heightOn:aGC.
3184
7ff3f8fb0b79 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3183
diff changeset
  2937
    self displayLabel:label h:labelHeight on:aGC x:x y:y h:h isHighlightedAsSelected:isHighlightedAsSelected.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2938
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2939
    xOffsetAdditionalName notNil ifTrue:[
3674
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2940
        additionalName := self additionalLabelForItem:self.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2941
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2942
        additionalName notNil ifTrue:[
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2943
            self displayLabel:additionalName
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2944
                            h:labelHeight on:aGC
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2945
                            x:(x + xOffsetAdditionalName) y:y
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2946
                            h:h.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2947
        ] ifFalse:[
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2948
            xOffsetAdditionalName := nil.
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2949
        ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2950
    ].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2951
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  2952
    "Modified (format): / 16-08-2017 / 12:57:39 / cg"
3674
693d13243c07 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
  2953
    "Modified: / 07-06-2019 / 22:14:30 / Claus Gittinger"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2954
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2955
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2956
recursiveAdditionalNameBehaviourChanged
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2957
    width := xOffsetAdditionalName := nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2958
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2959
    children notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2960
	children do:[:each| each recursiveAdditionalNameBehaviourChanged ]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2961
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2962
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2963
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2964
widthOn:aGC
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2965
    "return the width of the receiver, if it is to be displayed on aGC
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2966
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2967
    |additionalName|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2968
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2969
    width isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2970
	width := self widthOf:(self label) on:aGC.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2971
	width := width + 2.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2972
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2973
	additionalName := self additionalLabelForItem:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2974
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2975
	additionalName notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2976
	    xOffsetAdditionalName := width + 10.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2977
	    width := xOffsetAdditionalName + (self widthOf:additionalName on:aGC).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2978
	    width := width + 2.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2979
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2980
	    xOffsetAdditionalName := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2981
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2982
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2983
    ^ width
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2984
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2985
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2986
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'enumerating'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2987
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2988
handlesDo:aTwoArgAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2989
    "evaluate the two arg block on each handle; the arguments to the block is
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2990
     the rectangle relative to the rootView and the handle type which is
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2991
     set to nil if not resizeable.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2992
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  2993
     TYPES:     type    position( X - Y )
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2994
		-------------------------
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2995
		#LT     Left   - Top
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2996
		#LC     Left   - Center
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2997
		#LB     Left   - Bottom
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2998
		#CT     Center - Top
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  2999
		#CB     Center - Bottom
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3000
		#RT     Right  - Top
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3001
		#RC     Right  - Center
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3002
		#RB     Right  - Bottom
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3003
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3004
		nil     ** handle not pickable **
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3005
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3006
    |type relOrg relCrn maxExt rootView w h
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3007
     xL    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3008
     xC    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3009
     xR    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3010
     yT    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3011
     yC    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3012
     yB    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3013
    |
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3014
    rootView := self rootView.
3217
af9fd0c681e0 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3216
diff changeset
  3015
    rootView isNil ifTrue:[^ self ].
af9fd0c681e0 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3216
diff changeset
  3016
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3017
    widget isNil ifTrue:[^ self].
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3018
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3019
    relOrg   := widget originRelativeTo:rootView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3020
    relOrg isNil ifTrue:[ ^ self ].    "/ widget destroyed
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3021
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3022
    relOrg   := relOrg - (HandleExtent // 2).
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3023
    relCrn   := relOrg + widget extent.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3024
    maxExt   := rootView extent - HandleExtent.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3025
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3026
    xL := relOrg x max:0.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3027
    xR := relCrn x min:(maxExt x).
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3028
    xC := xR + xL // 2.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3029
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3030
    yT := relOrg y max:0.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3031
    yB := relCrn y min:(maxExt y).
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3032
    yC := yB + yT // 2.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3033
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3034
    type := self layoutType.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3035
    w   := HandleExtent x.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3036
    h   := HandleExtent y.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3037
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3038
    (type == #LayoutFrame or:[type == #Rectangle]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3039
	aTwoArgAction value:(Rectangle left:xL top:yT width:w height:h) value:#LT.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3040
	aTwoArgAction value:(Rectangle left:xL top:yC width:w height:h) value:#LC.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3041
	aTwoArgAction value:(Rectangle left:xL top:yB width:w height:h) value:#LB.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3042
	aTwoArgAction value:(Rectangle left:xC top:yT width:w height:h) value:#CT.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3043
	aTwoArgAction value:(Rectangle left:xC top:yB width:w height:h) value:#CB.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3044
	aTwoArgAction value:(Rectangle left:xR top:yT width:w height:h) value:#RT.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3045
	aTwoArgAction value:(Rectangle left:xR top:yC width:w height:h) value:#RC.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3046
	aTwoArgAction value:(Rectangle left:xR top:yB width:w height:h) value:#RB.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3047
      ^ self
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3048
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3049
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3050
    aTwoArgAction value:(Rectangle left:xL top:yT width:w height:h) value:nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3051
    aTwoArgAction value:(Rectangle left:xL top:yB width:w height:h) value:nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3052
    aTwoArgAction value:(Rectangle left:xR top:yT width:w height:h) value:nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3053
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3054
    type == #Extent ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3055
	aTwoArgAction value:(Rectangle left:xC top:yB width:w height:h) value:#CB.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3056
	aTwoArgAction value:(Rectangle left:xR top:yC width:w height:h) value:#RC.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3057
	aTwoArgAction value:(Rectangle left:xR top:yB width:w height:h) value:#RB.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3058
      ^ self
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3059
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3060
    aTwoArgAction value:(Rectangle left:xR top:yB width:w height:h) value:nil.
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3061
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3062
    "Modified: / 16-08-2017 / 13:04:27 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3063
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3064
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3065
recursiveEachVisibleItemDo:anOneArgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3066
    "recursive evaluate the block on each child which is visible
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3067
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3068
    (isExpanded and:[children size > 0]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3069
	children do:[:aChild|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3070
	    anOneArgBlock value:aChild.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3071
	    aChild recursiveEachVisibleItemDo:anOneArgBlock.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3072
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3073
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3074
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3075
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3076
subViewsDo:aOneArgBlock
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3077
    "evaluate aBlock for all subviews other than InputView's
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3078
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3079
    |subViews|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3080
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3081
    subViews := widget subViews.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3082
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3083
    subViews notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3084
	subViews do:aOneArgBlock
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3085
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3086
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3087
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3088
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'initialization'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3089
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3090
forMenuItem:aMenuItem
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3091
    menuItem := aMenuItem.
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3092
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3093
    "Created: / 16-08-2017 / 12:08:50 / cg"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3094
!
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3095
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3096
forView:aView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3097
    widget := aView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3098
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3099
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3100
initialize
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3101
    "setup default attributes
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3102
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3103
    super initialize.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3104
    isDrawnShown := false.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3105
    isExpanded   := false.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3106
    children     := OrderedCollection new.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3107
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3108
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3109
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'operations delete'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3110
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3111
delete
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3112
    "delete self and all contained items; the assigned views are destroyed
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3113
     in case of rootView, only the children are deleted
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3114
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3115
    parent isHierarchicalItem ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3116
	self criticalDo:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3117
	    parent remove:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3118
	    widget destroy.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3119
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3120
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3121
	self deleteAll
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3122
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3123
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3124
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3125
deleteAll
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3126
    "delete all contained items; the assigned views are destroyed
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3127
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3128
    children size == 0 ifTrue:[^ self].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3129
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3130
    self criticalDo:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3131
	self nonCriticalDo:[:el| el widget destroy ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3132
	self removeAll
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3133
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3134
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3135
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3136
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'operations layout'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3137
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3138
asLayoutFrame
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3139
    "convert the layout of the widget to a LayoutFrame;
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3140
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3141
    |extent layout newLyt lftFrc lftOff topFrc topOff|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3142
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3143
    layout := widget geometryLayout.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3144
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3145
    layout isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3146
	^ widget bounds asLayout
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3147
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3148
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3149
    layout isLayout ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3150
	layout isRectangle ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3151
	    ^ LayoutFrame leftOffset:(layout left) rightOffset:(layout right)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3152
			   topOffset:(layout top) bottomOffset:(layout bottom)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3153
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3154
	layout isPoint ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3155
	    extent := widget extent.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3156
	  ^ LayoutFrame leftOffset:(layout x)  rightOffset:(layout x + extent x)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3157
			 topOffset:(layout y) bottomOffset:(layout y + extent y)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3158
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3159
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3160
	Transcript showCR:'UNSUPPORTRD LAYOUT: ', layout printString.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3161
      ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3162
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3163
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3164
    layout isLayoutFrame ifTrue:[ ^ layout copy ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3165
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3166
    lftFrc := layout leftFraction.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3167
    lftOff := layout leftOffset.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3168
    topFrc := layout topFraction.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3169
    topOff := layout topOffset.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3170
    extent := widget extent.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3171
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3172
    newLyt := LayoutFrame leftFraction:lftFrc offset:lftOff
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3173
			 rightFraction:lftFrc offset:(lftOff + extent x)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3174
			   topFraction:topFrc offset:topOff
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3175
			bottomFraction:topFrc offset:(topOff + extent y).
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3176
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3177
    (      layout isAlignmentOrigin
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3178
     and:[(layout leftAlignmentFraction ~= 0 or:[layout topAlignmentFraction ~= 0])]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3179
    ) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3180
	|svRc prBd dlta|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3181
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3182
	svRc := widget superView viewRectangle.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3183
	prBd := widget preferredBounds.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3184
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3185
	dlta := (  ((layout rectangleRelativeTo:svRc preferred:prBd) corner)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3186
		 - ((newLyt rectangleRelativeTo:svRc preferred:prBd) corner)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3187
		) rounded.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3188
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3189
	newLyt   leftOffset:(lftOff + dlta x).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3190
	newLyt  rightOffset:(lftOff + extent x + dlta x).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3191
	newLyt    topOffset:(topOff + dlta y).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3192
	newLyt bottomOffset:(topOff + extent y + dlta y).
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3193
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3194
    ^ newLyt
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3195
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3196
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3197
moveLeft:l top:t
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3198
    "move the widget n pixele left and right
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3199
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3200
    |layout|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3201
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3202
    self isMoveable ifFalse:[ ^ self ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3203
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3204
    (layout := widget geometryLayout) isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3205
	"Extent"
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3206
	widget origin:(widget origin + (l@t)).
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3207
      ^ self
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3208
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3209
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3210
    layout := layout copy.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3211
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3212
    layout isLayout ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3213
	layout leftOffset:(layout leftOffset + l)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3214
		topOffset:(layout topOffset  + t).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3215
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3216
	layout isLayoutFrame ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3217
	    layout  rightOffset:(layout rightOffset  + l).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3218
	    layout bottomOffset:(layout bottomOffset + t).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3219
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3220
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3221
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3222
	layout isRectangle ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3223
	    layout setLeft:(layout left + l).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3224
	    layout  setTop:(layout top  + t).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3225
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3226
	    layout isPoint ifFalse:[^ self].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3227
	    layout x:(layout x + l) y:(layout y + t).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3228
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3229
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3230
    widget geometryLayout:layout.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3231
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3232
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3233
resizeLeft:l top:t right:r bottom:b
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3234
    "resize the widget measured in pixels
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3235
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3236
    |layout|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3237
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3238
    self isResizeable ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3239
	^ self
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3240
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3241
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3242
    (layout := widget geometryLayout) isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3243
	"Extent"
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3244
	(r == l and:[b == t]) ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3245
	    widget extent:(widget computeExtent + ((r-l) @ (b-t))).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3246
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3247
	^ self
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3248
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3249
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3250
    layout isLayout ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3251
	layout := layout copy.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3252
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3253
	layout leftOffset:(layout leftOffset + l)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3254
		topOffset:(layout topOffset  + t).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3255
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3256
	layout isLayoutFrame ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3257
	    layout bottomOffset:(layout bottomOffset + b).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3258
	    layout  rightOffset:(layout rightOffset  + r).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3259
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3260
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3261
	layout isRectangle ifFalse:[^ self].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3262
	layout := layout copy.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3263
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3264
	layout left:(layout left   + l)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3265
	      right:(layout right  + r)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3266
		top:(layout top    + t)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3267
	     bottom:(layout bottom + b).
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3268
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3269
    widget geometryLayout:layout.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3270
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3271
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3272
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'operations update'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3273
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3274
updateChildren
3209
c13a1f4f4ccb class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3186
diff changeset
  3275
    |queue|
c13a1f4f4ccb class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3186
diff changeset
  3276
3532
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3277
    queue := OrderedCollection with:self.
3209
c13a1f4f4ccb class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3186
diff changeset
  3278
c13a1f4f4ccb class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3186
diff changeset
  3279
    self criticalDo:[
3532
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3280
        [queue notEmpty] whileTrue:[
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3281
            |toRemove  elProcessed|
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3282
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3283
            elProcessed := queue removeFirst.
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3284
            toRemove := nil.
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3285
            elProcessed nonCriticalDo:[:el|
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3286
                el exists ifTrue:[
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3287
                    queue add:el.
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3288
                ] ifFalse:[
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3289
                    toRemove isNil ifTrue:[toRemove := OrderedCollection new].
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3290
                    toRemove add:el.
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3291
                ]
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3292
            ].
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3293
            toRemove notNil ifTrue:[
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3294
                toRemove do:[:el| elProcessed remove:el ].
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3295
            ].
12b7b904b5e1 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3525
diff changeset
  3296
        ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3297
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3298
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3299
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3300
updateFromChildren:mergedList
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3301
    "update my children against the list of items derived from
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3302
     the merged list.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3303
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3304
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3305
    mergedList size == 0 ifTrue:[ ^ self removeAll ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3306
    children   size == 0 ifTrue:[ ^ self addAll:mergedList ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3307
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3308
    self criticalDo:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3309
	self nonCriticalDo:[:el| |wdg|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3310
	    wdg := el widget.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3311
	    mergedList detect:[:e2| e2 widget == wdg ] ifNone:[ self remove:el ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3312
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3313
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3314
	mergedList keysAndValuesDo:[:i :el| |wdg e2|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3315
	    wdg := el widget.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3316
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3317
	    e2  := self at:i ifAbsent:nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3318
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3319
	    (e2 isNil or:[e2 widget ~~ wdg]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3320
		self add:el beforeIndex:i
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3321
	    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3322
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3323
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3324
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3325
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3326
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'printing & storing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3327
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3328
icon
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3329
    "get the icon used for presentation"
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3330
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3331
    |specClass model|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3332
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3333
    menuItem notNil ifTrue:[
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3334
        menuItem isSeparator ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3335
            (parent widget perform:#isVerticalLayout ifNotUnderstood:[^ DividerSpec icon]) ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3336
                ^ DividerSpec horizontalIcon.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3337
            ].    
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3338
            ^ DividerSpec verticalIcon.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3339
        ].    
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3340
        menuItem label isImage ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3341
            ^ menuItem label magnifiedTo:20@20.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3342
        ].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3343
    ].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3344
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3345
    specClass := self specClass.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3346
    specClass isNil ifTrue:[^ nil].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3347
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3348
    model := self treeModel.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3349
    model notNil ifTrue:[
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3350
        ^ model iconAt:specClass ifNonePut:[specClass icon]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3351
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3352
    ^ specClass icon
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3353
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3354
    "Modified: / 16-08-2017 / 13:00:35 / cg"
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  3355
    "Modified: / 27-05-2019 / 13:27:28 / Claus Gittinger"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3356
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3357
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3358
label
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3359
    "get the label used for presentation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3360
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3361
    ^ self string
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3362
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3363
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3364
printOn:aStream
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3365
    "append a a printed representation of the item to aStream
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3366
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3367
    aStream nextPutAll:(self string)
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3368
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3369
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3370
string
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3371
    "get the string
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3372
    "
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3373
    widget isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3374
	^ menuItem class name
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3375
    ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3376
    ^ widget class name.
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3377
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3378
    "Modified: / 16-08-2017 / 13:45:39 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3379
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3380
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3381
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'queries'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3382
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3383
canChangeLayout
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3384
    "returns true if the layout of the widget can be changed and the
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3385
     layout is not organized by its superView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3386
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3387
    ^ self isResizeable
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3388
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3389
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3390
canResizeSubComponents
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3391
    "returns true if the widget can resize its sub components
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3392
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3393
    |specClass|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3394
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3395
    specClass := self specClass.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3396
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3397
    specClass notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3398
	^ specClass canResizeSubComponents
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3399
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3400
    ^ false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3401
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3402
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3403
exists
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3404
    widget isNil ifTrue:[^ menuItem notNil].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3405
    widget id notNil ifTrue:[^ true ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3406
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3407
    exists ~~ false ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3408
	exists := false.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3409
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3410
	widget superView notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3411
	    (parent isHierarchicalItem and:[parent exists]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3412
		exists := (parent widget subViews includesIdentical:widget).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3413
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3414
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3415
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3416
    ^ exists
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3417
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3418
    "Modified: / 16-08-2017 / 12:47:50 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3419
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3420
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3421
isApplicationClass
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3422
    |cls|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3423
3551
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  3424
    widget isNil ifTrue:[^ false].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3425
    cls := widget class.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3426
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3427
    ^ (    cls == ApplicationSubView
3551
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  3428
        or:[cls == ApplicationWindow
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  3429
        or:[cls == SubCanvas]]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3430
      )
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3431
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3432
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3433
isSelected
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3434
    |model|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3435
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3436
    model := self treeModel.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3437
    model notNil ifTrue:[^ model isSelected:self].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3438
    ^ false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3439
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3440
3551
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  3441
isView
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  3442
    ^ widget notNil
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  3443
!
94a23bbd725b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3532
diff changeset
  3444
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3445
supportsSubComponents
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3446
    "returns true if the widget supports sub components
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3447
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3448
    |specClass|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3449
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3450
    widget isScrollWrapper ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3451
	^ false
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3452
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3453
    specClass := self specClass.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3454
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3455
    specClass notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3456
	^ specClass supportsSubComponents
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3457
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3458
    ^ false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3459
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3460
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3461
!ViewTreeInspectorApplication::ViewTreeItem methodsFor:'testing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3462
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3463
isInLayoutContainer
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3464
    "returns true if the widget is in a layout container
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3465
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3466
    |sv specClass|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3467
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3468
    sv := widget superView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3469
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3470
    sv notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3471
	specClass := sv specClass.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3472
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3473
	specClass notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3474
	    ^ specClass isLayoutContainer
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3475
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3476
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3477
    ^ false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3478
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3479
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3480
isLayoutContainer
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3481
    "answer whether corresponding view instances of the spec class can contain
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3482
     (and arrange) other view
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3483
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3484
    |specClass|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3485
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3486
    specClass := self specClass.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3487
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3488
    specClass notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3489
	^ specClass isLayoutContainer
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3490
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3491
    ^ false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3492
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3493
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3494
isMoveable
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3495
    "returns true if the widget is not in a layout container
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3496
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3497
    self isInLayoutContainer ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3498
	^ widget superView notNil
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3499
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3500
    ^ false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3501
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3502
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3503
isResizeable
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3504
    "returns true if the widget is resizeable
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3505
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3506
    |sv specClass|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3507
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3508
    sv := widget superView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3509
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3510
    sv notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3511
	specClass := sv specClass.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3512
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3513
	specClass notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3514
	    ^ specClass canResizeSubComponents
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3515
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3516
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3517
    ^ false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3518
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3519
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3520
!ViewTreeInspectorApplication::ViewTreeModel class methodsFor:'documentation'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3521
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3522
documentation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3523
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3524
    Instances of ViewTreeModel can be used as model on a View and all
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3525
    it contained subviews for a HierarchicalListView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3526
    The model keeps two values, the hierarchical representation of the views
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3527
    and subviews (ViewTreeItems) and the selection, a list of selected ViewTreeItems's.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3528
    It shows the selected items highlighted.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3529
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3530
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3531
    [Instance variables:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3532
	lockSema            <Semaphore>         lock selection notifications and redraws
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3533
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3534
	testModeChannel     <ValueHolder>       true, than running in test mode.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3535
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3536
	hasTargetWidgetChannel <ValueHolder>    true, than any target view is grapped
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3537
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3538
	selection           <Sequence or nil>   selected items or nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3539
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3540
	hiddenLevel         <Integer>           internal use; redrawing the selection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3541
						only is done if the counter is 0.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3542
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3543
	listOfItems         <HierarchicalList>  hiearchical list build from existing items.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3544
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3545
	selectedSuperItems  <Sequence>          list of selected super items; items selected
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3546
						but not contained in another selected item.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3547
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3548
	inputEventAction    <Action>            called for each InputEvent
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3549
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3550
	mappedViewAction    <Action>            called for a new mapped view which
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3551
						can not be found in the current item list.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3552
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3553
	beforeSelectionChangedAction <Action>   called before the selection changed
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3554
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3555
    [author:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3556
	Claus Atzkern
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3557
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3558
    [see also:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3559
	ViewTreeItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3560
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3561
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3562
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3563
examples
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3564
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3565
    example 1: pick any window and show views and contained views
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3566
										[exBegin]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3567
    |top sel model panel|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3568
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3569
    model := ViewTreeModel new.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3570
    top   := StandardSystemView new; extent:440@400.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3571
    sel   := ScrollableView for:HierarchicalListView miniScroller:true origin:0.0@0.0 corner:1.0@1.0 in:top.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3572
    sel bottomInset:24.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3573
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3574
    panel := HorizontalPanelView origin:0.0@1.0 corner:1.0@1.0 in:top.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3575
    panel topInset:-24.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3576
    panel horizontalLayout:#fitSpace.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3577
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3578
    Button label:'Exit'       action:[model rootItem:nil. top destroy] in:panel.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3579
    Button label:'Pick Views' action:[  |win|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3580
					(     (win := Screen current viewFromUser) notNil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3581
					 and:[(win := win topView) ~~ Screen current rootView
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3582
					 and:[win ~~ top]]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3583
					) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3584
					    model rootItem:(ViewTreeItem buildViewsFrom:win)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3585
					] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3586
					    model rootItem:nil
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3587
					]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3588
				     ] in:panel.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3589
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3590
    sel  multipleSelectOk:true.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3591
    sel              list:model listOfItems.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3592
    sel             model:model.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3593
    sel          useIndex:false.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3594
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3595
    sel doubleClickAction:[:i| |el|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3596
	el := model listOfItems at:i.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3597
	el spec notNil ifTrue:[ el spec   inspect ] ifFalse:[ el widget inspect ]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3598
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3599
    sel indicatorAction:[:i| (model listOfItems at:i) toggleExpand ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3600
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3601
    model inputEventAction:[:anEvent| |item|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3602
	anEvent isButtonEvent ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3603
	    anEvent isButtonPressEvent ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3604
		model selectedItem:(model listOfItems detectItemRespondsToView:(anEvent view)).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3605
	    ] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3606
		anEvent type == #'buttonMultiPress:x:y:' ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3607
		    (item := model selectedItem) notNil ifTrue:[item widget inspect]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3608
		]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3609
	    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3610
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3611
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3612
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3613
    top openAndWait.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3614
    [[top shown] whileTrue:[Delay waitForSeconds:0.5]. model rootItem:nil] forkAt:8
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3615
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3616
										[exEnd]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3617
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3618
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3619
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3620
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'accessing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3621
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3622
application:anApplication
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3623
    listOfItems application:anApplication.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3624
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3625
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3626
catchEvents:aBoolean
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3627
    catchEvents := aBoolean.
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3628
    aBoolean ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3629
	self redrawUnselected:selection andLock:false checkTestMode:false.
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3630
    ].
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3631
!
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3632
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3633
path
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3634
    "Return a XPath like path to this item"
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3635
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3636
    | view views|
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3637
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3638
    selection isNil ifTrue:[ ^ nil ].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3639
    selection isCollection ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3640
	selection size ~~ 1 ifTrue:[ ^ nil ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3641
	view := selection anElement widget.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3642
    ] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3643
	view := selection widget.
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3644
    ].
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3645
    view isNil ifTrue:[^ nil].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3646
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3647
    views := OrderedCollection new.
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3648
    [ view notNil ] whileTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3649
	views add: view.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3650
	view := view superView.
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3651
    ].
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3652
    views removeLast.
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3653
    ^ String streamContents:[ :s|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3654
	views reverseDo:[:each |
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3655
	    s nextPutAll:'/'.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3656
	    s nextPutAll: each name asString "storeString".
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3657
	].
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3658
    ]
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3659
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3660
    "Created: / 19-05-2014 / 18:15:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  3661
    "Modified: / 16-08-2017 / 13:03:47 / cg"
3112
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3662
!
80453ab62df9 Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3105
diff changeset
  3663
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3664
rootItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3665
    "get the rootItem the event viewer is established on
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3666
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3667
    ^ listOfItems root
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3668
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3669
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3670
rootItem:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3671
    "set the rootItem the event viewer is established on
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3672
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3673
    |expanded|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3674
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3675
    timedUpdateTask := nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3676
    self deselect.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3677
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3678
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3679
	anItem notNil ifTrue:[ expanded := anItem isExpanded ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3680
		     ifFalse:[ expanded := false ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3681
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3682
	self value:nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3683
	listOfItems root:anItem.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3684
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3685
	anItem notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3686
	    timedUpdateTask := Process for:[ self timedUpdateTaskCycle ] priority:8.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3687
	    timedUpdateTask name:'Update'.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3688
	    timedUpdateTask resume.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3689
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3690
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3691
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3692
    (expanded and:[anItem notNil]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3693
	anItem expand
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3694
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3695
    ^ anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3696
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3697
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3698
rootView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3699
    "get the top widget the event viewer is established on, a View
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3700
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3701
    ^ listOfItems rootView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3702
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3703
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3704
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'accessing actions'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3705
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3706
beforeSelectionChangedAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3707
    "none argument action which is called before
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3708
     the selection changed
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3709
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3710
    ^ beforeSelectionChangedAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3711
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3712
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3713
beforeSelectionChangedAction:aNoneArgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3714
    "none argument action which is called before
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3715
     the selection changed
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3716
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3717
    beforeSelectionChangedAction := aNoneArgBlock.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3718
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3719
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3720
inputEventAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3721
    "called for each input event; the argument to the action is the WindowEvent
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3722
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3723
    ^ inputEventAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3724
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3725
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3726
inputEventAction:aOneArgActionTheEvent
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3727
    "called for each input event; the argument to the action is the WindowEvent
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3728
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3729
    inputEventAction := aOneArgActionTheEvent.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3730
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3731
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3732
mappedViewAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3733
    "called for a new mapped view which can not be found
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3734
     in the current item list
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3735
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3736
    ^ mappedViewAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3737
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3738
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3739
mappedViewAction:aOneArgBlockTheMappedView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3740
    "called for a new mapped view which can not be found
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3741
     in the current item list
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3742
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3743
    mappedViewAction := aOneArgBlockTheMappedView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3744
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3745
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3746
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'accessing look'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3747
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3748
iconAt:aKey ifNonePut:aNoneArgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3749
    |icon view|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3750
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3751
    icon := icons at:aKey ifAbsent:nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3752
    icon notNil ifTrue:[^ icon].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3753
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3754
    icon := aNoneArgBlock value.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3755
    icon isNil ifTrue:[^ nil].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3756
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3757
    view := self rootView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3758
    view isNil ifTrue:[^ icon].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3759
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3760
    icon := icon copy onDevice:(view device).
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3761
    icon isImage ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3762
	icon clearMaskedPixels.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3763
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3764
    icons at:aKey put:icon.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3765
    ^ icon
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3766
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3767
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3768
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'accessing visibility'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3769
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3770
signalHiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3771
    "show the selection if signaled; increments hiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3772
     see: #waitHiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3773
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3774
    (hiddenLevel := hiddenLevel - 1) < 1 ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3775
	hiddenLevel := 0.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3776
	self invalidateSelection.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3777
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3778
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3779
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3780
waitHiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3781
    "hide the selection until signaled; increments hiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3782
     see: #signalHiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3783
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3784
    self redrawUnselected:selection andLock:true
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3785
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3786
3453
01e6b207c1b4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3398
diff changeset
  3787
withSelectionHiddenDo:aZeroArgumentBlock
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3788
    "apply block with selection hidden
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3789
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3790
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3791
    [
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3792
	self waitHiddenLevel.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3793
	aZeroArgumentBlock value
3453
01e6b207c1b4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3398
diff changeset
  3794
    ] ensure:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3795
	self signalHiddenLevel.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3796
    ].
3453
01e6b207c1b4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3398
diff changeset
  3797
01e6b207c1b4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3398
diff changeset
  3798
    "Modified (format): / 17-07-2017 / 10:44:01 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3799
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3800
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3801
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'aspects'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3802
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3803
hasTargetWidgetChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3804
    "answer the channel which is set to true if a target widget exists"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3805
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3806
    ^ hasTargetWidgetChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3807
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3808
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3809
listOfItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3810
    "hiearchical list build from existing items"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3811
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3812
    ^ listOfItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3813
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3814
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3815
selectOnClickHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3816
    "boolean holder, which indicates whether the selection will change on click
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3817
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3818
    ^ selectOnClickHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3819
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3820
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3821
testModeChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3822
    "answer a boolean channel which describes the behaviour how to process
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3823
     events on the target view.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3824
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3825
     false: all input events are eaten and the selection is shown on the target view.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3826
     true:  no  input events are eaten and no  selection is shown on the target view."
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3827
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3828
    ^ testModeChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3829
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3830
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3831
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'change & update'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3832
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3833
targetWidgetChanged
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3834
    hasTargetWidgetChannel value:(self rootItem notNil).
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3835
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3836
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3837
timedUpdateTaskCycle
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3838
    |view myTaskId|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3839
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3840
    myTaskId := timedUpdateTask.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3841
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3842
    listOfItems root notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3843
	view := listOfItems root widget.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3844
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3845
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3846
    [ view notNil ] whileTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3847
	Delay waitForSeconds:0.5.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3848
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3849
	(myTaskId == timedUpdateTask and:[view id notNil]) ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3850
	    view := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3851
	] ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3852
	    (view sensor hasUserEvent:#updateChildren for:self) ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3853
		view sensor pushUserEvent:#updateChildren for:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3854
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3855
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3856
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3857
    timedUpdateTask == myTaskId ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3858
	timedUpdateTask := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3859
	listOfItems root:nil.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3860
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3861
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3862
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3863
update:something with:someArgument from:aModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3864
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3865
    aModel == testModeChannel ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3866
	(hiddenLevel == 0 and:[selection size > 0]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3867
	    testModeChannel value ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3868
		self redrawUnselected:selection andLock:false checkTestMode:false.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3869
	    ] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3870
		self invalidateSelection.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3871
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3872
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3873
	^ self
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3874
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3875
    super update:something with:someArgument from:aModel.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3876
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3877
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3878
updateChildren
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3879
    |rootItem|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3880
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3881
    rootItem := listOfItems root.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3882
    rootItem isNil ifTrue:[^ self].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3883
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3884
    rootItem exists ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3885
	listOfItems root:nil.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3886
    ] ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3887
	rootItem updateChildren.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3888
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3889
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3890
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3891
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'event processing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3892
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3893
processEvent:anEvent
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3894
    "catch and process all WindowEvents for the rootComponent and its contained
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
  3895
     widgets; redraw selection in case of damage...
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
  3896
     return true, if the event was eaten"
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
  3897
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3898
    |evView item rootView testMode|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3899
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3900
    catchEvents ifFalse:[^ false].
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3901
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3902
    evView := anEvent view.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3903
    evView isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3904
	(anEvent isMessageSendEvent not or:[anEvent receiver ~~ self]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3905
	    ^ false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3906
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3907
	anEvent value.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3908
	^ true.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3909
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3910
    rootView := listOfItems rootView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3911
    rootView isNil ifTrue:[ ^ false ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3912
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3913
    anEvent isConfigureEvent ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3914
	hiddenLevel == 0 ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3915
	    self redrawUnselected:selection andLock:false.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3916
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3917
	^ false
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3918
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3919
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3920
    "/ check whether view is contained within the rootView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3921
    (evView == rootView or:[evView isComponentOf:rootView]) ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3922
	^ false
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3923
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3924
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3925
    anEvent isInputEvent ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3926
	anEvent isDamage ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3927
	    hiddenLevel == 0 ifTrue:[self invalidateSelection].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3928
	    ^ false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3929
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3930
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3931
	anEvent isMapEvent ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3932
	    mappedViewAction notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3933
		item := listOfItems recursiveDetect:[:el| el widget == evView].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3934
		item isNil ifTrue:[ mappedViewAction value:evView ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3935
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3936
	    ^ false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3937
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3938
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3939
	anEvent type == #terminate ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3940
	    item := listOfItems recursiveDetect:[:el| el widget == evView].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3941
	    item notNil ifTrue:[ self processTerminateForItem:item ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3942
	    ^ false
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3943
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3944
	^ false
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3945
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3946
    testMode := testModeChannel value.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3947
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3948
    anEvent isFocusEvent ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3949
	evView == rootView ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3950
	    self invalidateSelection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3951
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3952
	^ testMode not.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3953
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3954
    anEvent isPointerEnterLeaveEvent ifTrue:[ ^ testMode not ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3955
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3956
    testMode ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3957
	inputEventAction notNil ifTrue:[ inputEventAction value:anEvent ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3958
    ] ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3959
	anEvent isButtonPressEvent ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3960
	    selectOnClickHolder value ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3961
		self selectItem:(listOfItems detectItemRespondsToView:evView).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3962
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3963
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3964
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3965
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3966
    (hiddenLevel ~~ 0 and:[anEvent isButtonReleaseEvent]) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3967
	hiddenLevel := 1.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  3968
	self signalHiddenLevel.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3969
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3970
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3971
    ^ testMode not
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3972
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3973
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3974
processTerminateForItem:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3975
    "received terminate for an item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3976
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3977
    anItem remove.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3978
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3979
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3980
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'initialization'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3981
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3982
initialize
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3983
    "setup the default attributes
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3984
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3985
    super initialize.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3986
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3987
    hiddenLevel           := 0.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3988
    lockSema              := RecursionLock new.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3989
    listOfItems           := ItemList new on:self.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3990
    selectedSuperItems    := #().
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3991
    icons                 := IdentityDictionary new.
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  3992
    catchEvents           := true.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3993
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3994
    hasTargetWidgetChannel := false asValue.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3995
    selectOnClickHolder    := true asValue.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3996
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3997
    testModeChannel := false asValue.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3998
    testModeChannel addDependent:self.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  3999
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4000
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4001
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'private selection'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4002
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4003
invalidateSelection
3319
97fd83492529 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3302
diff changeset
  4004
    "invalidate (force async redraw) the current selection
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4005
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4006
    |topView|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4007
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4008
    testModeChannel value ifTrue:[ ^ self ]. "/ test whether running testMode
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4009
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4010
    (     hiddenLevel == 0
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4011
     and:[selection notNil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4012
     and:[(topView := listOfItems rootView) notNil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4013
     and:[topView shown]]]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4014
    ) ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4015
	topView sensor pushUserEvent:#redrawSelection for:self withArguments:#()
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4016
    ]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4017
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4018
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4019
recursiveRepair:theDamages startIn:aView relativeTo:aRootView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4020
    "repair all views and contained views, which intersects the damage.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4021
     !!!! all damages repaired are removed from the list of damages !!!!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4022
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4023
    |color relOrg damage subViews repaired
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4024
     bwWidth    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4025
     x          "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4026
     y          "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4027
     w          "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4028
     h          "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4029
     relOrgX    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4030
     relOrgY    "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4031
     width      "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4032
     height     "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4033
     size       "{ Class:SmallInteger }"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4034
    |
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4035
    (aView shown and:[theDamages notEmpty]) ifFalse:[ ^ self ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4036
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4037
    subViews := aView subViews.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4038
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4039
    subViews size ~~ 0 ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4040
	subViews reverseDo:[:v| self recursiveRepair:theDamages startIn:v relativeTo:aRootView ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4041
	theDamages isEmpty ifTrue:[ ^ self ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4042
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4043
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4044
    relOrg  := aView originRelativeTo:aRootView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4045
    bwWidth := aView borderWidth.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4046
    size    := theDamages size.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4047
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4048
    "/ compute relative origin starting from border left@top
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4049
    relOrgX := relOrg x - bwWidth.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4050
    relOrgY := relOrg y - bwWidth.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4051
    width   := aView width  + bwWidth + bwWidth.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4052
    height  := aView height + bwWidth + bwWidth.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4053
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4054
    size to:1 by:-1 do:[:anIndex|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4055
	repaired := damage := theDamages at:anIndex.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4056
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4057
	"/ compute the rectangle into the view
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4058
	y := damage top  - relOrgY.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4059
	x := damage left - relOrgX.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4060
	w := damage width.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4061
	h := damage height.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4062
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4063
	x     < 0      ifTrue:[ w := w + x. x := 0. repaired := nil ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4064
	y     < 0      ifTrue:[ h := h + y. y := 0. repaired := nil ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4065
	x + w > width  ifTrue:[ w := width  - x.    repaired := nil ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4066
	y + h > height ifTrue:[ h := height - y.    repaired := nil ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4067
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4068
	(w > 0 and:[h > 0]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4069
	    bwWidth ~~ 0 ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4070
		color isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4071
		    "/ must force redraw of border
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4072
		    color := aView borderColor.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4073
		    aView borderColor:(Color colorId:1).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4074
		    aView borderColor:color.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4075
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4076
		w := w - bwWidth.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4077
		h := h - bwWidth.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4078
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4079
		(x := x - bwWidth) < 0 ifTrue:[w := w + x. x := 0].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4080
		(y := y - bwWidth) < 0 ifTrue:[h := h + y. y := 0].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4081
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4082
		h > 0 ifFalse:[w := 0].         "/ later testing on width only
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4083
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4084
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4085
	    w > 0 ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4086
		aView clearRectangleX:x y:y width:w height:h.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4087
		aView exposeX:x y:y width:w height:h
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4088
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4089
	    repaired notNil ifTrue:[ theDamages removeFromIndex:anIndex toIndex:anIndex ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4090
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4091
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4092
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4093
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4094
redrawSelection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4095
    "redraw all items selected
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4096
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4097
    |topView size|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4098
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4099
    testModeChannel value ifTrue:[ ^ self ]. "/ test whether running testMode
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4100
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4101
    (     hiddenLevel == 0
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4102
     and:[(size := selection size) > 0
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4103
     and:[(topView := listOfItems rootView) notNil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4104
     and:[topView shown
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4105
     and:[(topView sensor hasEvent:#redrawSelection for:self) not]]]]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4106
    ) ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4107
	^ self
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4108
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4109
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4110
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4111
	|list|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4112
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4113
	list := selection.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4114
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4115
	list size > 0 ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4116
	    topView paint:(Color black).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4117
	    topView clippedByChildren:false.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4118
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4119
	    list keysAndValuesReverseDo:[:anIndex :anItem|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4120
		(anIndex == 1 and:[size > 1]) ifTrue:[ topView paint:(Color red) ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4121
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4122
		anItem handlesDo:[:aRect :what|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4123
		    what isNil ifTrue:[topView displayRectangle:aRect]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4124
			      ifFalse:[topView fillRectangle:aRect]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4125
		]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4126
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4127
	    topView clippedByChildren:true.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4128
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4129
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4130
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4131
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4132
redrawUnselected:aList andLock:doLock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4133
    "redraw all items unselected; if doLock is true, the hiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4134
     is incremented and thus the select mechanism is locked.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4135
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4136
    self redrawUnselected:aList andLock:doLock checkTestMode:true.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4137
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4138
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4139
redrawUnselected:aList andLock:doLock checkTestMode:checkTestMode
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4140
    "redraw all items unselected; if doLock is true, the hiddenLevel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4141
     is incremented and thus the select mechanism is locked.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4142
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4143
    |rootView damages subViews x y w h|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4144
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4145
    doLock ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4146
	hiddenLevel := hiddenLevel + 1.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4147
	hiddenLevel ~~ 1 ifTrue:[^ self].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4148
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4149
	hiddenLevel ~~ 0 ifTrue:[^ self].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4150
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4151
    checkTestMode ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4152
	testModeChannel value ifTrue:[ ^ self ]. "/ test whether running testMode
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4153
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4154
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4155
    (     aList size ~~ 0
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4156
     and:[(rootView := listOfItems rootView) notNil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4157
     and:[rootView shown]]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4158
    ) ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4159
	^ self
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4160
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4161
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4162
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4163
	damages := OrderedCollection new:(8 * aList size).
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4164
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4165
	aList do:[:item|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4166
	    item handlesDo:[:handle :what|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4167
		damages reverseDo:[:el|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4168
		    (el intersects:handle) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4169
			damages removeIdentical:el.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4170
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4171
			handle left:(handle left   min:el left)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4172
			      right:(handle right  max:el right)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4173
				top:(handle top    min:el top)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4174
			     bottom:(handle bottom max:el bottom)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4175
		    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4176
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4177
		damages add:handle
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4178
	    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4179
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4180
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4181
	damages do:[:el|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4182
	    x := el left.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4183
	    y := el top.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4184
	    w := el width.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4185
	    h := el height.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4186
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4187
	    rootView clearRectangleX:x y:y width:w height:h.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4188
	    rootView         exposeX:x y:y width:w height:h.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4189
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4190
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4191
	(subViews := rootView subViews) notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4192
	    subViews reverseDo:[:v| self recursiveRepair:damages startIn:v relativeTo:rootView ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4193
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4194
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4195
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4196
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4197
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'queries'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4198
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4199
isInTestMode
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4200
    "answer false, all input events are eaten and the selection is shown on the target view.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4201
     answer true,  no  input events are eaten and no  selection is shown on the target view."
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4202
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4203
    ^ testModeChannel value
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4204
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4205
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4206
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection accessing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4207
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4208
at:anIndex
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4209
    "returns the selected item at an index or nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4210
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4211
    selection notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4212
	^ selection at:anIndex ifAbsent:nil
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4213
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4214
    ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4215
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4216
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4217
at:anIndex ifAbsent:aBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4218
    "returns the selected item at an index or the result of the block
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4219
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4220
    selection notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4221
	^ selection at:anIndex ifAbsent:aBlock
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4222
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4223
    ^ aBlock value
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4224
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4225
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4226
first
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4227
    "returns the first selected item or nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4228
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4229
    ^ self at:1
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4230
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4231
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4232
last
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4233
    "returns the last selected item or nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4234
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4235
    ^ selection notNil ifTrue:[selection last] ifFalse:[nil]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4236
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4237
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4238
selectedItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4239
    "returns the single selected item or nil (size ~~ 1 nil is returned)
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4240
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4241
    ^ selection size == 1 ifTrue:[selection at:1] ifFalse:[nil]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4242
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4243
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4244
selectedSuperItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4245
    "returs the list of selected superItems; items selected
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4246
     but not contained in another selected item.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4247
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4248
    ^ selectedSuperItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4249
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4250
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4251
size
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4252
    "returns the number of items selected
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4253
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4254
    ^ selection size
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4255
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4256
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4257
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection adding & removing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4258
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4259
add:item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4260
    "add an item to the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4261
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4262
    |newSelect|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4263
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4264
    item isNil ifTrue:[^ item].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4265
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4266
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4267
	selection isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4268
	    newSelect := Array with:item.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4269
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4270
	    (self includes:item) ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4271
		newSelect := selection copyWith:item
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4272
	    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4273
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4274
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4275
	newSelect size ~~ selection size ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4276
	    item makeVisible.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4277
	    self value:newSelect
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4278
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4279
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4280
    ^ item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4281
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4282
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4283
addAll:aCollectionOfItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4284
    "add a collection of items to the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4285
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4286
    |newSelect|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4287
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4288
    aCollectionOfItems size == 0 ifTrue:[ ^ aCollectionOfItems ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4289
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4290
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4291
	selection isNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4292
	    newSelect := Array withAll:aCollectionOfItems.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4293
	] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4294
	    newSelect := OrderedCollection withAll:selection.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4295
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4296
	    aCollectionOfItems do:[:el|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4297
		(selection includesIdentical:el) ifFalse:[newSelect add:el]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4298
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4299
	].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4300
	self value:newSelect.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4301
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4302
    ^ aCollectionOfItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4303
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4304
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4305
deselect
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4306
    "clear the selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4307
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4308
    self value:nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4309
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4310
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4311
remove:item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4312
    "remove the item from the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4313
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4314
    |newSelect|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4315
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4316
    item isNil ifTrue:[^ nil].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4317
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4318
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4319
	(selection notNil and:[selection includesIdentical:item]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4320
	    selection size == 1 ifTrue:[ newSelect := nil ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4321
			       ifFalse:[ newSelect := selection copyWithout:item ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4322
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4323
	    self value:newSelect
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4324
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4325
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4326
    ^ item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4327
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4328
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4329
removeAll
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4330
    "clear the selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4331
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4332
    self deselect.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4333
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4334
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4335
removeAll:loItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4336
    "remove all items of the collection from the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4337
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4338
    |newSelect|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4339
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4340
    selection   isNil ifTrue:[ ^ loItems ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4341
    loItems size == 0 ifTrue:[ ^ loItems ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4342
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4343
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4344
	selection notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4345
	    newSelect := selection select:[:el| (loItems includesIdentical:el) not ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4346
	    self value:newSelect.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4347
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4348
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4349
    ^ loItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4350
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4351
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4352
selectAll
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4353
    "select all items
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4354
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4355
    |root newSelection|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4356
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4357
    root := listOfItems root.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4358
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4359
    root isNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4360
	newSelection := nil
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4361
    ] ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4362
	newSelection := OrderedCollection new.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4363
	root recursiveDo:[:el| newSelection add:el ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4364
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4365
    self value:newSelection.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4366
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4367
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4368
selectItem:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4369
    "set the current selection to the item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4370
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4371
    self value:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4372
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4373
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4374
selectRootItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4375
    "set the current selection to the root item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4376
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4377
    self value:(self rootItem).
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4378
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4379
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4380
selectedItem:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4381
    "set the current selection to the item
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4382
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4383
    self selectItem:anItem.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4384
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4385
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4386
toggleSelectItem:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4387
    "toggle selection-state of the item; add or remove the item from the
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4388
     current selection.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4389
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4390
    anItem notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4391
	(self includes:anItem) ifTrue:[self remove:anItem]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4392
			      ifFalse:[self add:anItem]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4393
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4394
    ^ anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4395
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4396
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4397
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection enumerating'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4398
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4399
collect:aBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4400
    "for each element in the selection, evaluate the argument, aBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4401
     and return a new collection with the results
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4402
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4403
    |res|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4404
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4405
    res := OrderedCollection new.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4406
    self do:[:el| res add:(aBlock value:el)].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4407
  ^ res
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4408
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4409
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4410
do:aOneArgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4411
    "evaluate the argument, aBlock for each item in the selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4412
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4413
    |keptSelection|
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4414
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4415
    "/ the selection may change at any time (may it?)
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4416
    (keptSelection := selection) isNil ifTrue:[^ nil].
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4417
    ^ keptSelection do:aOneArgBlock
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4418
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4419
    "Modified (format): / 12-02-2017 / 11:53:23 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4420
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4421
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4422
from:start do:aOneArgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4423
    "evaluate the argument, aBlock for the items starting at index start
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4424
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4425
    |keptSelection|
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4426
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4427
    "/ the selection may change at any time (may it?)
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4428
    (keptSelection := selection) isNil ifTrue:[^ nil].
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4429
    "/ but if so, then start may no longer be valid here??
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4430
    ^ keptSelection from:start do:aOneArgBlock
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4431
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4432
    "Modified (comment): / 12-02-2017 / 11:52:57 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4433
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4434
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4435
from:start to:stop do:aOneArgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4436
    "evaluate the argument, aBlock for the items with index start to
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4437
     stop in the selection.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4438
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4439
    |keptSelection|
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4440
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4441
    "/ the selection may change at any time (may it?)
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4442
    (keptSelection := selection) isNil ifTrue:[^ nil].
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4443
    "/ but if so, then start and stop may no longer be valid here??
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4444
    ^ keptSelection from:start to:stop do:aOneArgBlock
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4445
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4446
    "Modified (comment): / 12-02-2017 / 11:52:25 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4447
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4448
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4449
reverseDo:aOneArgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4450
    "evaluate the argument, aBlock for each item in the selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4451
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4452
    |keptSelection|
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4453
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4454
    "/ the selection may change at any time (may it?)
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4455
    (keptSelection := selection) isNil ifTrue:[^ nil].
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4456
    ^ keptSelection reverseDo:aOneArgBlock
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4457
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4458
    "Modified: / 12-02-2017 / 11:50:02 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4459
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4460
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4461
select:aBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4462
    "return a new collection with all elements from the selection, for which
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4463
     the argument aBlock evaluates to true.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4464
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4465
    |res|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4466
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4467
    res := OrderedCollection new.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4468
    self do:[:el| (aBlock value:el) ifTrue:[res add:el] ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4469
  ^ res
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4470
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4471
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4472
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection protocol'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4473
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4474
changed:aParameter with:oldSelection
3568
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4475
    "update the visibility status of the current selection
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4476
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4477
    |unselected rootView rootItem selSize|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4478
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4479
    selSize := selection size.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4480
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4481
    selSize == 0 ifTrue:[
3568
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4482
        selectedSuperItems := #().
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4483
    ] ifFalse:[
3568
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4484
        selSize == 1 ifTrue:[
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4485
            selectedSuperItems := Array with:(selection at:1).
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4486
        ] ifFalse:[
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4487
            rootItem := listOfItems root.
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4488
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4489
            (selection includesIdentical:rootItem) ifTrue:[
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4490
                selectedSuperItems := Array with:rootItem.
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4491
            ] ifFalse:[
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4492
                selectedSuperItems := OrderedCollection new:selSize.
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4493
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4494
                selection do:[:anItem|
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4495
                    anItem parentsDetect:[:el| selection includesIdentical:el ]
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4496
                                  ifNone:[ selectedSuperItems add:anItem ].
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4497
                ].
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4498
            ]
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4499
        ]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4500
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4501
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4502
    (     hiddenLevel == 0
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4503
     and:[(rootView := listOfItems rootView) notNil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4504
     and:[rootView shown]]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4505
    ) ifTrue:[
3568
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4506
        selSize == 0 ifTrue:[
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4507
            "/ must redraw the old selection unselected
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4508
            self redrawUnselected:oldSelection andLock:false
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4509
        ] ifFalse:[
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4510
            self invalidateSelection.
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4511
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4512
            oldSelection size ~~ 0 ifTrue:[
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4513
                "/ must redraw all elements no longer in the selection
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4514
                unselected := oldSelection select:[:el| (selection includesIdentical:el) not ].
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4515
                self redrawUnselected:unselected andLock:false.
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4516
            ]
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4517
        ]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4518
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4519
    super changed:aParameter with:oldSelection.
3568
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4520
5004640f2a10 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  4521
    "Modified (comment): / 29-06-2018 / 08:25:36 / Claus Gittinger"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4522
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4523
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4524
setValue:aNewSelection
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4525
    "set the selection without notifying
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4526
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4527
    |newSelect idx|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4528
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4529
    newSelect := nil.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4530
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4531
    aNewSelection notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4532
	lockSema critical:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4533
	    aNewSelection isCollection ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4534
		(selection size == 1 and:[selection first == aNewSelection]) ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4535
		    newSelect := selection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4536
		] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4537
		    newSelect := Array with:aNewSelection.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4538
		]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4539
	    ] ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4540
		aNewSelection notEmpty ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4541
		    aNewSelection size ~~ selection size ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4542
			newSelect := aNewSelection copy.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4543
		    ] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4544
			idx := selection findFirst:[:el| (aNewSelection includesIdentical:el) not ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4545
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4546
			idx ~~ 0 ifTrue:[newSelect := aNewSelection copy]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4547
				ifFalse:[newSelect := selection ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4548
		    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4549
		]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4550
	    ]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4551
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4552
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4553
    newSelect ~~ selection ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4554
	beforeSelectionChangedAction value.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4555
	selection := newSelect.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4556
	selection notNil ifTrue:[selection do:[:el| el makeVisible]]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4557
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4558
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4559
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4560
triggerValue:aValue
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4561
    "set my value & send change notifications to my dependents.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4562
     Send the change message even if the value didn't change.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4563
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4564
    |oldSelection|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4565
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4566
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4567
	oldSelection := selection.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4568
	self setValue:aValue.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4569
	self changed:#value with:oldSelection
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4570
    ]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4571
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4572
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4573
value
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4574
    "returns the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4575
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4576
    ^ selection ? #()
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4577
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4578
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4579
value:aValue
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4580
    "change the current selection and send change notifications to my
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4581
     dependents if it changed.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4582
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4583
    |oldSelection|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4584
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4585
    lockSema critical:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4586
	oldSelection := selection.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4587
	self setValue:aValue.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4588
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4589
	oldSelection == selection ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4590
	    self changed:#value with:oldSelection
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4591
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4592
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4593
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4594
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4595
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection searching'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4596
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4597
detect:aBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4598
    "evaluate the argument, aBlock for each item in the selection until
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4599
     the block returns true; in this case return the element which caused
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4600
     the true evaluation.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4601
     If none of the evaluations returns true, an error is raised
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4602
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4603
    ^ self detect:aBlock ifNone:[self errorNotFound]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4604
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4605
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4606
detect:aBlock ifNone:exceptionBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4607
    "evaluate the argument, aBlock for each item in the selection until the
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4608
     block returns true; in this case return the element which caused the
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4609
     true evaluation.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4610
     If none of the evaluations returns true, the result of the evaluation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4611
     of the exceptionBlock is returned
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4612
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4613
    |keptSelection|
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4614
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4615
    "/ the selection may change at any time (may it?)
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4616
    (keptSelection := selection) isNil ifTrue:[ ^ exceptionBlock value ].
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4617
    ^ keptSelection detect:aBlock ifNone:exceptionBlock
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4618
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4619
    "Modified (format): / 12-02-2017 / 11:54:13 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4620
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4621
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4622
detectLast:aBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4623
    "evaluate the argument, aBlock for each item in the selection until
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4624
     the block returns true; in this case return the element which caused
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4625
     the true evaluation. The items are processed in reverse order.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4626
     If none of the evaluations returns true, an error is raised
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4627
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4628
    ^ self detectLast:aBlock ifNone:[self errorNotFound]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4629
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4630
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4631
detectLast:aBlock ifNone:exceptionBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4632
    "evaluate the argument, aBlock for each item in the selection until
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4633
     the block returns true; in this case return the element which caused
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4634
     the true evaluation. The items are processed in reverse order.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4635
     If none of the evaluations returns true, the result of the evaluation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4636
     of the exceptionBlock is returned
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4637
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4638
    |keptSelection|
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4639
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4640
    "/ the selection may change at any time (may it?)
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4641
    (keptSelection := selection) isNil ifTrue:[ ^ exceptionBlock value ].
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4642
    ^ keptSelection detectLast:aBlock ifNone:exceptionBlock
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4643
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4644
    "Modified (format): / 12-02-2017 / 11:53:49 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4645
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4646
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4647
!ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection testing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4648
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4649
includes:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4650
    "returns true if the item is in the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4651
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4652
    |keptSelection|
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4653
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4654
    "/ the selection may change at any time (may it?)
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4655
    (keptSelection := selection) isNil ifTrue:[^ false].
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4656
    ^ keptSelection includesIdentical:anItem
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4657
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4658
    "Modified: / 12-02-2017 / 11:51:34 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4659
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4660
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4661
includesAll:aCollection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4662
    "return true, if all items of the collection are included in the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4663
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4664
    |keptSelection|
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4665
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4666
    aCollection size ~~ 0 ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4667
	"/ the selection may change at any time (may it?)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4668
	(keptSelection := selection) isNil ifTrue:[ ^ false ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4669
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4670
	^ aCollection contains:[:el| (keptSelection includesIdentical:el)]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4671
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4672
    ^ true
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4673
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4674
    "Modified (format): / 12-02-2017 / 11:51:14 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4675
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4676
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4677
includesAny:aCollection
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4678
    "return true, if any item of the collection is in the current selection
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4679
    "
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4680
    |keptSelection|
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4681
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4682
    aCollection notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4683
	"/ the selection may change at any time (may it?)
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4684
	(keptSelection := selection) notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4685
	    ^ aCollection contains:[:el| (keptSelection includesIdentical:el)]
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4686
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4687
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4688
    ^ false
3398
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4689
9c87da351c9c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  4690
    "Modified (format): / 12-02-2017 / 11:50:26 / cg"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4691
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4692
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4693
includesIdentical:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4694
    "returns true if the item is in the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4695
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4696
    ^ self includes:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4697
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4698
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4699
isEmpty
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4700
    "returns true if the current selection is empty
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4701
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4702
    ^ selection size == 0
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4703
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4704
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4705
isSelected:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4706
    "returns true if the item is in the current selection
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4707
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4708
    ^ self includes:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4709
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4710
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4711
notEmpty
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4712
    "returns true if the current selection is not empty
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4713
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4714
    ^ selection size ~~ 0
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4715
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4716
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4717
!ViewTreeInspectorApplication::ViewTreeModel::ItemList class methodsFor:'documentation'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4718
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4719
documentation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4720
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4721
    Kind of HierarchicalList class which contains all the visible
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4722
    ViewTreeItem's and the root, the anchor of the hierarchical list.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4723
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4724
    [Instance variables:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4725
	treeModel       <ViewTreeModel>         all events are delegated to
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4726
	eventHook       <BlockValue>            save and resore the pre/post -EventHook
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4727
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4728
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4729
    [author:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4730
	Claus Atzkern
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4731
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4732
    [see also:]
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4733
	HierarchicalList
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4734
	ViewTreeModel
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4735
	ViewTreeItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4736
"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4737
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4738
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4739
!ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'accessing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4740
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4741
root:theRoot
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4742
    "set the root item; delegate events to my treeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4743
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4744
    |rootView|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4745
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4746
    theRoot == root ifTrue:[^ self].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4747
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4748
    rootView := self rootView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4749
    super root:theRoot.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4750
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4751
    rootView notNil ifTrue:[ |wgrp|
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4752
	wgrp := rootView windowGroup.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4753
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4754
	wgrp notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4755
	   wgrp removePreEventHook:treeModel.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4756
	   wgrp removePostEventHook:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4757
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4758
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4759
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4760
    super root:theRoot.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4761
    rootView := self rootView.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4762
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4763
    rootView notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4764
	"must setup a task because there might not exist a windowGroup at the moment
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4765
	"
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4766
	[   |wgrp|
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4767
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4768
	    [rootView == self rootView] whileTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4769
		wgrp := rootView windowGroup.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4770
		wgrp notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4771
		    rootView := nil.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4772
		    wgrp addPreEventHook:treeModel.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4773
		    wgrp addPostEventHook:self.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4774
		] ifFalse:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4775
		    Delay waitForMilliseconds:100.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4776
		].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4777
	    ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4778
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4779
	] forkAt:(Processor userSchedulingPriority + 2).
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4780
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4781
    treeModel notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4782
	treeModel targetWidgetChanged.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4783
    ].
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4784
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4785
    ^ root.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4786
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4787
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4788
rootView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4789
    "returns the widget assigned to the root or nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4790
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4791
    ^ root notNil ifTrue:[root widget] ifFalse:[nil]
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4792
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4793
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4794
treeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4795
    "returne the treeModel, a ViewTreeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4796
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4797
    ^ treeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4798
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4799
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4800
!ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'accessing look'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4801
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4802
additionalLabelForItem:anItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4803
    "answer the additional lable for an item or nil"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4804
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4805
    |widget l applClass applClassName key label|
3017
d971763e5d03 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3014
diff changeset
  4806
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  4807
    l := nil.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4808
    showWidgetNames == true ifTrue:[
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4809
        (widget := anItem widget) notNil ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4810
            l := '"', widget name, '"'
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4811
        ] ifFalse:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4812
            "/ a menuItem
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4813
            anItem menuItem isSeparator ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4814
            ] ifFalse:[    
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4815
                label := anItem menuItem label.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4816
                label isImage ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4817
                    l := ''
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4818
                ] ifFalse:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4819
                    l := '"', label asString, '"'
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4820
                ].
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4821
                l := l , ' value: ',anItem menuItem itemValue printString.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4822
            ].
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4823
        ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4824
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4825
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4826
    anItem isApplicationClass ifTrue:[
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4827
        applClass := anItem applicationClass.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4828
        applClass notNil ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4829
            applClassName := '[', applClass name allBold, ']'.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4830
            l := (l isNil ifTrue:[''] ifFalse:[l , ' ']) , applClassName
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4831
        ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4832
    ].
3017
d971763e5d03 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3014
diff changeset
  4833
d971763e5d03 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3014
diff changeset
  4834
    application notNil ifTrue:[
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4835
        key := application builder namedComponents keyAtValue:widget ifAbsent:nil.
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4836
        key notNil ifTrue:[
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4837
            l := l , ' #',key
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4838
        ].
3017
d971763e5d03 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3014
diff changeset
  4839
    ].
d971763e5d03 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3014
diff changeset
  4840
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  4841
    ^ l
3456
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  4842
4d4297bad4fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3453
diff changeset
  4843
    "Modified: / 16-08-2017 / 12:47:12 / cg"
3667
0b24b3e8c949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
  4844
    "Modified: / 27-05-2019 / 13:19:35 / Claus Gittinger"
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4845
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4846
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4847
showWidgetNames
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4848
    "answer true if the additional text is the widget name
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4849
     otherwise the name of the application"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4850
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  4851
    ^ showWidgetNames ? true
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4852
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4853
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4854
showWidgetNames:aBoolean
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4855
    "set true if the additional text is the widget name
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4856
     otherwise the name of the application"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4857
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4858
    self showWidgetNames == aBoolean ifFalse:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4859
	showWidgetNames := aBoolean.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4860
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4861
	root notNil ifTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4862
	    root recursiveAdditionalNameBehaviourChanged.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4863
	    self changed.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4864
	].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4865
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4866
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4867
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4868
!ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'event processing'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4869
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4870
processEvent:anEvent
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4871
    "post process event
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4872
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4873
    ^ treeModel isInTestMode not
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4874
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4875
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4876
!ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'instance creation'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4877
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4878
on:aModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4879
    "set the model, a ViewTreeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4880
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4881
    treeModel := aModel.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4882
    showRoot  := true.
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  4883
    "/ showWidgetNames := false.
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
  4884
    showWidgetNames := true.
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4885
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4886
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4887
!ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'searching'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4888
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4889
detectItemRespondsToView:aView
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4890
    "returns the bottom-most item which contains the view
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4891
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4892
    |view item topView|
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4893
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4894
    root notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4895
	view    := aView.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4896
	topView := root widget.
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4897
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4898
	[ view notNil ] whileTrue:[
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4899
	    topView == view ifTrue:[^ root].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4900
	    item := root recursiveDetect:[:el| el widget == view ].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4901
	    item notNil ifTrue:[^ item].
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4902
	    view := view superView
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4903
	]
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4904
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4905
    ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4906
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4907
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4908
recursiveDetect:aOneOrgBlock
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4909
    "recursive find the first child, for which evaluation
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4910
     of the block returns true; if none nil is returned
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4911
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4912
    root notNil ifTrue:[
3524
366f04fbfb23 flyByHelpSpec -> helpSpec
Claus Gittinger <cg@exept.de>
parents: 3500
diff changeset
  4913
	(aOneOrgBlock value:root) ifTrue:[ ^ root ].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4914
      ^ root recursiveDetect:aOneOrgBlock
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4915
    ].
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4916
    ^ nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4917
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4918
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4919
!ViewTreeInspectorApplication class methodsFor:'documentation'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4920
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4921
version
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4922
    ^ '$Header$'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4923
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4924
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4925
version_CVS
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4926
    ^ '$Header$'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4927
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4928
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
  4929
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4930
ViewTreeInspectorApplication initialize!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  4931
ViewTreeInspectorApplication::ViewTreeItem initialize!