commit button spec added
authortz
Sat, 17 Jan 1998 18:06:23 +0100
changeset 758 f979af2fbb90
parent 757 094c6c7c4ce6
child 759 405baa7e92d4
commit button spec added
ToolApplicationModel.st
--- a/ToolApplicationModel.st	Fri Jan 16 16:20:10 1998 +0100
+++ b/ToolApplicationModel.st	Sat Jan 17 18:06:23 1998 +0100
@@ -221,6 +221,55 @@
           ) nil
           nil
       )
+!
+
+windowSpecForCommit
+    "this window spec was automatically generated by the ST/X UIPainter"
+
+    "do not manually edit this - the painter/builder may not be able to
+     handle the specification if its corrupted."
+
+    "
+     UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit
+     ToolApplicationModel new openInterface:#windowSpecForCommit
+    "
+
+    <resource: #canvas>
+
+    ^
+     
+       #(#FullSpec
+          #'window:' 
+           #(#WindowSpec
+              #'name:' 'unnamed canvas'
+              #'layout:' #(#LayoutFrame 264 0 340 0 563 0 399 0)
+              #'label:' 'unnamed canvas'
+              #'min:' #(#Point 100 22)
+              #'max:' #(#Point 1152 900)
+              #'bounds:' #(#Rectangle 264 340 564 400)
+              #'usePreferredExtent:' false
+          )
+          #'component:' 
+           #(#SpecCollection
+              #'collection:' 
+               #(
+                 #(#ActionButtonSpec
+                    #'name:' 'cancelButton'
+                    #'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1)
+                    #'label:' 'Cancel'
+                    #'model:' #cancel
+                    #'enableChannel:' #valueOfEnablingCommitButtons
+                )
+                 #(#ActionButtonSpec
+                    #'name:' 'okButton'
+                    #'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0)
+                    #'label:' 'OK'
+                    #'model:' #accept
+                    #'enableChannel:' #valueOfEnablingCommitButtons
+                )
+              )
+          )
+      )
 ! !
 
 !ToolApplicationModel class methodsFor:'resources'!
@@ -308,7 +357,7 @@
     "ImageEditor openOnClass:self andSelector:#rightIcon"
 
     <resource: #image>
-    ^(Depth2Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 21 85 85 85 85 85 37 85 85 85 85 85 41 85 64 0 0 0 42 85 74 170 170 170 170 149 74 170 170 170 170 165 74 170 170 170 170 165 74 170 170 170 170 149 69 85 85 85 106 85 85 85 85 85 41 85 85 85 85 85 37 85 85 85 85 85 21 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 192 0 0 224 0 0 240 127 255 248 127 255 252 127 255 254 127 255 254 127 255 252 127 255 248 0 0 240 0 0 224 0 0 192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 84 85 80 85 85 85 84 149 80 85 85 85 84 165 80 0 0 0 0 169 80 42 170 170 170 170 80 42 170 170 170 170 144 42 170 170 170 170 144 42 170 170 170 170 80 21 85 85 85 169 80 85 85 85 84 165 80 85 85 85 84 149 80 85 85 85 84 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 128 0 1 192 0 1 224 255 255 240 255 255 248 255 255 252 255 255 252 255 255 248 255 255 240 0 1 224 0 1 192 0 1 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
 
 runIcon
     "ImageEditor openOnClass:self andSelector:#runIcon"
@@ -326,7 +375,7 @@
     "ImageEditor openOnClass:self andSelector:#searchIcon"
 
     <resource: #image>
-    ^(Depth2Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 90 160 13 106 128 0 0 0 0 0 0 3 90 160 13 106 128 3 90 160 13 106 128 3 90 160 13 106 128 3 90 160 13 106 128 3 90 160 13 106 128 3 90 160 13 106 128 3 90 162 141 106 128 3 90 128 1 106 128 3 90 141 161 106 128 3 90 128 1 106 128 3 90 160 13 106 128 0 0 0 0 0 0 0 53 168 53 104 0 0 0 0 0 0 0 0 6 128 1 160 0 0 0 0 0 0 0 0 54 160 13 168 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color grey:74.5083); add:(Color grey:49.9962); add:(Color white); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 63 231 252 63 231 252 63 231 252 63 231 252 63 231 252 63 231 252 63 231 252 63 231 252 63 255 252 63 255 252 63 255 252 63 255 252 63 255 252 63 255 252 63 255 252 15 255 240 15 255 240 7 195 224 7 195 224 15 231 240 15 231 240 0 0 0]) ; yourself); yourself!
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 13 106 128 53 170 0 0 0 0 0 0 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 138 53 170 0 13 106 0 5 170 0 13 106 54 133 170 0 13 106 0 5 170 0 13 106 128 53 170 0 0 0 0 0 0 0 0 214 160 213 160 0 0 0 0 0 0 0 0 26 0 6 128 0 0 0 0 0 0 0 0 218 128 54 160 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color grey:74.5083); add:(Color grey:49.9962); add:(Color white); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 31 255 224 31 255 224 15 135 192 15 135 192 31 207 224 31 207 224]) ; yourself); yourself!
 
 startFileBrowserIcon
     "ImageEditor openOnClass:self andSelector:#startFileBrowserIcon"
