// @(#)root/eve:$Id: TEveLegoEventHandler.h 25245 2008-08-25 21:44:09Z matevz $
// Author: Matevz Tadel 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/


#ifndef ROOT_TEveLegoEventHandler
#define ROOT_TEveLegoEventHandler

#include "TGLEventHandler.h"
#include "TGLCamera.h"

class TEveCaloLego;

class TEveLegoEventHandler : public TGLEventHandler
{
private:
   TEveLegoEventHandler(const TEveLegoEventHandler&);            // Not implemented
   TEveLegoEventHandler& operator=(const TEveLegoEventHandler&); // Not implemented

protected:
   enum EMode_e   { kLocked, kFree };

   EMode_e  fMode;       // current rotation mode
   Float_t  fTransTheta; // transition theta
   Float_t  fTheta;

   TEveCaloLego*  fLastPickedLego;

   virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2);

public:
   TEveLegoEventHandler(const char *name, TGWindow *w, TObject *obj, const char *title="");
   virtual ~TEveLegoEventHandler() {}

   virtual Bool_t HandleKey(Event_t *event);
   virtual Bool_t HandleDoubleClick(Event_t *event);

   Float_t GetTransTheta() {return fTransTheta;}
   void    SetTransTheta(Float_t h) {fTransTheta=h;}

   ClassDef(TEveLegoEventHandler, 0); // A GL event handler class. Swiches perspective or orthographic camera.
};

#endif

Last change: Tue Aug 26 17:15:06 2008
Last generated: 2008-08-26 17:15

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.