EmbeddedCanvas and Line


I’m trying to draw a line across a TH2D inside a TRootEmbeddedCanvas in order to call ProjectionX on the selected pixel.
I have designed a HorizontalLine class, inheriting from TLine and TQObject, but I still don’t understand what to do so that it responds to the mouse clicks. Should I connect it to the ProcessedEvent() signal of the canvas, by writing a method that handles the incoming Event_t*?