equal
deleted
inserted
replaced
13 "{ Package: 'stx:libtool2' }" |
13 "{ Package: 'stx:libtool2' }" |
14 |
14 |
15 ToolApplicationModel subclass:#ImageEditor |
15 ToolApplicationModel subclass:#ImageEditor |
16 instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
16 instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
17 selectedColorIndex postOpenAction imageSeqNr' |
17 selectedColorIndex postOpenAction imageSeqNr' |
18 classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode' |
18 classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
|
19 DefaultRelativeSizes' |
19 poolDictionaries:'' |
20 poolDictionaries:'' |
20 category:'Interface-UIPainter' |
21 category:'Interface-UIPainter' |
21 ! |
22 ! |
22 |
23 |
23 !ImageEditor class methodsFor:'documentation'! |
24 !ImageEditor class methodsFor:'documentation'! |
1160 #window: |
1161 #window: |
1161 #(#WindowSpec |
1162 #(#WindowSpec |
1162 #label: 'Image Editor' |
1163 #label: 'Image Editor' |
1163 #name: 'Image Editor' |
1164 #name: 'Image Editor' |
1164 #min: #(#Point 400 320) |
1165 #min: #(#Point 400 320) |
1165 #bounds: #(#Rectangle 105 601 555 951) |
1166 #bounds: #(#Rectangle 16 46 466 396) |
1166 #menu: #menu |
1167 #menu: #menu |
1167 ) |
1168 ) |
1168 #component: |
1169 #component: |
1169 #(#SpecCollection |
1170 #(#SpecCollection |
1170 #collection: #( |
1171 #collection: #( |
1174 #menu: #menuToolbar |
1175 #menu: #menuToolbar |
1175 #style: #(#FontDescription #helvetica #medium #roman 10) |
1176 #style: #(#FontDescription #helvetica #medium #roman 10) |
1176 #showSeparatingLines: true |
1177 #showSeparatingLines: true |
1177 ) |
1178 ) |
1178 #(#VariableHorizontalPanelSpec |
1179 #(#VariableHorizontalPanelSpec |
1179 #name: 'variableHorizontalPanel1' |
1180 #name: 'horizontalPanel' |
1180 #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
1181 #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
1181 #snapMode: #both |
1182 #snapMode: #both |
1182 #barLevel: 1 |
1183 #barLevel: 1 |
1183 #component: |
1184 #component: |
1184 #(#SpecCollection |
1185 #(#SpecCollection |
1188 #level: 1 |
1189 #level: 1 |
1189 #component: |
1190 #component: |
1190 #(#SpecCollection |
1191 #(#SpecCollection |
1191 #collection: #( |
1192 #collection: #( |
1192 #(#VariableVerticalPanelSpec |
1193 #(#VariableVerticalPanelSpec |
1193 #name: 'VariableVerticalPanel1' |
1194 #name: 'verticalPanel' |
1194 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
1195 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
1195 #level: 0 |
1196 #level: 0 |
1196 #snapMode: #both |
1197 #snapMode: #both |
1197 #component: |
1198 #component: |
1198 #(#SpecCollection |
1199 #(#SpecCollection |
2925 |
2926 |
2926 ! ! |
2927 ! ! |
2927 |
2928 |
2928 !ImageEditor methodsFor:'startup / release'! |
2929 !ImageEditor methodsFor:'startup / release'! |
2929 |
2930 |
|
2931 closeDownViews |
|
2932 DefaultRelativeSizes := |
|
2933 Array |
|
2934 with:(builder componentAt:#horizontalPanel) relativeCorners |
|
2935 with:(builder componentAt:#verticalPanel) relativeCorners. |
|
2936 |
|
2937 super closeDownViews |
|
2938 ! |
|
2939 |
2930 closeRequest |
2940 closeRequest |
2931 "close request" |
2941 "close request" |
2932 |
2942 |
2933 imageEditView checkModified ifTrue:[super closeRequest] |
2943 imageEditView checkModified ifTrue:[super closeRequest] |
2934 |
2944 |
2938 "after opening, sets the masterApplication of the imageEditView to self" |
2948 "after opening, sets the masterApplication of the imageEditView to self" |
2939 |
2949 |
2940 super open. |
2950 super open. |
2941 |
2951 |
2942 imageEditView := (self componentAt: #imageEditView) subViews first. |
2952 imageEditView := (self componentAt: #imageEditView) subViews first. |
|
2953 ! |
|
2954 |
|
2955 postBuildWith:aBuilder |
|
2956 super postBuildWith:aBuilder. |
|
2957 |
|
2958 DefaultRelativeSizes notNil ifTrue:[ |
|
2959 (aBuilder componentAt:#horizontalPanel) relativeCorners:DefaultRelativeSizes first. |
|
2960 (aBuilder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
|
2961 ]. |
2943 ! |
2962 ! |
2944 |
2963 |
2945 postOpenWith:aBuilder |
2964 postOpenWith:aBuilder |
2946 "after opening, sets the masterApplication of the imageEditView to self; |
2965 "after opening, sets the masterApplication of the imageEditView to self; |
2947 evaluate the postOpenAction" |
2966 evaluate the postOpenAction" |