Tools__ViewTreeApplication.st
author Claus Gittinger <cg@exept.de>
Wed, 31 Jul 2013 13:13:51 +0200
changeset 3040 b62c4b71910c
parent 3037 876c28de42da
child 3049 292d06e8b7ae
permissions -rw-r--r--
class: Tools::ViewTreeInspectorApplication changed: #submenuInspector: #submenuInterface:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2748
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     1
"
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     2
 COPYRIGHT (c) 2007 by eXept Software AG
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     3
              All Rights Reserved
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     4
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     5
 This software is furnished under a license and may be used
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     6
 only in accordance with the terms of that license and with the
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     8
 be provided or otherwise made available to, or used by, any
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
     9
 other person.  No title to or ownership of the software is
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    10
 hereby transferred.
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    11
"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    12
"{ Package: 'stx:libtool2' }"
87bb1815460b initial checkin
ca
parents:
diff changeset
    13
87bb1815460b initial checkin
ca
parents:
diff changeset
    14
"{ NameSpace: Tools }"
87bb1815460b initial checkin
ca
parents:
diff changeset
    15
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    16
ToolApplicationModel subclass:#ViewTreeInspectorApplication
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    17
	instanceVariableNames:'model treeView hasSingleSelectionHolder clickedItem clickedPoint
2770
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
    18
		motionAction process followFocusChannel showNamesHolder
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
    19
		inspectorView inspectorModeIndexHolder'
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    20
	classVariableNames:''
87bb1815460b initial checkin
ca
parents:
diff changeset
    21
	poolDictionaries:''
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    22
	category:'Interface-Smalltalk'
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    23
!
87bb1815460b initial checkin
ca
parents:
diff changeset
    24
87bb1815460b initial checkin
ca
parents:
diff changeset
    25
Object subclass:#MenuDesc
87bb1815460b initial checkin
ca
parents:
diff changeset
    26
	instanceVariableNames:'title value action'
87bb1815460b initial checkin
ca
parents:
diff changeset
    27
	classVariableNames:''
87bb1815460b initial checkin
ca
parents:
diff changeset
    28
	poolDictionaries:''
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    29
	privateIn:ViewTreeInspectorApplication
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    30
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    31
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    32
HierarchicalItem subclass:#ViewTreeItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    33
	instanceVariableNames:'widget isDrawnShown exists xOffsetAdditionalName'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    34
	classVariableNames:'HandleExtent'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    35
	poolDictionaries:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    36
	privateIn:ViewTreeInspectorApplication
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    37
!
87bb1815460b initial checkin
ca
parents:
diff changeset
    38
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    39
ValueModel subclass:#ViewTreeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    40
	instanceVariableNames:'lockSema selectedSuperItems selection hiddenLevel listOfItems
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    41
		inputEventAction mappedViewAction beforeSelectionChangedAction
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    42
		icons timedUpdateTask selectOnClickHolder testModeChannel
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
    43
		hasTargetWidgetChannel catchEvents'
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    44
	classVariableNames:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    45
	poolDictionaries:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    46
	privateIn:ViewTreeInspectorApplication
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    47
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    48
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    49
HierarchicalList subclass:#ItemList
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    50
	instanceVariableNames:'treeModel eventHook eventHookInitialized showWidgetNames'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    51
	classVariableNames:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    52
	poolDictionaries:''
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    53
	privateIn:ViewTreeInspectorApplication::ViewTreeModel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    54
!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    55
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    56
!ViewTreeInspectorApplication class methodsFor:'documentation'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    57
2748
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    58
copyright
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    59
"
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    60
 COPYRIGHT (c) 2007 by eXept Software AG
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    61
              All Rights Reserved
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
 This software is furnished under a license and may be used
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    64
 only in accordance with the terms of that license and with the
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    65
 inclusion of the above copyright notice.   This software may not
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    66
 be provided or otherwise made available to, or used by, any
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    67
 other person.  No title to or ownership of the software is
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    68
 hereby transferred.
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    69
"
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    70
!
76f6fd319918 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
    71
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    72
documentation
87bb1815460b initial checkin
ca
parents:
diff changeset
    73
"
87bb1815460b initial checkin
ca
parents:
diff changeset
    74
     Small application showing a ViewTreeModel use.
87bb1815460b initial checkin
ca
parents:
diff changeset
    75
87bb1815460b initial checkin
ca
parents:
diff changeset
    76
     It displays a hierarchical list of a selected TopView and
87bb1815460b initial checkin
ca
parents:
diff changeset
    77
     all its contained subViews.
87bb1815460b initial checkin
ca
parents:
diff changeset
    78
     Useful to have a look at subcomponents - to see how views
87bb1815460b initial checkin
ca
parents:
diff changeset
    79
     are structured.
87bb1815460b initial checkin
ca
parents:
diff changeset
    80
87bb1815460b initial checkin
ca
parents:
diff changeset
    81
87bb1815460b initial checkin
ca
parents:
diff changeset
    82
    [Instance variables:]
87bb1815460b initial checkin
ca
parents:
diff changeset
    83
        model           <ViewTreeModel>      the used ViewTreeModel
87bb1815460b initial checkin
ca
parents:
diff changeset
    84
        clickedItem     <ViewTreeItem>       item under the clickedPoint (motion action)
87bb1815460b initial checkin
ca
parents:
diff changeset
    85
        clickedPoint    <Point>              point where the motion action started from.
87bb1815460b initial checkin
ca
parents:
diff changeset
    86
        motionAction    <Action>             (oneArg-) action called durring buttonMotion.
87bb1815460b initial checkin
ca
parents:
diff changeset
    87
87bb1815460b initial checkin
ca
parents:
diff changeset
    88
87bb1815460b initial checkin
ca
parents:
diff changeset
    89
    [author:]
87bb1815460b initial checkin
ca
parents:
diff changeset
    90
        Claus Atzkern
87bb1815460b initial checkin
ca
parents:
diff changeset
    91
87bb1815460b initial checkin
ca
parents:
diff changeset
    92
    [see also:]
87bb1815460b initial checkin
ca
parents:
diff changeset
    93
        ViewTreeModel
87bb1815460b initial checkin
ca
parents:
diff changeset
    94
        ViewTreeItem
87bb1815460b initial checkin
ca
parents:
diff changeset
    95
"
87bb1815460b initial checkin
ca
parents:
diff changeset
    96
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
    97
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
    98
!ViewTreeInspectorApplication class methodsFor:'initialization'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
    99
87bb1815460b initial checkin
ca
parents:
diff changeset
   100
initialize
87bb1815460b initial checkin
ca
parents:
diff changeset
   101
    "add myself to the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   102
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   103
    self installInLauncher.
87bb1815460b initial checkin
ca
parents:
diff changeset
   104
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   105
87bb1815460b initial checkin
ca
parents:
diff changeset
   106
installInLauncher
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   107
    "add myself to the launcher menu"
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   108
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   109
    |menuItem icon|
87bb1815460b initial checkin
ca
parents:
diff changeset
   110
87bb1815460b initial checkin
ca
parents:
diff changeset
   111
    NewLauncher isNil ifTrue:[^ self].
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   112
    "/ cg - disabled. the icon is too ugly.
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   113
    ^ self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   114
87bb1815460b initial checkin
ca
parents:
diff changeset
   115
    icon := ToolbarIconLibrary inspectLocals20x20Icon magnifiedTo:28@28.
87bb1815460b initial checkin
ca
parents:
diff changeset
   116
87bb1815460b initial checkin
ca
parents:
diff changeset
   117
    menuItem := MenuItem new 
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   118
                    label: 'View Tree Inspector';
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   119
                    value: [ ViewTreeInspectorApplication open];
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   120
                    isButton: true;
87bb1815460b initial checkin
ca
parents:
diff changeset
   121
                    icon: icon;
87bb1815460b initial checkin
ca
parents:
diff changeset
   122
                    nameKey: #viewInspect.
87bb1815460b initial checkin
ca
parents:
diff changeset
   123
87bb1815460b initial checkin
ca
parents:
diff changeset
   124
    menuItem startGroup:#right.
87bb1815460b initial checkin
ca
parents:
diff changeset
   125
    NewLauncher addMenuItem:menuItem in:'toolbar'
87bb1815460b initial checkin
ca
parents:
diff changeset
   126
                   position:#( #before #help)
87bb1815460b initial checkin
ca
parents:
diff changeset
   127
                      space:false.
87bb1815460b initial checkin
ca
parents:
diff changeset
   128
87bb1815460b initial checkin
ca
parents:
diff changeset
   129
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   130
self installInLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   131
self removeFromLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   132
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   133
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   134
87bb1815460b initial checkin
ca
parents:
diff changeset
   135
postAutoload
87bb1815460b initial checkin
ca
parents:
diff changeset
   136
    "add myself to the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   137
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   138
    self installInLauncher.
87bb1815460b initial checkin
ca
parents:
diff changeset
   139
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   140
self installInLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   141
self removeFromLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   142
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   143
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   144
87bb1815460b initial checkin
ca
parents:
diff changeset
   145
removeFromLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   146
    "remove myself from the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   147
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   148
    NewLauncher isNil ifTrue:[^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
   149
    NewLauncher removeUserTool:#viewInspect
87bb1815460b initial checkin
ca
parents:
diff changeset
   150
87bb1815460b initial checkin
ca
parents:
diff changeset
   151
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   152
self installInLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   153
self removeFromLauncher
87bb1815460b initial checkin
ca
parents:
diff changeset
   154
"
87bb1815460b initial checkin
ca
parents:
diff changeset
   155
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   156
87bb1815460b initial checkin
ca
parents:
diff changeset
   157
unload
87bb1815460b initial checkin
ca
parents:
diff changeset
   158
    "class is about to be unloaded - remove myself from the launcher menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   159
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   160
    self removeFromLauncher.
87bb1815460b initial checkin
ca
parents:
diff changeset
   161
    super unload.
87bb1815460b initial checkin
ca
parents:
diff changeset
   162
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   163
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   164
!ViewTreeInspectorApplication class methodsFor:'image specs'!
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   165
2759
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   166
crossHairIcon
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   167
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   168
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   169
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   170
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   171
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   172
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   173
    "
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   174
     self crossHairIcon inspect
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   175
     ImageEditor openOnClass:self andSelector:#crossHairIcon
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   176
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   177
    "
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   178
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   179
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   180
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   181
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   182
        constantNamed:'Tools::ViewTreeInspectorApplication class crossHairIcon'
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   183
        ifAbsentPut:[(Depth1Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@F0@@XL@@>>@A8O@A>?@B,Z B(J @@@@B(J B,Z A>?@A8O@@>>@@XL@@F0@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[255 255 255 0 0 0]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G0@@_<@@?>@A??@C?? C?? G??0G<_0G<_0G<_0G??0C?? C?? A??@@?>@@_<@@G0@@@@@@@@@@@@@@@@@') ; yourself); yourself]
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   184
!
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   185
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   186
pickWindowIcon
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   187
    "This resource specification was automatically generated
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   188
     by the ImageEditor of ST/X."
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   189
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   190
    "Do not manually edit this!! If it is corrupted,
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   191
     the ImageEditor may not be able to read the specification."
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   192
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   193
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   194
     self pickWindowIcon inspect
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   195
     ImageEditor openOnClass:self andSelector:#pickWindowIcon
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   196
     Icon flushCachedIcons
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   197
    "
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   198
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   199
    <resource: #image>
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   200
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   201
    ^Icon
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   202
        constantNamed:'Tools::ViewTreeInspectorApplication class pickWindowIcon'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   203
        ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   204
,;N3,;N3,;N3,;N3,;N3,;N3,;N3,3H<P38;M3P,H2@^GA(VEQHQCP0KA D<[&-%XU=WST%BN#D!!GQ$TD@(IBP\BQF)+Z6E_U4-FPCX+G1,WEA@JBP$HAT23
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   205
,;N3,;N3,;N3,;N$():Z&IRR&1!!^,;N3,;N3,;N3,;N$)JJ^&)"T$),0W[N3,;N3,;N3,;N3,:R"'')*X%IJWK523,;N3,;N3,0@@@KN3)JJ^&)"T$"5Z,;N3
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   206
,;N3@@B3-KL@@JJ^&)"T$)D*V[N3,;N3@KN3-KR4)JH@&)"T$)*MJE"3,;N3,0B3)JJ4&*R"@I*X%IJZ#RYV,;N3,0B3@JR"-JR"-I(@%IJV%H %U[N3,;L@
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   207
-@B4-KR4-KR4@IRR%IJEIER3,;N3@KL@)JJ4():4&@BO#9RR!!RIS,;N3,;L@,:R"-JJ^& BT#8>O#8H"T+N3,;N3@KN$@@@@'')(@%H>O#(>AH%F3,;N3,;L@
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   208
@JR4'' @@%IJO#8>O RIO,;N3,;N3):P@@@BX%IJO#8>O#7<"S*63,;N$():Z&IRR&IRR#8>O#8=>H"&-,;N$():Z&IRR&)"T$(>O#8>O @<)R$!!GQTD?OS$8
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   209
MSL.I2H"H"H"H"HO,;N3,;N3,;N3,;N3,;N3,;N3,;N3,0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 0 50 164 0 50 171 0 137 0 0 206 0 1 50 177 2 56 178 3 64 241 3 67 246 3 73 255 4 74 255 5 63 191 7 66 194 10 71 196 10 79 255 12 59 167 12 82 255 14 77 199 18 83 201 19 88 255 21 91 255 23 89 204 27 95 206 28 97 255 29 72 179 30 100 255 32 101 209 36 106 255 36 107 211 39 109 255 41 113 214 45 115 255 45 119 216 48 118 255 50 87 176 50 125 219 51 88 176 51 88 177 52 89 178 52 90 178 53 90 178 53 127 212 54 91 179 54 123 255 54 131 221 55 92 180 55 95 181 56 93 180 56 94 181 57 127 255 57 149 229 58 99 184 58 137 224 61 104 187 63 132 255 63 143 226 64 108 190 66 113 193 66 135 255 67 149 229 68 157 232 69 117 196 71 155 231 72 122 199 72 141 255 75 126 202 75 144 255 75 160 234 77 163 236 78 131 206 80 149 255 81 136 209 84 140 212 84 153 255 87 145 215 88 157 255 91 168 235 93 161 255 94 154 222 96 157 223 96 165 255 97 159 225 98 160 225 98 162 226 99 163 227 100 165 228 101 166 229 101 170 255 102 167 230 103 169 231 104 170 232 104 173 255 105 172 233 105 174 234 106 175 235 109 178 255 112 180 255 117 186 255 119 187 255 122 154 245 125 160 253 125 193 255 126 161 253 126 194 255 127 162 254 130 165 254 132 200 255 132 201 255 133 60 36 135 170 255 139 207 255 140 175 255 144 179 255 149 184 255 153 188 255 157 192 255 162 196 255 166 200 255 170 204 255 174 208 255 174 218 230 177 212 255 181 215 255 185 219 255 188 222 255 191 225 255 212 211 224 218 217 230 219 219 230 220 220 231 222 221 232 223 223 233 225 224 234 225 225 234 226 226 237 227 226 235 227 227 236 227 227 238 228 228 237 229 229 239 231 230 238 231 231 238 231 231 240 232 232 241 233 232 239 233 233 240 234 234 242 235 234 241 236 236 243 237 236 242 237 237 244 238 237 243 238 238 244 239 238 243 239 239 245 240 239 244 241 240 245 241 241 246 241 241 247 242 242 246 242 242 247 243 243 247 243 243 248 244 244 248 244 244 249 245 244 247 246 246 249 246 246 250 247 246 249 247 247 250 248 248 251 249 249 250 249 249 251 250 250 251 250 250 252 251 251 252 251 251 253 253 253 254 254 254 255 255 255 255 0 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C????????????????????????????????????????????????????????????????????????????????@@@C') ; yourself); yourself]
2759
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   210
!
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   211
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   212
pickWindowIcon2
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   213
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   214
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   215
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   216
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   217
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   218
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   219
    "
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   220
     self pickWindowIcon2 inspect
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   221
     ImageEditor openOnClass:self andSelector:#pickWindowIcon2
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   222
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   223
    "
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   224
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   225
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   226
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   227
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   228
        constantNamed:'Tools::ViewTreeInspectorApplication class pickWindowIcon2'
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   229
        ifAbsentPut:[(Depth8Image new) width: 22; height: 23; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   230
@CH<O#,7MB0#HA8\F!!XUD!!DMC@,F@P@<[&U!!W5]MRTH:LRD]FQPPB $IA0H@QF)+XU=WR4Y@M",_F1\TD@(IBP E@D23,;N3,;N3,;N3,;N"'')*X%IJ[F@A^
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   231
,;N3,;N3,0@@@@@@():Z&IRR&3@@W+N3,;N3@@B3,0B3)@@@&)"T$),0@E63,;N3@KN3@@@@@@B"'' BX%IJWK0A\,;N3@KN3,;N3@JR"'')*X@IRR&24@V+N3
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   232
@KN3,;L@@@@@@I:Z&IP@$),*@E&3,0B3,;N3,:P@():Z&IRT@IJ[J@AX,0B3@KL@,;L@@@B^& BT@IP@&2X@U+L@,0B3@KL@)JJ^@I @%@BT@I,%@EV3@@@@
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   233
@@@@@JR"'' @@@@@@@@B[I@AT,0B3@KL@)@B$()8@&@BZ@IP@&2H@T;L@,0B3@JR$@@@@%I @& BT@I,"@EJ3,0B3,:R$)I8@&IRX%I*X@IJ[H AQ,;L@,:R$
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   234
)@@@@@@@&IRO#0BO RH@S;N3,0B$)JR"'' BX%I"T#0BO#7<"@D:-,;N$@JR$@@@@@@BR#0BO#8=>H AN+[N$)JH@@I"T@I"T@@BO#8>O_"H@JZ63)JJ^&) @
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   235
@@@@@IJO#8>O#8@O@B&3,;N3,;N3,;N3,;N"'')*X%IJ[C0@)R$]EPS<=NS 5L28''H"H"H"H"H <b') ; colorMapFromArray:#[0 0 0 0 50 164 0 50 171 0 137 0 0 206 0 1 50 177 2 56 178 3 64 241 3 67 246 3 73 255 4 74 255 5 63 191 7 66 194 10 71 196 10 79 255 12 59 167 12 82 255 14 77 199 18 83 201 19 88 255 21 91 255 23 89 204 27 95 206 28 97 255 29 72 179 30 100 255 32 101 209 36 106 255 36 107 211 39 109 255 41 113 214 45 115 255 45 119 216 48 118 255 50 87 176 50 125 219 51 88 176 51 88 177 52 89 178 52 90 178 53 90 178 53 127 212 54 91 179 54 123 255 54 131 221 55 92 180 55 95 181 56 93 180 56 94 181 57 127 255 57 149 229 58 99 184 58 137 224 61 104 187 63 132 255 63 143 226 64 108 190 66 113 193 66 135 255 67 149 229 68 157 232 69 117 196 71 155 231 72 122 199 72 141 255 75 126 202 75 144 255 75 160 234 77 163 236 78 131 206 80 149 255 81 136 209 84 140 212 84 153 255 87 145 215 88 157 255 91 168 235 93 161 255 94 154 222 96 157 223 96 165 255 97 159 225 98 160 225 98 162 226 99 163 227 100 165 228 101 166 229 101 170 255 102 167 230 103 169 231 104 170 232 104 173 255 105 172 233 105 174 234 106 175 235 109 178 255 112 180 255 117 186 255 119 187 255 122 154 245 125 160 253 125 193 255 126 161 253 126 194 255 127 162 254 130 165 254 132 200 255 132 201 255 133 60 36 135 170 255 139 207 255 140 175 255 144 179 255 149 184 255 153 188 255 157 192 255 162 196 255 166 200 255 170 204 255 174 208 255 174 218 230 177 212 255 181 215 255 185 219 255 188 222 255 191 225 255 212 211 224 218 217 230 219 219 230 220 220 231 222 221 232 223 223 233 225 224 234 225 225 234 226 226 237 227 226 235 227 227 236 227 227 238 228 228 237 229 229 239 231 230 238 231 231 238 231 231 240 232 232 241 233 232 239 233 233 240 234 234 242 235 234 241 236 236 243 237 236 242 237 237 244 238 237 243 238 238 244 239 238 243 239 239 245 240 239 244 241 240 245 241 241 246 241 241 247 242 242 246 242 242 247 243 243 247 243 243 248 244 244 248 244 244 249 245 244 247 246 246 249 246 246 250 247 246 249 247 247 250 248 248 251 249 249 250 249 249 251 250 250 251 250 250 252 251 251 252 251 251 253 253 253 254 254 254 255 255 255 255]; mask:((Depth1Image new) width: 22; height: 23; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<_??<') ; yourself); yourself]
3000
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   236
!
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   237
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   238
releaseViewIcon
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   239
    "This resource specification was automatically generated
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   240
     by the ImageEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   243
     the ImageEditor may not be able to read the specification."
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   244
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
     self releaseViewIcon inspect
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   247
     ImageEditor openOnClass:self andSelector:#releaseViewIcon
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   248
     Icon flushCachedIcons
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   249
    "
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   250
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   251
    <resource: #image>
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   252
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   253
    ^Icon
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   254
        constantNamed:'Tools::ViewTreeInspectorApplication releaseViewIcon'
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   255
        ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   256
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   257
@@@@@@@@@@@@@@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
   258
