ROOT » GRAF3D » GL » TGLEventHandler

class TGLEventHandler: public TGEventHandler


 Base-class and default implementation of event-handler for TGLViewer.

 This allows for complete disentanglement of GL-viewer from GUI
 event handling. Further, alternative event-handlers can easily be
 designed and set at run-time.

 The signals about object being selected or hovered above are
 emitted via the TGLViewer itself.

 The following rootrc settings influence the behaviour:
 OpenGL.EventHandler.ViewerCentricControls:  1
 OpenGL.EventHandler.ArrowKeyFactor:        -1.0
 OpenGL.EventHandler.MouseDragFactor:       -1.0
 OpenGL.EventHandler.MouseWheelFactor:      -1.0

Function Members (Methods)

public:
virtual~TGLEventHandler()
voidTObject::AbstractMethod(const char* method) const
voidTGEventHandler::Activate()
virtual voidTObject::AppendPad(Option_t* option = "")
static Bool_tTQObject::AreAllSignalsBlocked()
Bool_tTQObject::AreSignalsBlocked() const
static Bool_tTQObject::BlockAllSignals(Bool_t b)
Bool_tTQObject::BlockSignals(Bool_t b)
virtual voidTObject::Browse(TBrowser* b)
virtual voidTQObject::ChangedBy(const char* method)SIGNAL
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual voidClearMouseOver()
virtual TObject*TNamed::Clone(const char* newname = "") const
voidTQObject::CollectClassSignalLists(TList& list, TClass* cls)
virtual Int_tTNamed::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
virtual voidTNamed::Copy(TObject& named) const
voidTGEventHandler::DeActivate()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidTQObject::Destroyed()SIGNAL
Bool_tTQObject::Disconnect(const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = 0)
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Bool_tGetArcBall() const
Bool_tGetDoInternalSelection() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TList*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
TList*TQObject::GetListOfSignals() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetSecSelType() const
virtual const char*TNamed::GetTitle() const
Int_tGetTooltipPixelTolerance() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tHandleButton(Event_t* event)
virtual Bool_tTGEventHandler::HandleColormapChange(Event_t*)
virtual Bool_tHandleConfigureNotify(Event_t* event)
virtual Bool_tHandleCrossing(Event_t* event)
virtual Bool_tHandleDoubleClick(Event_t* event)
virtual Bool_tHandleEvent(Event_t* event)
virtual Bool_tHandleExpose(Event_t* event)
virtual Bool_tHandleFocusChange(Event_t* event)
virtual Bool_tHandleKey(Event_t* event)
virtual Bool_tHandleMotion(Event_t* event)
virtual Bool_tTGEventHandler::HandleSelection(Event_t*)
virtual Bool_tTGEventHandler::HandleSelectionClear(Event_t*)
virtual Bool_tTGEventHandler::HandleSelectionRequest(Event_t*)
virtual Bool_tHandleTimer(TTimer* t)
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
virtual ULong_tTNamed::Hash() const
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTGEventHandler::IsActive() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTQObject::LowPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)SIGNAL
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TGLEventHandler&operator=(const TGLEventHandler&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPopupContextMenu(TGLPhysicalShape* pshp, Event_t* event, Int_t gx, Int_t gy)
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidTGEventHandler::ProcessedEvent(Event_t* event)SIGNAL
virtual Bool_tTGEventHandler::ProcessMessage(Long_t, Long_t, Long_t)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidRemoveTooltip()
virtual voidRepaint()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidTGEventHandler::SendMessage(const TGWindow* w, Long_t msg, Long_t parm1, Long_t parm2)
voidSetArcBall(Bool_t a)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetDoInternalSelection(Bool_t x)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetMouseOverSelectDelay(Int_t ms)
voidSetMouseOverTooltipDelay(Int_t ms)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetSecSelType(Int_t t)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidSetTooltipPixelTolerance(Int_t t)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStartMouseTimer()
virtual voidStopMouseTimer()
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TGLEventHandler(const TGLEventHandler&)
TGLEventHandler(TGWindow* w, TObject* obj)
virtual voidTriggerTooltip(const char* text)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
Int_tControlValue(Int_t v)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual void*TQObject::GetSender()
virtual const char*TQObject::GetSenderClassName() const
virtual voidGrabMouse()
voidTObject::MakeZombie()
virtual Bool_tRotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
virtual voidSelectForClicked(Event_t* event)
virtual voidSelectForMouseOver()
virtual voidUnGrabMouse()

Data Members

public:
static TObject::<anonymous>TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::<anonymous>TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::<anonymous>TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::<anonymous>TObject::kOverwrite
static TObject::<anonymous>TObject::kSingleKey
static TObject::<anonymous>TObject::kWriteDelete
static TObject::<anonymous>TObject::kZombie
protected:
UInt_tfActiveButtonID
Bool_tfArcBall
Float_tfArrowKeyFactor
TPointfButtonPushPos
Bool_tfDoInternalSelection
TGLViewer*fGLViewer
Bool_tfIgnoreButtonUp
Bool_tfInPointerGrab
UInt_tfLastEventState
TPointfLastGlobalPos
TPointfLastMouseOverPos
TGLPhysicalShape*fLastMouseOverShape
TPointfLastPos
TList*TQObject::fListOfConnections! list of connections to this object
TList*TQObject::fListOfSignals! list of signals from this object
Float_tfMouseDragFactor
TTimer*fMouseTimermouse delay timer
Bool_tfMouseTimerRunning
Float_tfMouseWheelFactor
TStringTNamed::fNameobject identifier
Int_tfSecSelTypesecondary selection type
Bool_tTQObject::fSignalsBlocked! flag used for suppression of signals
TStringTNamed::fTitleobject title
TGToolTip*fTooltiptooltip for highlight
Int_tfTooltipPixelTolerance
TPointfTooltipPos
Bool_tfTooltipShown
Bool_tfViewerCentricControls
static Bool_tTQObject::fgAllSignalsBlockedflag used for suppression of all signals

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLEventHandler(TGWindow* w, TObject* obj)
 Constructor.
~TGLEventHandler()
 Destructor.
void GrabMouse()
 Acquire mouse grab.
void UnGrabMouse()
 Release mouse grab.
void SelectForClicked(Event_t* event)
 Run selection (optionally with on secondary selection) and emit
 corresponding Clicked() signals.
 Protected method.
void SelectForMouseOver()
 Run selection (optionally with on secondary selection) and emit
 corresponding MouseOver() signals.
 Protected method.
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Process event of type 'event' - one of EEventType types,
 occuring at window location px, py
 This is provided for use when embedding GL viewer into pad
Bool_t HandleEvent(Event_t* event)
 Handle generic Event_t type 'event' - provided to catch focus changes
 and terminate any interaction in viewer.
Bool_t HandleFocusChange(Event_t* event)
 Handle generic Event_t type 'event' - provided to catch focus changes
 and terminate any interaction in viewer.
Bool_t HandleCrossing(Event_t* event)
 Handle generic Event_t type 'event' - provided to catch focus changes
 and terminate any interaction in viewer.
Bool_t HandleButton(Event_t* event)
 Handle mouse button 'event'.
Bool_t HandleDoubleClick(Event_t* event)
 Handle mouse double click 'event'.
Bool_t HandleConfigureNotify(Event_t* event)
 Handle configure notify 'event' - a window resize/movement.
Bool_t HandleExpose(Event_t* event)
 Handle window expose 'event' - show.
Bool_t HandleKey(Event_t* event)
 Handle keyboard 'event'.
Bool_t HandleMotion(Event_t* event)
 Handle mouse motion 'event'.
Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
 Method to handle action TGLViewer::kDragCameraRotate.
Bool_t HandleTimer(TTimer* t)
 If mouse delay timer times out emit signal.
void StartMouseTimer()
 Start mouse timer in single-shot mode.
void StopMouseTimer()
 Make sure mouse timers are not running.
void ClearMouseOver()
 Clear mouse-over state and emit mouse-over signals.
 Current overlay element is also told the mouse has left.
void Repaint()
 Handle window expose 'event' - show.
void PopupContextMenu(TGLPhysicalShape* pshp, Event_t* event, Int_t gx, Int_t gy)
 Popup context menu.
void TriggerTooltip(const char* text)
 Trigger display of tooltip.
void RemoveTooltip()
 Hide the tooltip.
void SetMouseOverSelectDelay(Int_t ms)
 Set delay of mouse-over probe (highlight).
void SetMouseOverTooltipDelay(Int_t ms)
 Set delay of tooltip timer.
Int_t ControlValue(Int_t v)
{ return fViewerCentricControls ? -v : v; }
TGLEventHandler(TGWindow* w, TObject* obj)
Int_t GetTooltipPixelTolerance() const
void SetTooltipPixelTolerance(Int_t t)
Int_t GetSecSelType() const
{ return fSecSelType; }
void SetSecSelType(Int_t t)
{ fSecSelType = t; }
Bool_t GetDoInternalSelection() const
void SetDoInternalSelection(Bool_t x)
Bool_t GetArcBall() const
{ return fArcBall; }
void SetArcBall(Bool_t a)
{ fArcBall = a; }