278 'Add a new linked sub menu.' |
278 'Add a new linked sub menu.' |
279 |
279 |
280 #basicsAction |
280 #basicsAction |
281 'An action selector with 0, 1 (the argument field), or 2 (the selected item) arguments.' |
281 'An action selector with 0, 1 (the argument field), or 2 (the selected item) arguments.' |
282 |
282 |
|
283 #browseMethod |
|
284 'Open a browser on this method in the application. Create the method, if it does not exist.' |
|
285 |
283 #basicsArgument |
286 #basicsArgument |
284 'An optional arg passed with above selector, if it is a 1 or 2 arg selector (enter a Smalltalk literal).' |
287 'An optional arg passed with above selector, if it is a 1 or 2 arg selector (enter a Smalltalk literal).' |
285 |
288 |
286 #basicsChoice |
289 #basicsChoice |
287 'Aspect for a boolean holder, block or method, specifying the choices state (RadioButton behavior).' |
290 'Aspect for a boolean holder, block or method, specifying the choices state (RadioButton behavior).' |
409 #triggerOnDown |
412 #triggerOnDown |
410 'If on, the items action is performed on mouse-button press (default is: on button-release).' |
413 'If on, the items action is performed on mouse-button press (default is: on button-release).' |
411 |
414 |
412 ) |
415 ) |
413 |
416 |
414 "Modified: / 20-09-2010 / 13:24:49 / cg" |
417 "Modified: / 21-10-2010 / 14:18:03 / cg" |
415 ! |
418 ! |
416 |
419 |
417 localFlyHelpSpecStrings |
420 localFlyHelpSpecStrings |
418 "This resource specification was automatically generated |
421 "This resource specification was automatically generated |
419 by the UIHelpTool of ST/X." |
422 by the UIHelpTool of ST/X." |
2579 ]. |
2582 ]. |
2580 ^ selectors asOrderedCollection |
2583 ^ selectors asOrderedCollection |
2581 ! |
2584 ! |
2582 |
2585 |
2583 doBrowseActionMethod |
2586 doBrowseActionMethod |
|
2587 "open a browser on the callback method (create if not yet existing)" |
|
2588 |
|
2589 self doBrowseApplicationMethodFor:#itemValue |
|
2590 |
|
2591 "Modified: / 21-10-2010 / 14:09:33 / cg" |
|
2592 ! |
|
2593 |
|
2594 doBrowseApplicationMethodFor:aspect |
2584 |selector cls category| |
2595 |selector cls category| |
2585 |
2596 |
2586 selector := (self aspectFor:#itemValue) value. |
2597 specClass isNil ifTrue:[ |
2587 |
2598 self warn:(resources string:'Please define the application class first.'). |
|
2599 ^ self |
|
2600 ]. |
|
2601 |
|
2602 selector := (self aspectFor:aspect) value. |
2588 selector isEmptyOrNil ifTrue:[ |
2603 selector isEmptyOrNil ifTrue:[ |
2589 Dialog information:(resources |
2604 Dialog information:(resources string:'Please enter an action method name.'). |
2590 string:'Please enter an action method name.'). |
|
2591 ^ self |
2605 ^ self |
2592 ]. |
2606 ]. |
|
2607 (selector = 'true' or:[selector = 'false']) ifTrue:[^ self]. |
|
2608 (selector == true or:[selector == false]) ifTrue:[^ self]. |
2593 |
2609 |
2594 selector := selector asSymbol. |
2610 selector := selector asSymbol. |
2595 |
|
2596 specClass isNil ifTrue:[ |
|
2597 self warn:'Please define the application class first.'. |
|
2598 ^ self |
|
2599 ]. |
|
2600 |
2611 |
2601 cls := self resolveName:specClass. |
2612 cls := self resolveName:specClass. |
2602 cls isNil ifTrue:[ |
2613 cls isNil ifTrue:[ |
2603 self warn:'Class ', specClass asString, ' does not exist!!'. |
2614 self warn:(resources string:'Class %1 does not exist!!' with:specClass asString). |
2604 ^ self |
2615 ^ self |
2605 ]. |
2616 ]. |
2606 |
2617 |
2607 (cls includesSelector:selector) ifFalse:[ |
2618 (cls includesSelector:selector) ifFalse:[ |
2608 category := UserPreferences current categoryForMenuActionsMethods. |
2619 category := UserPreferences current categoryForMenuActionsMethods. |
2611 createActionMethodFor:selector in:cls |
2622 createActionMethodFor:selector in:cls |
2612 category:category |
2623 category:category |
2613 redefine:(self redefineAspectMethodsChannel value). |
2624 redefine:(self redefineAspectMethodsChannel value). |
2614 ]. |
2625 ]. |
2615 |
2626 |
2616 UserPreferences current systemBrowse |
2627 UserPreferences current systemBrowserClass openInClass:cls selector:selector |
|
2628 |
|
2629 "Created: / 21-10-2010 / 14:07:32 / cg" |
|
2630 ! |
|
2631 |
|
2632 doBrowseEnabledMethod |
|
2633 "open a browser on the enabled method (create if not yet existing)" |
|
2634 |
|
2635 self doBrowseApplicationMethodFor:#enabled |
|
2636 |
|
2637 "Created: / 21-10-2010 / 14:09:41 / cg" |
|
2638 ! |
|
2639 |
|
2640 doBrowseVisibilityMethod |
|
2641 "open a browser on the visibility method (create if not yet existing)" |
|
2642 |
|
2643 self doBrowseApplicationMethodFor:#isVisible |
|
2644 |
|
2645 "Created: / 21-10-2010 / 14:09:56 / cg" |
2617 ! |
2646 ! |
2618 |
2647 |
2619 doGenerateAspectMethods |
2648 doGenerateAspectMethods |
2620 "compile aspect and action methods" |
2649 "compile aspect and action methods" |
2621 |
2650 |
3304 UIPainter new openOnClass:MenuEditor::Item andSelector:#detailsEditSpec |
3333 UIPainter new openOnClass:MenuEditor::Item andSelector:#detailsEditSpec |
3305 " |
3334 " |
3306 |
3335 |
3307 <resource: #canvas> |
3336 <resource: #canvas> |
3308 |
3337 |
3309 ^ |
3338 ^ |
3310 #(FullSpec |
3339 #(FullSpec |
3311 name: detailsEditSpec |
3340 name: detailsEditSpec |
3312 window: |
3341 window: |
3313 (WindowSpec |
3342 (WindowSpec |
3314 label: 'Details Edit' |
3343 label: 'Details Edit' |
3315 name: 'Details Edit' |
3344 name: 'Details Edit' |
3316 min: (Point 10 10) |
3345 min: (Point 10 10) |
3317 bounds: (Rectangle 0 0 407 291) |
3346 bounds: (Rectangle 0 0 407 291) |
3318 ) |
3347 ) |
3319 component: |
3348 component: |
3320 (SpecCollection |
3349 (SpecCollection |
3321 collection: ( |
3350 collection: ( |
3322 (LabelSpec |
3351 (LabelSpec |
3323 label: 'Accelerator:' |
3352 label: 'Accelerator:' |
3324 name: 'shortcutKeyLabel' |
3353 name: 'shortcutKeyLabel' |
3365 acceptOnTab: true |
3394 acceptOnTab: true |
3366 acceptChannel: acceptChannel |
3395 acceptChannel: acceptChannel |
3367 modifiedChannel: modifiedChannel |
3396 modifiedChannel: modifiedChannel |
3368 acceptOnPointerLeave: false |
3397 acceptOnPointerLeave: false |
3369 ) |
3398 ) |
|
3399 (ActionButtonSpec |
|
3400 label: 'browseActionImage' |
|
3401 name: 'Button1' |
|
3402 layout: (LayoutFrame -25 1 40 0 -5 1 62 0) |
|
3403 activeHelpKey: browseMethod |
|
3404 hasCharacterOrientedLabel: false |
|
3405 translateLabel: true |
|
3406 resizeForLabel: true |
|
3407 tabable: true |
|
3408 model: doBrowseEnabledMethod |
|
3409 ) |
3370 (LabelSpec |
3410 (LabelSpec |
3371 label: 'Visibility:' |
3411 label: 'Visibility:' |
3372 name: 'visibilityLabel' |
3412 name: 'visibilityLabel' |
3373 layout: (AlignmentOrigin 107 0 76 0 1 0.5) |
3413 layout: (AlignmentOrigin 107 0 76 0 1 0.5) |
3374 activeHelpKey: detailsVisibility |
3414 activeHelpKey: detailsVisibility |
3388 acceptOnReturn: true |
3428 acceptOnReturn: true |
3389 acceptOnTab: true |
3429 acceptOnTab: true |
3390 acceptChannel: acceptChannel |
3430 acceptChannel: acceptChannel |
3391 modifiedChannel: modifiedChannel |
3431 modifiedChannel: modifiedChannel |
3392 acceptOnPointerLeave: false |
3432 acceptOnPointerLeave: false |
|
3433 ) |
|
3434 (ActionButtonSpec |
|
3435 label: 'browseActionImage' |
|
3436 name: 'Button2' |
|
3437 layout: (LayoutFrame -25 1 65 0 -5 1 87 0) |
|
3438 activeHelpKey: browseMethod |
|
3439 hasCharacterOrientedLabel: false |
|
3440 translateLabel: true |
|
3441 resizeForLabel: true |
|
3442 tabable: true |
|
3443 model: doBrowseVisibilityMethod |
3393 ) |
3444 ) |
3394 (LabelSpec |
3445 (LabelSpec |
3395 label: 'Aux Value' |
3446 label: 'Aux Value' |
3396 name: 'auxLabel' |
3447 name: 'auxLabel' |
3397 layout: (AlignmentOrigin 107 0 101 0 1 0.5) |
3448 layout: (AlignmentOrigin 107 0 101 0 1 0.5) |
3429 name: 'StartGroupPopUp' |
3480 name: 'StartGroupPopUp' |
3430 layout: (LayoutFrame 110 0 128 0 -5 1.0 150 0) |
3481 layout: (LayoutFrame 110 0 128 0 -5 1.0 150 0) |
3431 activeHelpKey: detailsStartGroup |
3482 activeHelpKey: detailsStartGroup |
3432 tabable: true |
3483 tabable: true |
3433 model: startGroup |
3484 model: startGroup |
3434 menu: (left right conditionalRight) |
3485 menu: |
|
3486 (Array |
|
3487 left right |
|
3488 conditionalRight |
|
3489 ) |
3435 ) |
3490 ) |
3436 (LabelSpec |
3491 (LabelSpec |
3437 label: 'Access Character Position:' |
3492 label: 'Access Character Position:' |
3438 name: 'accessCharLabel' |
3493 name: 'accessCharLabel' |
3439 layout: (AlignmentOrigin 217 0 170 0 1 0.5) |
3494 layout: (AlignmentOrigin 217 0 170 0 1 0.5) |
3493 translateLabel: true |
3548 translateLabel: true |
3494 resizeForLabel: true |
3549 resizeForLabel: true |
3495 adjust: right |
3550 adjust: right |
3496 ) |
3551 ) |
3497 (FontMenuSpec |
3552 (FontMenuSpec |
3498 attributes: |
|
3499 (tabable |
|
3500 true |
|
3501 ) |
|
3502 name: 'fontMenu' |
3553 name: 'fontMenu' |
3503 layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0) |
3554 layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0) |
3504 activeHelpKey: fontMenu |
3555 activeHelpKey: fontMenu |
3505 model: font |
3556 model: font |
3506 allowSymbolicFonts: true |
3557 allowSymbolicFonts: true |
3507 ) |
3558 ) |
3508 ) |
3559 ) |
3509 |
3560 |
3510 ) |
3561 ) |
3511 ) |
3562 ) |
3512 |
3563 |
3513 "Modified: / 16-10-2006 / 12:48:12 / cg" |
3564 "Modified: / 21-10-2010 / 14:15:09 / cg" |
3514 ! ! |
3565 ! ! |
3515 |
3566 |
3516 !MenuEditor::Item class methodsFor:'interface-editor'! |
3567 !MenuEditor::Item class methodsFor:'interface-editor'! |
3517 |
3568 |
3518 addBindingsTo:aspects for:aMenuEditor |
3569 addBindingsTo:aspects for:aMenuEditor |
3951 hasCharacterOrientedLabel: false |
4002 hasCharacterOrientedLabel: false |
3952 translateLabel: true |
4003 translateLabel: true |
3953 resizeForLabel: true |
4004 resizeForLabel: true |
3954 tabable: true |
4005 tabable: true |
3955 model: doBrowseActionMethod |
4006 model: doBrowseActionMethod |
|
4007 activeHelpKey: browseMethod |
3956 ) |
4008 ) |
3957 (LabelSpec |
4009 (LabelSpec |
3958 label: 'Argument:' |
4010 label: 'Argument:' |
3959 name: 'argumentLabel' |
4011 name: 'argumentLabel' |
3960 layout: (AlignmentOrigin 107 0 107 0 1 0.5) |
4012 layout: (AlignmentOrigin 107 0 107 0 1 0.5) |