Perfect!
I've subclassed TREventOverseer to be able to use Announcer instead of
block: [].
But it works just as I wanted. :)
Since I now use announcer I can easily do
overseer when: TRMouseLeftClick do: [ :event | ] .... and thus I do not
need to filter MouseMove at all.
Thanks again!
Peter
(if you want to look at the overseer, it's as always at
)
On Sat, Jul 25, 2015 at 10:31 PM, Alexandre Bergel <alexandre.bergel(a)me.com>
wrote:
Hi!
Having this overseer will indeed address some problems. For example,
clicking on a background to remove all the resize handle. I have just
implemented something:
c := TRCanvas new.
s := TRBoxShape new size: 50.
c addShape: s.
click := 0.
s when: TRMouseClick do: [ :evt | click := click + 1 ].
eo := TREventOverseer new.
events := OrderedCollection new.
eo block: [ :anEvent | events add: anEvent ].
c eventOverseer: eo.
c
I think you will need more. Probably that you do not want to capture all
the event right? In particular, MouseMove is probably not interesting for
you.
Feel free to extend TREventOverseer as you wish.
Cheers,
Alexandre
On Jul 25, 2015, at 4:38 PM, Peter Uhnák
<i.uhnak(a)gmail.com> wrote:
Hi Alex,
I'm trying to find a way how to observe all mouse clicks regardless of
elements. I can do this easily on my side, because I have control over
everything I create,
but doing that would prevent certain things like
RTResizable from
working in pure Roassal...
Currently all Trachel mouse events are created in Morphic (TRMorph),
however
events themselves are fired from shapes' announcers so there is no
convergence point.
So, would it be possible to basically fire the event twice, once from
the
shape's announcer and once from probably view or canvas (or some
TROverseer class or whatever).
As far as performance goes this shouldn't be a problem if you consider
that
just mouse movement can trigger 10 events every second.
What do you think? Is it worth for you to change/implement it?
If not I will resolve it on my side.
Thanks,
Peter
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev