Re: 3D viewer in ROOT 4.02

From: Ralf Ehrlich <>
Date: Tue, 8 Mar 2005 15:08:32 -0500 (EST)

Hi Richard,
thank you very much for looking into this problem.  

> Incidently I would be interested to know why you overload ExecuteEvent()

For the program I wrote I needed to set myPad->SetEditable(false) to prevent users from moving/changing/deleting objects inside the pad. The first line in TPadOpenGLView::ExecuteEvent() is/was

    if (GetPad() && !GetPad()->IsEditable()) return; That means that ExecuteEvent returns without doing anything, if the reference TPad is not editable (e.g. myPad). The same thing happens with TView::ExecuteEvent(). Therefore I overloaded both classes in the following way:
class MyPadOpenGLView : public TPadOpenGLView {
  TPad *fPad;

  MyPadOpenGLView(TPad *pad):TPadOpenGLView(pad) {fPad=pad;}   void ExecuteEvent(Int_t event, Int_t px, Int_t py)   {
    TPadOpenGLView::ExecuteEvent(event,px,py);     fPad->SetEditable(false);


Thank you vey much,
Ralf Received on Tue Mar 08 2005 - 21:09:00 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:05 MET