Looking for an easy way to hook events


#1

I'm in the midst of making JUCE the GUI layer for a development environment written in a different (not-C++) language.

Right now I'm putting in handlers for, e.g. "moved()" and "mouseDown()" etc, which are all virtual methods of Component.

Inside my environment there are sub-classes of the various JUCE types, e.g. "MyWindow" deriving from a "DocumentWindow" and so forth.

What I would like to avoid, is having to copy-paste the event handling code for each of my derived classes.  I'm hoping there's a better way.

 

I know that I could mess around inside the JUCE code, but that's inadvisable for many reasons.

Is there some other, reasonable mechanism to do what I want, aside from the copy-paste route?


#2

OK, I guess the 'addMouseListener()' and 'addKeyListener()' will take care of some of this