I've subclassed TREventOverseer to be able to use Announcer instead of
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.
(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>
Having this overseer will indeed address some problems. For example,
clicking on a background to remove all the resize handle. I have just
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.
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
Feel free to extend TREventOverseer as you wish.
> 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
> 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.
> Moose-dev mailing list
Alexandre Bergel http://www.bergel.eu
Moose-dev mailing list