equal
deleted
inserted
replaced
180 |
180 |
181 #(#FullSpec |
181 #(#FullSpec |
182 #'window:' |
182 #'window:' |
183 #(#WindowSpec |
183 #(#WindowSpec |
184 #'name:' 'Tab Basic' |
184 #'name:' 'Tab Basic' |
185 #'layout:' #(#LayoutFrame 171 0 551 0 477 0 751 0) |
185 #'layout:' #(#LayoutFrame 411 0 572 0 773 0 797 0) |
186 #'label:' 'Tab Basic' |
186 #'label:' 'Tab Basic' |
187 #'min:' #(#Point 10 10) |
187 #'min:' #(#Point 10 10) |
188 #'max:' #(#Point 1280 1024) |
188 #'max:' #(#Point 1280 1024) |
189 #'bounds:' #(#Rectangle 171 551 478 752) |
189 #'bounds:' #(#Rectangle 411 572 774 798) |
190 #'usePreferredExtent:' false |
190 #'usePreferredExtent:' false |
191 ) |
191 ) |
192 #'component:' |
192 #'component:' |
193 #(#SpecCollection |
193 #(#SpecCollection |
194 #'collection:' |
194 #'collection:' |
205 #'activeHelpKey:' #label |
205 #'activeHelpKey:' #label |
206 #'model:' #label |
206 #'model:' #label |
207 ) |
207 ) |
208 #(#CheckBoxSpec |
208 #(#CheckBoxSpec |
209 #'name:' 'TranslateLabel' |
209 #'name:' 'TranslateLabel' |
210 #'layout:' #(#LayoutOrigin 107 0 47 0) |
210 #'layout:' #(#LayoutOrigin 104 0 42 0) |
211 #'activeHelpKey:' #translateLabel |
211 #'activeHelpKey:' #translateLabel |
212 #'model:' #translateLabel |
212 #'model:' #translateLabel |
213 #'label:' 'Label derives from Application' |
213 #'label:' 'Label derives from Application' |
214 ) |
214 ) |
215 #(#ColorMenuSpec |
215 #(#ColorMenuSpec |
216 #'name:' 'ForegroundColorMenu' |
216 #'name:' 'ForegroundColorMenu' |
217 #'layout:' #(#LayoutFrame 75 0 124 0 -4 1.0 146 0) |
217 #'layout:' #(#LayoutFrame 75 0 124 0 -5 1.0 146 0) |
218 #'activeHelpKey:' #foregroundColor |
218 #'activeHelpKey:' #foregroundColor |
219 #'model:' #labelForegroundColor |
219 #'model:' #labelForegroundColor |
220 #'labelsAreColored:' false |
220 #'labelsAreColored:' false |
221 ) |
221 ) |
222 #(#LabelSpec |
222 #(#LabelSpec |
924 [ |
924 [ |
925 someObject value |
925 someObject value |
926 ifTrue: [self doTest] |
926 ifTrue: [self doTest] |
927 ifFalse:[testView lower. self selectionHolder value:1]. |
927 ifFalse:[testView lower. self selectionHolder value:1]. |
928 |
928 |
929 self valueOfInfoLabel value: self defaultInfoLabel. |
929 self updateInfoLabel |
930 ] |
930 ] |
931 ! ! |
931 ! ! |
932 |
932 |
933 !TabItemEditor methodsFor:'help'! |
933 !TabItemEditor methodsFor:'help'! |
934 |
934 |
947 |
947 |
948 selectedIndex:anIndex |
948 selectedIndex:anIndex |
949 |s oldSel| |
949 |s oldSel| |
950 |
950 |
951 self listOfLabels notEmpty ifTrue: [self canShowTestMode value: true]. |
951 self listOfLabels notEmpty ifTrue: [self canShowTestMode value: true]. |
|
952 anIndex notNil ifTrue: [self testMode value: false]. |
952 |
953 |
953 oldSel := selectedIndex. |
954 oldSel := selectedIndex. |
954 selectedIndex := anIndex ? 0. |
955 selectedIndex := anIndex ? 0. |
955 |
956 |
956 selectedIndex == oldSel ifTrue:[^ self]. |
957 selectedIndex == oldSel ifTrue:[^ self]. |
966 |
967 |
967 testView notNil ifTrue:[ |
968 testView notNil ifTrue:[ |
968 testView lower. |
969 testView lower. |
969 ]. |
970 ]. |
970 |
971 |
971 |
|
972 "self testMode value not & anIndex notNil ifTrue: [self testMode value: false]. |
|
973 " |
|
974 ! ! |
972 ! ! |
975 |
973 |
976 !TabItemEditor methodsFor:'startup / release'! |
974 !TabItemEditor methodsFor:'startup / release'! |
977 |
975 |
978 closeRequest |
976 closeRequest |
1074 "cut selected tab |
1072 "cut selected tab |
1075 " |
1073 " |
1076 |list index| |
1074 |list index| |
1077 |
1075 |
1078 (index := selectedIndex) ~~ 0 ifTrue:[ |
1076 (index := selectedIndex) ~~ 0 ifTrue:[ |
|
1077 self testMode value: false. |
1079 list := self listOfLabels. |
1078 list := self listOfLabels. |
1080 self clipboard:(listOfTabs at:index) deepCopy. |
1079 self clipboard:(listOfTabs at:index) deepCopy. |
1081 self selectionHolder value:0. |
1080 self selectionHolder value:0. |
1082 listOfTabs removeIndex:index. |
1081 listOfTabs removeIndex:index. |
1083 list removeIndex:index. |
1082 list removeIndex:index. |
1262 |
1261 |
1263 ! |
1262 ! |
1264 |
1263 |
1265 doNew |
1264 doNew |
1266 |
1265 |
|
1266 self testMode value: false. |
|
1267 |
1267 self modified:false. |
1268 self modified:false. |
1268 |
1269 |
1269 rebuildMode := true. |
1270 rebuildMode := true. |
1270 |
1271 |
1271 self selectionHolder value:0. |
1272 self selectionHolder value:0. |
1285 doPasteTab |
1286 doPasteTab |
1286 "paste a tab |
1287 "paste a tab |
1287 " |
1288 " |
1288 |tab| |
1289 |tab| |
1289 |
1290 |
|
1291 self testMode value: false. |
1290 tab := self class clipboard deepCopy. |
1292 tab := self class clipboard deepCopy. |
1291 listOfTabs add:tab afterIndex:selectedIndex. |
1293 listOfTabs add:tab afterIndex:selectedIndex. |
1292 self listOfLabels add:(tab label) afterIndex:selectedIndex. |
1294 self listOfLabels add:(tab label) afterIndex:selectedIndex. |
1293 hasChanged := true. |
1295 hasChanged := true. |
1294 |
1296 |