''%!!/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
   259
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
   260
@@@@@@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
   261
"P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   262
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; 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
   263
! !
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   264
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   265
!ViewTreeInspectorApplication class methodsFor:'interface specs'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   266
87bb1815460b initial checkin
ca
parents:
diff changeset
   267
windowSpec
87bb1815460b initial checkin
ca
parents:
diff changeset
   268
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   269
     by the UIPainter of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   270
87bb1815460b initial checkin
ca
parents:
diff changeset
   271
    "Do not manually edit this!! If it is corrupted,
87bb1815460b initial checkin
ca
parents:
diff changeset
   272
     the UIPainter may not be able to read the specification."
87bb1815460b initial checkin
ca
parents:
diff changeset
   273
87bb1815460b initial checkin
ca
parents:
diff changeset
   274
    "
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   275
     UIPainter new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#windowSpec
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   276
     Tools::ViewTreeInspectorApplication new openInterface:#windowSpec
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   277
     Tools::ViewTreeInspectorApplication open
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   278
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   279
87bb1815460b initial checkin
ca
parents:
diff changeset
   280
    <resource: #canvas>
87bb1815460b initial checkin
ca
parents:
diff changeset
   281
87bb1815460b initial checkin
ca
parents:
diff changeset
   282
    ^ 
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   283
    #(FullSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   284
       name: windowSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   285
       window: 
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   286
      (WindowSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   287
         label: 'View Tree Inspector'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   288
         name: 'View Tree Inspector'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   289
         min: (Point 10 10)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   290
         max: (Point 1024 9999)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   291
         bounds: (Rectangle 0 0 381 654)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   292
         menu: menu
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   293
       )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   294
       component: 
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   295
      (SpecCollection
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   296
         collection: (
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   297
          (MenuPanelSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   298
             name: 'toolbarMenu'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   299
             layout: (LayoutFrame 0 0.0 0 0 0 1.0 40 0)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   300
             menu: toolbarMenu
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   301
             textDefault: true
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   302
           )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   303
          (VariableVerticalPanelSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   304
             name: 'VariableVerticalPanel1'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   305
             layout: (LayoutFrame 0 0.0 40 0.0 0 1.0 0 1.0)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   306
             component: 
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   307
            (SpecCollection
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   308
               collection: (
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   309
                (HierarchicalListViewSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   310
                   name: 'List'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   311
                   level: 1
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   312
                   model: model
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   313
                   menu: middleButtonMenu
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   314
                   hasHorizontalScrollBar: true
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   315
                   hasVerticalScrollBar: true
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   316
                   miniScrollerHorizontal: true
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   317
                   miniScrollerVertical: false
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   318
                   listModel: listOfItems
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   319
                   multipleSelectOk: true
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   320
                   useIndex: false
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   321
                   highlightMode: label
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   322
                   showLeftIndicators: false
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   323
                   indicatorSelector: indicatorClicked:
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   324
                   useDefaultIcons: false
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   325
                   postBuildCallback: postBuildTree:
2770
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
   326
                 )
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   327
                (ViewSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   328
                   name: 'Box2'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   329
                   component: 
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   330
                  (SpecCollection
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   331
                     collection: (
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   332
                      (ViewSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   333
                         name: 'Inspector'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   334
                         layout: (LayoutFrame 0 0 26 0 0 1 0 1)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   335
                         postBuildCallback: postBuildInspectorView:
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   336
                         viewClassName: 'InspectorView'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   337
                       )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   338
                      (TabViewSpec
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   339
                         name: 'TabHeader1'
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   340
                         layout: (LayoutFrame 0 0.0 0 0 0 1.0 25 0)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   341
                         model: inspectorModeIndexHolder
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   342
                         menu: inspectorModes
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   343
                         useIndex: true
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   344
                         translateLabel: true
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   345
                       )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   346
                      )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   347
                    
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   348
                   )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   349
                 )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   350
                )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   351
              
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   352
             )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   353
             handles: (Any 0.5 1.0)
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   354
           )
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   355
          )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   356
        
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   357
       )
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   358
     )
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   359
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   360
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   361
!ViewTreeInspectorApplication class methodsFor:'menu specs'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   362
87bb1815460b initial checkin
ca
parents:
diff changeset
   363
menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   364
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   365
     by the MenuEditor of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   366
87bb1815460b initial checkin
ca
parents:
diff changeset
   367
    "Do not manually edit this!! If it is corrupted,
87bb1815460b initial checkin
ca
parents:
diff changeset
   368
     the MenuEditor may not be able to read the specification."
87bb1815460b initial checkin
ca
parents:
diff changeset
   369
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   370
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   371
    "
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   372
     MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#menu
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   373
     (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication menu)) startUp
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   374
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   375
87bb1815460b initial checkin
ca
parents:
diff changeset
   376
    <resource: #menu>
87bb1815460b initial checkin
ca
parents:
diff changeset
   377
87bb1815460b initial checkin
ca
parents:
diff changeset
   378
    ^ 