@@ -392,7 +441,7 @@
     "ImageEditor openOnClass:self andSelector:#upRightIcon"
 
     <resource: #image>
-    ^(Depth2Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 85 85 85 85 84 85 85 85 85 85 84 149 85 85 85 85 84 165 85 80 0 0 0 169 85 82 170 170 170 170 85 82 170 170 170 170 149 82 170 170 170 170 149 82 170 170 170 170 85 82 169 85 85 169 85 82 169 85 84 165 85 82 169 85 84 149 85 82 169 85 84 85 85 82 169 85 85 85 85 82 169 85 85 85 85 82 169 85 85 85 85 82 169 85 85 85 85 82 169 85 85 85 85 82 169 85 85 85 85 82 169 85 85 85 85 82 169 85 85 85 85 81 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 1 128 0 1 192 0 1 224 63 255 240 63 255 248 63 255 252 63 255 252 63 255 248 63 255 240 63 1 224 63 1 192 63 1 128 63 0 0 63 0 0 63 0 0 63 0 0 63 0 0 63 0 0 63 0 0 63 0 0 63 0 0 0 0 0 0 0 0]) ; yourself); yourself! !
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 81 85 80 85 85 85 82 85 80 85 85 85 82 149 80 64 0 0 2 165 80 74 170 170 170 169 80 74 170 170 170 170 80 74 170 170 170 170 80 74 170 170 170 169 80 74 165 85 86 165 80 74 165 85 82 149 80 74 165 85 82 85 80 74 165 85 81 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 69 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 3 0 0 3 128 0 3 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 240 127 255 224 126 3 192 126 3 128 126 3 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 0 0 0]) ; yourself); yourself! !
 
 !ToolApplicationModel methodsFor:'accessing - views'!
 
@@ -404,36 +453,12 @@
 preferredExtent
 
     ^(self builder window width max: (self builder window subViews first preferredExtent x max:
-        (self menuToolbarView ? self builder window) preferredExtent x))
+     (self menuToolbarView ? self builder window) preferredExtent x))
      @ 
      (self builder window height max: ((self menuToolbarView ? self builder window) font height) * 20)
 
 ! !
 
-!ToolApplicationModel methodsFor:'accessing menu'!
-
-menuAbout
-
-    ^ self class menuAbout
-
-
-!
-
-menuHelp
-
-    ^ self class menuHelp
-
-
-!
-
-menuSettings
-    "this window spec was automatically generated by the UI Builder"
-
-    ^ self class menuSettings
-
-
-! !
-
 !ToolApplicationModel methodsFor:'action - settings'!
 
 languageSetting 
@@ -540,10 +565,25 @@
 
 
 
+!
+
+menuHelp
+
+  ^self class menuHelp
 ! !
 
 !ToolApplicationModel methodsFor:'aspects'!
 
+valueOfEnablingCommitButtons
+
+    |holder|
+    (holder := builder bindingAt:#valueOfEnablingCommitButtons) isNil ifTrue:[
+        builder aspectAt:#valueOfEnablingCommitButtons put:(holder :=  false asValue).
+    ].
+    ^ holder
+
+!
+
 valueOfHavingClipboard
 
     |holder|
@@ -789,5 +829,5 @@
 !ToolApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.6 1998-01-16 14:21:44 tz Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.7 1998-01-17 17:06:23 tz Exp $'
 ! !