class: Tools::ViewTreeInspectorApplication
authorClaus Gittinger <cg@exept.de>
Sun, 26 Jan 2014 13:40:49 +0100
changeset 3070 648aad0e3777
parent 3069 e8e52581e0cb
child 3071 e69992cb4b24
class: Tools::ViewTreeInspectorApplication added: #flyByHelpSpec #lockViewIcon comment/format in: #doPickView #doUnpick #releaseViewIcon changed:5 methods lock/unlock feedback
Tools__ViewTreeApplication.st
--- a/Tools__ViewTreeApplication.st	Fri Jan 24 16:57:06 2014 +0100
+++ b/Tools__ViewTreeApplication.st	Sun Jan 26 13:40:49 2014 +0100
@@ -161,6 +161,22 @@
     super unload.
 ! !
 
+!ViewTreeInspectorApplication class methodsFor:'help specs'!
+
+flyByHelpSpec
+    <resource: #help>
+
+    ^super flyByHelpSpec addPairsFrom:#(
+
+#doUncatchEvents
+'Release Picked View and Uncatch Events (Currently Locked)'  
+
+#doCatchEvents
+'Release Picked View and Uncatch Events (Currently Unlocked)'  
+
+)
+! !
+
 !ViewTreeInspectorApplication class methodsFor:'image specs'!
 
 crossHairIcon
@@ -183,6 +199,33 @@
         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]
 !
 
+lockViewIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self lockViewIcon inspect
+     ImageEditor openOnClass:self andSelector:#lockViewIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:'Tools::ViewTreeInspectorApplication lockViewIcon'
+        ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@A8^G!!7O3ACP5*P@@A8^G @@@@@@@@@@@A8^@@@OE0/!!P0S#0@@^G @@@@@@@@@@@B (@D''D#48"1.CX5H@(J@@@@@@@@@@@@B (B(>SAT"
+''%!!/P7,@(J@@@@@@@@@@@@@%IB0#M"H%IRTQV5P@IRT@@@@@@@@@@@ANSX:U]PANS$8:T80@S$8@@@@@@@@@@@AN&UYWK(EYQ@\FUPQHXT8@@@@@@@@@@@AN
+HC2!!TVY:Y#-%I*IKMD8@@@@@@@@@@@A$\@83XBEG%).GGX _!!&P@@@@@@@@@@@AO[P5+ &(WPYN@["!!E\$<@@@@@@@@@@@B_F''FQPAXX_!!&TGH4HB9<@@@@@
+@@@@@@B_%3HCJ7=BKPU,Q)01B9<@@@@@@@@@@@@PBP8T_F!!''JPI)_Y"D&!!@@@@@@@@@@@@@$B)I9TGXO''WQIWQ93W0@@@@@@@@@@@@@$"U=JR$)JR$)JR$)_
+"P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[132 141 152 147 150 154 250 223 1 246 214 0 205 172 133 238 195 0 213 180 146 217 186 150 188 136 0 206 151 0 183 125 9 208 208 202 196 204 214 255 255 210 255 255 219 210 178 65 242 242 235 106 112 117 96 107 126 250 255 255 255 241 0 154 154 151 255 227 0 67 35 0 52 17 0 253 211 0 208 159 0 167 178 193 222 168 0 248 231 45 208 174 26 199 152 26 225 184 36 255 249 75 220 220 215 77 88 108 241 241 235 245 245 239 255 250 109 242 249 255 255 255 142 255 237 1 142 148 162 242 212 1 143 154 176 174 133 0 222 189 144 169 179 192 177 184 193 184 129 0 255 255 194 253 241 60 210 210 205 214 214 209 77 83 92 230 230 225 98 106 114 243 243 238 117 117 114 255 252 115 255 255 255 115 123 147 130 140 156 152 156 159 241 210 0 53 18 0 151 116 0 162 170 184 218 187 150 193 143 4 220 165 0 206 188 46 181 130 21 204 173 44 206 206 201 208 167 44 72 84 108 240 240 234 244 244 238 243 243 237 212 182 79 255 255 126 131 135 141 119 133 159 132 141 163 195 162 126 219 188 133 218 185 135 180 180 176 221 190 150 175 181 191 176 183 196 181 189 201 202 170 38 209 209 204 207 207 202 251 241 74 229 229 224 238 238 233 226 234 245 244 244 237 255 251 113 255 255 124 255 241 2 255 234 3 249 219 0 255 249 29 252 243 30 227 181 0 212 165 5 222 170 0 173 179 194 216 171 19 255 255 198 208 208 203 156 90 7 206 175 50 91 91 95 211 180 71 242 242 237 246 246 241 212 182 80 255 255 123 129 137 152 255 239 8 251 223 0 59 25 0 251 215 0 228 183 0 222 191 149 249 238 43 177 186 197 187 129 0 186 194 206 209 209 203 249 238 67 255 255 211 226 226 221 235 235 229 100 103 111 76 93 127 255 255 112 88 104 139 130 135 148 149 155 158 247 218 0 224 194 126 255 217 0 228 184 0 13 30 68 161 138 32 204 152 0 255 255 53 206 155 18 207 207 201 255 250 72 255 255 82 209 176 59 232 232 227 243 243 236 245 245 240 255 255 115 255 255 251]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@G8@@O<@@_>@@^^@@\N@@\N@@?? @?? @?? @?? @?? @?? @?? @?? @_?@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]
+!
+
 pickWindowIcon
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
@@ -247,7 +290,6 @@
      ImageEditor openOnClass:self andSelector:#releaseViewIcon
      Icon flushCachedIcons
     "
-
     <resource: #image>
 
     ^Icon
@@ -761,9 +803,11 @@
          (MenuItem
             enabled: hasTargetWidgetChannel
             label: 'Release Picked View and Uncatch Events'
+            activeHelpKey: doUncatchEvents
             itemValue: doUncatchEvents
+            nameKey: doUncatchEvents
             isButton: true
-            labelImage: (ResourceRetriever #'Tools::ViewTreeInspectorApplication' releaseViewIcon)
+            labelImage: (ResourceRetriever nil releaseViewIcon)
           )
          (MenuItem
             label: '-'
@@ -1926,13 +1970,13 @@
         ^ self
     ].
 
-    self showWindow:clickedView
+    self showWindow:clickedView.
 !
 
 doRedraw
     "redraw the app"
 
-    model rootView withAllSubViewsDo:[:v | v redraw; invalidate].
+    model rootView withAllSubViewsDo:[:v | v "redraw; "invalidate].
 !
 
 doSelectNextOfApplicationClass:aClass startingIn:anItem
@@ -1989,6 +2033,9 @@
 
 doUncatchEvents
     model catchEvents:false.
+    ((builder componentAt:'toolbarMenu') itemAt:#doUncatchEvents) 
+        label:(self class releaseViewIcon);
+        activeHelpKey:#doCatchEvents.
     self doRedraw
 !
 
@@ -2011,6 +2058,9 @@
     topWindow := aView topView.
 
     model catchEvents:true.
+    ((builder componentAt:'toolbarMenu') itemAt:#doUncatchEvents) 
+        label:(self class lockViewIcon);
+        activeHelpKey:#doUncatchEvents.
     self setRootItem:(ViewTreeItem buildViewsFrom:topWindow).
     self selectView:aView.
 ! !