changeset 713 | f94e58bb44ac |
parent 697 | ca492fc8390a |
child 721 | 325eba9f37b7 |
712:bf8aa59e82b6 | 713:f94e58bb44ac |
---|---|
103 label |
103 label |
104 |
104 |
105 ^'GUI Builder' |
105 ^'GUI Builder' |
106 ! ! |
106 ! ! |
107 |
107 |
108 !UIPainter class methodsFor:'accessing-defaults'! |
|
109 |
|
110 defaultNameOfCanvas |
|
111 "returns the default name (id) of the application |
|
112 " |
|
113 ^'NewApplication' |
|
114 |
|
115 ! ! |
|
116 |
|
108 !UIPainter class methodsFor:'help specs'! |
117 !UIPainter class methodsFor:'help specs'! |
109 |
118 |
110 helpSpec |
119 helpSpec |
111 "return a dictionary filled with helpKey -> helptext associations. |
120 "return a dictionary filled with helpKey -> helptext associations. |
112 These are used by the activeHelp tool." |
121 These are used by the activeHelp tool." |
115 UIHelpTool openOnClass:UIPainter |
124 UIHelpTool openOnClass:UIPainter |
116 " |
125 " |
117 |
126 |
118 ^ super helpSpec addPairsFrom:#( |
127 ^ super helpSpec addPairsFrom:#( |
119 |
128 |
120 #accept |
|
121 'Writes back changes.' |
|
122 |
|
123 #alignSelectionBottom |
129 #alignSelectionBottom |
124 'Aligns selected widgets to the bottom edge of the dominant widget.' |
130 'Aligns the selected widgets to the bottom edge of the dominant widget.' |
125 |
131 |
126 #alignSelectionCenterHor |
132 #alignSelectionCenterHor |
127 'Aligns selected widgets vertical to the center of the dominant widget.' |
133 'Aligns the selected widgets vertically to the center of the dominant widget.' |
128 |
134 |
129 #alignSelectionCenterVer |
135 #alignSelectionCenterVer |
130 'Aligns selected widgets horizontal to the center of the dominant widget.' |
136 'Aligns the selected widgets horizontally to the center of the dominant widget.' |
131 |
137 |
132 #alignSelectionLeft |
138 #alignSelectionLeft |
133 'Aligns selected widgets to the left edge of the dominant widget.' |
139 'Aligns the selected widgets to the left edge of the dominant widget.' |
134 |
140 |
135 #alignSelectionLeftAndRight |
141 #alignSelectionLeftAndRight |
136 'Aligns selected widgets to the right and left edge of the dominant widget.' |
142 'Aligns the selected widgets to the right and left edge of the dominant widget.' |
137 |
143 |
138 #alignSelectionRight |
144 #alignSelectionRight |
139 'Aligns selected widgets to the right edge of the dominant widget.' |
145 'Aligns the selected widgets to the right edge of the dominant widget.' |
140 |
146 |
141 #alignSelectionTop |
147 #alignSelectionTop |
142 'Aligns selected widgets to the top edge of the dominant widget.' |
148 'Aligns the selected widgets to the top edge of the dominant widget.' |
143 |
149 |
144 #alignSelectionTopAndBottom |
150 #alignSelectionTopAndBottom |
145 'Aligns selected widgets to the top and bottom edge of the dominant widget.' |
151 'Aligns the selected widgets to the top and bottom edge of the dominant widget.' |
146 |
|
147 #cancel |
|
148 'Rereads specification and layout.' |
|
149 |
152 |
150 #centerSelectionHor |
153 #centerSelectionHor |
151 'Centers widgets horizontal to their top widget.' |
154 'Centers the selected widgets horizontally to their contained widget.' |
152 |
155 |
153 #centerSelectionVer |
156 #centerSelectionVer |
154 'Centers vertical horizontal in contained view.' |
157 'Centers the selected widgets vertically in their contained widget.' |
155 |
158 |
156 #copyExtent |
159 #changePositionDown |
157 'Copies extent of the selected widget.' |
160 'Changes the position of the widgets to the bottom.' |
158 |
161 |
159 #copyLayout |
162 #changePositionLeft |
160 'Copies layout of the selected widget.' |
163 'Changes the position of the widgets to the left.' |
164 |
|
165 #changePositionRight |
|
166 'Changes the position of the widgets to the right.' |
|
167 |
|
168 #changePositionUp |
|
169 'Changes the position of the widgets to the top.' |
|
170 |
|
171 #editDimensionCopyExtent |
|
172 'Copies the extent of the selected widgets.' |
|
173 |
|
174 #editDimensionCopyLayout |
|
175 'Copies the layout of the selected widgets.' |
|
176 |
|
177 #editDimensionDefaultExtent |
|
178 'Sets the selected widgets to their default extent.' |
|
179 |
|
180 #editDimensionDefaultHeight |
|
181 'Sets the selected widgets to their default height.' |
|
182 |
|
183 #editDimensionDefaultWidth |
|
184 'Sets the selected widgets to their default width.' |
|
185 |
|
186 #editDimensionPasteExtent |
|
187 'Sets the extent of the selected widgets to the last copied extent.' |
|
188 |
|
189 #editDimensionPasteHeight |
|
190 'Sets the height of the selected widgets to the height of the last copied layout/extent.' |
|
191 |
|
192 #editDimensionPasteLayout |
|
193 'Sets the layout of the selected widgets to the last copied layout.' |
|
194 |
|
195 #editDimensionPasteWidth |
|
196 'Sets the width of the selected widgets to the width of the last copied layout/extent.' |
|
197 |
|
198 #fileBrowseAspectMethods |
|
199 'Opens a System Browser to browse the aspect methods.' |
|
161 |
200 |
162 #fileLoad |
201 #fileLoad |
163 'Opens dialog to load an interface from a class.' |
202 'Opens a dialog to load a window spec from a class.' |
164 |
203 |
165 #fileLoadSubspec |
204 #fileLoadSubspec |
166 'Opens dialog to load an subspec interface from a class.' |
205 'Opens a dialog to load an sub spec from a class.' |
167 |
206 |
168 #fileNew |
207 #fileNew |
169 'Creates new interface.' |
208 'Creates a new window spec.' |
170 |
209 |
171 #filePickAnInterface |
210 #filePickAnInterface |
172 'Changes the cursor for moving it over another view to load its interface.' |
211 'Changes the cursor for moving it over another interface application to load its window spec.' |
173 |
212 |
174 #fileSave |
213 #fileSave |
175 'Saves current interface.' |
214 'Saves current window spec on current class and if modified the help spec.' |
176 |
215 |
177 #galleryShown |
216 #fileSaveAs |
178 'Shows or hide gallery view.' |
217 'Opens a dialog to select or create a class and selector in order to save current window spec.' |
179 |
218 |
180 #menuAlignment |
219 #fileShowWindowSpec |
181 'Provides a set of alignment operation on the current selected widgets.' |
220 'Opens a Workspace showing the current window spec.' |
182 |
221 |
183 #moveSelectionDown |
222 #generateAspectMethods |
184 'Moves selected widgets down.' |
223 'Generates aspect methods for defined aspect selectors of the widgets.' |
185 |
224 |
186 #moveSelectionLeft |
225 #generateHookMethods |
187 'Moves selected widgets out of parent widget.' |
226 'Generates startup/release methods. (#closeRequest, #postBuildWith:, #postOpenWith:)' |
188 |
227 |
189 #moveSelectionRight |
228 #moveWidgetDown |
190 'Moves selected widgets into next widget as child.' |
229 'Moves the selected widget one step down.' |
191 |
230 |
192 #moveSelectionUp |
231 #moveWidgetInto |
193 'Moves selected widgets up.' |
232 'Moves the selected widget into next widget as child widget.' |
194 |
233 |
195 #painterShown |
234 #moveWidgetOut |
196 'Shows or hide painter view.' |
235 'Moves the selected widget out of its parent widget.' |
236 |
|
237 #moveWidgetUp |
|
238 'Moves the selected widget one step up.' |
|
197 |
239 |
198 #pasteBuffer |
240 #pasteBuffer |
199 'Pastes widgets at current mouse position.' |
241 'Pastes the widgets of the clipboard at current mouse position.' |
200 |
|
201 #pasteExtent |
|
202 'Changes extent of all selected widgets to the last copied extent.' |
|
203 |
|
204 #pasteHeight |
|
205 'Changes height of all selected widgets to the last copied extent height.' |
|
206 |
|
207 #pasteLayout |
|
208 'Changes layout of all selected widgets to the last copied layout.' |
|
209 |
|
210 #pasteWidth |
|
211 'Changes width of all selected widgets to the last copied extent width.' |
|
212 |
242 |
213 #pasteWithLayout |
243 #pasteWithLayout |
214 'Pastes widgets without changing their layouts.' |
244 'Pastes the widgets of the clipboard without a changing of their layouts.' |
215 |
245 |
216 #setToDefaultExtent |
246 #settingsCanvas |
217 'Sets selected widgets to their default extent.' |
247 'Shows or hides the canvas window.' |
218 |
248 |
219 #setToDefaultHeight |
249 #settingsGallery |
220 'Sets selected widgets to their default height.' |
250 'Shows or hides the gallery window.' |
221 |
251 |
222 #setToDefaultWidth |
252 #settingsGridManager |
223 'Sets selected widgets to their default width.' |
253 'Opens a dialog to show/hide the grid points or to change the distances between them.' |
254 |
|
255 #settingsRedefineAspectMethods |
|
256 'Turns on/off the permission of redefinition of the aspect methods.' |
|
257 |
|
258 #settingsUndoManager |
|
259 'Opens a dialog to reverse a certain number of last edit action.' |
|
224 |
260 |
225 #spreadSelectionHor |
261 #spreadSelectionHor |
226 'Sets horizontal spaces between selected widgets as the same.' |
262 'Sets the horizontal spaces between the selected widgets as the same.' |
227 |
263 |
228 #spreadSelectionVer |
264 #spreadSelectionVer |
229 'Sets vertical spaces between selected widgets as the same.' |
265 'Sets the vertical spaces between the selected widgets as the same.' |
266 |
|
267 #testGeometryTestMode |
|
268 'Turns on/off the geometry test mode in order to define ratios of variable panels.' |
|
230 |
269 |
231 #testStartApplication |
270 #testStartApplication |
232 'Starts current application on loaded interface.' |
271 'Starts current application on current window spec.' |
233 |
272 |
234 ) |
273 ) |
235 ! ! |
274 ! ! |
236 |
275 |
237 !UIPainter class methodsFor:'helpers'! |
276 !UIPainter class methodsFor:'helpers'! |
313 <resource: #canvas> |
352 <resource: #canvas> |
314 |
353 |
315 ^ |
354 ^ |
316 |
355 |
317 #(#FullSpec |
356 #(#FullSpec |
318 #'window:' |
357 #window: |
319 #(#WindowSpec |
358 #(#WindowSpec |
320 #'name:' 'GUI Builder' |
359 #name: 'GUI Painter' |
321 #'layout:' #(#LayoutFrame 44 0 416 0 325 0 613 0) |
360 #layout: #(#LayoutFrame 171 0 570 0 452 0 767 0) |
322 #'label:' 'GUI Builder' |
361 #label: 'GUI Painter' |
323 #'min:' #(#Point 10 10) |
362 #min: #(#Point 10 10) |
324 #'max:' #(#Point 1280 1024) |
363 #max: #(#Point 1280 1024) |
325 #'bounds:' #(#Rectangle 44 416 326 614) |
364 #bounds: #(#Rectangle 171 570 453 768) |
326 #'usePreferredExtent:' false |
365 #usePreferredExtent: false |
327 ) |
366 ) |
328 #'component:' |
367 #component: |
329 #(#SpecCollection |
368 #(#SpecCollection |
330 #'collection:' |
369 #collection: |
331 #( |
370 #( |
332 #(#FramedBoxSpec |
371 #(#FramedBoxSpec |
333 #'name:' 'framedBox' |
372 #name: 'FramedBox' |
334 #'layout:' #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) |
373 #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) |
335 #'component:' |
374 #component: |
336 #(#SpecCollection |
375 #(#SpecCollection |
337 #'collection:' |
376 #collection: |
338 #( |
377 #( |
339 #(#CheckBoxSpec |
378 #(#CheckBoxSpec |
340 #'name:' 'show' |
379 #name: 'ShowGridCheckBox' |
341 #'layout:' #(#Point 23 24) |
380 #layout: #(#Point 23 24) |
342 #'model:' #showGrid |
381 #model: #showGrid |
343 #'label:' 'Show grid' |
382 #label: 'Show Grid' |
344 ) |
383 ) |
345 #(#CheckBoxSpec |
384 #(#CheckBoxSpec |
346 #'name:' 'align' |
385 #name: 'AlignCheckBox' |
347 #'layout:' #(#Point 23 52) |
386 #layout: #(#Point 23 52) |
348 #'model:' #alignToGrid |
387 #model: #alignToGrid |
349 #'label:' 'Align to Grid' |
388 #label: 'Align to Grid' |
350 ) |
389 ) |
351 #(#LabelSpec |
390 #(#LabelSpec |
352 #'name:' 'hrzLabel' |
391 #name: 'HorizontalPixelsLabel' |
353 #'layout:' #(#AlignmentOrigin 148 0 99 0 1 0.5) |
392 #layout: #(#AlignmentOrigin 148 0 99 0 1 0.5) |
354 #'label:' 'Horizontal Pixels:' |
393 #label: 'Horizontal Pixels:' |
355 #'adjust:' #right |
394 #adjust: #right |
356 #'resizeForLabel:' true |
395 #resizeForLabel: true |
357 ) |
396 ) |
358 #(#InputFieldSpec |
397 #(#InputFieldSpec |
359 #'name:' 'hrzField' |
398 #name: 'HorizontalPixelsField' |
360 #'layout:' #(#LayoutFrame 154 0 87 0 207 0 109 0) |
399 #layout: #(#LayoutFrame 154 0 87 0 207 0 109 0) |
361 #'model:' #hspace |
400 #model: #hspace |
362 #'type:' #numberOrNil |
401 #type: #numberOrNil |
363 ) |
402 ) |
364 #(#LabelSpec |
403 #(#LabelSpec |
365 #'name:' 'vrtLabel' |
404 #name: 'VerticalPixelsLabel' |
366 #'layout:' #(#AlignmentOrigin 149 0 124 0 1 0.5) |
405 #layout: #(#AlignmentOrigin 149 0 124 0 1 0.5) |
367 #'label:' 'Vertical Pixels:' |
406 #label: 'Vertical Pixels:' |
368 #'adjust:' #right |
407 #adjust: #right |
369 #'resizeForLabel:' true |
408 #resizeForLabel: true |
370 ) |
409 ) |
371 #(#InputFieldSpec |
410 #(#InputFieldSpec |
372 #'name:' 'vrtField' |
411 #name: 'VerticalPixelsField' |
373 #'layout:' #(#LayoutFrame 154 0 112 0 207 0 134 0) |
412 #layout: #(#LayoutFrame 154 0 112 0 207 0 134 0) |
374 #'model:' #vspace |
413 #model: #vspace |
375 #'type:' #numberOrNil |
414 #type: #numberOrNil |
376 ) |
415 ) |
377 ) |
416 ) |
378 ) |
417 ) |
379 #'label:' 'Grid Parameter' |
418 #label: 'Grid Parameter' |
380 #'labelPosition:' #topLeft |
419 #labelPosition: #topLeft |
381 ) |
420 ) |
382 #(#UISubSpecification |
421 #(#UISubSpecification |
383 #'name:' 'uISubSpecifica1' |
422 #name: 'CommitButtonsSubSpecView' |
384 #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
423 #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
385 #'majorKey:' #ToolApplicationModel |
424 #majorKey: #ToolApplicationModel |
386 #'minorKey:' #windowSpecForCommitWithoutChannels |
425 #minorKey: #windowSpecForCommitWithoutChannels |
387 ) |
426 ) |
388 ) |
427 ) |
389 ) |
428 ) |
390 ) |
429 ) |
391 ! |
430 ! |
402 " |
441 " |
403 |
442 |
404 <resource: #canvas> |
443 <resource: #canvas> |
405 |
444 |
406 ^ |
445 ^ |
407 |
446 |
408 #(#FullSpec |
447 #(#FullSpec |
409 #'window:' |
448 #'window:' |
410 #(#WindowSpec |
449 #(#WindowSpec |
411 #'name:' 'GUI Builder' |
450 #'name:' 'GUI Builder' |
412 #'layout:' #(#LayoutFrame 238 0 270 0 584 0 429 0) |
451 #'layout:' #(#LayoutFrame 238 0 270 0 584 0 429 0) |
467 #'model:' #superclassNameChannel |
506 #'model:' #superclassNameChannel |
468 #'comboList:' #superclassNameDefaults |
507 #'comboList:' #superclassNameDefaults |
469 ) |
508 ) |
470 ) |
509 ) |
471 ) |
510 ) |
472 #'label:' 'Class and selector for interface' |
511 #'label:' 'Define Class And Selector' |
473 #'labelPosition:' #topLeft |
512 #'labelPosition:' #topLeft |
474 ) |
513 ) |
475 #(#UISubSpecification |
514 #(#UISubSpecification |
476 #'name:' 'uISubSpecifica1' |
515 #'name:' 'uISubSpecifica1' |
477 #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
516 #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
479 #'minorKey:' #windowSpecForCommitWithoutChannels |
518 #'minorKey:' #windowSpecForCommitWithoutChannels |
480 ) |
519 ) |
481 ) |
520 ) |
482 ) |
521 ) |
483 ) |
522 ) |
523 |
|
484 ! |
524 ! |
485 |
525 |
486 windowSpec |
526 windowSpec |
487 "this window spec was automatically generated by the ST/X UIPainter" |
527 "this window spec was automatically generated by the ST/X UIPainter" |
488 |
528 |
498 <resource: #canvas> |
538 <resource: #canvas> |
499 |
539 |
500 ^ |
540 ^ |
501 |
541 |
502 #(#FullSpec |
542 #(#FullSpec |
503 #'window:' |
543 #window: |
504 #(#WindowSpec |
544 #(#WindowSpec |
505 #'name:' 'Tree-View' |
545 #name: 'GUI Painter' |
506 #'layout:' #(#LayoutFrame 340 0 328 0 892 0 853 0) |
546 #layout: #(#LayoutFrame 282 0 281 0 834 0 818 0) |
507 #'label:' 'Tree-View' |
547 #label: 'GUI Painter' |
508 #'min:' #(#Point 10 10) |
548 #min: #(#Point 10 10) |
509 #'max:' #(#Point 1160 870) |
549 #max: #(#Point 1160 870) |
510 #'bounds:' #(#Rectangle 340 328 893 854) |
550 #bounds: #(#Rectangle 282 281 835 819) |
511 #'menu:' #menu |
551 #menu: #menu |
512 #'usePreferredExtent:' false |
552 #usePreferredExtent: false |
513 ) |
553 ) |
514 #'component:' |
554 #component: |
515 #(#SpecCollection |
555 #(#SpecCollection |
516 #'collection:' |
556 #collection: |
517 #( |
557 #( |
518 #(#MenuPanelSpec |
558 #(#MenuPanelSpec |
519 #'name:' 'menuToolbarView' |
559 #name: 'menuToolbarView' |
520 #'layout:' #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0) |
560 #layout: #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0) |
521 #'tabable:' true |
561 #tabable: true |
522 #'menu:' #menuToolbar |
562 #menu: #menuToolbar |
523 #'showSeparatingLines:' true |
|
524 ) |
563 ) |
525 #(#VariableVerticalPanelSpec |
564 #(#VariableVerticalPanelSpec |
526 #'name:' 'vpanel' |
565 #name: 'vpanel' |
527 #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
566 #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
528 #'component:' |
567 #component: |
529 #(#SpecCollection |
568 #(#SpecCollection |
530 #'collection:' |
569 #collection: |
531 #( |
570 #( |
532 #(#VariableHorizontalPanelSpec |
571 #(#VariableHorizontalPanelSpec |
533 #'name:' 'hpanel' |
572 #name: 'hpanel' |
534 #'component:' |
573 #component: |
535 #(#SpecCollection |
574 #(#SpecCollection |
536 #'collection:' |
575 #collection: |
537 #( |
576 #( |
538 #(#ArbitraryComponentSpec |
577 #(#ArbitraryComponentSpec |
539 #'name:' 'treeView' |
578 #name: 'treeView' |
540 #'tabable:' true |
579 #tabable: true |
541 #'menu:' #menuEdit |
580 #menu: #menuEdit |
542 #'hasHorizontalScrollBar:' true |
581 #hasHorizontalScrollBar: true |
543 #'hasVerticalScrollBar:' true |
582 #hasVerticalScrollBar: true |
544 #'miniScrollerHorizontal:' true |
583 #miniScrollerHorizontal: true |
545 #'miniScrollerVertical:' true |
584 #miniScrollerVertical: true |
546 #'component:' #treeView |
585 #component: #treeView |
547 #'hasBorder:' false |
586 #hasBorder: false |
548 ) |
587 ) |
549 #(#ViewSpec |
588 #(#ViewSpec |
550 #'name:' 'specHolderView' |
589 #name: 'specHolderView' |
551 #'component:' |
590 #component: |
552 #(#SpecCollection |
591 #(#SpecCollection |
553 #'collection:' |
592 #collection: |
554 #( |
593 #( |
555 #(#ViewSpec |
594 #(#MenuPanelSpec |
556 #'name:' 'View' |
595 #name: 'menuToolbar2View' |
557 #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 28 0) |
596 #layout: #(#LayoutFrame -1 0.0 -2 0 -1 1.0 30 0) |
558 #'component:' |
597 #enableChannel: #canMoveOrAlignSelection |
598 #tabable: true |
|
599 #menu: #menuToolbar2 |
|
600 ) |
|
601 #(#NoteBookViewSpec |
|
602 #name: 'noteBook' |
|
603 #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -30 1.0) |
|
604 #enableChannel: #enableChannel |
|
605 #tabable: true |
|
606 #model: #tabModel |
|
607 #menu: #tabList |
|
608 #style: #(#FontDescription #helvetica #medium #roman 10) |
|
609 #canvas: #noteBookView |
|
610 ) |
|
611 #(#HorizontalPanelViewSpec |
|
612 #name: 'horizontalPanelView1' |
|
613 #layout: #(#LayoutFrame -128 1 -1 0 0 1.0 31 0) |
|
614 #component: |
|
559 #(#SpecCollection |
615 #(#SpecCollection |
560 #'collection:' |
616 #collection: |
561 #( |
617 #( |
562 #(#HorizontalPanelViewSpec |
618 #(#ArrowButtonSpec |
563 #'name:' 'panelViewButtons' |
619 #name: 'MoveLeftButton' |
564 #'layout:' #(#LayoutFrame 0 0.0 2 0 0 0.5 26 0) |
620 #activeHelpKey: #changePositionLeft |
565 #'component:' |
621 #tabable: true |
566 #(#SpecCollection |
622 #model: #moveSelectionLeft |
567 #'collection:' |
623 #enableChannel: #canMoveOrAlignSelection |
568 #( |
624 #isTriggerOnDown: true |
569 #(#CheckBoxSpec |
625 #direction: #left |
570 #'name:' 'checkBox1' |
626 #extent: #(#Point 32 32) |
571 #'model:' #galleryShown |
|
572 #'label:' 'Gallery' |
|
573 #'extent:' #(#Point 82 22) |
|
574 ) |
|
575 #(#CheckBoxSpec |
|
576 #'name:' 'checkBox2' |
|
577 #'model:' #painterShown |
|
578 #'label:' 'Canvas' |
|
579 #'extent:' #(#Point 119 22) |
|
580 ) |
|
581 ) |
|
582 ) |
|
583 #'horizontalLayout:' #left |
|
584 #'verticalLayout:' #top |
|
585 #'horizontalSpace:' 4 |
|
586 #'verticalSpace:' 4 |
|
587 ) |
627 ) |
588 #(#HorizontalPanelViewSpec |
628 #(#ArrowButtonSpec |
589 #'name:' 'horizontalPanelView1' |
629 #name: 'MoveRightButton' |
590 #'layout:' #(#LayoutFrame 0 0.5 2 0 0 1.0 26 0) |
630 #activeHelpKey: #changePositionRight |
591 #'component:' |
631 #model: #moveSelectionRight |
592 #(#SpecCollection |
632 #enableChannel: #canMoveOrAlignSelection |
593 #'collection:' |
633 #isTriggerOnDown: true |
594 #( |
634 #direction: #right |
595 #(#ArrowButtonSpec |
635 #extent: #(#Point 32 32) |
596 #'name:' 'arrowButton1' |
636 ) |
597 #'activeHelpKey:' #moveSelectionLeft |
637 #(#ArrowButtonSpec |
598 #'tabable:' true |
638 #name: 'MoveDownButton' |
599 #'model:' #moveSelectionLeft |
639 #activeHelpKey: #changePositionDown |
600 #'enableChannel:' #canMoveOrAlignSelection |
640 #model: #moveSelectionDown |
601 #'isTriggerOnDown:' true |
641 #enableChannel: #canMoveOrAlignSelection |
602 #'direction:' #left |
642 #isTriggerOnDown: true |
603 #'extent:' #(#Point 22 22) |
643 #direction: #down |
604 ) |
644 #extent: #(#Point 32 32) |
605 #(#ArrowButtonSpec |
645 ) |
606 #'name:' 'arrowButton2' |
646 #(#ArrowButtonSpec |
607 #'activeHelpKey:' #moveSelectionRight |
647 #name: 'MoveUpButton' |
608 #'model:' #moveSelectionRight |
648 #activeHelpKey: #changePositionUp |
609 #'enableChannel:' #canMoveOrAlignSelection |
649 #model: #moveSelectionUp |
610 #'isTriggerOnDown:' true |
650 #enableChannel: #canMoveOrAlignSelection |
611 #'direction:' #right |
651 #isTriggerOnDown: true |
612 #'extent:' #(#Point 22 22) |
652 #direction: #up |
613 ) |
653 #extent: #(#Point 32 32) |
614 #(#ArrowButtonSpec |
|
615 #'name:' 'arrowButton3' |
|
616 #'activeHelpKey:' #moveSelectionDown |
|
617 #'model:' #moveSelectionDown |
|
618 #'enableChannel:' #canMoveOrAlignSelection |
|
619 #'isTriggerOnDown:' true |
|
620 #'direction:' #down |
|
621 #'extent:' #(#Point 22 22) |
|
622 ) |
|
623 #(#ArrowButtonSpec |
|
624 #'name:' 'arrowButton4' |
|
625 #'activeHelpKey:' #moveSelectionUp |
|
626 #'model:' #moveSelectionUp |
|
627 #'enableChannel:' #canMoveOrAlignSelection |
|
628 #'isTriggerOnDown:' true |
|
629 #'direction:' #up |
|
630 #'extent:' #(#Point 22 22) |
|
631 ) |
|
632 ) |
|
633 ) |
|
634 #'horizontalLayout:' #right |
|
635 #'verticalLayout:' #top |
|
636 #'horizontalSpace:' 4 |
|
637 #'verticalSpace:' 4 |
|
638 ) |
654 ) |
639 ) |
655 ) |
640 ) |
656 ) |
641 #'level:' 1 |
657 #horizontalLayout: #fit |
642 ) |
658 #verticalLayout: #fit |
643 #(#NoteBookViewSpec |
659 #horizontalSpace: 0 |
644 #'name:' 'noteBook' |
660 #verticalSpace: 0 |
645 #'layout:' #(#LayoutFrame 0 0.0 29 0.0 0 1.0 -30 1.0) |
|
646 #'enableChannel:' #enableChannel |
|
647 #'tabable:' true |
|
648 #'model:' #tabModel |
|
649 #'menu:' #tabList |
|
650 #'style:' #(#FontDescription #helvetica #medium #roman 10) |
|
651 #'canvas:' #noteBookView |
|
652 ) |
661 ) |
653 #(#HorizontalPanelViewSpec |
662 #(#HorizontalPanelViewSpec |
654 #'name:' 'modifyPanel' |
663 #name: 'modifyPanel' |
655 #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0) |
664 #layout: #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0) |
656 #'component:' |
665 #component: |
657 #(#SpecCollection |
666 #(#SpecCollection |
658 #'collection:' |
667 #collection: |
659 #( |
668 #( |
660 #(#ActionButtonSpec |
669 #(#ActionButtonSpec |
661 #'name:' 'cancelButton' |
670 #name: 'cancelButton' |
662 #'activeHelpKey:' #cancel |
671 #activeHelpKey: #cancel |
663 #'label:' 'Cancel' |
672 #label: 'Cancel' |
664 #'tabable:' true |
673 #tabable: true |
665 #'model:' #cancel |
674 #model: #cancel |
666 #'enableChannel:' #modifiedChannel |
675 #enableChannel: #modifiedChannel |
667 #'extent:' #(#Point 179 24) |
676 #extent: #(#Point 183 24) |
668 ) |
677 ) |
669 #(#ActionButtonSpec |
678 #(#ActionButtonSpec |
670 #'name:' 'acceptButton' |
679 #name: 'acceptButton' |
671 #'activeHelpKey:' #accept |
680 #activeHelpKey: #accept |
672 #'label:' 'OK' |
681 #label: 'OK' |
673 #'tabable:' true |
682 #tabable: true |
674 #'model:' #accept |
683 #model: #accept |
675 #'enableChannel:' #modifiedChannel |
684 #enableChannel: #modifiedChannel |
676 #'extent:' #(#Point 180 24) |
685 #extent: #(#Point 183 24) |
677 ) |
686 ) |
678 ) |
687 ) |
679 ) |
688 ) |
680 #'horizontalLayout:' #fitSpace |
689 #horizontalLayout: #fitSpace |
681 #'verticalLayout:' #fitSpace |
690 #verticalLayout: #fitSpace |
682 #'horizontalSpace:' 3 |
691 #horizontalSpace: 3 |
683 #'verticalSpace:' 3 |
692 #verticalSpace: 3 |
684 ) |
693 ) |
685 ) |
694 ) |
686 ) |
695 ) |
687 #'borderWidth:' 1 |
696 #borderWidth: 1 |
688 ) |
697 ) |
689 ) |
698 ) |
690 ) |
699 ) |
691 #'level:' 1 |
700 #level: 1 |
692 #'handles:' #(#Any 0.329435 1.0) |
701 #handles: #(#Any 0.318264 1.0) |
693 ) |
702 ) |
694 #(#TextEditorSpec |
703 #(#TextEditorSpec |
695 #'name:' 'Transcript' |
704 #name: 'Transcript' |
696 #'hasHorizontalScrollBar:' true |
705 #hasHorizontalScrollBar: true |
697 #'hasVerticalScrollBar:' true |
706 #hasVerticalScrollBar: true |
698 #'miniScrollerHorizontal:' true |
707 #miniScrollerHorizontal: true |
699 #'miniScrollerVertical:' true |
708 #miniScrollerVertical: true |
700 ) |
709 ) |
701 ) |
710 ) |
702 ) |
711 ) |
703 #'handles:' #(#Any 0.880597 1.0) |
712 #handles: #(#Any 0.880597 1.0) |
704 ) |
713 ) |
705 #(#UISubSpecification |
714 #(#UISubSpecification |
706 #'name:' 'infoBarSubSpec' |
715 #name: 'infoBarSubSpec' |
707 #'layout:' #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
716 #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
708 #'majorKey:' #ToolApplicationModel |
717 #majorKey: #ToolApplicationModel |
709 #'minorKey:' #windowSpecForInfoBarWithClock |
718 #minorKey: #windowSpecForInfoBar |
710 ) |
719 ) |
711 ) |
720 ) |
712 ) |
721 ) |
713 ) |
722 ) |
714 ! ! |
723 ! ! |
738 #labelImage: #(#ResourceRetriever nil #menuIcon) |
747 #labelImage: #(#ResourceRetriever nil #menuIcon) |
739 #submenuChannel: #menuAbout |
748 #submenuChannel: #menuAbout |
740 ) |
749 ) |
741 #(#MenuItem |
750 #(#MenuItem |
742 #label: 'File' |
751 #label: 'File' |
743 #value: #file |
|
744 #enabled: #enableChannel |
752 #enabled: #enableChannel |
745 #submenu: |
753 #submenu: |
746 #(#Menu |
754 #(#Menu |
747 |
755 |
748 #( |
756 #( |
754 #(#MenuItem |
762 #(#MenuItem |
755 #label: '-' |
763 #label: '-' |
756 ) |
764 ) |
757 #(#MenuItem |
765 #(#MenuItem |
758 #label: 'Load...' |
766 #label: 'Load...' |
759 #value: #doFromClass |
767 #value: #doLoad |
760 #activeHelpKey: #fileLoad |
768 #activeHelpKey: #fileLoad |
761 ) |
769 ) |
762 #(#MenuItem |
770 #(#MenuItem |
763 #label: 'Load Subspec...' |
771 #label: 'Load Subspec...' |
764 #value: #loadSubspec |
772 #value: #doLoadSubspec |
765 #activeHelpKey: #fileLoadSubspec |
773 #activeHelpKey: #fileLoadSubspec |
766 ) |
774 ) |
767 #(#MenuItem |
775 #(#MenuItem |
768 #label: '-' |
776 #label: '-' |
769 ) |
777 ) |
770 #(#MenuItem |
778 #(#MenuItem |
771 #label: 'Save' |
779 #label: 'Save' |
772 #value: #doInstallSpec |
780 #value: #doSave |
773 #activeHelpKey: #fileSave |
781 #activeHelpKey: #fileSave |
774 ) |
782 ) |
775 #(#MenuItem |
783 #(#MenuItem |
776 #label: '-' |
784 #label: 'Save As...' |
785 #value: #doSaveAs |
|
786 #activeHelpKey: #fileSaveAs |
|
777 ) |
787 ) |
778 #(#MenuItem |
788 #(#MenuItem |
779 #label: 'Define Class And Selector...' |
789 #label: 'Define Class And Selector...' |
780 #value: #defineClassAndSelector |
790 #value: #defineClassAndSelector |
791 #activeHelpKey: #fileSaveAs |
|
781 ) |
792 ) |
782 #(#MenuItem |
793 #(#MenuItem |
783 #label: '-' |
794 #label: '-' |
784 ) |
795 ) |
785 #(#MenuItem |
796 #(#MenuItem |
786 #label: 'Create Aspect Methods' |
797 #label: 'Pick A Window Spec...' |
787 #value: #doInstallAspects |
|
788 #enabled: #hasSpecClass |
|
789 ) |
|
790 #(#MenuItem |
|
791 #label: 'Create Hook Methods' |
|
792 #value: #doInstallHooks |
|
793 #enabled: #hasSpecClass |
|
794 ) |
|
795 #(#MenuItem |
|
796 #label: '-' |
|
797 ) |
|
798 #(#MenuItem |
|
799 #label: 'Pick An Interface' |
|
800 #value: #doPickAView |
798 #value: #doPickAView |
801 #activeHelpKey: #filePickAnInterface |
799 #activeHelpKey: #filePickAnInterface |
802 ) |
800 ) |
803 #(#MenuItem |
801 #(#MenuItem |
804 #label: '-' |
802 #label: '-' |
805 ) |
803 ) |
806 #(#MenuItem |
804 #(#MenuItem |
807 #label: 'Show Interface Spec' |
805 #label: 'Show Window Spec' |
808 #value: #doWindowSpec |
806 #value: #doWindowSpec |
809 ) |
807 #activeHelpKey: #fileShowWindowSpec |
810 #(#MenuItem |
808 ) |
811 #label: 'Browse Interface Class' |
809 #(#MenuItem |
812 #value: #doBrowseAppClass |
810 #label: 'Browse Class' |
811 #value: #doBrowseClass |
|
812 #activeHelpKey: #fileBrowseClass |
|
813 #enabled: #hasSpecClass |
813 #enabled: #hasSpecClass |
814 ) |
814 ) |
815 #(#MenuItem |
815 #(#MenuItem |
816 #label: 'Browse Aspect Methods' |
816 #label: 'Browse Aspect Methods' |
817 #value: #doBrowseAspectMethods |
817 #value: #doBrowseAspectMethods |
818 #activeHelpKey: #fileBrowseAspectMethods |
|
818 #enabled: #hasSpecClass |
819 #enabled: #hasSpecClass |
819 ) |
820 ) |
820 #(#MenuItem |
821 #(#MenuItem |
821 #label: '-' |
822 #label: '-' |
822 ) |
823 ) |
834 #submenuChannel: #menuEdit |
835 #submenuChannel: #menuEdit |
835 ) |
836 ) |
836 #(#MenuItem |
837 #(#MenuItem |
837 #label: 'Align' |
838 #label: 'Align' |
838 #submenuChannel: #menuAlign |
839 #submenuChannel: #menuAlign |
840 ) |
|
841 #(#MenuItem |
|
842 #label: 'Generate' |
|
843 #submenu: |
|
844 #(#Menu |
|
845 |
|
846 #( |
|
847 #(#MenuItem |
|
848 #label: 'Aspect Methods' |
|
849 #value: #doInstallAspects |
|
850 #activeHelpKey: #generateAspectMethods |
|
851 #enabled: #hasSpecClass |
|
852 ) |
|
853 #(#MenuItem |
|
854 #label: '-' |
|
855 ) |
|
856 #(#MenuItem |
|
857 #label: 'Hook Methods' |
|
858 #value: #doInstallHooks |
|
859 #activeHelpKey: #generateHookMethods |
|
860 #enabled: #hasSpecClass |
|
861 ) |
|
862 ) nil |
|
863 nil |
|
864 ) |
|
839 ) |
865 ) |
840 #(#MenuItem |
866 #(#MenuItem |
841 #label: 'Test' |
867 #label: 'Test' |
842 #submenu: |
868 #submenu: |
843 #(#Menu |
869 #(#Menu |
851 #(#MenuItem |
877 #(#MenuItem |
852 #label: '-' |
878 #label: '-' |
853 ) |
879 ) |
854 #(#MenuItem |
880 #(#MenuItem |
855 #label: 'Geometry Test Mode' |
881 #label: 'Geometry Test Mode' |
882 #activeHelpKey: #testGeometryTestMode |
|
856 #indication: #testMode: |
883 #indication: #testMode: |
857 ) |
884 ) |
858 ) nil |
885 ) nil |
859 nil |
886 nil |
860 ) |
887 ) |
864 #submenu: |
891 #submenu: |
865 #(#Menu |
892 #(#Menu |
866 |
893 |
867 #( |
894 #( |
868 #(#MenuItem |
895 #(#MenuItem |
896 #label: 'Canvas' |
|
897 #activeHelpKey: #settingsCanvas |
|
898 #indication: #painterShown |
|
899 ) |
|
900 #(#MenuItem |
|
901 #label: 'Gallery' |
|
902 #activeHelpKey: #settingsGallery |
|
903 #indication: #galleryShown |
|
904 ) |
|
905 #(#MenuItem |
|
906 #label: '-' |
|
907 ) |
|
908 #(#MenuItem |
|
869 #label: 'Undo Manager...' |
909 #label: 'Undo Manager...' |
870 #value: #openUndoMenu |
910 #value: #openUndoMenu |
871 ) |
911 #activeHelpKey: #settingsUndoManager |
872 #(#MenuItem |
|
873 #label: '-' |
|
874 ) |
912 ) |
875 #(#MenuItem |
913 #(#MenuItem |
876 #label: 'Grid Manager...' |
914 #label: 'Grid Manager...' |
877 #value: #gridMenu |
915 #value: #gridMenu |
916 #activeHelpKey: #settingsGridManager |
|
917 ) |
|
918 #(#MenuItem |
|
919 #label: '-' |
|
920 ) |
|
921 #(#MenuItem |
|
922 #label: 'Redefine Aspect Methods' |
|
923 #activeHelpKey: #settingsRedefineAspectMethods |
|
924 #enabled: #hasSpecClass |
|
925 #indication: #doRedefineMethods: |
|
878 ) |
926 ) |
879 ) nil |
927 ) nil |
880 nil |
928 nil |
881 ) |
929 ) |
882 ) |
930 ) |
885 #submenuChannel: #menuHistory |
933 #submenuChannel: #menuHistory |
886 ) |
934 ) |
887 #(#MenuItem |
935 #(#MenuItem |
888 #label: 'Help' |
936 #label: 'Help' |
889 #startGroup: #right |
937 #startGroup: #right |
890 #submenuChannel: #menuHelp |
938 #submenu: |
939 #(#Menu |
|
940 |
|
941 #( |
|
942 #(#MenuItem |
|
943 #label: 'Documentation' |
|
944 #translateLabel: true |
|
945 #value: #openDocumentation |
|
946 #activeHelpKey: #helpTutorial |
|
947 #enabled: #valueOfHavingDocumentation |
|
948 ) |
|
949 #(#MenuItem |
|
950 #label: 'Examples' |
|
951 #translateLabel: true |
|
952 #value: #openExamples |
|
953 #activeHelpKey: #helpTutorial |
|
954 #enabled: #valueOfHavingExamples |
|
955 ) |
|
956 #(#MenuItem |
|
957 #label: '-' |
|
958 ) |
|
959 #(#MenuItem |
|
960 #label: 'Show Help Texts' |
|
961 #translateLabel: true |
|
962 #activeHelpKey: #helpShowHelp |
|
963 #indication: #showHelp: |
|
964 ) |
|
965 ) nil |
|
966 nil |
|
967 ) |
|
891 ) |
968 ) |
892 ) nil |
969 ) nil |
893 nil |
970 nil |
894 ) |
971 ) |
895 |
972 ! |
896 "Modified: / 27.2.1998 / 16:15:24 / cg" |
973 |
897 ! |
974 menuAlign |
898 |
|
899 menuAdd |
|
900 "this window spec was automatically generated by the ST/X MenuEditor" |
975 "this window spec was automatically generated by the ST/X MenuEditor" |
901 |
976 |
902 "do not manually edit this - the builder may not be able to |
977 "do not manually edit this - the builder may not be able to |
903 handle the specification if its corrupted." |
978 handle the specification if its corrupted." |
904 |
979 |
905 " |
980 " |
906 MenuEditor new openOnClass:UIPainter andSelector:#menuAdd |
981 MenuEditor new openOnClass:UIPainter andSelector:#menuAlign |
907 (Menu new fromLiteralArrayEncoding:(UIPainter menuAdd)) startUp |
982 (Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp |
908 " |
983 " |
909 |
984 |
910 <resource: #menu> |
985 <resource: #menu> |
911 |
986 |
912 ^ |
987 ^ |
913 |
988 |
914 #(#Menu |
989 #(#Menu |
915 |
990 |
916 #( |
991 #( |
917 #(#MenuItem |
992 #(#MenuItem |
918 #'label:' 'Buttons' |
993 #label: 'Left' |
919 #'submenu:' |
994 #value: #alignSelectionLeft |
920 #(#Menu |
995 #activeHelpKey: #alignSelectionLeft |
921 |
996 #enabled: #canMoveOrAlignSelection |
922 #( |
997 #labelImage: #(#ResourceRetriever #UIPainter #iconAlignL 'Left') |
923 #(#MenuItem |
998 ) |
924 #'label:' 'Action Button' |
999 #(#MenuItem |
925 #'value:' #'addWidget:' |
1000 #label: 'Right' |
926 #'argument:' #ActionButtonSpec |
1001 #value: #alignSelectionRight |
927 #'labelImage:' #(#ResourceRetriever #ActionButtonSpec #icon 'Action Button') |
1002 #activeHelpKey: #alignSelectionRight |
928 ) |
1003 #enabled: #canMoveOrAlignSelection |
929 #(#MenuItem |
1004 #labelImage: #(#ResourceRetriever #UIPainter #iconAlignR 'Right') |
930 #'label:' 'Arrow Button' |
1005 ) |
931 #'value:' #'addWidget:' |
1006 #(#MenuItem |
932 #'argument:' #ArrowButtonSpec |
1007 #label: 'Left & Right' |
933 #'labelImage:' #(#ResourceRetriever #ArrowButtonSpec #icon 'Arrow Button') |
1008 #value: #alignSelectionLeftAndRight |
934 ) |
1009 #activeHelpKey: #alignSelectionLeftAndRight |
935 #(#MenuItem |
1010 #enabled: #canMoveOrAlignSelection |
936 #'label:' '-' |
1011 #labelImage: #(#ResourceRetriever #UIPainter #iconAlignLR 'Left & Right') |
937 ) |
1012 ) |
938 #(#MenuItem |
1013 #(#MenuItem |
939 #'label:' 'Toggle' |
1014 #label: 'Top' |
940 #'value:' #'addWidget:' |
1015 #value: #alignSelectionTop |
941 #'argument:' #ToggleSpec |
1016 #activeHelpKey: #alignSelectionTop |
942 #'labelImage:' #(#ResourceRetriever #ToggleSpec #icon 'Toggle') |
1017 #enabled: #canMoveOrAlignSelection |
943 ) |
1018 #labelImage: #(#ResourceRetriever #UIPainter #iconAlignT 'Top') |
944 #(#MenuItem |
1019 ) |
945 #'label:' 'Radio Button' |
1020 #(#MenuItem |
946 #'value:' #'addWidget:' |
1021 #label: 'Bottom' |
947 #'argument:' #RadioButtonSpec |
1022 #value: #alignSelectionBottom |
948 #'labelImage:' #(#ResourceRetriever #RadioButtonSpec #icon 'Radio Button') |
1023 #activeHelpKey: #alignSelectionBottom |
949 ) |
1024 #enabled: #canMoveOrAlignSelection |
950 #(#MenuItem |
1025 #labelImage: #(#ResourceRetriever #UIPainter #iconAlignB 'Bottom') |
951 #'label:' '-' |
1026 ) |
952 ) |
1027 #(#MenuItem |
953 #(#MenuItem |
1028 #label: 'Top & Bottom' |
954 #'label:' 'Check Box' |
1029 #value: #alignSelectionTopAndBottom |
955 #'value:' #'addWidget:' |
1030 #activeHelpKey: #alignSelectionTopAndBottom |
956 #'argument:' #CheckBoxSpec |
1031 #enabled: #canMoveOrAlignSelection |
957 #'labelImage:' #(#ResourceRetriever #CheckBoxSpec #icon 'Check Box') |
1032 #labelImage: #(#ResourceRetriever #UIPainter #iconAlignTB 'Top & Bottom') |
958 ) |
1033 ) |
959 #(#MenuItem |
1034 #(#MenuItem |
960 #'label:' '-' |
1035 #label: '-' |
961 ) |
1036 ) |
962 #(#MenuItem |
1037 #(#MenuItem |
963 #'label:' 'Up Down Button' |
1038 #label: 'Centered Horizontal' |
964 #'value:' #'addWidget:' |
1039 #value: #alignSelectionCenterHor |
965 #'argument:' #UpDownButtonSpec |
1040 #activeHelpKey: #alignSelectionCenterHor |
966 #'labelImage:' #(#ResourceRetriever #UpDownButtonSpec #icon 'Up Down Button') |
1041 #enabled: #canMoveOrAlignSelection |
967 ) |
1042 ) |
968 #(#MenuItem |
1043 #(#MenuItem |
969 #'label:' '-' |
1044 #label: 'Centered Vertical' |
970 ) |
1045 #value: #alignSelectionCenterVer |
971 #(#MenuItem |
1046 #activeHelpKey: #alignSelectionCenterVer |
972 #'label:' 'Slider' |
1047 #enabled: #canMoveOrAlignSelection |
973 #'value:' #'addWidget:' |
1048 ) |
974 #'argument:' #SliderSpec |
1049 #(#MenuItem |
975 #'labelImage:' #(#ResourceRetriever #SliderSpec #icon 'Slider') |
1050 #label: '-' |
976 ) |
1051 ) |
977 #(#MenuItem |
1052 #(#MenuItem |
978 #'label:' 'Thumb Wheel' |
1053 #label: 'Center Horizontal In Frame' |
979 #'value:' #'addWidget:' |
1054 #value: #centerSelectionHor |
980 #'argument:' #ThumbWheelSpec |
1055 #activeHelpKey: #centerSelectionHor |
981 #'labelImage:' #(#ResourceRetriever #ThumbWheelSpec #icon 'Thumb Wheel') |
1056 #enabled: #canMoveOrAlignSelection |
982 ) |
1057 ) |
983 ) nil |
1058 #(#MenuItem |
984 nil |
1059 #label: 'Center Vertical In Frame' |
985 ) |
1060 #value: #centerSelectionVer |
986 ) |
1061 #activeHelpKey: #centerSelectionVer |
987 #(#MenuItem |
1062 #enabled: #canMoveOrAlignSelection |
988 #'label:' 'Menus' |
1063 ) |
989 #'submenu:' |
1064 #(#MenuItem |
990 #(#Menu |
1065 #label: '-' |
991 |
1066 ) |
992 #( |
1067 #(#MenuItem |
993 #(#MenuItem |
1068 #label: 'Spread Horizontal' |
994 #'label:' 'Combo Box' |
1069 #value: #spreadSelectionHor |
995 #'value:' #'addWidget:' |
1070 #activeHelpKey: #spreadSelectionHor |
996 #'argument:' #ComboBoxSpec |
1071 #enabled: #canMoveOrAlignSelection |
997 #'labelImage:' #(#ResourceRetriever #ComboBoxSpec #icon 'Combo Box') |
1072 ) |
998 ) |
1073 #(#MenuItem |
999 #(#MenuItem |
1074 #label: 'Spread Vertical' |
1000 #'label:' 'Combo List' |
1075 #value: #spreadSelectionVer |
1001 #'value:' #'addWidget:' |
1076 #activeHelpKey: #spreadSelectionVer |
1002 #'argument:' #ComboListSpec |
1077 #enabled: #canMoveOrAlignSelection |
1003 #'labelImage:' #(#ResourceRetriever #ComboListSpec #icon 'Combo List') |
|
1004 ) |
|
1005 #(#MenuItem |
|
1006 #'label:' 'PopUp List' |
|
1007 #'value:' #'addWidget:' |
|
1008 #'argument:' #PopUpListSpec |
|
1009 #'labelImage:' #(#ResourceRetriever #ComboListSpec #icon 'PopUp List') |
|
1010 ) |
|
1011 #(#MenuItem |
|
1012 #'label:' '-' |
|
1013 ) |
|
1014 #(#MenuItem |
|
1015 #'label:' 'Tab' |
|
1016 #'value:' #'addWidget:' |
|
1017 #'argument:' #TabViewSpec |
|
1018 #'labelImage:' #(#ResourceRetriever #TabViewSpec #icon 'Tab') |
|
1019 ) |
|
1020 #(#MenuItem |
|
1021 #'label:' 'Note Book' |
|
1022 #'value:' #'addWidget:' |
|
1023 #'argument:' #NoteBookViewSpec |
|
1024 #'labelImage:' #(#ResourceRetriever #NoteBookViewSpec #icon 'Note Book') |
|
1025 ) |
|
1026 #(#MenuItem |
|
1027 #'label:' 'Gallery' |
|
1028 #'value:' #'addWidget:' |
|
1029 #'argument:' #UIGalleryViewSpec |
|
1030 #'labelImage:' #(#ResourceRetriever #UIGalleryViewSpec #icon 'Gallery') |
|
1031 ) |
|
1032 #(#MenuItem |
|
1033 #'label:' '-' |
|
1034 ) |
|
1035 #(#MenuItem |
|
1036 #'label:' 'Menu Panel' |
|
1037 #'value:' #'addWidget:' |
|
1038 #'argument:' #MenuPanelSpec |
|
1039 #'labelImage:' #(#ResourceRetriever #MenuPanelSpec #icon 'Menu Panel') |
|
1040 ) |
|
1041 ) nil |
|
1042 nil |
|
1043 ) |
|
1044 ) |
|
1045 #(#MenuItem |
|
1046 #'label:' 'Text Views' |
|
1047 #'submenu:' |
|
1048 #(#Menu |
|
1049 |
|
1050 #( |
|
1051 #(#MenuItem |
|
1052 #'label:' 'Text Editor' |
|
1053 #'value:' #'addWidget:' |
|
1054 #'argument:' #TextEditorSpec |
|
1055 #'labelImage:' #(#ResourceRetriever #TextEditorSpec #icon 'Text Editor') |
|
1056 ) |
|
1057 #(#MenuItem |
|
1058 #'label:' 'Input Field' |
|
1059 #'value:' #'addWidget:' |
|
1060 #'argument:' #InputFieldSpec |
|
1061 #'labelImage:' #(#ResourceRetriever #InputFieldSpec #icon 'Input Field') |
|
1062 ) |
|
1063 #(#MenuItem |
|
1064 #'label:' '-' |
|
1065 ) |
|
1066 #(#MenuItem |
|
1067 #'label:' 'Label' |
|
1068 #'value:' #'addWidget:' |
|
1069 #'argument:' #LabelSpec |
|
1070 #'labelImage:' #(#ResourceRetriever #LabelSpec #icon 'Label') |
|
1071 ) |
|
1072 #(#MenuItem |
|
1073 #'label:' '-' |
|
1074 ) |
|
1075 #(#MenuItem |
|
1076 #'label:' 'HTML View' |
|
1077 #'value:' #'addWidget:' |
|
1078 #'argument:' #HTMLViewSpec |
|
1079 #'labelImage:' #(#ResourceRetriever #HTMLViewSpec #icon 'HTML View') |
|
1080 ) |
|
1081 ) nil |
|
1082 nil |
|
1083 ) |
|
1084 ) |
|
1085 #(#MenuItem |
|
1086 #'label:' 'Lists' |
|
1087 #'submenu:' |
|
1088 #(#Menu |
|
1089 |
|
1090 #( |
|
1091 #(#MenuItem |
|
1092 #'label:' 'List' |
|
1093 #'value:' #'addWidget:' |
|
1094 #'argument:' #SequenceViewSpec |
|
1095 #'labelImage:' #(#ResourceRetriever #SequenceViewSpec #icon 'List') |
|
1096 ) |
|
1097 #(#MenuItem |
|
1098 #'label:' 'Data Set List' |
|
1099 #'value:' #'addWidget:' |
|
1100 #'argument:' #DataSetSpec |
|
1101 #'labelImage:' #(#ResourceRetriever #DataSetSpec #icon 'Data Set List') |
|
1102 ) |
|
1103 #(#MenuItem |
|
1104 #'label:' '-' |
|
1105 ) |
|
1106 #(#MenuItem |
|
1107 #'label:' 'Tree List' |
|
1108 #'value:' #'addWidget:' |
|
1109 #'argument:' #SelectionInTreeViewSpec |
|
1110 #'labelImage:' #(#ResourceRetriever #SelectionInTreeViewSpec #icon 'Tree List') |
|
1111 ) |
|
1112 #(#MenuItem |
|
1113 #'label:' 'File Tree List' |
|
1114 #'value:' #'addWidget:' |
|
1115 #'argument:' #FileSelectionTreeSpec |
|
1116 #'labelImage:' #(#ResourceRetriever #FileSelectionTreeSpec #icon 'File Tree List') |
|
1117 ) |
|
1118 ) nil |
|
1119 nil |
|
1120 ) |
|
1121 ) |
|
1122 #(#MenuItem |
|
1123 #'label:' 'Boxes' |
|
1124 #'submenu:' |
|
1125 #(#Menu |
|
1126 |
|
1127 #( |
|
1128 #(#MenuItem |
|
1129 #'label:' 'Box' |
|
1130 #'value:' #'addWidget:' |
|
1131 #'argument:' #ViewSpec |
|
1132 #'labelImage:' #(#ResourceRetriever #ViewSpec #icon 'Box') |
|
1133 ) |
|
1134 #(#MenuItem |
|
1135 #'label:' 'Framed Box' |
|
1136 #'value:' #'addWidget:' |
|
1137 #'argument:' #FramedBoxSpec |
|
1138 #'labelImage:' #(#ResourceRetriever #FramedBoxSpec #icon 'Framed Box') |
|
1139 ) |
|
1140 #(#MenuItem |
|
1141 #'label:' '-' |
|
1142 ) |
|
1143 #(#MenuItem |
|
1144 #'label:' 'Horizontal Panel' |
|
1145 #'value:' #'addWidget:' |
|
1146 #'argument:' #HorizontalPanelViewSpec |
|
1147 #'labelImage:' #(#ResourceRetriever #HorizontalPanelViewSpec #icon 'Horizontal Panel') |
|
1148 ) |
|
1149 #(#MenuItem |
|
1150 #'label:' 'Vertical Panel' |
|
1151 #'value:' #'addWidget:' |
|
1152 #'argument:' #VerticalPanelViewSpec |
|
1153 #'labelImage:' #(#ResourceRetriever #VerticalPanelViewSpec #icon 'Vertical Panel') |
|
1154 ) |
|
1155 #(#MenuItem |
|
1156 #'label:' '-' |
|
1157 ) |
|
1158 #(#MenuItem |
|
1159 #'label:' 'Area Panel' |
|
1160 #'value:' #'addWidget:' |
|
1161 #'argument:' #PanelViewSpec |
|
1162 #'labelImage:' #(#ResourceRetriever #PanelViewSpec #icon 'Area Panel') |
|
1163 ) |
|
1164 #(#MenuItem |
|
1165 #'label:' '-' |
|
1166 ) |
|
1167 #(#MenuItem |
|
1168 #'label:' 'Variable Horizontal Panel' |
|
1169 #'value:' #'addWidget:' |
|
1170 #'argument:' #VariableHorizontalPanelSpec |
|
1171 #'labelImage:' #(#ResourceRetriever #VariableHorizontalPanelSpec #icon 'Variable Horizontal Panel') |
|
1172 ) |
|
1173 #(#MenuItem |
|
1174 #'label:' 'Variable Vertical Panel' |
|
1175 #'value:' #'addWidget:' |
|
1176 #'argument:' #VariableVerticalPanelSpec |
|
1177 #'labelImage:' #(#ResourceRetriever #VariableVerticalPanelSpec #icon 'Variable Vertical Panel') |
|
1178 ) |
|
1179 ) nil |
|
1180 nil |
|
1181 ) |
|
1182 ) |
|
1183 #(#MenuItem |
|
1184 #'label:' 'Misc' |
|
1185 #'submenu:' |
|
1186 #(#Menu |
|
1187 |
|
1188 #( |
|
1189 #(#MenuItem |
|
1190 #'label:' 'Arbitrary Component' |
|
1191 #'value:' #'addWidget:' |
|
1192 #'argument:' #ArbitraryComponentSpec |
|
1193 #'labelImage:' #(#ResourceRetriever #ArbitraryComponentSpec #icon 'Arbitrary Component') |
|
1194 ) |
|
1195 #(#MenuItem |
|
1196 #'label:' '-' |
|
1197 ) |
|
1198 #(#MenuItem |
|
1199 #'label:' 'Sub Specification' |
|
1200 #'value:' #'addWidget:' |
|
1201 #'argument:' #UISubSpecification |
|
1202 #'labelImage:' #(#ResourceRetriever #ArbitraryComponentSpec #icon 'Sub Specification') |
|
1203 ) |
|
1204 #(#MenuItem |
|
1205 #'label:' 'Sub Canvas' |
|
1206 #'value:' #'addWidget:' |
|
1207 #'argument:' #SubCanvasSpec |
|
1208 #'labelImage:' #(#ResourceRetriever #SubCanvasSpec #icon 'Sub Canvas') |
|
1209 ) |
|
1210 #(#MenuItem |
|
1211 #'label:' '-' |
|
1212 ) |
|
1213 #(#MenuItem |
|
1214 #'label:' 'Progress Indicator' |
|
1215 #'value:' #'addWidget:' |
|
1216 #'argument:' #ProgressIndicatorSpec |
|
1217 #'labelImage:' #(#ResourceRetriever #ProgressIndicatorSpec #icon 'Progress Indicator') |
|
1218 ) |
|
1219 #(#MenuItem |
|
1220 #'label:' '-' |
|
1221 ) |
|
1222 #(#MenuItem |
|
1223 #'label:' 'Divider' |
|
1224 #'value:' #'addWidget:' |
|
1225 #'argument:' #DividerSpec |
|
1226 #'labelImage:' #(#ResourceRetriever #DividerSpec #icon 'Divider') |
|
1227 ) |
|
1228 #(#MenuItem |
|
1229 #'label:' 'Region' |
|
1230 #'value:' #'addWidget:' |
|
1231 #'argument:' #RegionSpec |
|
1232 #'labelImage:' #(#ResourceRetriever #RegionSpec #icon 'Region') |
|
1233 ) |
|
1234 ) nil |
|
1235 nil |
|
1236 ) |
|
1237 ) |
1078 ) |
1238 ) nil |
1079 ) nil |
1239 nil |
1080 nil |
1240 ) |
1081 ) |
1241 ! |
1082 ! |
1242 |
1083 |
1243 menuAlign |
1084 menuEdit |
1244 "this window spec was automatically generated by the ST/X MenuEditor" |
1085 "this window spec was automatically generated by the ST/X MenuEditor" |
1245 |
1086 |
1246 "do not manually edit this - the builder may not be able to |
1087 "do not manually edit this - the builder may not be able to |
1247 handle the specification if its corrupted." |
1088 handle the specification if its corrupted." |
1248 |
1089 |
1249 " |
1090 " |
1250 MenuEditor new openOnClass:UIPainter andSelector:#menuAlign |
1091 MenuEditor new openOnClass:UIPainter andSelector:#menuEdit |
1251 (Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp |
1092 (Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp |
1252 " |
1093 " |
1253 |
1094 |
1254 <resource: #menu> |
1095 <resource: #menu> |
1255 |
1096 |
1256 ^ |
1097 ^ |
1257 |
1098 |
1258 #(#Menu |
1099 #(#Menu |
1259 |
1100 |
1260 #( |
1101 #( |
1261 #(#MenuItem |
1102 #(#MenuItem |
1262 #'label:' 'Align Left' |
1103 #label: 'Undo' |
1263 #'value:' #alignSelectionLeft |
1104 #nameKey: #undo |
1264 #'activeHelpKey:' #alignSelectionLeft |
1105 #value: #undoLast |
1265 #'enabled:' #hasSelection |
1106 #activeHelpKey: #editUndo |
1266 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignL 'Align Left') |
1107 #enabled: #hasUndoHistory |
1267 ) |
1108 #shortcutKeyCharacter: #Cmdu |
1268 #(#MenuItem |
1109 ) |
1269 #'label:' 'Align Right' |
1110 #(#MenuItem |
1270 #'value:' #alignSelectionRight |
1111 #label: '-' |
1271 #'activeHelpKey:' #alignSelectionRight |
1112 ) |
1272 #'enabled:' #hasSelection |
1113 #(#MenuItem |
1273 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignR 'Align Right') |
1114 #label: 'Cut' |
1274 ) |
1115 #value: #cutSelection |
1275 #(#MenuItem |
1116 #activeHelpKey: #editCut |
1276 #'label:' 'Align Left & Right' |
1117 #enabled: #valueOfCanCut |
1277 #'value:' #alignSelectionLeftAndRight |
1118 #shortcutKeyCharacter: #Cut |
1278 #'activeHelpKey:' #alignSelectionLeftAndRight |
1119 ) |
1279 #'enabled:' #hasSelection |
1120 #(#MenuItem |
1280 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignLR 'Align Left & Right') |
1121 #label: 'Copy' |
1281 ) |
1122 #value: #copySelection |
1282 #(#MenuItem |
1123 #activeHelpKey: #editCopy |
1283 #'label:' 'Align top' |
1124 #enabled: #valueOfCanCopy |
1284 #'value:' #alignSelectionTop |
1125 #shortcutKeyCharacter: #Copy |
1285 #'activeHelpKey:' #alignSelectionTop |
1126 ) |
1286 #'enabled:' #hasSelection |
1127 #(#MenuItem |
1287 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignT 'Align top') |
1128 #label: 'Paste' |
1288 ) |
1129 #value: #pasteBuffer |
1289 #(#MenuItem |
1130 #activeHelpKey: #pasteBuffer |
1290 #'label:' 'Align Bottom' |
1131 #enabled: #valueOfCanPaste |
1291 #'value:' #alignSelectionBottom |
1132 #shortcutKeyCharacter: #Paste |
1292 #'activeHelpKey:' #alignSelectionBottom |
1133 ) |
1293 #'enabled:' #hasSelection |
1134 #(#MenuItem |
1294 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignB 'Align Bottom') |
1135 #label: 'Delete' |
1295 ) |
1136 #value: #deleteSelection |
1296 #(#MenuItem |
1137 #enabled: #valueOfCanCut |
1297 #'label:' 'Align Top & Bottom' |
1138 #shortcutKeyCharacter: #Delete |
1298 #'value:' #alignSelectionTopAndBottom |
1139 ) |
1299 #'activeHelpKey:' #alignSelectionTopAndBottom |
1140 #(#MenuItem |
1300 #'enabled:' #hasSelection |
1141 #label: '-' |
1301 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignTB 'Align Top & Bottom') |
1142 ) |
1302 ) |
1143 #(#MenuItem |
1303 #(#MenuItem |
1144 #label: 'Paste With Layout' |
1304 #'label:' 'Align Centered Horizontal' |
1145 #value: #pasteWithLayout |
1305 #'value:' #alignSelectionCenterHor |
1146 #activeHelpKey: #pasteWithLayout |
1306 #'activeHelpKey:' #alignSelectionCenterHor |
1147 #enabled: #canKeepLayoutInSelection |
1307 #'enabled:' #hasSelection |
1148 ) |
1308 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterH 'Align Centered Horizontal') |
1149 #(#MenuItem |
1309 ) |
1150 #label: '-' |
1310 #(#MenuItem |
1151 ) |
1311 #'label:' 'Align Centered Vertical' |
1152 #(#MenuItem |
1312 #'value:' #alignSelectionCenterVer |
1153 #label: 'Move' |
1313 #'activeHelpKey:' #alignSelectionCenterVer |
1154 #submenuChannel: #menuMove |
1314 #'enabled:' #hasSelection |
1155 ) |
1315 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterV 'Align Centered Vertical') |
1156 #(#MenuItem |
1316 ) |
1157 #label: 'Dimension' |
1317 #(#MenuItem |
1158 #enabled: #hasSelection |
1318 #'label:' '-' |
1159 #submenu: |
1319 ) |
1160 #(#Menu |
1320 #(#MenuItem |
1161 |
1321 #'label:' 'Spread Horizontal' |
1162 #( |
1322 #'value:' #spreadSelectionHor |
1163 #(#MenuItem |
1323 #'activeHelpKey:' #spreadSelectionHor |
1164 #label: 'Default Extent' |
1324 #'enabled:' #hasSelection |
1165 #value: #setToDefaultExtent |
1325 ) |
1166 #activeHelpKey: #editDimensionDefaultExtent |
1326 #(#MenuItem |
1167 #enabled: #canMoveOrAlignSelection |
1327 #'label:' 'Spread Vertical' |
1168 ) |
1328 #'value:' #spreadSelectionVer |
1169 #(#MenuItem |
1329 #'activeHelpKey:' #spreadSelectionVer |
1170 #label: 'Default Width' |
1330 #'enabled:' #hasSelection |
1171 #value: #setToDefaultWidth |
1331 ) |
1172 #activeHelpKey: #editDimensionDefaultWidth |
1332 #(#MenuItem |
1173 #enabled: #canMoveOrAlignSelection |
1333 #'label:' '-' |
1174 ) |
1334 ) |
1175 #(#MenuItem |
1335 #(#MenuItem |
1176 #label: 'Default Height' |
1336 #'label:' 'Center Horizontal In Frame' |
1177 #value: #setToDefaultHeight |
1337 #'value:' #centerSelectionHor |
1178 #activeHelpKey: #editDimensionDefaultHeight |
1338 #'activeHelpKey:' #centerSelectionHor |
1179 #enabled: #canMoveOrAlignSelection |
1339 #'enabled:' #hasSelection |
1180 ) |
1340 ) |
1181 #(#MenuItem |
1341 #(#MenuItem |
1182 #label: '-' |
1342 #'label:' 'Center Vertical In Frame' |
1183 ) |
1343 #'value:' #centerSelectionVer |
1184 #(#MenuItem |
1344 #'activeHelpKey:' #centerSelectionVer |
1185 #label: 'Copy Layout' |
1345 #'enabled:' #hasSelection |
1186 #value: #copyLayout |
1187 #activeHelpKey: #editDimensionCopyLayout |
|
1188 #enabled: #hasSingleSelection |
|
1189 ) |
|
1190 #(#MenuItem |
|
1191 #label: 'Copy Extent' |
|
1192 #value: #copyExtent |
|
1193 #activeHelpKey: #editDimensionCopyExtent |
|
1194 #enabled: #hasSingleSelection |
|
1195 ) |
|
1196 #(#MenuItem |
|
1197 #label: '-' |
|
1198 ) |
|
1199 #(#MenuItem |
|
1200 #label: 'Paste Layout' |
|
1201 #value: #pasteLayout |
|
1202 #activeHelpKey: #editDimensionPasteLayout |
|
1203 #enabled: #canMoveOrAlignSelection |
|
1204 ) |
|
1205 #(#MenuItem |
|
1206 #label: 'Paste Extent' |
|
1207 #value: #pasteExtent |
|
1208 #activeHelpKey: #editDimensionPasteExtent |
|
1209 #enabled: #canMoveOrAlignSelection |
|
1210 ) |
|
1211 #(#MenuItem |
|
1212 #label: 'Paste Width' |
|
1213 #value: #pasteWidth |
|
1214 #activeHelpKey: #editDimensionPasteWidth |
|
1215 #enabled: #canMoveOrAlignSelection |
|
1216 ) |
|
1217 #(#MenuItem |
|
1218 #label: 'Paste Height' |
|
1219 #value: #pasteHeight |
|
1220 #activeHelpKey: #editDimensionPasteHeight |
|
1221 #enabled: #canMoveOrAlignSelection |
|
1222 ) |
|
1223 ) nil |
|
1224 nil |
|
1225 ) |
|
1346 ) |
1226 ) |
1347 ) nil |
1227 ) nil |
1348 nil |
1228 nil |
1349 ) |
1229 ) |
1350 |
1230 ! |
1351 "Modified: / 27.1.1998 / 21:27:33 / cg" |
1231 |
1352 ! |
1232 menuMove |
1353 |
|
1354 menuEdit |
|
1355 "this window spec was automatically generated by the ST/X MenuEditor" |
1233 "this window spec was automatically generated by the ST/X MenuEditor" |
1356 |
1234 |
1357 "do not manually edit this - the builder may not be able to |
1235 "do not manually edit this - the builder may not be able to |
1358 handle the specification if its corrupted." |
1236 handle the specification if its corrupted." |
1359 |
1237 |
1360 " |
1238 " |
1361 MenuEditor new openOnClass:UIPainter andSelector:#menuEdit |
1239 MenuEditor new openOnClass:UIPainter andSelector:#menuMove |
1362 (Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp |
1240 (Menu new fromLiteralArrayEncoding:(UIPainter menuMove)) startUp |
1363 " |
1241 " |
1364 |
1242 |
1365 <resource: #menu> |
1243 <resource: #menu> |
1366 |
1244 |
1367 ^ |
1245 ^ |
1368 |
1246 |
1369 #(#Menu |
1247 #(#Menu |
1370 |
1248 |
1371 #( |
1249 #( |
1372 #(#MenuItem |
1250 #(#MenuItem |
1373 #'label:' 'Cut' |
1251 #label: 'Up' |
1374 #'value:' #deleteSelection |
1252 #value: #doStepUp |
1375 #'activeHelpKey:' #editCut |
1253 #activeHelpKey: #moveWidgetUp |
1376 #'enabled:' #hasSelection |
1254 #enabled: #canMoveOrAlignSelection |
1377 #'shortcutKeyCharacter:' #Cut |
1255 #labelImage: #(#ResourceRetriever #ToolApplicationModel #upIcon 'Up') |
1378 ) |
1256 ) |
1379 #(#MenuItem |
1257 #(#MenuItem |
1380 #'label:' 'Copy' |
1258 #label: 'Down' |
1381 #'value:' #copySelection |
1259 #value: #doStepDown |
1382 #'activeHelpKey:' #editCopy |
1260 #activeHelpKey: #moveWidgetDown |
1383 #'enabled:' #hasSelection |
1261 #enabled: #canMoveOrAlignSelection |
1384 #'shortcutKeyCharacter:' #Copy |
1262 #labelImage: #(#ResourceRetriever #ToolApplicationModel #downIcon 'Down') |
1385 ) |
1263 ) |
1386 #(#MenuItem |
1264 #(#MenuItem |
1387 #'label:' 'Paste' |
1265 #label: 'Into' |
1388 #'nameKey:' #paste |
1266 #value: #doStepIn |
1389 #'value:' #paste |
1267 #activeHelpKey: #moveWidgetInto |
1390 #'activeHelpKey:' #editPaste |
1268 #enabled: #canMoveSelectionIntoContainer |
1391 #'enabled:' #canPaste |
1269 #labelImage: #(#ResourceRetriever #ToolApplicationModel #downRightIcon 'Into') |
1392 #'submenu:' |
1270 ) |
1393 #(#Menu |
1271 #(#MenuItem |
1394 |
1272 #label: 'Out' |
1395 #( |
1273 #value: #doStepOut |
1396 #(#MenuItem |
1274 #activeHelpKey: #moveWidgetOut |
1397 #'label:' 'Paste' |
1275 #enabled: #canMoveSelectionOutOfContainer |
1398 #'value:' #pasteBuffer |
1276 #labelImage: #(#ResourceRetriever #ToolApplicationModel #leftDownIcon 'Out') |
1399 #'activeHelpKey:' #pasteBuffer |
|
1400 #'shortcutKeyCharacter:' #Paste |
|
1401 ) |
|
1402 #(#MenuItem |
|
1403 #'label:' 'Keep Layout' |
|
1404 #'value:' #pasteWithLayout |
|
1405 #'activeHelpKey:' #pasteWithLayout |
|
1406 #'enabled:' #canKeepLayoutInSelection |
|
1407 ) |
|
1408 ) nil |
|
1409 nil |
|
1410 ) |
|
1411 ) |
|
1412 #(#MenuItem |
|
1413 #'label:' '-' |
|
1414 ) |
|
1415 #(#MenuItem |
|
1416 #'label:' 'Undo' |
|
1417 #'nameKey:' #undo |
|
1418 #'value:' #undoLast |
|
1419 #'activeHelpKey:' #editUndo |
|
1420 #'enabled:' #hasUndoHistory |
|
1421 #'shortcutKeyCharacter:' #Cmdu |
|
1422 ) |
|
1423 #(#MenuItem |
|
1424 #'label:' '-' |
|
1425 ) |
|
1426 #(#MenuItem |
|
1427 #'label:' 'Align' |
|
1428 #'submenuChannel:' #menuAlign |
|
1429 ) |
|
1430 #(#MenuItem |
|
1431 #'label:' 'Move' |
|
1432 #'submenuChannel:' #menuMove |
|
1433 ) |
|
1434 #(#MenuItem |
|
1435 #'label:' 'Dimension' |
|
1436 #'value:' #dimension |
|
1437 #'enabled:' #hasSelection |
|
1438 #'submenu:' |
|
1439 #(#Menu |
|
1440 |
|
1441 #( |
|
1442 #(#MenuItem |
|
1443 #'label:' 'Default Extent' |
|
1444 #'value:' #setToDefaultExtent |
|
1445 #'activeHelpKey:' #setToDefaultExtent |
|
1446 #'enabled:' #canMoveOrAlignSelection |
|
1447 ) |
|
1448 #(#MenuItem |
|
1449 #'label:' 'Default Width' |
|
1450 #'value:' #setToDefaultWidth |
|
1451 #'activeHelpKey:' #setToDefaultWidth |
|
1452 #'enabled:' #canMoveOrAlignSelection |
|
1453 ) |
|
1454 #(#MenuItem |
|
1455 #'label:' 'Default Height' |
|
1456 #'value:' #setToDefaultHeight |
|
1457 #'activeHelpKey:' #setToDefaultHeight |
|
1458 #'enabled:' #canMoveOrAlignSelection |
|
1459 ) |
|
1460 #(#MenuItem |
|
1461 #'label:' '-' |
|
1462 ) |
|
1463 #(#MenuItem |
|
1464 #'label:' 'Copy Extent' |
|
1465 #'value:' #copyExtent |
|
1466 #'activeHelpKey:' #copyExtent |
|
1467 #'enabled:' #hasSingleSelection |
|
1468 ) |
|
1469 #(#MenuItem |
|
1470 #'label:' '-' |
|
1471 ) |
|
1472 #(#MenuItem |
|
1473 #'label:' 'Paste Extent' |
|
1474 #'value:' #pasteExtent |
|
1475 #'activeHelpKey:' #pasteExtent |
|
1476 #'enabled:' #canMoveOrAlignSelection |
|
1477 ) |
|
1478 #(#MenuItem |
|
1479 #'label:' 'Paste Width' |
|
1480 #'value:' #pasteWidth |
|
1481 #'activeHelpKey:' #pasteWidth |
|
1482 #'enabled:' #canMoveOrAlignSelection |
|
1483 ) |
|
1484 #(#MenuItem |
|
1485 #'label:' 'Paste Height' |
|
1486 #'value:' #pasteHeight |
|
1487 #'activeHelpKey:' #pasteHeight |
|
1488 #'enabled:' #canMoveOrAlignSelection |
|
1489 ) |
|
1490 #(#MenuItem |
|
1491 #'label:' '-' |
|
1492 ) |
|
1493 #(#MenuItem |
|
1494 #'label:' 'Copy Layout' |
|
1495 #'value:' #copyLayout |
|
1496 #'activeHelpKey:' #copyLayout |
|
1497 #'enabled:' #hasSingleSelection |
|
1498 ) |
|
1499 #(#MenuItem |
|
1500 #'label:' 'Paste Layout' |
|
1501 #'value:' #pasteLayout |
|
1502 #'activeHelpKey:' #pasteLayout |
|
1503 #'enabled:' #canMoveOrAlignSelection |
|
1504 ) |
|
1505 ) nil |
|
1506 nil |
|
1507 ) |
|
1508 ) |
1277 ) |
1509 ) nil |
1278 ) nil |
1510 nil |
1279 nil |
1511 ) |
1280 ) |
1512 ! |
1281 ! |
1513 |
1282 |
1514 menuMove |
1283 menuToolbar |
1515 "this window spec was automatically generated by the ST/X MenuEditor" |
1284 "this window spec was automatically generated by the ST/X MenuEditor" |
1516 |
1285 |
1517 "do not manually edit this - the builder may not be able to |
1286 "do not manually edit this - the builder may not be able to |
1518 handle the specification if its corrupted." |
1287 handle the specification if its corrupted." |
1519 |
1288 |
1520 " |
1289 " |
1521 MenuEditor new openOnClass:UIPainter andSelector:#menuMove |
1290 MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar |
1522 (Menu new fromLiteralArrayEncoding:(UIPainter menuMove)) startUp |
1291 (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp |
1523 " |
1292 " |
1524 |
1293 |
1525 <resource: #menu> |
1294 <resource: #menu> |
1526 |
1295 |
1527 ^ |
1296 ^ |
1528 |
1297 |
1529 #(#Menu |
1298 #(#Menu |
1530 |
1299 |
1531 #( |
1300 #( |
1532 #(#MenuItem |
1301 #(#MenuItem |
1533 #'label:' 'Move Up' |
1302 #label: 'Start' |
1534 #'value:' #doStepUp |
1303 #isButton: true |
1535 #'activeHelpKey:' #moveSelectionUp |
1304 #value: #doStartApplication |
1536 #'enabled:' #canMoveOrAlignSelection |
1305 #activeHelpKey: #testStartApplication |
1537 #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #upIcon 'Move Up') |
1306 #labelImage: #(#ResourceRetriever nil #startIcon) |
1538 ) |
1307 ) |
1539 #(#MenuItem |
1308 #(#MenuItem |
1540 #'label:' 'Move Down' |
1309 #label: '' |
1541 #'value:' #doStepDown |
1310 ) |
1542 #'activeHelpKey:' #moveSelectionDown |
1311 #(#MenuItem |
1543 #'enabled:' #canMoveOrAlignSelection |
1312 #label: 'New' |
1544 #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downIcon 'Move Down') |
1313 #isButton: true |
1545 ) |
1314 #value: #doNew |
1546 #(#MenuItem |
1315 #activeHelpKey: #fileNew |
1547 #'label:' 'Move In' |
1316 #labelImage: #(#ResourceRetriever nil #newIcon) |
1548 #'value:' #doStepIn |
1317 ) |
1549 #'activeHelpKey:' #moveSelectionRight |
1318 #(#MenuItem |
1550 #'enabled:' #canMoveSelectionIntoContainer |
1319 #label: 'Load' |
1551 #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downRightIcon 'Move In') |
1320 #isButton: true |
1552 ) |
1321 #value: #doLoad |
1553 #(#MenuItem |
1322 #activeHelpKey: #fileLoad |
1554 #'label:' 'Move Out' |
1323 #labelImage: #(#ResourceRetriever nil #loadIcon) |
1555 #'value:' #doStepOut |
1324 ) |
1556 #'activeHelpKey:' #moveSelectionLeft |
1325 #(#MenuItem |
1557 #'enabled:' #canMoveSelectionOutOfContainer |
1326 #label: 'Save' |
1558 #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #leftDownIcon 'Move Out') |
1327 #isButton: true |
1328 #value: #doSave |
|
1329 #activeHelpKey: #fileSave |
|
1330 #labelImage: #(#ResourceRetriever nil #saveIcon) |
|
1331 ) |
|
1332 #(#MenuItem |
|
1333 #label: '' |
|
1334 ) |
|
1335 #(#MenuItem |
|
1336 #label: 'Cut' |
|
1337 #isButton: true |
|
1338 #value: #cutSelection |
|
1339 #activeHelpKey: #editCut |
|
1340 #enabled: #valueOfCanCut |
|
1341 #labelImage: #(#ResourceRetriever nil #cutIcon) |
|
1342 ) |
|
1343 #(#MenuItem |
|
1344 #label: 'Copy' |
|
1345 #isButton: true |
|
1346 #value: #copySelection |
|
1347 #activeHelpKey: #editCopy |
|
1348 #enabled: #valueOfCanCopy |
|
1349 #labelImage: #(#ResourceRetriever nil #copyIcon) |
|
1350 ) |
|
1351 #(#MenuItem |
|
1352 #label: 'Paste' |
|
1353 #isButton: true |
|
1354 #value: #pasteBuffer |
|
1355 #activeHelpKey: #editPaste |
|
1356 #enabled: #valueOfCanPaste |
|
1357 #labelImage: #(#ResourceRetriever nil #pasteIcon) |
|
1358 ) |
|
1359 #(#MenuItem |
|
1360 #label: 'Delete' |
|
1361 #isButton: true |
|
1362 #value: #deleteSelection |
|
1363 #activeHelpKey: #editDelete |
|
1364 #enabled: #valueOfCanCut |
|
1365 #labelImage: #(#ResourceRetriever nil #deleteIcon) |
|
1366 ) |
|
1367 #(#MenuItem |
|
1368 #label: '' |
|
1369 ) |
|
1370 #(#MenuItem |
|
1371 #label: 'Move Up' |
|
1372 #isButton: true |
|
1373 #value: #doStepUp |
|
1374 #activeHelpKey: #moveWidgetUp |
|
1375 #enabled: #canChangeOrderInContainer |
|
1376 #labelImage: #(#ResourceRetriever nil #upIcon) |
|
1377 ) |
|
1378 #(#MenuItem |
|
1379 #label: 'Move Down' |
|
1380 #isButton: true |
|
1381 #value: #doStepDown |
|
1382 #activeHelpKey: #moveWidgetDown |
|
1383 #enabled: #canChangeOrderInContainer |
|
1384 #labelImage: #(#ResourceRetriever nil #downIcon) |
|
1385 ) |
|
1386 #(#MenuItem |
|
1387 #label: 'Move Into' |
|
1388 #isButton: true |
|
1389 #value: #doStepIn |
|
1390 #activeHelpKey: #moveWidgetInto |
|
1391 #enabled: #canMoveSelectionIntoContainer |
|
1392 #labelImage: #(#ResourceRetriever nil #downRightIcon) |
|
1393 ) |
|
1394 #(#MenuItem |
|
1395 #label: 'Move Out' |
|
1396 #isButton: true |
|
1397 #value: #doStepOut |
|
1398 #activeHelpKey: #moveWidgetOut |
|
1399 #enabled: #canMoveSelectionOutOfContainer |
|
1400 #labelImage: #(#ResourceRetriever nil #leftDownIcon) |
|
1401 ) |
|
1402 #(#MenuItem |
|
1403 #label: '' |
|
1404 ) |
|
1405 #(#MenuItem |
|
1406 #label: 'Canvas' |
|
1407 #activeHelpKey: #settingsCanvas |
|
1408 #indication: #painterShown |
|
1409 ) |
|
1410 #(#MenuItem |
|
1411 #label: 'Gallery' |
|
1412 #activeHelpKey: #settingsGallery |
|
1413 #indication: #galleryShown |
|
1559 ) |
1414 ) |
1560 ) nil |
1415 ) nil |
1561 nil |
1416 nil |
1562 ) |
1417 ) |
1563 ! |
1418 ! |
1564 |
1419 |
1565 menuToolbar |
1420 menuToolbar2 |
1566 "this window spec was automatically generated by the ST/X MenuEditor" |
1421 "this window spec was automatically generated by the ST/X MenuEditor" |
1567 |
1422 |
1568 "do not manually edit this - the builder may not be able to |
1423 "do not manually edit this - the builder may not be able to |
1569 handle the specification if its corrupted." |
1424 handle the specification if its corrupted." |
1570 |
1425 |
1571 " |
1426 " |
1572 MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar |
1427 MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar2 |
1573 (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp |
1428 (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar2)) startUp |
1574 " |
1429 " |
1575 |
1430 |
1576 <resource: #menu> |
1431 <resource: #menu> |
1577 |
1432 |
1578 ^ |
1433 ^ |
1579 |
1434 |
1580 #(#Menu |
1435 #(#Menu |
1581 |
1436 |
1582 #( |
1437 #( |
1583 #(#MenuItem |
1438 #(#MenuItem |
1584 #'label:' 'Start' |
1439 #label: 'Align Left' |
1585 #'isButton:' true |
1440 #isButton: true |
1586 #'value:' #doStartApplication |
1441 #value: #alignSelectionLeft |
1587 #'activeHelpKey:' #testStartApplication |
1442 #activeHelpKey: #alignSelectionLeft |
1588 #'labelImage:' #(#ResourceRetriever nil #startIcon) |
1443 #labelImage: #(#ResourceRetriever nil #iconAlignL) |
1589 ) |
1444 ) |
1590 #(#MenuItem |
1445 #(#MenuItem |
1591 #'label:' '' |
1446 #label: 'Align Right' |
1592 ) |
1447 #isButton: true |
1593 #(#MenuItem |
1448 #value: #alignSelectionRight |
1594 #'label:' 'New' |
1449 #activeHelpKey: #alignSelectionRight |
1595 #'isButton:' true |
1450 #labelImage: #(#ResourceRetriever nil #iconAlignR) |
1596 #'value:' #doNew |
1451 ) |
1597 #'activeHelpKey:' #fileNew |
1452 #(#MenuItem |
1598 #'labelImage:' #(#ResourceRetriever nil #newIcon) |
1453 #label: 'Align Left & Right' |
1599 ) |
1454 #isButton: true |
1600 #(#MenuItem |
1455 #value: #alignSelectionLeftAndRight |
1601 #'label:' 'Load' |
1456 #activeHelpKey: #alignSelectionLeftAndRight |
1602 #'isButton:' true |
1457 #labelImage: #(#ResourceRetriever nil #iconAlignLR) |
1603 #'value:' #doFromClass |
1458 ) |
1604 #'activeHelpKey:' #fileLoad |
1459 #(#MenuItem |
1605 #'labelImage:' #(#ResourceRetriever nil #loadIcon) |
1460 #label: '' |
1606 ) |
1461 ) |
1607 #(#MenuItem |
1462 #(#MenuItem |
1608 #'label:' 'Save' |
1463 #label: 'Align Top' |
1609 #'isButton:' true |
1464 #isButton: true |
1610 #'value:' #doInstallSpec |
1465 #value: #alignSelectionTop |
1611 #'activeHelpKey:' #fileSave |
1466 #activeHelpKey: #alignSelectionTop |
1612 #'labelImage:' #(#ResourceRetriever nil #saveIcon) |
1467 #labelImage: #(#ResourceRetriever nil #iconAlignT) |
1613 ) |
1468 ) |
1614 #(#MenuItem |
1469 #(#MenuItem |
1615 #'label:' '' |
1470 #label: 'Align Bottom' |
1616 ) |
1471 #isButton: true |
1617 #(#MenuItem |
1472 #value: #alignSelectionBottom |
1618 #'label:' 'Move Up' |
1473 #activeHelpKey: #alignSelectionBottom |
1619 #'isButton:' true |
1474 #labelImage: #(#ResourceRetriever nil #iconAlignB) |
1620 #'value:' #doStepUp |
1475 ) |
1621 #'activeHelpKey:' #moveSelectionUp |
1476 #(#MenuItem |
1622 #'enabled:' #canChangeOrderInContainer |
1477 #label: 'Align Top & Bottom' |
1623 #'labelImage:' #(#ResourceRetriever nil #upIcon) |
1478 #isButton: true |
1624 ) |
1479 #value: #alignSelectionTopAndBottom |
1625 #(#MenuItem |
1480 #activeHelpKey: #alignSelectionTopAndBottom |
1626 #'label:' 'Move Down' |
1481 #labelImage: #(#ResourceRetriever nil #iconAlignTB) |
1627 #'isButton:' true |
|
1628 #'value:' #doStepDown |
|
1629 #'activeHelpKey:' #moveSelectionDown |
|
1630 #'enabled:' #canChangeOrderInContainer |
|
1631 #'labelImage:' #(#ResourceRetriever nil #downIcon) |
|
1632 ) |
|
1633 #(#MenuItem |
|
1634 #'label:' 'Move In' |
|
1635 #'isButton:' true |
|
1636 #'value:' #doStepIn |
|
1637 #'activeHelpKey:' #moveSelectionRight |
|
1638 #'enabled:' #canMoveSelectionIntoContainer |
|
1639 #'labelImage:' #(#ResourceRetriever nil #downRightIcon) |
|
1640 ) |
|
1641 #(#MenuItem |
|
1642 #'label:' 'Move Out' |
|
1643 #'isButton:' true |
|
1644 #'value:' #doStepOut |
|
1645 #'activeHelpKey:' #moveSelectionLeft |
|
1646 #'enabled:' #canMoveSelectionOutOfContainer |
|
1647 #'labelImage:' #(#ResourceRetriever nil #leftDownIcon) |
|
1648 ) |
|
1649 #(#MenuItem |
|
1650 #'label:' '' |
|
1651 ) |
|
1652 #(#MenuItem |
|
1653 #'label:' 'Align left' |
|
1654 #'isButton:' true |
|
1655 #'value:' #alignSelectionLeft |
|
1656 #'activeHelpKey:' #alignSelectionLeft |
|
1657 #'labelImage:' #(#ResourceRetriever nil #iconAlignL) |
|
1658 ) |
|
1659 #(#MenuItem |
|
1660 #'label:' 'Align right' |
|
1661 #'isButton:' true |
|
1662 #'value:' #alignSelectionRight |
|
1663 #'activeHelpKey:' #alignSelectionRight |
|
1664 #'labelImage:' #(#ResourceRetriever nil #iconAlignR) |
|
1665 ) |
|
1666 #(#MenuItem |
|
1667 #'label:' 'Align left & right' |
|
1668 #'isButton:' true |
|
1669 #'value:' #alignSelectionLeftAndRight |
|
1670 #'activeHelpKey:' #alignSelectionLeftAndRight |
|
1671 #'labelImage:' #(#ResourceRetriever nil #iconAlignLR) |
|
1672 ) |
|
1673 #(#MenuItem |
|
1674 #'label:' 'Align top' |
|
1675 #'isButton:' true |
|
1676 #'value:' #alignSelectionTop |
|
1677 #'activeHelpKey:' #alignSelectionTop |
|
1678 #'labelImage:' #(#ResourceRetriever nil #iconAlignT) |
|
1679 ) |
|
1680 #(#MenuItem |
|
1681 #'label:' 'Align bottom' |
|
1682 #'isButton:' true |
|
1683 #'value:' #alignSelectionBottom |
|
1684 #'activeHelpKey:' #alignSelectionBottom |
|
1685 #'labelImage:' #(#ResourceRetriever nil #iconAlignB) |
|
1686 ) |
|
1687 #(#MenuItem |
|
1688 #'label:' 'Align top & bottom' |
|
1689 #'isButton:' true |
|
1690 #'value:' #alignSelectionTopAndBottom |
|
1691 #'activeHelpKey:' #alignSelectionTopAndBottom |
|
1692 #'labelImage:' #(#ResourceRetriever nil #iconAlignTB) |
|
1693 ) |
|
1694 #(#MenuItem |
|
1695 #'label:' '' |
|
1696 ) |
|
1697 #(#MenuItem |
|
1698 #'label:' 'Align centered horizontal' |
|
1699 #'isButton:' true |
|
1700 #'value:' #alignSelectionCenterHor |
|
1701 #'activeHelpKey:' #alignSelectionCenterHor |
|
1702 #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterH) |
|
1703 ) |
|
1704 #(#MenuItem |
|
1705 #'label:' 'Align centered vertical' |
|
1706 #'isButton:' true |
|
1707 #'value:' #alignSelectionCenterVer |
|
1708 #'activeHelpKey:' #alignSelectionCenterVer |
|
1709 #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterV) |
|
1710 ) |
1482 ) |
1711 ) nil |
1483 ) nil |
1712 nil |
1484 nil |
1713 ) |
1485 ) |
1714 ! ! |
1486 ! ! |
1723 |
1495 |
1724 <resource: #image> |
1496 <resource: #image> |
1725 |
1497 |
1726 ^Icon |
1498 ^Icon |
1727 constantNamed:#'UIPainter iconAlignB' |
1499 constantNamed:#'UIPainter iconAlignB' |
1728 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@'); yourself); yourself]! |
1500 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself] |
1729 |
1501 ! |
1730 iconAlignCenterH |
|
1731 "Generated by the Image Editor" |
|
1732 " |
|
1733 ImageEditor openOnClass:self andSelector:#iconAlignCenterH |
|
1734 " |
|
1735 |
|
1736 <resource: #image> |
|
1737 |
|
1738 ^Icon |
|
1739 constantNamed:#'UIPainter iconAlignCenterH' |
|
1740 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUUPV*****)PV*****)PUUUMUUUPUUT?UUUPUUS?5UU\UUO?=UUWUT???UUPUTUUUUUPUUUUUUUPV*****)PV*****)PUUUMUUUPUUT?UUUPUUS?5UUPUUO?=UUPUT???UUWUTUUUUUPUUUUUUUPUUUUUUUP'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BO??0O??0@G@@@O @@_0@@?8@A?<@A?<@@@@@O??0O??3@G@@@O @@_0@@?8@A?<@A?<@@@@@@@@@'); yourself); yourself]! |
|
1741 |
|
1742 iconAlignCenterV |
|
1743 "Generated by the Image Editor" |
|
1744 " |
|
1745 ImageEditor openOnClass:self andSelector:#iconAlignCenterV |
|
1746 " |
|
1747 |
|
1748 <resource: #image> |
|
1749 |
|
1750 ^Icon |
|
1751 constantNamed:#'UIPainter iconAlignCenterV' |
|
1752 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUV%UV%PUUV%UV%PUUV%UV%PTEV$EV%PT=V$=V%PT?V$?V%PT?6$?6%WT?>$?>%PT?>$?>%_T?6$?6%PT?V$?V%PT=V$=V%PT5V$5V%WUUV%UV%PUUV%UV%PUUV%UV%_UUV%UV%WUUV%UV%PUUUUUUUPUUUUUUUQ'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@LA!!@LA @LA LM!! NM1 OM9 O-= O=? O=? O=? O-= OM9 NM1 DL!!#@LA @LA @LA @LA @@@C@@@@'); yourself); yourself]! |
|
1753 |
1502 |
1754 iconAlignL |
1503 iconAlignL |
1755 "Generated by the Image Editor" |
1504 "Generated by the Image Editor" |
1756 " |
1505 " |
1757 ImageEditor openOnClass:self andSelector:#iconAlignL |
1506 ImageEditor openOnClass:self andSelector:#iconAlignL |
1759 |
1508 |
1760 <resource: #image> |
1509 <resource: #image> |
1761 |
1510 |
1762 ^Icon |
1511 ^Icon |
1763 constantNamed:#'UIPainter iconAlignL' |
1512 constantNamed:#'UIPainter iconAlignL' |
1764 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@'); yourself); yourself]! |
1513 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself] |
1514 ! |
|
1765 |
1515 |
1766 iconAlignLR |
1516 iconAlignLR |
1767 "Generated by the Image Editor" |
1517 "Generated by the Image Editor" |
1768 " |
1518 " |
1769 ImageEditor openOnClass:self andSelector:#iconAlignLR |
1519 ImageEditor openOnClass:self andSelector:#iconAlignLR |
1771 |
1521 |
1772 <resource: #image> |
1522 <resource: #image> |
1773 |
1523 |
1774 ^Icon |
1524 ^Icon |
1775 constantNamed:#'UIPainter iconAlignLR' |
1525 constantNamed:#'UIPainter iconAlignLR' |
1776 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@'); yourself); yourself]! |
1526 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself] |
1527 ! |
|
1777 |
1528 |
1778 iconAlignR |
1529 iconAlignR |
1779 "Generated by the Image Editor" |
1530 "Generated by the Image Editor" |
1780 " |
1531 " |
1781 ImageEditor openOnClass:self andSelector:#iconAlignR |
1532 ImageEditor openOnClass:self andSelector:#iconAlignR |
1783 |
1534 |
1784 <resource: #image> |
1535 <resource: #image> |
1785 |
1536 |
1786 ^Icon |
1537 ^Icon |
1787 constantNamed:#'UIPainter iconAlignR' |
1538 constantNamed:#'UIPainter iconAlignR' |
1788 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@'); yourself); yourself]! |
1539 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself] |
1540 ! |
|
1789 |
1541 |
1790 iconAlignT |
1542 iconAlignT |
1791 "Generated by the Image Editor" |
1543 "Generated by the Image Editor" |
1792 " |
1544 " |
1793 ImageEditor openOnClass:self andSelector:#iconAlignT |
1545 ImageEditor openOnClass:self andSelector:#iconAlignT |
1795 |
1547 |
1796 <resource: #image> |
1548 <resource: #image> |
1797 |
1549 |
1798 ^Icon |
1550 ^Icon |
1799 constantNamed:#'UIPainter iconAlignT' |
1551 constantNamed:#'UIPainter iconAlignT' |
1800 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@'); yourself); yourself]! |
1552 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself] |
1553 ! |
|
1801 |
1554 |
1802 iconAlignTB |
1555 iconAlignTB |
1803 "Generated by the Image Editor" |
1556 "Generated by the Image Editor" |
1804 " |
1557 " |
1805 ImageEditor openOnClass:self andSelector:#iconAlignTB |
1558 ImageEditor openOnClass:self andSelector:#iconAlignTB |
1807 |
1560 |
1808 <resource: #image> |
1561 <resource: #image> |
1809 |
1562 |
1810 ^Icon |
1563 ^Icon |
1811 constantNamed:#'UIPainter iconAlignTB' |
1564 constantNamed:#'UIPainter iconAlignTB' |
1812 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@'); yourself); yourself]! ! |
1565 ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself] |
1566 ! ! |
|
1813 |
1567 |
1814 !UIPainter methodsFor:'actions'! |
1568 !UIPainter methodsFor:'actions'! |
1815 |
1569 |
1816 accept |
1570 accept |
1817 "accept changes done to the specification. The component assigned to the |
1571 "accept changes done to the specification. The component assigned to the |
1983 ! |
1737 ! |
1984 |
1738 |
1985 hasOneSelectionOtherThanCanvas |
1739 hasOneSelectionOtherThanCanvas |
1986 "returns a value holder which is true in case that one component is selected |
1740 "returns a value holder which is true in case that one component is selected |
1987 other than the canvas. |
1741 other than the canvas. |
1988 " |
1742 " |
1989 ^ builder booleanValueAspectFor:#hasOneSelectionOtherThanCanvas |
1743 ^ builder booleanValueAspectFor:#hasOneSelectionOtherThanCanvas |
1990 ! |
1744 ! |
1991 |
1745 |
1992 modifiedChannel |
1746 modifiedChannel |
1993 "returns a boolean value holder which is set to true if something is modified |
1747 "returns a boolean value holder which is set to true if something is modified |
2117 |cls aspect editor| |
1871 |cls aspect editor| |
2118 |
1872 |
2119 cls := self resolveName:specClass. |
1873 cls := self resolveName:specClass. |
2120 |
1874 |
2121 cls isNil ifTrue:[ |
1875 cls isNil ifTrue:[ |
2122 ^ self information:'No application class defined yet!!' |
1876 ^ self warn:'No application class defined yet!!' |
2123 ]. |
1877 ]. |
2124 |
1878 |
2125 cls notNil ifTrue:[ |
1879 cls notNil ifTrue:[ |
2126 (aspect := self specTool specification menuSelector) notNil ifTrue:[ |
1880 (aspect := self specTool specification menuSelector) notNil ifTrue:[ |
2127 aspect := aspect asSymbol |
1881 aspect := aspect asSymbol |
2138 ]. |
1892 ]. |
2139 ]. |
1893 ]. |
2140 |
1894 |
2141 editor := MenuEditor new. |
1895 editor := MenuEditor new. |
2142 editor masterApplication:self. |
1896 editor masterApplication:self. |
2143 editor useHelpDictionary:(self helpTool dictionary). |
1897 editor specClass: cls. |
1898 editor useHelpTool: self helpTool. |
|
2144 editor openModalOnClass:cls andSelector:aspect. |
1899 editor openModalOnClass:cls andSelector:aspect. |
2145 self helpTool updateList. |
1900 self helpTool updateList. |
2146 |
1901 |
2147 editor selectorName ~= aspect ifTrue:[ |
1902 editor selectorName ~= aspect ifTrue:[ |
2148 editor didInstall ifTrue:[ |
1903 editor didInstall ifTrue:[ |
2229 |cls aspect editor columns| |
1984 |cls aspect editor columns| |
2230 |
1985 |
2231 cls := self resolveName:specClass. |
1986 cls := self resolveName:specClass. |
2232 |
1987 |
2233 cls isNil ifTrue:[ |
1988 cls isNil ifTrue:[ |
2234 ^ self information:'no application class defined yet' |
1989 ^ self information:'No application class defined yet!!' |
2235 ]. |
1990 ]. |
2236 aspect := self specTool specification listSelector. |
1991 aspect := self specTool specification listSelector. |
2237 editor := TabItemEditor new. |
1992 editor := TabItemEditor new. |
2238 editor masterApplication:self. |
1993 editor masterApplication:self. |
2239 |
1994 |
2329 |
2084 |
2330 specClass isNil ifTrue: [^'No class and selector defined']. |
2085 specClass isNil ifTrue: [^'No class and selector defined']. |
2331 ^specClass printString, ' >> ', specSelector |
2086 ^specClass printString, ' >> ', specSelector |
2332 ! |
2087 ! |
2333 |
2088 |
2334 openTutorial |
2089 openDocumentation |
2335 |
2090 |
2336 self openTutorial: 'tools/uipainter/TOP.html' |
2091 self openHTMLDocument: 'tools/uipainter/TOP.html' |
2092 ! |
|
2093 |
|
2094 openExamples |
|
2095 |
|
2096 self openHTMLDocument: 'tools/uipainter/Examples.html' |
|
2337 ! |
2097 ! |
2338 |
2098 |
2339 showHelp:aHelpText for:view |
2099 showHelp:aHelpText for:view |
2340 "display active help texts in my own info area." |
2100 "display active help texts in my own info area." |
2341 |
2101 |
2366 |
2126 |
2367 !UIPainter methodsFor:'private'! |
2127 !UIPainter methodsFor:'private'! |
2368 |
2128 |
2369 checkModified |
2129 checkModified |
2370 "check interface modification |
2130 "check interface modification |
2371 " |
2131 " |
2372 self painter isModified |
2132 (self painter isModified or: [self helpTool isModified]) |
2373 ifTrue: |
2133 ifTrue: |
2374 [ |
2134 [ |
2375 ((YesNoBox title:'Interface was modified!!') |
2135 ((YesNoBox title:'Window Spec was modified!!') |
2376 noText:'Cancel'; |
2136 noText:'Cancel'; |
2377 yesText:'Waste it and proceed'; |
2137 yesText:'Waste it and proceed'; |
2378 showAtPointer; |
2138 showAtPointer; |
2379 accepted) ifFalse: [^false]. |
2139 accepted) ifFalse: [^false]. |
2380 self painter resetModification |
2140 self painter resetModification |
2408 " |
2168 " |
2409 aView map. |
2169 aView map. |
2410 aView bePartner. |
2170 aView bePartner. |
2411 ! |
2171 ! |
2412 |
2172 |
2173 resourceMessage: aString |
|
2174 |
|
2175 aString notNil "and: [self askForModification])" |
|
2176 ifTrue: |
|
2177 [ |
|
2178 |msg cls sel| |
|
2179 msg := aString asCollectionOfWords. |
|
2180 (msg size == 2 and: |
|
2181 [(cls := self resolveName:(msg at:1)) notNil]) |
|
2182 ifTrue: |
|
2183 [ |
|
2184 specClass := cls name. |
|
2185 specSuperclass := cls superclass name. |
|
2186 specSelector := (msg at: 2) asSymbol. |
|
2187 ^true |
|
2188 ] |
|
2189 ]. |
|
2190 ^false |
|
2191 ! |
|
2192 |
|
2413 setClass:cls selector:selector |
2193 setClass:cls selector:selector |
2414 "set the application class and the selector under which the |
2194 "set the application class and the selector under which the |
2415 window specification should be stored |
2195 window specification should be stored |
2416 " |
2196 " |
2417 |clsName superClassName| |
2197 |clsName superClassName| |
2559 ^ self |
2339 ^ self |
2560 ]. |
2340 ]. |
2561 |
2341 |
2562 self isModified ifTrue:[ |
2342 self isModified ifTrue:[ |
2563 whatToDo := DialogBox |
2343 whatToDo := DialogBox |
2564 confirmWithCancel:'Accept change made in ' , tabSelection printString , ' section?' |
2344 confirmWithCancel:'Accept modifications in section ' , tabSelection printString , '?' |
2565 labels:#('Cancel' 'Ignore' 'Accept') |
2345 labels:#('Cancel' 'Ignore' 'Accept') |
2566 default:3. |
2346 default:3. |
2567 whatToDo isNil ifTrue:[^self]. |
2347 whatToDo isNil ifTrue:[^self]. |
2568 whatToDo == true ifTrue:[ |
2348 whatToDo == true ifTrue:[ |
2569 self accept |
2349 self accept |
2580 ! |
2360 ! |
2581 |
2361 |
2582 treeSelection |
2362 treeSelection |
2583 "called whenever the selection of the treeview changed |
2363 "called whenever the selection of the treeview changed |
2584 " |
2364 " |
2585 |view list spec slices size property tabComponent| |
2365 |view list spec slices size property tabComponent canCutOrCopy canPaste clipboard sel| |
2586 |
2366 |
2587 self isModified ifTrue:[ |
2367 self isModified ifTrue:[ |
2588 (self confirm:'Accept change made in ' , tabSelection printString , ' section ?') ifTrue:[ |
2368 (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ |
2589 self accept |
2369 self accept |
2590 ] |
2370 ] |
2591 ]. |
2371 ]. |
2372 |
|
2592 self canMoveOrAlignSelection value:(treeView canMoveOrAlignSelection). |
2373 self canMoveOrAlignSelection value:(treeView canMoveOrAlignSelection). |
2593 self canChangeOrderInContainer value:(treeView canChangeOrderInContainer). |
2374 self canChangeOrderInContainer value:(treeView canChangeOrderInContainer). |
2594 self canMoveSelectionIntoContainer value:(treeView canMoveSelectionIntoContainer). |
2375 self canMoveSelectionIntoContainer value:(treeView canMoveSelectionIntoContainer). |
2595 self canMoveSelectionOutOfContainer value:(treeView canMoveSelectionOutOfContainer). |
2376 self canMoveSelectionOutOfContainer value:(treeView canMoveSelectionOutOfContainer). |
2596 self hasOneSelectionOtherThanCanvas value:(treeView hasOneSelectionOtherThanCanvas). |
2377 self hasOneSelectionOtherThanCanvas value:(treeView hasOneSelectionOtherThanCanvas). |
2636 self helpTool helpKey:nil. |
2417 self helpTool helpKey:nil. |
2637 tabComponent enabled:false. |
2418 tabComponent enabled:false. |
2638 self show:nil. |
2419 self show:nil. |
2639 ]. |
2420 ]. |
2640 self modifiedChannel value:false. |
2421 self modifiedChannel value:false. |
2422 |
|
2423 treeView notNil |
|
2424 ifTrue: |
|
2425 [ |
|
2426 canCutOrCopy := treeView selection size >= 1 and:[treeView selection first ~~ 1]. |
|
2427 clipboard := self getSelection. |
|
2428 |
|
2429 clipboard isCollection ifTrue:[clipboard notEmpty ifTrue:[sel := clipboard first]] |
|
2430 ifFalse:[sel := clipboard]. |
|
2431 |
|
2432 canPaste := (sel isKindOf:UISpecification) and: |
|
2433 [treeView selection size = 1 |
|
2434 and:[treeView selection first == 1 |
|
2435 or: [self canPasteInto: treeView selectedNode contents view]]] |
|
2436 ]. |
|
2437 |
|
2438 self valueOfCanCut value: canCutOrCopy. |
|
2439 self valueOfCanCopy value: canCutOrCopy. |
|
2440 self valueOfCanPaste value: canPaste |
|
2441 |
|
2641 ! ! |
2442 ! ! |
2642 |
2443 |
2643 !UIPainter methodsFor:'startup / release'! |
2444 !UIPainter methodsFor:'startup / release'! |
2644 |
2445 |
2645 closeRequest |
2446 closeRequest |
2646 "close all windows open by builder |
2447 "close all windows open by builder |
2647 " |
2448 " |
2449 |
|
2648 self checkModified ifFalse:[^self]. |
2450 self checkModified ifFalse:[^self]. |
2649 |
2451 |
2650 treeView model removeDependent:self. |
2452 treeView model removeDependent:self. |
2651 self painter release. |
2453 self painter release. |
2652 ColorMenu releaseResources. |
2454 ColorMenu releaseResources. |
2716 ifFalse:[#windowSpec]) asValue |
2518 ifFalse:[#windowSpec]) asValue |
2717 ). |
2519 ). |
2718 |
2520 |
2719 treeView := TreeView new. |
2521 treeView := TreeView new. |
2720 painterView := StandardSystemView new. |
2522 painterView := StandardSystemView new. |
2721 painterView label:'unnamed canvas'. |
2523 painterView name: self class defaultNameOfCanvas. |
2524 painterView label: self class defaultNameOfCanvas. |
|
2722 painterView extent:300@300. |
2525 painterView extent:300@300. |
2723 |
2526 |
2724 painter := UIPainterView in:painterView. |
2527 painter := UIPainterView in:painterView. |
2725 painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout. |
2528 painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout. |
2726 |
2529 |
2730 |
2533 |
2731 super openInterface:aSymbol. |
2534 super openInterface:aSymbol. |
2732 |
2535 |
2733 transcript := (self builder componentAt:#Transcript) scrolledView. |
2536 transcript := (self builder componentAt:#Transcript) scrolledView. |
2734 topView := self window. |
2537 topView := self window. |
2538 |
|
2735 topView label:'GUI Painter'. |
2539 topView label:'GUI Painter'. |
2736 |
2540 |
2737 painterView openInGroup:(topView windowGroup). |
2541 painterView openInGroup:(topView windowGroup). |
2542 |
|
2738 painterView application:self. |
2543 painterView application:self. |
2739 painterView open. |
2544 painterView open. |
2740 |
2545 |
2741 painterView application:self. |
2546 painterView application:self. |
2742 selectionPanel := UISelectionPanel new. |
2547 selectionPanel := UISelectionPanel new. |
2743 selectionPanel allButOpenInterface:#windowSpec. |
2548 selectionPanel allButOpenInterface:#windowSpec. |
2744 selectionPanel window openInGroup:(topView windowGroup). |
2549 selectionPanel window openInGroup:(topView windowGroup). |
2550 |
|
2745 selectionPanel openWindow. |
2551 selectionPanel openWindow. |
2746 selectionPanel masterApplication:self. |
2552 selectionPanel masterApplication:self. |
2747 |
2553 |
2748 topView iconLabel:'GUI Painter'. |
2554 topView iconLabel:'GUI Painter'. |
2749 topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100). |
2555 topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100). |
2757 |
2563 |
2758 selectionPanel window iconLabel:'GUI Painter'. |
2564 selectionPanel window iconLabel:'GUI Painter'. |
2759 selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100). |
2565 selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100). |
2760 |
2566 |
2761 ActiveHelp startFor:self. |
2567 ActiveHelp startFor:self. |
2762 ! |
|
2763 |
|
2764 openNewWindowCanvas |
|
2765 "open new |
|
2766 " |
|
2767 self open. |
|
2768 |
|
2769 |
2568 |
2770 ! |
2569 ! |
2771 |
2570 |
2772 openOnClass:aClass |
2571 openOnClass:aClass |
2773 "open up an interface builder |
2572 "open up an interface builder |
2780 via some selector |
2579 via some selector |
2781 " |
2580 " |
2782 |painter| |
2581 |painter| |
2783 |
2582 |
2784 aClass isNil ifTrue:[ |
2583 aClass isNil ifTrue:[ |
2785 (self confirm:'nil class given to UIPainter (class was probably renamed ?)\\Open anyway (to create a new interface) ?' withCRs) |
2584 (self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs) |
2786 ifFalse:[^ nil]. |
2585 ifFalse:[^ nil]. |
2787 ]. |
2586 ]. |
2788 |
2587 |
2789 self openInterface. |
2588 self openInterface. |
2790 |
2589 |
2791 aClass notNil ifTrue:[ |
2590 aClass notNil ifTrue:[ |
2792 painter := self painter. |
2591 painter := self painter. |
2793 self setClass:aClass selector:aSelector. |
2592 self setClass:aClass selector:aSelector. |
2794 (aClass respondsTo:aSelector) ifTrue:[ |
2593 (aClass respondsTo:aSelector) ifTrue:[ |
2795 painter setupFromSpec:(aClass perform:aSelector). |
2594 painter setupFromSpec:(aClass perform:aSelector). |
2595 treeView selection: #(1). |
|
2796 ] |
2596 ] |
2797 ] |
2597 ] |
2798 |
2598 |
2799 "Modified: / 25.10.1997 / 19:11:51 / cg" |
2599 "Modified: / 25.10.1997 / 19:11:51 / cg" |
2800 "Modified: / 5.2.1998 / 09:48:15 / stefan" |
2600 "Modified: / 5.2.1998 / 09:48:15 / stefan" |
2601 ! |
|
2602 |
|
2603 postOpenWith: aBuilder |
|
2604 |
|
2605 super postOpenWith: aBuilder. |
|
2606 |
|
2607 treeView selection: (Array with: 1). |
|
2608 self treeSelection. |
|
2609 self tabSelection: 'Basics' |
|
2610 |
|
2801 ! ! |
2611 ! ! |
2802 |
2612 |
2803 !UIPainter methodsFor:'user interactions'! |
2613 !UIPainter methodsFor:'user interactions'! |
2804 |
|
2805 doBrowseAppClass |
|
2806 "open a browser on the class" |
|
2807 |
|
2808 |cls| |
|
2809 |
|
2810 self painter isModified ifTrue:[ |
|
2811 self warn:'The current interface has not yet been saved.\\The browser will show the code of the old interface.' withCRs. |
|
2812 ]. |
|
2813 cls := self resolveName:specClass. |
|
2814 |
|
2815 cls notNil ifTrue:[ |
|
2816 SystemBrowser openInClass:cls |
|
2817 ] ifFalse:[ |
|
2818 self information:'No class defined!!'. |
|
2819 ]. |
|
2820 |
|
2821 ! |
|
2822 |
2614 |
2823 doBrowseAspectMethods |
2615 doBrowseAspectMethods |
2824 "open a browser on the aspect methods" |
2616 "open a browser on the aspect methods" |
2825 |
2617 |
2826 |cls methods| |
2618 |cls methods| |
2827 |
2619 |
2828 self painter isModified ifTrue:[ |
2620 self painter isModified ifTrue:[ |
2829 self warn:'The current interface has not yet been saved.\\The browser may show the code of the old aspect methods.' withCRs. |
2621 self warn:'The current window spec has not yet been saved!!\\The System Browser may show the code of the old aspect methods.' withCRs. |
2830 ]. |
2622 ]. |
2831 cls := self resolveName:specClass. |
2623 cls := self resolveName:specClass. |
2832 |
2624 |
2833 cls notNil ifTrue:[ |
2625 cls notNil ifTrue:[ |
2834 methods := self painter aspectMethods. |
2626 methods := self painter aspectMethods. |
2842 ]. |
2634 ]. |
2843 |
2635 |
2844 "Created: / 25.10.1997 / 19:07:55 / cg" |
2636 "Created: / 25.10.1997 / 19:07:55 / cg" |
2845 ! |
2637 ! |
2846 |
2638 |
2847 doFromClass |
2639 doBrowseClass |
2640 "open a browser on the class" |
|
2641 |
|
2642 |cls| |
|
2643 |
|
2644 self painter isModified ifTrue:[ |
|
2645 self warn:'The current window spec has not yet been saved!!\\The System Browser will show the code of the old window spec.' withCRs. |
|
2646 ]. |
|
2647 cls := self resolveName:specClass. |
|
2648 |
|
2649 cls notNil ifTrue:[ |
|
2650 SystemBrowser openInClass:cls |
|
2651 ] ifFalse:[ |
|
2652 self information:'No class defined!!'. |
|
2653 ]. |
|
2654 |
|
2655 ! |
|
2656 |
|
2657 doInstallAspects |
|
2658 "install aspects and actions |
|
2659 " |
|
2660 |code| |
|
2661 |
|
2662 self hasSpecClassAndSelector ifFalse:[ |
|
2663 self defineClassAndSelector |
|
2664 ]. |
|
2665 |
|
2666 self checkClassAndSelector ifFalse:[ |
|
2667 ^ self |
|
2668 ]. |
|
2669 |
|
2670 self painter className:specClass |
|
2671 superclassName:specSuperclass |
|
2672 selector:specSelector. |
|
2673 |
|
2674 code := self painter generateAspectMethods. |
|
2675 (ReadStream on:code) fileIn. |
|
2676 |
|
2677 ! |
|
2678 |
|
2679 doInstallHooks |
|
2680 "install application hooks |
|
2681 " |
|
2682 |code| |
|
2683 |
|
2684 self hasSpecClassAndSelector ifFalse:[ |
|
2685 self defineClassAndSelector |
|
2686 ]. |
|
2687 |
|
2688 self checkClassAndSelector ifFalse:[ |
|
2689 ^ self |
|
2690 ]. |
|
2691 |
|
2692 self painter className:specClass |
|
2693 superclassName:specSuperclass |
|
2694 selector:specSelector. |
|
2695 |
|
2696 code := self painter generateHookMethods. |
|
2697 (ReadStream on:code) fileIn. |
|
2698 |
|
2699 "Created: / 31.10.1997 / 17:37:54 / cg" |
|
2700 ! |
|
2701 |
|
2702 doLoad |
|
2848 |
2703 |
2849 self loadFromMessage: |
2704 self loadFromMessage: |
2850 (ResourceSelectionBrowser |
2705 (ResourceSelectionBrowser |
2851 request: 'Load Interface From Class' |
2706 request: 'Load Window Spec From Class' |
2852 onSuperclass: nil |
2707 onSuperclass: nil |
2853 andClass: specClass |
2708 andClass: specClass |
2854 andSelector: specSelector |
2709 andSelector: specSelector |
2855 withResourceTypes: #(canvas)) |
2710 withResourceTypes: #(canvas)) |
2856 ! |
2711 ! |
2857 |
2712 |
2858 doInstallAspects |
2713 doLoadSubspec |
2859 "install aspects and actions |
|
2860 " |
|
2861 |code| |
|
2862 |
|
2863 self hasSpecClassAndSelector ifFalse:[ |
|
2864 self defineClassAndSelector |
|
2865 ]. |
|
2866 |
|
2867 self checkClassAndSelector ifFalse:[ |
|
2868 ^ self |
|
2869 ]. |
|
2870 |
|
2871 self painter className:specClass |
|
2872 superclassName:specSuperclass |
|
2873 selector:specSelector. |
|
2874 |
|
2875 code := self painter generateAspectMethods. |
|
2876 (ReadStream on:code) fileIn. |
|
2877 |
|
2878 ! |
|
2879 |
|
2880 doInstallHooks |
|
2881 "install application hooks |
|
2882 " |
|
2883 |code| |
|
2884 |
|
2885 self hasSpecClassAndSelector ifFalse:[ |
|
2886 self defineClassAndSelector |
|
2887 ]. |
|
2888 |
|
2889 self checkClassAndSelector ifFalse:[ |
|
2890 ^ self |
|
2891 ]. |
|
2892 |
|
2893 self painter className:specClass |
|
2894 superclassName:specSuperclass |
|
2895 selector:specSelector. |
|
2896 |
|
2897 code := self painter generateHookMethods. |
|
2898 (ReadStream on:code) fileIn. |
|
2899 |
|
2900 "Created: / 31.10.1997 / 17:37:54 / cg" |
|
2901 ! |
|
2902 |
|
2903 doInstallSpec |
|
2904 "install window specification |
|
2905 " |
|
2906 |code painter| |
|
2907 |
|
2908 self hasSpecClassAndSelector ifFalse:[ |
|
2909 self defineClassAndSelector |
|
2910 ]. |
|
2911 |
|
2912 self checkClassAndSelector ifFalse:[ |
|
2913 ^ self |
|
2914 ]. |
|
2915 |
|
2916 self isModified ifTrue:[ |
|
2917 (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[ |
|
2918 self accept |
|
2919 ] ifFalse:[ |
|
2920 (self confirm:'Load old interface?') ifFalse:[ |
|
2921 ^ self |
|
2922 ] |
|
2923 ] |
|
2924 ]. |
|
2925 |
|
2926 painter := self painter. |
|
2927 |
|
2928 painter className:specClass |
|
2929 superclassName:specSuperclass |
|
2930 selector:specSelector. |
|
2931 |
|
2932 code := painter generateWindowSpecMethodSource withCRs. |
|
2933 painter resetModification. |
|
2934 (ReadStream on:code) fileIn. |
|
2935 |
|
2936 self helpTool installHelpSpecInto:specClass |
|
2937 ! |
|
2938 |
|
2939 doNew |
|
2940 "remove all components and associated resources |
|
2941 " |
|
2942 self painter isModified ifTrue:[ |
|
2943 (self confirm:'Edit a new interface without saving current?') ifFalse:[ |
|
2944 ^ self |
|
2945 ] |
|
2946 ]. |
|
2947 self painter removeAll. |
|
2948 ! |
|
2949 |
|
2950 doPickAView |
|
2951 "pick a view and setup specifications |
|
2952 " |
|
2953 |painter view cls spec app| |
|
2954 |
|
2955 self painter isModified ifTrue:[ |
|
2956 (self confirm:'pick another interface without saving your modifications ?') ifFalse:[ |
|
2957 ^ self |
|
2958 ] |
|
2959 ]. |
|
2960 |
|
2961 (view := Screen current viewFromUser) notNil ifTrue:[ |
|
2962 view == Screen current rootView ifFalse:[ |
|
2963 painter := self painter. |
|
2964 spec := UISpecification fromView:view topView. |
|
2965 |
|
2966 "/ ok, got it |
|
2967 |
|
2968 (app := view application) notNil ifTrue:[ |
|
2969 cls := app class |
|
2970 ] ifFalse:[ |
|
2971 cls := view class |
|
2972 ]. |
|
2973 self setClass:cls selector:nil. |
|
2974 |
|
2975 painter setupFromSpec:spec. |
|
2976 ] |
|
2977 ] |
|
2978 |
|
2979 "Modified: / 1.11.1997 / 13:47:49 / cg" |
|
2980 ! |
|
2981 |
|
2982 doStartApplication |
|
2983 "start current edited application |
|
2984 " |
|
2985 |cls app infoMessage| |
|
2986 |
|
2987 self isModified ifTrue:[ |
|
2988 (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[ |
|
2989 self accept. |
|
2990 "/ "XXX must be fixed - canvas changes are not recorded in the history |
|
2991 "/ so isModified returns false here |
|
2992 "/ |
|
2993 "/ self painter isModified ifTrue:[ |
|
2994 "/ |
|
2995 (self confirm:'Reinstall the new interface?' withCRs) ifTrue:[ |
|
2996 self doInstallSpec |
|
2997 ] |
|
2998 "/ ]. |
|
2999 ] |
|
3000 ]. |
|
3001 |
|
3002 (specClass notNil and:[specSelector size >= 2]) ifTrue:[ |
|
3003 "/ box suppressed, if no-class box is coming anyway ... |
|
3004 self painter isModified ifTrue:[ |
|
3005 (self confirm:'The current interface has not yet been reinstalled!!\\Start anyway (based upon the previous interface)?' withCRs) ifFalse:[ |
|
3006 ^ self |
|
3007 ] |
|
3008 ]. |
|
3009 ]. |
|
3010 |
|
3011 (specClass isNil or:[specSelector size < 2]) ifTrue:[ |
|
3012 self painter isModified ifTrue:[ |
|
3013 infoMessage := 'Class and selector must be defined,\and the interface must be saved first !!' withCRs. |
|
3014 ] ifFalse:[ |
|
3015 infoMessage := 'No class and selector defined !!'. |
|
3016 ] |
|
3017 ] ifFalse:[ |
|
3018 cls := self resolveName:specClass. |
|
3019 |
|
3020 cls isNil ifTrue:[ |
|
3021 infoMessage := 'Class does not exist!!'. |
|
3022 ] ifFalse:[ |
|
3023 (cls respondsTo:specSelector) ifFalse:[ |
|
3024 infoMessage := ('No method for: #' |
|
3025 , specSelector , ' in ' , cls name |
|
3026 , '\\(did you install the interface?)') withCRs. |
|
3027 ] |
|
3028 ] |
|
3029 ]. |
|
3030 |
|
3031 infoMessage notNil ifTrue:[ |
|
3032 ^ self information:infoMessage |
|
3033 ]. |
|
3034 app := cls new. |
|
3035 (app respondsTo:#openInterface:) ifFalse:[ |
|
3036 ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs. |
|
3037 ]. |
|
3038 app openInterface:specSelector |
|
3039 |
|
3040 "Modified: / 5.3.1998 / 03:25:36 / cg" |
|
3041 ! |
|
3042 |
|
3043 doWindowSpec |
|
3044 "create the window specification but do not write to application; instead |
|
3045 open a view |
|
3046 " |
|
3047 |code v| |
|
3048 |
|
3049 code := self painter generateWindowSpecMethodSource. |
|
3050 |
|
3051 v := CodeView open. |
|
3052 v contents:code. |
|
3053 v label:'windowSpec'. |
|
3054 |
|
3055 ! |
|
3056 |
|
3057 loadFromMessage: aMessage |
|
3058 |
|
3059 ((aMessage size > 0) and: [self checkModified]) |
|
3060 ifTrue: |
|
3061 [ |
|
3062 |readStream aClass aSelector| |
|
3063 readStream := aMessage readStream. |
|
3064 (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil |
|
3065 ifTrue: |
|
3066 [ |
|
3067 aSelector := readStream upToEnd asSymbol. |
|
3068 self setClass: aClass selector: aSelector. |
|
3069 (aClass respondsTo:aSelector) |
|
3070 ifTrue: |
|
3071 [ |
|
3072 self painter setupFromSpec:(aClass perform:aSelector). |
|
3073 ] |
|
3074 ] |
|
3075 ] |
|
3076 |
|
3077 ! |
|
3078 |
|
3079 loadSubspec |
|
3080 |
2714 |
3081 |subSpecMessage| |
2715 |subSpecMessage| |
3082 (subSpecMessage := ResourceSelectionBrowser |
2716 (subSpecMessage := ResourceSelectionBrowser |
3083 request: 'Load Subspec From Class' |
2717 request: 'Load Subspec From Class' |
3084 onSuperclass: nil |
2718 onSuperclass: nil |
3099 [ |
2733 [ |
3100 self addWidgetOfSpec: (Array with: (UISubSpecification new majorKey: aClass name; minorKey: aSelector)) |
2734 self addWidgetOfSpec: (Array with: (UISubSpecification new majorKey: aClass name; minorKey: aSelector)) |
3101 ] |
2735 ] |
3102 ] |
2736 ] |
3103 ] |
2737 ] |
2738 ! |
|
2739 |
|
2740 doNew |
|
2741 "remove all components and associated resources |
|
2742 " |
|
2743 self painter isModified ifTrue:[ |
|
2744 (self confirm:'Edit a new window spec without saving current?') ifFalse:[ |
|
2745 ^ self |
|
2746 ] |
|
2747 ]. |
|
2748 self painter removeAll. |
|
2749 ! |
|
2750 |
|
2751 doPickAView |
|
2752 "pick a view and setup specifications |
|
2753 " |
|
2754 |painter view cls spec app| |
|
2755 |
|
2756 self painter isModified ifTrue:[ |
|
2757 (self confirm:'Pick another window spec without saving your modifications?') ifFalse:[ |
|
2758 ^ self |
|
2759 ] |
|
2760 ]. |
|
2761 |
|
2762 (view := Screen current viewFromUser) notNil ifTrue:[ |
|
2763 view == Screen current rootView ifFalse:[ |
|
2764 painter := self painter. |
|
2765 spec := UISpecification fromView:view topView. |
|
2766 |
|
2767 "/ ok, got it |
|
2768 |
|
2769 (app := view application) notNil ifTrue:[ |
|
2770 cls := app class |
|
2771 ] ifFalse:[ |
|
2772 cls := view class |
|
2773 ]. |
|
2774 self setClass:cls selector:nil. |
|
2775 |
|
2776 painter setupFromSpec:spec. |
|
2777 ] |
|
2778 ] |
|
2779 |
|
2780 "Modified: / 1.11.1997 / 13:47:49 / cg" |
|
2781 ! |
|
2782 |
|
2783 doRedefineMethods |
|
2784 "redefine methods yes or no. If a method is defined in super class |
|
2785 should the message be reinstalled ? |
|
2786 " |
|
2787 ^ UIPainterView redefineMethods |
|
2788 |
|
2789 |
|
2790 ! |
|
2791 |
|
2792 doRedefineMethods:aBool |
|
2793 "redefine methods yes or no. If a method is defined in super class |
|
2794 should the message be reinstalled ? |
|
2795 " |
|
2796 UIPainterView redefineMethods:aBool |
|
2797 |
|
2798 |
|
2799 ! |
|
2800 |
|
2801 doSave |
|
2802 "install window spec |
|
2803 " |
|
2804 |code painter| |
|
2805 |
|
2806 self hasSpecClassAndSelector ifFalse:[ |
|
2807 self defineClassAndSelector |
|
2808 ]. |
|
2809 |
|
2810 (specClass notNil and: [(Smalltalk at: specClass asSymbol) isClass]) |
|
2811 ifFalse: |
|
2812 [ |
|
2813 ^nil |
|
2814 ]. |
|
2815 |
|
2816 self isModified ifTrue:[ |
|
2817 (self confirm:'Accept modifications in section ' , tabSelection printString , '?') ifTrue:[ |
|
2818 self accept |
|
2819 ] ifFalse:[ |
|
2820 (self confirm:'Load old window spec?') ifFalse:[ |
|
2821 ^ self |
|
2822 ] |
|
2823 ] |
|
2824 ]. |
|
2825 |
|
2826 painter := self painter. |
|
2827 |
|
2828 painter className:specClass |
|
2829 superclassName:specSuperclass |
|
2830 selector:specSelector. |
|
2831 |
|
2832 code := painter generateWindowSpecMethodSource withCRs. |
|
2833 painter resetModification. |
|
2834 (ReadStream on:code) fileIn. |
|
2835 |
|
2836 self helpTool installHelpSpecInto:specClass. |
|
2837 |
|
2838 self updateInfoLabel. |
|
2839 self painter resetModification. |
|
2840 |
|
2841 ((Smalltalk at: specClass asSymbol) class implements: specSelector) |
|
2842 ifTrue: |
|
2843 [ |
|
2844 self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. |
|
2845 ]. |
|
2846 |
|
2847 |
|
2848 ! |
|
2849 |
|
2850 doSaveAs |
|
2851 "launch a dialog to define class, superclass and method" |
|
2852 |
|
2853 |resourceMessage| |
|
2854 |
|
2855 (resourceMessage := ResourceSelectionBrowser |
|
2856 request: 'Save In Class' |
|
2857 onSuperclass: #Object |
|
2858 andClass: specClass ? #ApplicationModel |
|
2859 andSelector: specSelector ? #windowSpec |
|
2860 withResourceTypes: #(canvas)) notNil |
|
2861 ifTrue: |
|
2862 [ |
|
2863 (self resourceMessage: resourceMessage) |
|
2864 ifTrue: |
|
2865 [ |
|
2866 self doSave. |
|
2867 ^true |
|
2868 ] |
|
2869 ] |
|
2870 |
|
2871 ! |
|
2872 |
|
2873 doStartApplication |
|
2874 "start current edited application |
|
2875 " |
|
2876 |cls app infoMessage| |
|
2877 |
|
2878 (specClass isNil or:[specSelector size < 2]) ifTrue:[ |
|
2879 self painter isModified ifTrue:[ |
|
2880 infoMessage := 'Class and selector must be defined,\and the window spec must be saved first!!' withCRs. |
|
2881 ] ifFalse:[ |
|
2882 infoMessage := 'No class and selector defined!!'. |
|
2883 ] |
|
2884 ] ifFalse:[ |
|
2885 cls := self resolveName:specClass. |
|
2886 |
|
2887 cls isNil ifTrue:[ |
|
2888 infoMessage := 'Class does not exist!!'. |
|
2889 ] ifFalse:[ |
|
2890 (cls respondsTo:specSelector) ifFalse:[ |
|
2891 infoMessage := ('No method for: #' |
|
2892 , specSelector , ' in ' , cls name |
|
2893 , '\\(did you save the window spec?)') withCRs. |
|
2894 ] |
|
2895 ] |
|
2896 ]. |
|
2897 |
|
2898 infoMessage notNil ifTrue:[ |
|
2899 ^ self information:infoMessage |
|
2900 ]. |
|
2901 |
|
2902 self isModified ifTrue:[ |
|
2903 (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ |
|
2904 self accept. |
|
2905 "/ "XXX must be fixed - canvas changes are not recorded in the history |
|
2906 "/ so isModified returns false here |
|
2907 "/ |
|
2908 "/ self painter isModified ifTrue:[ |
|
2909 "/ |
|
2910 (self confirm:'Save the new window spec?' withCRs) ifTrue:[ |
|
2911 self doSave |
|
2912 ] |
|
2913 ] |
|
2914 ]. |
|
2915 |
|
2916 self painter isModified ifTrue:[ |
|
2917 (self confirm:'The current window spec has not yet been saved!!\\Start anyway (based upon the previous window spec)?' withCRs) ifFalse:[ |
|
2918 ^ self |
|
2919 ] |
|
2920 ]. |
|
2921 |
|
2922 ((app := cls new) respondsTo:#openInterface:) ifFalse:[ |
|
2923 ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs. |
|
2924 ]. |
|
2925 app openInterface:specSelector |
|
2926 ! |
|
2927 |
|
2928 doWindowSpec |
|
2929 "create the window specification but do not write to application; instead |
|
2930 open a view |
|
2931 " |
|
2932 |code v| |
|
2933 |
|
2934 code := self painter generateWindowSpecMethodSource. |
|
2935 |
|
2936 v := CodeView open. |
|
2937 v contents:code. |
|
2938 v label:'windowSpec'. |
|
2939 |
|
2940 ! |
|
2941 |
|
2942 loadFromMessage: aMessage |
|
2943 |
|
2944 ((aMessage size > 0) and: [self checkModified]) |
|
2945 ifTrue: |
|
2946 [ |
|
2947 |readStream aClass aSelector| |
|
2948 readStream := aMessage readStream. |
|
2949 (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil |
|
2950 ifTrue: |
|
2951 [ |
|
2952 aSelector := readStream upToEnd asSymbol. |
|
2953 self setClass: aClass selector: aSelector. |
|
2954 (aClass respondsTo:aSelector) |
|
2955 ifTrue: |
|
2956 [ |
|
2957 self painter setupFromSpec:(aClass perform:aSelector). |
|
2958 treeView selection: #(1). |
|
2959 ] |
|
2960 ] |
|
2961 ] |
|
3104 ! ! |
2962 ! ! |
3105 |
2963 |
3106 !UIPainter methodsFor:'user interactions - dialog'! |
2964 !UIPainter methodsFor:'user interactions - dialog'! |
3107 |
2965 |
3108 checkClassAndSelector |
2966 checkClassAndSelector |
3130 ^ true. |
2988 ^ true. |
3131 ]. |
2989 ]. |
3132 ^ false. |
2990 ^ false. |
3133 ]. |
2991 ]. |
3134 cls isBehavior ifFalse:[ |
2992 cls isBehavior ifFalse:[ |
3135 self warn:'A global named ' , specClass , ' exists, but is no class.'. |
2993 self warn:'A global named ' , specClass , ' exists, but it is no class.'. |
3136 ^ false. |
2994 ^ false. |
3137 ]. |
2995 ]. |
3138 |
2996 |
3139 specSuperclass isBehavior ifFalse:[ |
2997 specSuperclass isBehavior ifFalse:[ |
3140 specSuperclass isEmpty ifFalse:[ |
2998 specSuperclass isEmpty ifFalse:[ |
3202 ] |
3060 ] |
3203 |
3061 |
3204 ] doWhile:[again]. |
3062 ] doWhile:[again]. |
3205 |
3063 |
3206 self specClass:specClass. |
3064 self specClass:specClass. |
3065 self helpTool isModified: true |
|
3207 ! |
3066 ! |
3208 |
3067 |
3209 gridMenu |
3068 gridMenu |
3210 "open a dialog for grip parameters configuration |
3069 "open a dialog for grip parameters configuration |
3211 " |
3070 " |
3268 its container widget |
3127 its container widget |
3269 " |
3128 " |
3270 treeView doStepOver:-1 |
3129 treeView doStepOver:-1 |
3271 ! ! |
3130 ! ! |
3272 |
3131 |
3273 !UIPainter::TreeView class methodsFor:'constants'! |
|
3274 |
|
3275 defaultNameOfCanvas |
|
3276 "returns the default name (id) of the application |
|
3277 " |
|
3278 ^ 'WindowSpec' |
|
3279 ! ! |
|
3280 |
|
3281 !UIPainter::TreeView class methodsFor:'documentation'! |
3132 !UIPainter::TreeView class methodsFor:'documentation'! |
3282 |
3133 |
3283 documentation |
3134 documentation |
3284 " |
3135 " |
3285 selection in tree view; only used by the UIPainter |
3136 selection in tree view; only used by the UIPainter |
3312 " |
3163 " |
3313 |props| |
3164 |props| |
3314 |
3165 |
3315 props := UIPainterView::ViewProperty new. |
3166 props := UIPainterView::ViewProperty new. |
3316 props view:aCanvas. |
3167 props view:aCanvas. |
3317 model root:(TreeItem name:(self class defaultNameOfCanvas asBoldText) contents:props). |
3168 model root:(TreeItem name: UIPainter defaultNameOfCanvas asBoldText contents:props). |
3318 model root expand. |
3169 model root expand. |
3319 self enableChannel:(aCanvas enableChannel). |
3170 self enableChannel:(aCanvas enableChannel). |
3320 |
3171 |
3321 "Modified: / 27.2.1998 / 16:10:03 / cg" |
|
3322 ! |
3172 ! |
3323 |
3173 |
3324 canvasSpec |
3174 canvasSpec |
3325 "returns spec assigned to canvas |
3175 "returns spec assigned to canvas |
3326 " |
3176 " |
3327 |spec| |
3177 |spec| |
3328 |
3178 |
3329 spec := WindowSpec new. |
3179 spec := WindowSpec new. |
3330 |
3180 |
3331 spec fromView:(self canvas topView) callBack:nil. |
3181 spec fromView:(self canvas topView) callBack:nil. |
3332 |
|
3333 windowSpec notNil ifTrue:[ |
3182 windowSpec notNil ifTrue:[ |
3334 spec copyValuesFromSpec:windowSpec |
3183 spec copyValuesFromSpec:windowSpec |
3335 ]. |
3184 ]. |
3336 ^ spec |
3185 ^ spec |
3337 |
3186 |
3421 windowSpec := nil. |
3270 windowSpec := nil. |
3422 |
3271 |
3423 self canvas subViews copy do:[:aView| |
3272 self canvas subViews copy do:[:aView| |
3424 (aView isKindOf:InputView) ifFalse:[aView destroy] |
3273 (aView isKindOf:InputView) ifFalse:[aView destroy] |
3425 ]. |
3274 ]. |
3426 model root name: self class defaultNameOfCanvas asBoldText. |
3275 model root name: UIPainter defaultNameOfCanvas asBoldText. |
3427 model root children:(OrderedCollection new). |
3276 model root children:(OrderedCollection new). |
3428 model recomputeList. |
3277 model recomputeList. |
3429 self selection:nil. |
3278 self selection:nil. |
3430 |
3279 |
3431 |
3280 |
3457 fullSpec fromBuilder:(self canvas topView) |
3306 fullSpec fromBuilder:(self canvas topView) |
3458 components:(SpecCollection new collection:aSpecArray). |
3307 components:(SpecCollection new collection:aSpecArray). |
3459 |
3308 |
3460 windowSpec notNil ifTrue:[ |
3309 windowSpec notNil ifTrue:[ |
3461 winSpec := fullSpec window. |
3310 winSpec := fullSpec window. |
3462 winSpec copyValuesFromSpec:windowSpec |
3311 winSpec copyValuesFromSpec:windowSpec. |
3312 winSpec name: winSpec label. |
|
3463 ]. |
3313 ]. |
3464 ^ fullSpec literalArrayEncoding. |
3314 ^ fullSpec literalArrayEncoding. |
3465 |
3315 |
3466 "Modified: / 29.10.1997 / 18:05:58 / cg" |
3316 "Modified: / 29.10.1997 / 18:05:58 / cg" |
3467 ! |
3317 ! |
3468 |
3318 |
3469 setAttributesFromWindowSpec:aWindowSpec |
3319 setAttributesFromWindowSpec:aWindowSpec |
3470 "set windowSpec from argument a WindowSpec |
3320 "set windowSpec from argument a WindowSpec |
3471 " |
3321 " |
3472 windowSpec := WindowSpec new copyValuesFromSpec:aWindowSpec. |
3322 windowSpec := WindowSpec new copyValuesFromSpec:aWindowSpec. |
3473 self canvasNameChanged:aWindowSpec name. |
3323 self canvasNameChanged:aWindowSpec name. |
3474 |
3324 |
3475 "Modified: / 29.10.1997 / 18:06:56 / cg" |
3325 "Modified: / 29.10.1997 / 18:06:56 / cg" |
3476 ! ! |
3326 ! ! |
3585 ( aName size ~~ 0 |
3435 ( aName size ~~ 0 |
3586 and:[(name := aName string withoutSeparators) size ~~ 0 |
3436 and:[(name := aName string withoutSeparators) size ~~ 0 |
3587 and:[(self propertyDetect:[:p| p name = name]) isNil |
3437 and:[(self propertyDetect:[:p| p name = name]) isNil |
3588 and:[node name ~= name]]] |
3438 and:[node name ~= name]]] |
3589 ) ifTrue:[ |
3439 ) ifTrue:[ |
3590 node name: (name asBoldText , ': [', self class defaultNameOfCanvas , ']'). |
3440 node name: name asBoldText. |
3591 self redrawLine:1. |
3441 node changed. |
3592 ]. |
3442 ]. |
3593 |
|
3594 "Modified: / 27.2.1998 / 16:13:31 / cg" |
|
3595 ! |
3443 ! |
3596 |
3444 |
3597 layoutChanged |
3445 layoutChanged |
3598 "layout of any component changed; in case of single selection, the |
3446 "layout of any component changed; in case of single selection, the |
3599 application will be informed to update its layout |
3447 application will be informed to update its layout |
3709 !UIPainter::TreeView methodsFor:'initialization'! |
3557 !UIPainter::TreeView methodsFor:'initialization'! |
3710 |
3558 |
3711 initialize |
3559 initialize |
3712 "initialization; set multiple select and model |
3560 "initialization; set multiple select and model |
3713 " |
3561 " |
3714 |
|
3715 super initialize. |
3562 super initialize. |
3716 |
3563 |
3717 self multipleSelectOk:true. |
3564 self multipleSelectOk:true. |
3718 cvsEventsDisabled := false. |
3565 cvsEventsDisabled := false. |
3719 self showDirectoryIndicator: true. |
3566 self showDirectoryIndicator: true. |
3721 |
3568 |
3722 self model iconAction: |
3569 self model iconAction: |
3723 [:aNode| |
3570 [:aNode| |
3724 |specClass| |
3571 |specClass| |
3725 (specClass := aNode contents spec) isNil |
3572 (specClass := aNode contents spec) isNil |
3726 ifTrue: [WindowSpec icon] |
3573 ifTrue: |
3727 ifFalse: [specClass class icon] |
3574 [ |
3728 ]. |
3575 WindowSpec icon |
3729 |
3576 ] |
3730 self model |
3577 ifFalse: |
3731 labelAction: |
3578 [ |
3732 [:aNode| |
3579 ((selection size > 1) and: [(listOfNodes at:selection first) == aNode]) |
3733 |spec| |
3580 ifTrue: |
3734 spec := aNode contents spec. |
3581 [ |
3735 spec name asBoldText , ': [', spec viewClass name , ']' |
3582 specClass class icon copyWithColorMapProcessing:[:clr | clr blendWith:Color red] |
3583 ] |
|
3584 ifFalse: |
|
3585 [ |
|
3586 specClass class icon |
|
3736 ] |
3587 ] |
3737 |
3588 ] |
3738 "Modified: / 27.2.1998 / 16:12:37 / cg" |
3589 ]. |
3590 |
|
3591 self model labelAction: |
|
3592 [:aNode| |
|
3593 |spec| |
|
3594 (spec := aNode contents spec) notNil |
|
3595 ifTrue: [self nameForSpecInList:spec] |
|
3596 ifFalse: [aNode name] |
|
3597 ] |
|
3739 ! ! |
3598 ! ! |
3740 |
3599 |
3741 !UIPainter::TreeView methodsFor:'private'! |
3600 !UIPainter::TreeView methodsFor:'private'! |
3742 |
3601 |
3743 figureFor:aNode |
3602 nameForSpecInList:aSpec |
3744 "returns image for an spec item" |
3603 ^ aSpec name asBoldText, ': [', aSpec viewClass name , ']' |
3745 |
|
3746 |cls icon| |
|
3747 |
|
3748 cls := aNode contents spec class. |
|
3749 aNode contents spec isNil ifTrue: [cls := WindowSpec]. |
|
3750 icon := cls icon. |
|
3751 icon extent y > 16 ifTrue: [icon := icon magnifiedBy: 16/icon extent y]. |
|
3752 icon device ~~ device ifTrue: [icon := icon onDevice: device]. |
|
3753 ^icon |
|
3754 ! |
3604 ! |
3755 |
3605 |
3756 selectionChangedFrom:oldSelection |
3606 selectionChangedFrom:oldSelection |
3757 "selection has changed. update master selection and raise notification |
3607 "selection has changed. update master selection and raise notification |
3758 to canvas in case of enabled cvs events |
3608 to canvas in case of enabled cvs events |
3770 i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view] |
3620 i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view] |
3771 ] |
3621 ] |
3772 ]. |
3622 ]. |
3773 self canvas updateSelectionFromModel:sel |
3623 self canvas updateSelectionFromModel:sel |
3774 ]. |
3624 ]. |
3775 |
3625 size = 1 ifTrue:[ |
3776 size ~~ 0 ifTrue:[ |
3626 oldSelection size = 2 ifTrue: [ |
3777 sel := selection first. |
3627 self redrawLine: (lastDrawnMaster := selection first)] |
3778 |
3628 ]. |
3779 (listOfNodes at:sel) == lastDrawnMaster ifFalse:[ |
3629 size > 1 ifTrue:[ |
3780 self redrawLine:sel |
3630 selection first ~~ lastDrawnMaster ifTrue: [ |
3781 ] |
3631 self redrawLine: (lastDrawnMaster := selection first)] |
3632 ] |
|
3633 ifFalse: [ |
|
3634 lastDrawnMaster := nil |
|
3782 ] |
3635 ] |
3783 ! ! |
3636 ! ! |
3784 |
3637 |
3785 !UIPainter::TreeView methodsFor:'queries'! |
3638 !UIPainter::TreeView methodsFor:'queries'! |
3786 |
3639 |