(no subject)

Rene Brun (Rene.Brun@cern.ch)
Wed, 06 May 1998 14:08:07 +0200


Timothy Smith wrote:
>
> Hello People,
>
> I have seen this question asked before, but have not found the
> answer:
>
> How do I "zoom" in on a view?
>
> I think if I could simply read the mouse position I could then perform
> the zoom.
>

In the current Root, zooming in a pad is an operation to be
implemented by the application. I should clearly document somewhere
how to implement this function in some examples.
I will probably add (if I can really find a quiet moment) this
function in TPad itself.
Zoom is connected with picking. Some rough indications about picking
are given at http://HowtoPick.html.
In brief, you must implement a class with member functions
DistancetoPrimitive and ExecuteEvent. You must draw an object
of this class in the pad (by Draw, I mean add this object to the pad,
that is what TObject::Draw is doing by default for you).
I know that Pasha has already a very nice example of an event display
with a nice zoom facility included. Pasha, would you be willing
to publish your class?

Rene Brun