[squeak-dev] The Inbox: Morphic-cbc.1665.mcz
Chris Cunningham
cunningham.cb at gmail.com
Sat Jun 6 02:41:50 UTC 2020
This fixes the mangling I accidentally did to Marcel's changes, following
his suggestion (roughly).
I now get the best of both worlds in my image. If noone objects, I'll move
it to trunk in a few days.
-cbc
On Fri, Jun 5, 2020 at 7:38 PM <commits at source.squeak.org> wrote:
> A new version of Morphic was added to project The Inbox:
> http://source.squeak.org/inbox/Morphic-cbc.1665.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-cbc.1665
> Author: cbc
> Time: 5 June 2020, 7:38:31.284262 pm
> UUID: c887ffd7-40ae-3547-8240-13186db081c8
> Ancestors: Morphic-cbc.1664
>
> Add support for locking a morph so that it doesn't accept keyboard actions
> - but is still accessible with the mouse. Sending #rejectKeyboardFocus
> will make that morph completely ignore keyboard events of any kind. A
> morph can be tested with #shouldRejectKeyboardFocus to see if this should
> happen.
> DialogWindow has been modified to reject keyboard focus, so that in (say,
> ConfirmDialogs) you can still use the keyboard to interact with the keys
> AND you can interact with the message text via the mouse.
> (Also updated StringMorph similarly.)
>
> =============== Diff against Morphic-cbc.1664 ===============
>
> Item was changed:
> ----- Method: DialogWindow>>createMessage: (in category
> 'initialization') -----
> createMessage: aString
>
> messageMorph := aString asText asMorph.
> messageMorph
> name: 'Message';
> readOnly: true;
> setProperty: #indicateKeyboardFocus toValue: #never;
> + rejectKeyboardFocus.
> - lock.
> self setMessageParameters.
> ^ messageMorph!
>
> Item was added:
> + ----- Method: Morph>>rejectKeyboardFocus (in category 'accessing') -----
> + rejectKeyboardFocus
> + self rejectKeyboardFocus: true.!
>
> Item was added:
> + ----- Method: Morph>>rejectKeyboardFocus: (in category 'accessing') -----
> + rejectKeyboardFocus: boolean
> + self setProperty: #rejectKeyboardFocus toValue: boolean!
>
> Item was changed:
> ----- Method: Morph>>rejectsEvent: (in category 'events-processing')
> -----
> rejectsEvent: anEvent
> "Return true to reject the given event. Rejecting an event means
> neither the receiver nor any of it's submorphs will be given any chance to
> handle it."
> + ^self isLocked or: [self visible not or: [anEvent isKeyboard and:
> [self shouldRejectKeyboardFocus]]]!
> - ^self isLocked or:[self visible not]!
>
> Item was added:
> + ----- Method: Morph>>rejectsKeyboardFocus (in category 'testing') -----
> + rejectsKeyboardFocus
> + ^self valueOfProperty: #rejectKeyboardFocus ifAbsent: [false]!
>
> Item was added:
> + ----- Method: Morph>>shouldRejectKeyboardFocus (in category 'testing')
> -----
> + shouldRejectKeyboardFocus
> + ^self valueOfProperty: #rejectKeyboardFocus ifAbsent: [false]!
>
> Item was changed:
> ----- Method: StringMorph>>wouldAcceptKeyboardFocus (in category 'event
> handling') -----
> wouldAcceptKeyboardFocus
> + ^ self isLocked not and: [self shouldRejectKeyboardFocus not]!
> - ^ self isLocked not!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200605/d892522c/attachment-0001.html>
More information about the Squeak-dev
mailing list
|