Re: Updating a TView

From: Valeri Fine (Faine) (fine@bnl.gov)
Date: Thu Jul 29 1999 - 16:37:55 MEST


> Is there a way to immediatly "update" a TView. Maybe something like
> TView->Update()? I don't think TView has this member function though...
> 

Have a look at

http://www.star.bnl.gov/STAR/html/comp_l/root/html/examples/PadControlPanel.C.html

It has several methods like:

//_______________________________________________________________________________________
static void RotateView(Float_t phi, Float_t theta, TVirtualPad *pad=0)
{
  TVirtualPad *thisPad = pad;
  if (!thisPad) thisPad = gPad;
  if (thisPad) {
    TView *view = thisPad->GetView(); 
    if (view) {
      Int_t iret;
      Float_t p = phi;
      Float_t t = theta;
      view->SetView(p, t, 0, iret);
      thisPad->SetPhi(-90-p);
      thisPad->SetTheta(90-t);
      thisPad->Modified();
      thisPad->Update();
    }
  }
}

 All of them work right away. One needs no share /DLL library to use this class
just load it into your ROOT session ot try.
 You can use those methods to call it from your "Slider" directly or just as an
example.

  Hope this helps,
                     Valery

> Michael 
> 
> P.S. - if you really want to know, I am trying to have some slider bars
> available to the user so that he/she can rotate the detectors showing our
> geometry with the sliders

    I would be happy to add your "slider" to my "PadControlPanel".

                    Valery



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:36 MET