87bb1815460b initial checkin
ca
parents:
diff changeset
   379
     #(Menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   380
        (
87bb1815460b initial checkin
ca
parents:
diff changeset
   381
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   382
            label: 'File'
87bb1815460b initial checkin
ca
parents:
diff changeset
   383
            submenu: 
87bb1815460b initial checkin
ca
parents:
diff changeset
   384
           (Menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   385
              (
87bb1815460b initial checkin
ca
parents:
diff changeset
   386
               (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   387
                  label: 'Pick a View'
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
   388
                  itemValue: doPickView
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   389
                )
87bb1815460b initial checkin
ca
parents:
diff changeset
   390
               (MenuItem
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   391
                  enabled: hasTargetWidgetChannel
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   392
                  label: 'Release Picked View'
87bb1815460b initial checkin
ca
parents:
diff changeset
   393
                  itemValue: doUnpick
87bb1815460b initial checkin
ca
parents:
diff changeset
   394
                )
87bb1815460b initial checkin
ca
parents:
diff changeset
   395
               (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   396
                  label: '-'
87bb1815460b initial checkin
ca
parents:
diff changeset
   397
                )
87bb1815460b initial checkin
ca
parents:
diff changeset
   398
               (MenuItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   399
                  label: 'Settings'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   400
                  submenu: 
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   401
                 (Menu
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   402
                    (
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   403
                     (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   404
                        label: 'Test Mode'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   405
                        hideMenuOnActivated: false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   406
                        indication: testModeChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   407
                      )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   408
                     (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   409
                        enabled: testModeChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   410
                        label: 'Follow Focus'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   411
                        hideMenuOnActivated: false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   412
                        indication: followFocusChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   413
                      )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   414
                     (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   415
                        label: '-'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   416
                      )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   417
                     (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   418
                        label: 'Select on Click'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   419
                        hideMenuOnActivated: false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   420
                        indication: selectOnClickHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   421
                      )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   422
                     (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   423
                        label: '-'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   424
                      )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   425
                     (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   426
                        label: 'Show Name of Widgets'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   427
                        hideMenuOnActivated: false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   428
                        indication: showNamesHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   429
                      )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   430
                     )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   431
                    nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   432
                    nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   433
                  )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   434
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   435
               (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   436
                  label: '-'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   437
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   438
               (MenuItem
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   439
                  label: 'Exit'
87bb1815460b initial checkin
ca
parents:
diff changeset
   440
                  itemValue: closeRequest
87bb1815460b initial checkin
ca
parents:
diff changeset
   441
                )
87bb1815460b initial checkin
ca
parents:
diff changeset
   442
               )
87bb1815460b initial checkin
ca
parents:
diff changeset
   443
              nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   444
              nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   445
            )
87bb1815460b initial checkin
ca
parents:
diff changeset
   446
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   447
         (MenuItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   448
            enabled: hasSingleSelectionHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   449
            label: 'Selection'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   450
            submenuChannel: middleButtonMenu
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   451
          )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   452
         (MenuItem
3034
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   453
            label: 'Widget'
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   454
            submenu: 
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   455
           (Menu
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   456
              (
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   457
               (MenuItem
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   458
                  enabled: hasSingleSelectionHolder
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   459
                  label: 'Browse'
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   460
                  itemValue: doBrowse:
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   461
                  argument: view
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   462
                )
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   463
               (MenuItem
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   464
                  enabled: hasSingleSelectionHolder
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   465
                  label: 'Inspect'
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   466
                  itemValue: doInspect:
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   467
                  argument: view
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   468
                )
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   469
               (MenuItem
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   470
                  label: '-'
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   471
                )
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   472
               (MenuItem
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   473
                  enabled: hasTargetWidgetChannel
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   474
                  label: 'All Components'
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   475
                  startGroup: right
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   476
                  submenuChannel: submenuComponents:
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   477
                )
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   478
               )
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   479
              nil
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   480
              nil
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   481
            )
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   482
          )
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   483
         (MenuItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   484
            label: 'Application'
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   485
            submenu: 
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   486
           (Menu
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   487
              (
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   488
               (MenuItem
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   489
                  label: 'Redraw'
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   490
                  itemValue: doRedraw
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   491
                )
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   492
               (MenuItem
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   493
                  label: '-'
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   494
                )
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   495
               (MenuItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   496
                  enabled: hasSingleSelectionHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   497
                  label: 'Browse'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   498
                  itemValue: doBrowse:
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   499
                  argument: application
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   500
                )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   501
               (MenuItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   502
                  enabled: hasSingleSelectionHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   503
                  label: 'Inspect'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   504
                  itemValue: doInspect:
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   505
                  argument: application
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   506
                )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   507
               (MenuItem
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   508
                  label: '-'
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   509
                )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   510
               (MenuItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   511
                  enabled: hasTargetWidgetChannel
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   512
                  label: 'All Applications'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   513
                  submenuChannel: submenuApplications:
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   514
                )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   515
               )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   516
              nil
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   517
              nil
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   518
            )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   519
          )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   520
         (MenuItem
3034
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   521
            label: 'Process'
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   522
            submenu: 
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   523
           (Menu
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   524
              (
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   525
               (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   526
                  enabled: hasSingleSelectionHolder
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   527
                  label: 'Inspect'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   528
                  itemValue: doInspect:
3034
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   529
                  argument: process
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   530
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   531
               (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   532
                  label: '-'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   533
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   534
               (MenuItem
3034
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   535
                  label: 'Open Process Monitor'
862cd32dc02f class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3017
diff changeset
   536
                  itemValue: doOpenProcessMonitor
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   537
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   538
               )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   539
              nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   540
              nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   541
            )
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   542
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   543
         (MenuItem
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   544
            label: 'Help'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   545
            startGroup: conditionalRight
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   546
            submenu: 
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   547
           (Menu
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   548
              (
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   549
               (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   550
                  label: 'Documentation'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   551
                  itemValue: openDocumentation
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   552
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   553
               (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   554
                  label: '-'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   555
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   556
               (MenuItem
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   557
                  label: 'About this Application...'
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   558
                  itemValue: openAboutThisApplication
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   559
                )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   560
               )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   561
              nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   562
              nil
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   563
            )
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   564
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   565
         )
87bb1815460b initial checkin
ca
parents:
diff changeset
   566
        nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   567
        nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   568
      )
87bb1815460b initial checkin
ca
parents:
diff changeset
   569
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   570
87bb1815460b initial checkin
ca
parents:
diff changeset
   571
middleButtonMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
   572
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   573
     by the MenuEditor of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   574
87bb1815460b initial checkin
ca
parents:
diff changeset
   575
    "Do not manually edit this!! If it is corrupted,
87bb1815460b initial checkin
ca
parents:
diff changeset
   576
     the MenuEditor may not be able to read the specification."
87bb1815460b initial checkin
ca
parents:
diff changeset
   577
87bb1815460b initial checkin
ca
parents:
diff changeset
   578
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   579
     MenuEditor new openOnClass:ViewTreeApplication andSelector:#middleButtonMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
   580
     (Menu new fromLiteralArrayEncoding:(ViewTreeApplication middleButtonMenu)) startUp
87bb1815460b initial checkin
ca
parents:
diff changeset
   581
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   582
87bb1815460b initial checkin
ca
parents:
diff changeset
   583
    <resource: #menu>
87bb1815460b initial checkin
ca
parents:
diff changeset
   584
87bb1815460b initial checkin
ca
parents:
diff changeset
   585
    ^ 
87bb1815460b initial checkin
ca
parents:
diff changeset
   586
     #(Menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   587
        (
87bb1815460b initial checkin
ca
parents:
diff changeset
   588
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   589
            label: 'Geometry'
87bb1815460b initial checkin
ca
parents:
diff changeset
   590
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   591
            submenuChannel: submenuGeometry:
87bb1815460b initial checkin
ca
parents:
diff changeset
   592
            keepLinkedMenu: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   593
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   594
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   595
            label: 'Interface'
87bb1815460b initial checkin
ca
parents:
diff changeset
   596
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   597
            submenuChannel: submenuInterface:
87bb1815460b initial checkin
ca
parents:
diff changeset
   598
            keepLinkedMenu: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   599
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   600
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   601
            label: 'Visibility'
87bb1815460b initial checkin
ca
parents:
diff changeset
   602
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   603
            submenuChannel: submenuVisibility:
87bb1815460b initial checkin
ca
parents:
diff changeset
   604
            keepLinkedMenu: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   605
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   606
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   607
            label: '-'
87bb1815460b initial checkin
ca
parents:
diff changeset
   608
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   609
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   610
            label: 'Browse View Class'
87bb1815460b initial checkin
ca
parents:
diff changeset
   611
            itemValue: doBrowse:
87bb1815460b initial checkin
ca
parents:
diff changeset
   612
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   613
            argument: view
87bb1815460b initial checkin
ca
parents:
diff changeset
   614
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   615
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   616
            label: 'Browse Model Class'
87bb1815460b initial checkin
ca
parents:
diff changeset
   617
            itemValue: doBrowse:
87bb1815460b initial checkin
ca
parents:
diff changeset
   618
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   619
            isVisible: hasModel
87bb1815460b initial checkin
ca
parents:
diff changeset
   620
            argument: model
87bb1815460b initial checkin
ca
parents:
diff changeset
   621
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   622
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   623
            label: 'Browse Application Class'
87bb1815460b initial checkin
ca
parents:
diff changeset
   624
            itemValue: doBrowse:
87bb1815460b initial checkin
ca
parents:
diff changeset
   625
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   626
            isVisible: hasApplication
87bb1815460b initial checkin
ca
parents:
diff changeset
   627
            argument: application
87bb1815460b initial checkin
ca
parents:
diff changeset
   628
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   629
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   630
            label: 'Browse Controller Class'
87bb1815460b initial checkin
ca
parents:
diff changeset
   631
            itemValue: doBrowse:
87bb1815460b initial checkin
ca
parents:
diff changeset
   632
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   633
            isVisible: hasController
87bb1815460b initial checkin
ca
parents:
diff changeset
   634
            argument: controller
87bb1815460b initial checkin
ca
parents:
diff changeset
   635
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   636
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   637
            label: '-'
87bb1815460b initial checkin
ca
parents:
diff changeset
   638
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   639
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   640
            label: 'Inspect View'
87bb1815460b initial checkin
ca
parents:
diff changeset
   641
            itemValue: doInspect:
87bb1815460b initial checkin
ca
parents:
diff changeset
   642
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   643
            argument: view
87bb1815460b initial checkin
ca
parents:
diff changeset
   644
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   645
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   646
            label: 'Inspect Window Group'
87bb1815460b initial checkin
ca
parents:
diff changeset
   647
            itemValue: doInspect:
87bb1815460b initial checkin
ca
parents:
diff changeset
   648
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   649
            argument: group
87bb1815460b initial checkin
ca
parents:
diff changeset
   650
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   651
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   652
            label: 'Inspect Model'
87bb1815460b initial checkin
ca
parents:
diff changeset
   653
            itemValue: doInspect:
87bb1815460b initial checkin
ca
parents:
diff changeset
   654
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   655
            isVisible: hasModel
87bb1815460b initial checkin
ca
parents:
diff changeset
   656
            argument: model
87bb1815460b initial checkin
ca
parents:
diff changeset
   657
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   658
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   659
            label: 'Inspect Application'
87bb1815460b initial checkin
ca
parents:
diff changeset
   660
            itemValue: doInspect:
87bb1815460b initial checkin
ca
parents:
diff changeset
   661
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   662
            isVisible: hasApplication
87bb1815460b initial checkin
ca
parents:
diff changeset
   663
            argument: application
87bb1815460b initial checkin
ca
parents:
diff changeset
   664
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   665
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   666
            label: 'Inspect Controller'
87bb1815460b initial checkin
ca
parents:
diff changeset
   667
            itemValue: doInspect:
87bb1815460b initial checkin
ca
parents:
diff changeset
   668
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   669
            isVisible: hasController
87bb1815460b initial checkin
ca
parents:
diff changeset
   670
            argument: controller
87bb1815460b initial checkin
ca
parents:
diff changeset
   671
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   672
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   673
            label: '-'
87bb1815460b initial checkin
ca
parents:
diff changeset
   674
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   675
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   676
            label: 'Flash'
87bb1815460b initial checkin
ca
parents:
diff changeset
   677
            itemValue: doFlash
87bb1815460b initial checkin
ca
parents:
diff changeset
   678
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   679
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   680
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   681
            label: '-'
87bb1815460b initial checkin
ca
parents:
diff changeset
   682
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   683
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   684
            label: 'Destroy'
87bb1815460b initial checkin
ca
parents:
diff changeset
   685
            itemValue: doDestroy
87bb1815460b initial checkin
ca
parents:
diff changeset
   686
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   687
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   688
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   689
            label: '-'
87bb1815460b initial checkin
ca
parents:
diff changeset
   690
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   691
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   692
            label: 'Instance Variables'
87bb1815460b initial checkin
ca
parents:
diff changeset
   693
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   694
            submenuChannel: submenuInspector:
87bb1815460b initial checkin
ca
parents:
diff changeset
   695
            keepLinkedMenu: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   696
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   697
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   698
            label: '='
87bb1815460b initial checkin
ca
parents:
diff changeset
   699
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   700
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   701
            label: ''
87bb1815460b initial checkin
ca
parents:
diff changeset
   702
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   703
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   704
            enabled: selectedComponentHasChildren
87bb1815460b initial checkin
ca
parents:
diff changeset
   705
            label: 'Applications'
87bb1815460b initial checkin
ca
parents:
diff changeset
   706
            nameKey: single
87bb1815460b initial checkin
ca
parents:
diff changeset
   707
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   708
            submenuChannel: submenuApplications:
87bb1815460b initial checkin
ca
parents:
diff changeset
   709
            keepLinkedMenu: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   710
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   711
         (MenuItem
87bb1815460b initial checkin
ca
parents:
diff changeset
   712
            enabled: selectedComponentHasChildren
87bb1815460b initial checkin
ca
parents:
diff changeset
   713
            label: 'Components'
87bb1815460b initial checkin
ca
parents:
diff changeset
   714
            nameKey: single
87bb1815460b initial checkin
ca
parents:
diff changeset
   715
            translateLabel: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   716
            submenuChannel: submenuComponents:
87bb1815460b initial checkin
ca
parents:
diff changeset
   717
            keepLinkedMenu: true
87bb1815460b initial checkin
ca
parents:
diff changeset
   718
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   719
         )
87bb1815460b initial checkin
ca
parents:
diff changeset
   720
        nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   721
        nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   722
      )
87bb1815460b initial checkin
ca
parents:
diff changeset
   723
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   724
87bb1815460b initial checkin
ca
parents:
diff changeset
   725
toolbarMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
   726
    "This resource specification was automatically generated
87bb1815460b initial checkin
ca
parents:
diff changeset
   727
     by the MenuEditor of ST/X."
87bb1815460b initial checkin
ca
parents:
diff changeset
   728
87bb1815460b initial checkin
ca
parents:
diff changeset
   729
    "Do not manually edit this!! If it is corrupted,
87bb1815460b initial checkin
ca
parents:
diff changeset
   730
     the MenuEditor may not be able to read the specification."
87bb1815460b initial checkin
ca
parents:
diff changeset
   731
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   732
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   733
    "
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   734
     MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#toolbarMenu
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   735
     (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication toolbarMenu)) startUp
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   736
    "
87bb1815460b initial checkin
ca
parents:
diff changeset
   737
87bb1815460b initial checkin
ca
parents:
diff changeset
   738
    <resource: #menu>
87bb1815460b initial checkin
ca
parents:
diff changeset
   739
87bb1815460b initial checkin
ca
parents:
diff changeset
   740
    ^ 
87bb1815460b initial checkin
ca
parents:
diff changeset
   741
     #(Menu
87bb1815460b initial checkin
ca
parents:
diff changeset
   742
        (
87bb1815460b initial checkin
ca
parents:
diff changeset
   743
         (MenuItem
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   744
            enabled: hasTargetWidgetChannel
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   745
            label: 'Redraw'
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   746
            itemValue: doRedraw
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   747
            isButton: true
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   748
            labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon)
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   749
          )
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   750
         (MenuItem
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   751
            label: '-'
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   752
          )
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   753
         (MenuItem
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   754
            label: 'Pick a View and Catch Events'
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
   755
            itemValue: doPickView
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   756
            translateLabel: false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   757
            isButton: true
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   758
            hideMenuOnActivated: false
2759
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
   759
            labelImage: (ResourceRetriever #'Tools::ViewTreeInspectorApplication' pickWindowIcon2)
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   760
          )
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   761
         (MenuItem
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   762
            enabled: hasTargetWidgetChannel
2978
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   763
            label: 'Release Picked View and Uncatch Events'
a952dfdb1b6a class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2888
diff changeset
   764
            itemValue: doUncatchEvents
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   765
            isButton: true
3000
7b530cc76688 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   766
            labelImage: (ResourceRetriever #'Tools::ViewTreeInspectorApplication' releaseViewIcon)
2757
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   767
          )
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   768
         (MenuItem
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   769
            label: '-'
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   770
          )
6c83d6b487b2 changed:
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
   771
         (MenuItem
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   772
            enabled: hasSingleSelectionHolder
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   773
            label: 'Browse Application'
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   774
            itemValue: doBrowse:
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   775
            translateLabel: false
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   776
            isButton: true
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   777
            hideMenuOnActivated: false
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   778
            labelImage: (ResourceRetriever ToolbarIconLibrary systemBrowser24x24Icon2)
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   779
            argument: application
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   780
          )
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   781
         (MenuItem
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   782
            enabled: hasSingleSelectionHolder
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   783
            label: 'Inspect Application'
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   784
            itemValue: doInspect:
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   785
            translateLabel: false
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   786
            isButton: true
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   787
            hideMenuOnActivated: false
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   788
            labelImage: (ResourceRetriever ToolbarIconLibrary inspect22x24Icon)
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   789
            argument: application
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   790
          )
87bb1815460b initial checkin
ca
parents:
diff changeset
   791
         )
87bb1815460b initial checkin
ca
parents:
diff changeset
   792
        nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   793
        nil
87bb1815460b initial checkin
ca
parents:
diff changeset
   794
      )
87bb1815460b initial checkin
ca
parents:
diff changeset
   795
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   796
2747
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   797
!ViewTreeInspectorApplication class methodsFor:'startup'!
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   798
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   799
openInPickMode
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   800
    |app|
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   801
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   802
    app := self new.
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   803
    app open.
2762
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
   804
    app doPickView.
3014
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   805
!
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   806
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   807
openOn:aView
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   808
    "show a particular window's topView hierarchy,
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   809
     select the given view"
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   810
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   811
    |app|
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   812
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   813
    app := self new.
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   814
    app open.
05208490cea6 class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3000
diff changeset
   815
    app showWindow:aView.
2747
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   816
! !
717a0dcc710d added: #openInPickMode
Claus Gittinger <cg@exept.de>
parents: 2744
diff changeset
   817
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   818
!ViewTreeInspectorApplication methodsFor:'actions'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   819
87bb1815460b initial checkin
ca
parents:
diff changeset
   820
indicatorClicked:anIndex
87bb1815460b initial checkin
ca
parents:
diff changeset
   821
    |item sensor|
87bb1815460b initial checkin
ca
parents:
diff changeset
   822
87bb1815460b initial checkin
ca
parents:
diff changeset
   823
    item := model listOfItems at:anIndex ifAbsent:nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
   824
87bb1815460b initial checkin
ca
parents:
diff changeset
   825
    item notNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   826
        (     (sensor := self window sensor) notNil
87bb1815460b initial checkin
ca
parents:
diff changeset
   827
         and:[(sensor ctrlDown or:[sensor shiftDown])]
87bb1815460b initial checkin
ca
parents:
diff changeset
   828
        ) ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   829
            item recursiveToggleExpand
87bb1815460b initial checkin
ca
parents:
diff changeset
   830
        ] ifFalse:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   831
            item toggleExpand
87bb1815460b initial checkin
ca
parents:
diff changeset
   832
        ]
87bb1815460b initial checkin
ca
parents:
diff changeset
   833
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
   834
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   835
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   836
!ViewTreeInspectorApplication methodsFor:'aspects'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   837
87bb1815460b initial checkin
ca
parents:
diff changeset
   838
followFocusChannel
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   839
    "boolean holder, which indicates whether selection changed dependend on the focus view"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   840
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   841
    ^ followFocusChannel
87bb1815460b initial checkin
ca
parents:
diff changeset
   842
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   843
87bb1815460b initial checkin
ca
parents:
diff changeset
   844
hasSingleSelectionHolder
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   845
    "boolean holder, true if one item is selected"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   846
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   847
    ^ hasSingleSelectionHolder
87bb1815460b initial checkin
ca
parents:
diff changeset
   848
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   849
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   850
hasTargetWidgetChannel
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   851
    "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
   852
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   853
    ^ model hasTargetWidgetChannel
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   854
!
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   855
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   856
inspectorMode
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   857
    "what is shwn in the inspector:
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   858
     1->widget
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   859
     2->application"
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   860
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   861
    ^ (inspectorModeIndexHolder value == 1) 
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   862
        ifTrue:[#widget]
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   863
        ifFalse:[#application]
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   864
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   865
    "Created: / 30-07-2013 / 07:44:59 / cg"
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   866
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   867
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   868
inspectorModeIndexHolder
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   869
    "what is shwn in the inspector:
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   870
     1->widget
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   871
     2->application"
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   872
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   873
    ^ inspectorModeIndexHolder
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   874
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   875
    "Created: / 30-07-2013 / 07:44:07 / cg"
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   876
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   877
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   878
inspectorModes
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   879
    ^ #('Widget' 'Application')
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   880
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   881
    "Created: / 30-07-2013 / 09:42:16 / cg"
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   882
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   883
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   884
listOfItems
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   885
    "returns the hierarchical list of items"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   886
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   887
    ^ model listOfItems
87bb1815460b initial checkin
ca
parents:
diff changeset
   888
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   889
87bb1815460b initial checkin
ca
parents:
diff changeset
   890
model
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   891
    "returns my selection model, a ViewTreeModel"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   892
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   893
    ^ model
87bb1815460b initial checkin
ca
parents:
diff changeset
   894
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   895
87bb1815460b initial checkin
ca
parents:
diff changeset
   896
selectOnClickHolder
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   897
    "boolean holder, which indicates whether the selection will change on click"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   898
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   899
    ^ model selectOnClickHolder
87bb1815460b initial checkin
ca
parents:
diff changeset
   900
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   901
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   902
showNamesHolder
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   903
    "boolean holder, which indicates whether application names or widget names
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   904
     as additional text are shown for the items"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   905
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   906
    ^ showNamesHolder
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   907
!
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   908
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   909
testModeChannel
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   910
    "answer a boolean channel which describes the behaviour how to process
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   911
     events on the target view.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   912
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   913
     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
   914
     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
   915
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   916
    ^ model testModeChannel
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   917
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   918
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   919
!ViewTreeInspectorApplication methodsFor:'change & update'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   920
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   921
inspectorModeIndexHolderChanged
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   922
    self updateInspector
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   923
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   924
    "Created: / 30-07-2013 / 09:21:51 / cg"
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   925
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   926
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   927
selectionChanged
87bb1815460b initial checkin
ca
parents:
diff changeset
   928
    |info view item|
87bb1815460b initial checkin
ca
parents:
diff changeset
   929
87bb1815460b initial checkin
ca
parents:
diff changeset
   930
    item := model selectedItem.
87bb1815460b initial checkin
ca
parents:
diff changeset
   931
87bb1815460b initial checkin
ca
parents:
diff changeset
   932
    item notNil ifTrue:[ |state|
87bb1815460b initial checkin
ca
parents:
diff changeset
   933
        view := item widget.
87bb1815460b initial checkin
ca
parents:
diff changeset
   934
87bb1815460b initial checkin
ca
parents:
diff changeset
   935
        view id isNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   936
            state := 'no ID'.
87bb1815460b initial checkin
ca
parents:
diff changeset
   937
        ] ifFalse:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   938
            view shown ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   939
                state := 'visible'.
87bb1815460b initial checkin
ca
parents:
diff changeset
   940
            ] ifFalse:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   941
                state := 'invisible'
87bb1815460b initial checkin
ca
parents:
diff changeset
   942
            ].
87bb1815460b initial checkin
ca
parents:
diff changeset
   943
        ].
87bb1815460b initial checkin
ca
parents:
diff changeset
   944
        info := '%1 [%2] - %3' bindWith:(view class name)
87bb1815460b initial checkin
ca
parents:
diff changeset
   945
                                   with:(view name ? '') with:state allBold.
87bb1815460b initial checkin
ca
parents:
diff changeset
   946
87bb1815460b initial checkin
ca
parents:
diff changeset
   947
    ] ifFalse:[
87bb1815460b initial checkin
ca
parents:
diff changeset
   948
        info := ''
87bb1815460b initial checkin
ca
parents:
diff changeset
   949
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
   950
    hasSingleSelectionHolder value:(view notNil).
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   951
    self updateInspector
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   952
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   953
    "Modified: / 30-07-2013 / 09:21:27 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   954
!
87bb1815460b initial checkin
ca
parents:
diff changeset
   955
87bb1815460b initial checkin
ca
parents:
diff changeset
   956
update:something with:someArgument from:aModel
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   957
    |oldSelection|
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   958
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   959
    aModel == showNamesHolder ifTrue:[
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   960
        oldSelection := model selectedItem.
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   961
        model selectedItem:nil.
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   962
        self listOfItems showWidgetNames:(aModel value).
2454
4867f3e9dd43 *** empty log message ***
ca
parents: 2451
diff changeset
   963
        model selectedItem:oldSelection.
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   964
        ^ self
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
   965
    ].
2458
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
   966
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
   967
    aModel == model ifTrue:[
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
   968
        self selectionChanged.
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
   969
        ^ self
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
   970
    ].
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
   971
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   972
    super update:something with:someArgument from:aModel.
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   973
!
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   974
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   975
updateInspector
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   976
    |view obj|
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   977
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   978
    view := self selectedView.
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   979
    (view isNil or:[self inspectorMode == #widget]) ifTrue:[
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   980
        obj := view.
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   981
    ] ifFalse:[
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   982
        obj := view application.
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   983
    ].
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   984
    inspectorView inspect:obj.
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   985
    inspectorView headLineLabel:(obj class nameWithoutPrefix)
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   986
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
   987
    "Created: / 30-07-2013 / 09:21:16 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   988
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
   989
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
   990
!ViewTreeInspectorApplication methodsFor:'event processing'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   991
87bb1815460b initial checkin
ca
parents:
diff changeset
   992
processButtonMotionEvent:ev
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   993
    |click rootView|
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   994
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   995
    motionAction isNil ifTrue:[^ self].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
   996
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   997
    (rootView := model rootView) isNil ifTrue:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   998
        clickedItem := motionAction := nil.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
   999
        ^ self
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1000
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1001
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1002
    click := rootView device
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1003
            translatePoint:((ev x)@ (ev y))
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1004
            fromView:(ev view)
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1005
            toView:rootView.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1006
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1007
    click = clickedPoint ifFalse:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1008
        (clickedItem isNil or:[(click dist:clickedPoint) > 5.0]) ifTrue:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1009
            motionAction value:click
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1010
        ]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1011
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1012
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1013
87bb1815460b initial checkin
ca
parents:
diff changeset
  1014
processButtonPressEvent:ev
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1015
    |rootView sensor lastRectangle|
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1016
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1017
    rootView    := model rootView.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1018
    sensor      := model rootView sensor.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1019
    clickedItem := model listOfItems detectItemRespondsToView:(ev view).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1020
87bb1815460b initial checkin
ca
parents:
diff changeset
  1021
    (sensor ctrlDown or:[sensor shiftDown]) ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1022
        clickedItem notNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1023
            self selectOnClickHolder value ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1024
                model toggleSelectItem:clickedItem
87bb1815460b initial checkin
ca
parents:
diff changeset
  1025
            ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1026
        ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1027
        clickedItem := motionAction := nil.
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1028
        ^ self
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1029
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1030
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1031
    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
  1032
    lastRectangle := nil.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1033
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1034
    motionAction :=[:p|
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1035
        rootView    := model rootView device rootView.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1036
        rootView    := model rootView.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1037
        clickedItem := nil.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1038
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1039
        rootView xoring:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1040
            lastRectangle notNil ifTrue:[ rootView displayRectangle:lastRectangle ]
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1041
                                ifFalse:[ rootView clippedByChildren:false ].
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1042
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1043
            p isNil ifTrue:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1044
                rootView clippedByChildren:true.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1045
                motionAction := nil.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1046
            ] ifFalse:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1047
                lastRectangle := Rectangle origin:(clickedPoint min:p) corner:(clickedPoint max:p).
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1048
                rootView displayRectangle:lastRectangle.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1049
            ].
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1050
            rootView flush.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1051
        ].
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1052
        lastRectangle
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1053
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1054
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1055
87bb1815460b initial checkin
ca
parents:
diff changeset
  1056
processButtonReleaseEvent:anEvent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1057
    |rootView rectangle newItems widget origin|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1058
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1059
    (rootView := model rootView) isNil ifTrue:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1060
        clickedItem := motionAction := nil.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1061
        ^ self
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1062
    ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1063
    motionAction isNil ifTrue:[ ^ self ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1064
    clickedItem notNil ifTrue:[ ^ model selectItem:clickedItem ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1065
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1066
    rectangle := motionAction value:nil.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1067
    rectangle isNil ifTrue:[^ self].
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1068
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1069
    newItems := OrderedCollection new.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1070
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1071
    model rootItem recursiveDo:[:anItem|
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1072
        widget := anItem widget.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1073
        origin := widget originRelativeTo:rootView.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1074
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1075
        (rectangle containsRect:(Rectangle origin:origin extent:(widget extent))) ifTrue:[
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1076
            newItems add:anItem.
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1077
        ]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1078
    ].
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1079
    model value:newItems.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1080
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1081
87bb1815460b initial checkin
ca
parents:
diff changeset
  1082
processEvent:anEvent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1083
    |button menu|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1084
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1085
    anEvent isKeyPressEvent ifTrue:[ self processKeyPressEvent:anEvent. ^ self  ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1086
    anEvent isButtonEvent  ifFalse:[ ^ self ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1087
87bb1815460b initial checkin
ca
parents:
diff changeset
  1088
    button := anEvent button.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1089
87bb1815460b initial checkin
ca
parents:
diff changeset
  1090
    (button == 2 or:[button == #menu]) ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1091
        motionAction isNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1092
            anEvent isButtonPressEvent ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1093
                self selectOnClickHolder value ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1094
                    menu := self middleButtonMenu value.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1095
                    menu notNil ifTrue:[
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1096
                        menu := MenuPanel 
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1097
                                    menu:(Menu new fromLiteralArrayEncoding:menu)
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1098
                                    receiver:self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1099
                        menu startUp.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1100
                    ]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1101
                ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1102
            ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1103
            clickedItem := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1104
        ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1105
        ^ self
87bb1815460b initial checkin
ca
parents:
diff changeset
  1106
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1107
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1108
    anEvent isButtonPressEvent  ifTrue:[ self processButtonPressEvent:anEvent. ^ self ].
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1109
    anEvent isButtonMotionEvent ifTrue:[ self processButtonMotionEvent:anEvent. ^ self ].
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1110
87bb1815460b initial checkin
ca
parents:
diff changeset
  1111
    anEvent isButtonReleaseEvent ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1112
        self selectOnClickHolder value ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1113
            self processButtonReleaseEvent:anEvent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1114
        ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1115
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1116
    clickedItem := motionAction := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1117
87bb1815460b initial checkin
ca
parents:
diff changeset
  1118
    anEvent type == #'buttonMultiPress:x:y:' ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1119
        self selectOnClickHolder value ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1120
            self doInspect:#view.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1121
        ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1122
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1123
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1124
87bb1815460b initial checkin
ca
parents:
diff changeset
  1125
processKeyPressEvent:anEvent
87bb1815460b initial checkin
ca
parents:
diff changeset
  1126
    |item prnt idx key max next|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1127
87bb1815460b initial checkin
ca
parents:
diff changeset
  1128
    key := anEvent key.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1129
    key isSymbol ifFalse:[^ self].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1130
87bb1815460b initial checkin
ca
parents:
diff changeset
  1131
    key == #Delete    ifTrue:[ ^ self doDestroy ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1132
    key == #InspectIt ifTrue:[ ^ self doInspect:#view ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1133
87bb1815460b initial checkin
ca
parents:
diff changeset
  1134
    (   key == #CursorUp
87bb1815460b initial checkin
ca
parents:
diff changeset
  1135
    or:[key == #CursorDown
87bb1815460b initial checkin
ca
parents:
diff changeset
  1136
    or:[key == #CursorLeft
87bb1815460b initial checkin
ca
parents:
diff changeset
  1137
    or:[key == #CursorRight]]]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1138
    ) ifFalse:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1139
        ^ self
87bb1815460b initial checkin
ca
parents:
diff changeset
  1140
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1141
    item := model selectedItem.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1142
87bb1815460b initial checkin
ca
parents:
diff changeset
  1143
    item isNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1144
        ^ model selectedItem:(model first ? model rootItem)
87bb1815460b initial checkin
ca
parents:
diff changeset
  1145
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1146
87bb1815460b initial checkin
ca
parents:
diff changeset
  1147
    prnt := item parent.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1148
    prnt isNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1149
        "/ is the root item
87bb1815460b initial checkin
ca
parents:
diff changeset
  1150
        (key == #CursorUp or:[key == #CursorLeft]) ifTrue:[item := model listOfItems last]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1151
                                                  ifFalse:[item := item at:1 ifAbsent:item].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1152
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1153
        ^ model selectedItem:item
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1154
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1155
    key == #CursorLeft ifTrue:[ ^ model selectedItem:prnt ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1156
87bb1815460b initial checkin
ca
parents:
diff changeset
  1157
    key == #CursorRight ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1158
        next := item at:1 ifAbsent:nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1159
        next notNil ifTrue:[ model selectedItem:next ].
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1160
        ^ self
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1161
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1162
87bb1815460b initial checkin
ca
parents:
diff changeset
  1163
    max := prnt size.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1164
87bb1815460b initial checkin
ca
parents:
diff changeset
  1165
    key == #CursorUp ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1166
        idx := prnt identityIndexOf:item.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1167
        idx == 1 ifTrue:[idx := max + 1].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1168
        model selectedItem:(prnt at:idx - 1).
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1169
        ^ self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1170
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1171
87bb1815460b initial checkin
ca
parents:
diff changeset
  1172
    key == #CursorDown ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1173
        idx := prnt identityIndexOf:item.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1174
        idx == max ifTrue:[idx := 0].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1175
        model selectedItem:(prnt at:idx + 1).
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1176
        ^ self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1177
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1178
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1179
87bb1815460b initial checkin
ca
parents:
diff changeset
  1180
processMappedView:aView
87bb1815460b initial checkin
ca
parents:
diff changeset
  1181
    |parent anchor|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1182
87bb1815460b initial checkin
ca
parents:
diff changeset
  1183
    parent := self listOfItems detectItemRespondsToView:aView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1184
    parent isNil ifTrue:[ ^ self ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1185
87bb1815460b initial checkin
ca
parents:
diff changeset
  1186
    NotFoundSignal handle:[:ex|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1187
        "contained subvies used by spec are not yet created;
87bb1815460b initial checkin
ca
parents:
diff changeset
  1188
         thus we have to wait until last used subview is build
87bb1815460b initial checkin
ca
parents:
diff changeset
  1189
        "
87bb1815460b initial checkin
ca
parents:
diff changeset
  1190
        anchor := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1191
    ] do:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1192
        anchor := parent class buildViewsFrom:(parent widget).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1193
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1194
    anchor notNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1195
        parent updateFromChildren:anchor children.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1196
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1197
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1198
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1199
!ViewTreeInspectorApplication methodsFor:'initialization & release'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1200
87bb1815460b initial checkin
ca
parents:
diff changeset
  1201
closeDownViews
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1202
    "release the grapped application"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1203
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1204
    process := nil.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1205
    super closeDownViews.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1206
    self doUnpick.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1207
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1208
87bb1815460b initial checkin
ca
parents:
diff changeset
  1209
initialize
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1210
    "setup my model and channels"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1211
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1212
    super initialize.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1213
87bb1815460b initial checkin
ca
parents:
diff changeset
  1214
    hasSingleSelectionHolder := false asValue.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1215
    followFocusChannel       := false asValue.
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1216
    inspectorModeIndexHolder := 1 asValue.
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1217
    inspectorModeIndexHolder onChangeSend:#inspectorModeIndexHolderChanged to:self.
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1218
87bb1815460b initial checkin
ca
parents:
diff changeset
  1219
    model := ViewTreeModel new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1220
    model inputEventAction:[:ev| self processEvent:ev ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1221
    model mappedViewAction:[:vw| self processMappedView:vw ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1222
    model application:self.
2458
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1223
    model addDependent:self.
64d8f3c973b3 *** empty log message ***
ca
parents: 2455
diff changeset
  1224
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1225
2451
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1226
    showNamesHolder := false asValue.
cbda60900ced *** empty log message ***
ca
parents: 2177
diff changeset
  1227
    showNamesHolder addDependent:self.
3037
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1228
876c28de42da class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents: 3034
diff changeset
  1229
    "Modified: / 30-07-2013 / 09:20:08 / cg"
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1230
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1231
2770
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1232
postBuildInspectorView:anInspector
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1233
    inspectorView := anInspector.
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1234
!
9322aee00ea0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2762
diff changeset
  1235
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1236
postBuildTree:aTree
87bb1815460b initial checkin
ca
parents:
diff changeset
  1237
    treeView := aTree scrolledView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1238
    treeView hasConstantHeight:true.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1239
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1240
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1241
!ViewTreeInspectorApplication methodsFor:'menu queries'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1242
87bb1815460b initial checkin
ca
parents:
diff changeset
  1243
hasApplication
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1244
    "returns true if the current selected view has an application"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1245
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1246
    |view|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1247
87bb1815460b initial checkin
ca
parents:
diff changeset
  1248
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1249
  ^ (view notNil and:[view application notNil])
87bb1815460b initial checkin
ca
parents:
diff changeset
  1250
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1251
87bb1815460b initial checkin
ca
parents:
diff changeset
  1252
hasController
87bb1815460b initial checkin
ca
parents:
diff changeset
  1253
    "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
  1254
     other than nil or the view itself"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1255
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1256
    |view controller|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1257
87bb1815460b initial checkin
ca
parents:
diff changeset
  1258
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1259
87bb1815460b initial checkin
ca
parents:
diff changeset
  1260
    view notNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1261
        controller := view controller.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1262
      ^ (controller notNil and:[controller ~~ view])
87bb1815460b initial checkin
ca
parents:
diff changeset
  1263
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1264
    ^ false
87bb1815460b initial checkin
ca
parents:
diff changeset
  1265
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1266
87bb1815460b initial checkin
ca
parents:
diff changeset
  1267
hasModel
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1268
    "returns true if the current selected view has a model"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1269
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1270
    |view|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1271
87bb1815460b initial checkin
ca
parents:
diff changeset
  1272
    view := self selectedView.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1273
  ^ (view notNil and:[view model notNil])
87bb1815460b initial checkin
ca
parents:
diff changeset
  1274
! !
87bb1815460b initial checkin
ca
parents:
diff changeset
  1275
2744
5bee95e91ffd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2458
diff changeset
  1276
!ViewTreeInspectorApplication methodsFor:'menu specs'!
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1277
87bb1815460b initial checkin
ca
parents:
diff changeset
  1278
middleButtonMenu
2455
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1279
    "returns the middleButton menu for the single selected item or nil"
93aaf62a6b95 remove colors from window spec & rework
ca
parents: 2454
diff changeset
  1280
2758
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1281
    ^ [ 
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1282
        model selectedItem notNil 
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1283
            ifTrue:[self class middleButtonMenu]
c61fe917957a comment/format in:8 methods
Claus Gittinger <cg@exept.de>
parents: 2757
diff changeset
  1284
            ifFalse:[nil]
2177
87bb1815460b initial checkin
ca
parents:
diff changeset
  1285
      ]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1286
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1287
87bb1815460b initial checkin
ca
parents:
diff changeset
  1288
submenuApplications:aMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
  1289
    |applications menu item list addBlock|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1290
87bb1815460b initial checkin
ca
parents:
diff changeset
  1291
    item := aMenu selection nameKey == #single ifTrue:[model selectedItem]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1292
                                              ifFalse:[model rootItem].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1293
    item isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1294
87bb1815460b initial checkin
ca
parents:
diff changeset
  1295
    applications := IdentityDictionary new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1296
87bb1815460b initial checkin
ca
parents:
diff changeset
  1297
    addBlock := [:el| |cls ctr|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1298
        cls := self resolveApplicationClassFor:el.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1299
87bb1815460b initial checkin
ca
parents:
diff changeset
  1300
        cls notNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1301
            ctr := applications at:cls ifAbsent:0.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1302
            applications at:cls put:(ctr + 1).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1303
        ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1304
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1305
    item recursiveDo:addBlock.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1306
    addBlock value:item.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1307
87bb1815460b initial checkin
ca
parents:
diff changeset
  1308
    applications isEmpty ifTrue:[^ nil ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1309
    list := SortedCollection sortBlock:[:a :b| a title < b title ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1310
87bb1815460b initial checkin
ca
parents:
diff changeset
  1311
    applications keysAndValuesDo:[:cls :ctr|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1312
       list add:(MenuDesc title:(cls name)
87bb1815460b initial checkin
ca
parents:
diff changeset
  1313
                          value:(ctr printString)
87bb1815460b initial checkin
ca
parents:
diff changeset
  1314
                         action:[self doSelectNextOfApplicationClass:cls startingIn:item]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1315
                 ).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1316
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1317
87bb1815460b initial checkin
ca
parents:
diff changeset
  1318
    menu := MenuDesc buildFromList:list onGC:aMenu.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1319
    menu do:[:el|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1320
        el hideMenuOnActivated:false
87bb1815460b initial checkin
ca
parents:
diff changeset
  1321
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1322
    ^ menu
87bb1815460b initial checkin
ca
parents:
diff changeset
  1323
!
87bb1815460b initial checkin
ca
parents:
diff changeset
  1324
87bb1815460b initial checkin
ca
parents:
diff changeset
  1325
submenuComponents:aMenu
87bb1815460b initial checkin
ca
parents:
diff changeset
  1326
    |widgets list total menu item|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1327
87bb1815460b initial checkin
ca
parents:
diff changeset
  1328
    item := aMenu selection nameKey == #single ifTrue:[model selectedItem]
87bb1815460b initial checkin
ca
parents:
diff changeset
  1329
                                              ifFalse:[model rootItem].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1330
    item isNil ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1331
87bb1815460b initial checkin
ca
parents:
diff changeset
  1332
    widgets := IdentityDictionary new.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1333
    total   := 0.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1334
87bb1815460b initial checkin
ca
parents:
diff changeset
  1335
    item recursiveDo:[:el| |cls ctr|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1336
        cls := el widget.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1337
87bb1815460b initial checkin
ca
parents:
diff changeset
  1338
        cls notNil ifTrue:[
87bb1815460b initial checkin
ca
parents:
diff changeset
  1339
            cls := cls class.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1340
            ctr := widgets at:cls ifAbsent:0.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1341
            widgets at:cls put:(ctr + 1).
87bb1815460b initial checkin
ca
parents:
diff changeset
  1342
            total := total + 1.
87bb1815460b initial checkin
ca
parents:
diff changeset
  1343
        ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1344
    ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1345
    total == 0 ifTrue:[^ nil].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1346
    list := SortedCollection sortBlock:[:a :b| a title < b title ].
87bb1815460b initial checkin
ca
parents:
diff changeset
  1347
87bb1815460b initial checkin
ca
parents:
diff changeset
  1348
    widgets keysAndValuesDo:[:cls :ctr|
87bb1815460b initial checkin
ca
parents:
diff changeset
  1349
        list add:(MenuDesc title:(cls name)
87bb1815460b initial checkin
ca
parents:
diff changeset
  1350
                           value:(ctr printString)
87bb1815460b initial checkin
ca
parents:
diff changeset
  1351
                          action:[self doSelectNextOfClass:cls startingIn:item]