Logo ROOT  
Reference Guide
TEveViewer.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include "TEveViewer.h"
13#include "TEveScene.h"
14#include "TEveSceneInfo.h"
15
16#include "TEveManager.h"
17#include "TEveSelection.h"
18
19#include "TGLFormat.h"
20#include "TGLSAViewer.h"
21#include "TGLEmbeddedViewer.h"
22#include "TGLScenePad.h"
23
24#include "TGLEventHandler.h"
25
26#include "TApplication.h"
27#include "TEnv.h"
28#include "TSystem.h"
29#include "TVirtualX.h"
30
31/** \class TEveViewer
32\ingroup TEve
33Eve representation of TGLViewer.
34
35The gl-viewer is owned by this class and is deleted in destructor.
36
37The frame is not deleted, it is expected that the gl-viewer implementation
38will delete that. TGLSAViewer and TGEmbeddedViewer both do so.
39This could be an optional argument to SetGLViewer. A frame could be
40passed as well.
41
42When stand-alone viewer is requested, it will come up with menu-hiding
43enabled by default. If you dislike this, add the following line to rootrc
44file (or set corresponding gEnv entry in application initialization):
45~~~ {.cpp}
46 Eve.Viewer.HideMenus: off
47~~~
48*/
49
51
54
55////////////////////////////////////////////////////////////////////////////////
56/// Constructor.
57///
58/// The base-class TEveWindowFrame is constructed without a frame so
59/// a default composite-frame is instantiated and stored in fGUIFrame.
60/// Cleanup is set to no-cleanup as viewers need to be zapped with some
61/// more care.
62
63TEveViewer::TEveViewer(const char* n, const char* t) :
64 TEveWindowFrame(0, n, t),
65 fGLViewer (0),
66 fGLViewerFrame (0)
67{
69 fGUIFrame->SetCleanup(kNoCleanup); // the gl-viewer's frame deleted elsewhere.
70
71 if (!fgInitInternal)
72 {
74 }
75}
76
77////////////////////////////////////////////////////////////////////////////////
78/// Destructor.
79
81{
83
86 fGLViewerFrame->ReparentWindow(gClient->GetDefaultRoot());
87 TTimer::SingleShot(150, "TGLViewer", fGLViewer, "Delete()");
88}
89
90////////////////////////////////////////////////////////////////////////////////
91/// Initialize static data-members according to running conditions.
92
94{
95 // Determine if display is running on a mac.
96 // This also works for ssh connection mac->linux.
97 fgRecreateGlOnDockOps = (gVirtualX->SupportsExtension("Apple-WM") == 1);
98
100}
101
102////////////////////////////////////////////////////////////////////////////////
103/// Virtual function called before a window is undocked.
104/// On mac we have to force recreation of gl-context.
105
107{
110 {
111 // Mac only: TGLWidget can be already deleted
112 // in case of recursive delete
113 if (fGLViewer->GetGLWidget())
114 {
116 }
117 }
118}
119
120////////////////////////////////////////////////////////////////////////////////
121/// Virtual function called after a window is docked.
122/// On mac we have to force recreation of gl-context.
123
125{
128 }
130}
131
132////////////////////////////////////////////////////////////////////////////////
133/// Return TEveViewer icon.
134
136{
138}
139
140////////////////////////////////////////////////////////////////////////////////
141/// Set TGLViewer that is represented by this object.
142/// The old gl-viewer is deleted.
143
145{
146 delete fGLViewer;
147 fGLViewer = viewer;
148 fGLViewerFrame = frame;
149
151}
152
153////////////////////////////////////////////////////////////////////////////////
154/// Spawn new GLViewer and adopt it.
155
157{
158 static const TEveException kEH("TEveViewer::SpawnGLViewer ");
159
161
162 TGLFormat *form = 0;
163 if (stereo && quad_buf)
164 {
165 form = new TGLFormat;
166 form->SetStereo(kTRUE);
167 }
168
169 cf->SetEditable(kTRUE);
170 TGLSAViewer* v = 0;
171 try
172 {
173 v = new TGLSAViewer(cf, 0, ged, form);
174 }
175 catch (std::exception&)
176 {
177 Error("SpawnGLViewer", "Insufficient support from the graphics hardware. Aborting.");
179 }
180 cf->SetEditable(kFALSE);
181 v->ToggleEditObject();
182 v->DisableCloseMenuEntries();
183 if (gEnv->GetValue("Eve.Viewer.HideMenus", 1) == 1)
184 {
185 v->EnableMenuBarHiding();
186 }
187 SetGLViewer(v, v->GetFrame());
188
189 if (stereo)
190 v->SetStereo(kTRUE, quad_buf);
191
192 if (fEveFrame == 0)
193 PreUndock();
194
195 return v;
196}
197
198////////////////////////////////////////////////////////////////////////////////
199/// Spawn new GLViewer and adopt it.
200
202{
203 static const TEveException kEH("TEveViewer::SpawnGLEmbeddedViewer ");
204
206
207 TGLEmbeddedViewer* v = new TGLEmbeddedViewer(cf, 0, ged, border);
208 SetGLViewer(v, v->GetFrame());
209
211
213
214 if (fEveFrame == 0)
215 PreUndock();
216
217 return v;
218}
219
220////////////////////////////////////////////////////////////////////////////////
221/// Redraw viewer immediately.
222
223void TEveViewer::Redraw(Bool_t resetCameras)
224{
225 if (resetCameras) fGLViewer->PostSceneBuildSetup(kTRUE);
227}
228
229////////////////////////////////////////////////////////////////////////////////
230/// Switch stereo mode.
231/// This only works TGLSAViewers and, of course, with stereo support
232/// provided by the OpenGL driver.
233
235{
236 TGLSAViewer *v = dynamic_cast<TGLSAViewer*>(fGLViewer);
237
238 if (!v) {
239 Warning("SwitchStereo", "Only supported for TGLSAViewer.");
240 return;
241 }
242
243 v->DestroyGLWidget();
244 TGLFormat *f = v->GetFormat();
245switch_stereo:
246 f->SetStereo(!f->IsStereo());
247 v->SetStereo(f->IsStereo());
248 try
249 {
250 v->CreateGLWidget();
251 }
252 catch (std::exception&)
253 {
254 Error("SwitchStereo", "Insufficient support from the graphics hardware. Reverting.");
255 goto switch_stereo;
256 }
257}
258
259////////////////////////////////////////////////////////////////////////////////
260/// Add 'scene' to the list of scenes.
261
263{
264 static const TEveException eh("TEveViewer::AddScene ");
265
266 TGLSceneInfo* glsi = fGLViewer->AddScene(scene->GetGLScene());
267 if (glsi != 0) {
268 TEveSceneInfo* si = new TEveSceneInfo(this, scene, glsi);
269 AddElement(si);
270 } else {
271 throw(eh + "scene already in the viewer.");
272 }
273}
274
275////////////////////////////////////////////////////////////////////////////////
276/// Remove element 'el' from the list of children and also remove
277/// appropriate GLScene from GLViewer's list of scenes.
278/// Virtual from TEveElement.
279
281{
282 fGLViewer->RemoveScene(((TEveSceneInfo*)el)->GetGLScene());
283}
284
285////////////////////////////////////////////////////////////////////////////////
286/// Remove all children, forwarded to GLViewer.
287/// Virtual from TEveElement.
288
290{
292}
293
294////////////////////////////////////////////////////////////////////////////////
295/// Object to be edited when this is selected, returns the TGLViewer.
296/// Virtual from TEveElement.
297
299{
300 if (!fGLViewer)
301 throw(eh + "fGLViewer not set.");
302 return fGLViewer;
303}
304
305////////////////////////////////////////////////////////////////////////////////
306/// Receive a pasted object. TEveViewer only accepts objects of
307/// class TEveScene.
308/// Virtual from TEveElement.
309
311{
312 static const TEveException eh("TEveViewer::HandleElementPaste ");
313
314 TEveScene* scene = dynamic_cast<TEveScene*>(el);
315 if (scene != 0) {
316 AddScene(scene);
317 return kTRUE;
318 } else {
319 Warning(eh.Data(), "class TEveViewer only accepts TEveScene paste argument.");
320 return kFALSE;
321 }
322}
323
324/** \class TEveViewerList
325\ingroup TEve
326List of Viewers providing common operations on TEveViewer collections.
327*/
328
330
331////////////////////////////////////////////////////////////////////////////////
332
333TEveViewerList::TEveViewerList(const char* n, const char* t) :
334 TEveElementList(n, t),
335 fShowTooltip (kTRUE),
336
337 fBrightness(0),
338 fUseLightColorSet(kFALSE)
339{
340 // Constructor.
341
343 Connect();
344}
345
346////////////////////////////////////////////////////////////////////////////////
347/// Destructor.
348
350{
351 Disconnect();
352}
353
354////////////////////////////////////////////////////////////////////////////////
355/// Call base-class implementation.
356/// If compound is open and compound of the new element is not set,
357/// the el's compound is set to this.
358
360{
362 el->IncParentIgnoreCnt();
363}
364
365////////////////////////////////////////////////////////////////////////////////
366/// Decompoundofy el, call base-class version.
367
369{
370 el->DecParentIgnoreCnt();
372}
373
374////////////////////////////////////////////////////////////////////////////////
375/// Decompoundofy children, call base-class version.
376
378{
379 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
380 {
381 (*i)->DecParentIgnoreCnt();
382 }
383
385}
386
387////////////////////////////////////////////////////////////////////////////////
388/// Connect to TGLViewer class-signals.
389
391{
392 TQObject::Connect("TGLViewer", "MouseOver(TObject*,UInt_t)",
393 "TEveViewerList", this, "OnMouseOver(TObject*,UInt_t)");
394
395 TQObject::Connect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
396 "TEveViewerList", this, "OnReMouseOver(TObject*,UInt_t)");
397
398 TQObject::Connect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
399 "TEveViewerList", this, "OnUnMouseOver(TObject*,UInt_t)");
400
401 TQObject::Connect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
402 "TEveViewerList", this, "OnClicked(TObject*,UInt_t,UInt_t)");
403
404 TQObject::Connect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
405 "TEveViewerList", this, "OnReClicked(TObject*,UInt_t,UInt_t)");
406
407 TQObject::Connect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
408 "TEveViewerList", this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
409}
410
411////////////////////////////////////////////////////////////////////////////////
412/// Disconnect from TGLViewer class-signals.
413
415{
416 TQObject::Disconnect("TGLViewer", "MouseOver(TObject*,UInt_t)",
417 this, "OnMouseOver(TObject*,UInt_t)");
418
419 TQObject::Disconnect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
420 this, "OnReMouseOver(TObject*,UInt_t)");
421
422 TQObject::Disconnect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
423 this, "OnUnMouseOver(TObject*,UInt_t)");
424
425 TQObject::Disconnect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
426 this, "OnClicked(TObject*,UInt_t,UInt_t)");
427
428 TQObject::Disconnect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
429 this, "OnReClicked(TObject*,UInt_t,UInt_t)");
430
431 TQObject::Disconnect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
432 this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
433}
434
435////////////////////////////////////////////////////////////////////////////////
436/// Repaint viewers that are tagged as changed.
437
439{
440 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
441 {
442 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
443 if (glv->IsChanged())
444 {
445 if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
446 if (dropLogicals) glv->SetSmartRefresh(kFALSE);
447
449
450 if (dropLogicals) glv->SetSmartRefresh(kTRUE);
451 }
452 }
453}
454
455////////////////////////////////////////////////////////////////////////////////
456/// Repaint all viewers.
457
458void TEveViewerList::RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
459{
460 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
461 {
462 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
463
464 if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
465 if (dropLogicals) glv->SetSmartRefresh(kFALSE);
466
468
469 if (dropLogicals) glv->SetSmartRefresh(kTRUE);
470 }
471}
472
473////////////////////////////////////////////////////////////////////////////////
474/// Delete annotations from all viewers.
475
477{
478 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
479 {
480 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
482 }
483}
484
485////////////////////////////////////////////////////////////////////////////////
486/// Callback done from a TEveScene destructor allowing proper
487/// removal of the scene from affected viewers.
488
490{
491 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
492 {
493 TEveViewer* viewer = (TEveViewer*) *i;
494 List_i j = viewer->BeginChildren();
495 while (j != viewer->EndChildren())
496 {
497 TEveSceneInfo* sinfo = (TEveSceneInfo*) *j;
498 ++j;
499 if (sinfo->GetScene() == scene)
500 viewer->RemoveElement(sinfo);
501 }
502 }
503}
504
505////////////////////////////////////////////////////////////////////////////////
506/// Show / hide tooltip for various MouseOver events.
507/// Must be called from slots where sender is TGLEventHandler.
508
510{
511 if (fShowTooltip)
512 {
513 TGLViewer *glw = dynamic_cast<TGLViewer*>((TQObject*) gTQSender);
515 if (gEve->GetHighlight()->NumChildren() == 1)
516 {
518 if ( ! title.IsNull())
519 glh->TriggerTooltip(title);
520 }
521 else
522 {
523 glh->RemoveTooltip();
524 }
525 }
526}
527
528////////////////////////////////////////////////////////////////////////////////
529/// Slot for global TGLViewer::MouseOver() signal.
530///
531/// The attempt is made to determine the TEveElement being
532/// represented by the physical shape and global highlight is updated
533/// accordingly.
534///
535/// If TEveElement::IsPickable() returns false, the element is not
536/// highlighted.
537///
538/// Highlight is always in single-selection mode.
539
541{
542 TEveElement *el = dynamic_cast<TEveElement*>(obj);
543 if (el && !el->IsPickable())
544 el = 0;
545
546 void *qsender = gTQSender;
548 gTQSender = qsender;
549
551}
552
553////////////////////////////////////////////////////////////////////////////////
554/// Slot for global TGLViewer::ReMouseOver().
555///
556/// The obj is dyn-casted to the TEveElement and global selection is
557/// updated accordingly.
558///
559/// If TEveElement::IsPickable() returns false, the element is not
560/// selected.
561
563{
564 TEveElement* el = dynamic_cast<TEveElement*>(obj);
565 if (el && !el->IsPickable())
566 el = 0;
567
568 void *qsender = gTQSender;
570 gTQSender = qsender;
571
573}
574
575////////////////////////////////////////////////////////////////////////////////
576/// Slot for global TGLViewer::UnMouseOver().
577///
578/// The obj is dyn-casted to the TEveElement and global selection is
579/// updated accordingly.
580///
581/// If TEveElement::IsPickable() returns false, the element is not
582/// selected.
583
585{
586 TEveElement* el = dynamic_cast<TEveElement*>(obj);
587 if (el && !el->IsPickable())
588 el = 0;
589
590 void *qsender = gTQSender;
592 gTQSender = qsender;
593
595}
596
597////////////////////////////////////////////////////////////////////////////////
598/// Slot for global TGLViewer::Clicked().
599///
600/// The obj is dyn-casted to the TEveElement and global selection is
601/// updated accordingly.
602///
603/// If TEveElement::IsPickable() returns false, the element is not
604/// selected.
605
606void TEveViewerList::OnClicked(TObject *obj, UInt_t /*button*/, UInt_t state)
607{
608 TEveElement* el = dynamic_cast<TEveElement*>(obj);
609 if (el && !el->IsPickable())
610 el = 0;
612}
613
614////////////////////////////////////////////////////////////////////////////////
615/// Slot for global TGLViewer::ReClicked().
616///
617/// The obj is dyn-casted to the TEveElement and global selection is
618/// updated accordingly.
619///
620/// If TEveElement::IsPickable() returns false, the element is not
621/// selected.
622
623void TEveViewerList::OnReClicked(TObject *obj, UInt_t /*button*/, UInt_t /*state*/)
624{
625 TEveElement* el = dynamic_cast<TEveElement*>(obj);
626 if (el && !el->IsPickable())
627 el = 0;
629}
630
631////////////////////////////////////////////////////////////////////////////////
632/// Slot for global TGLViewer::UnClicked().
633///
634/// The obj is dyn-casted to the TEveElement and global selection is
635/// updated accordingly.
636///
637/// If TEveElement::IsPickable() returns false, the element is not
638/// selected.
639
640void TEveViewerList::OnUnClicked(TObject *obj, UInt_t /*button*/, UInt_t /*state*/)
641{
642 TEveElement* el = dynamic_cast<TEveElement*>(obj);
643 if (el && !el->IsPickable())
644 el = 0;
646}
647
648////////////////////////////////////////////////////////////////////////////////
649/// Set color brightness.
650
652{
654}
655
656////////////////////////////////////////////////////////////////////////////////
657/// Switch background color.
658
660{
662 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
663 {
664 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
666 glv->UseLightColorSet();
667 else
668 glv->UseDarkColorSet();
669
671 }
672}
void Class()
Definition: Class.C:29
const Mask_t kKeyControlMask
Definition: GuiTypes.h:196
#define b(i)
Definition: RSha256.hxx:100
#define f(i)
Definition: RSha256.hxx:104
const Bool_t kFALSE
Definition: RtypesCore.h:90
bool Bool_t
Definition: RtypesCore.h:61
float Float_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:89
#define ClassImp(name)
Definition: Rtypes.h:361
R__EXTERN TApplication * gApplication
Definition: TApplication.h:166
R__EXTERN TEnv * gEnv
Definition: TEnv.h:171
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
#define gClient
Definition: TGClient.h:166
@ kNoCleanup
Definition: TGFrame.h:49
@ kLHintsExpandY
Definition: TGLayout.h:38
@ kLHintsNormal
Definition: TGLayout.h:39
@ kLHintsExpandX
Definition: TGLayout.h:37
R__EXTERN void * gTQSender
Definition: TQObject.h:44
#define gVirtualX
Definition: TVirtualX.h:338
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
A list of TEveElements.
Definition: TEveElement.h:431
void SetChildClass(TClass *c)
Definition: TEveElement.h:463
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:34
virtual void AddElement(TEveElement *el)
Add el to the list of children.
List_t fChildren
Definition: TEveElement.h:79
virtual TString GetHighlightTooltip()
Definition: TEveElement.h:123
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
Bool_t IsPickable() const
Definition: TEveElement.h:339
List_i EndChildren()
Definition: TEveElement.h:165
Int_t NumChildren() const
Definition: TEveElement.h:168
void DecParentIgnoreCnt()
Decrease number of parents ignored in reference-counting.
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
virtual void RemoveElementLocal(TEveElement *el)
Perform additional local removal of el.
static const TGPicture * fgListTreeIcons[9]
Definition: TEveElement.h:63
List_i BeginChildren()
Definition: TEveElement.h:164
List_t::iterator List_i
Definition: TEveElement.h:70
virtual void RemoveElementsLocal()
Perform additional local removal of all elements.
void IncParentIgnoreCnt()
Increase number of parents ignored in reference-counting.
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
TEveSelection * GetSelection() const
Definition: TEveManager.h:129
TEveSelection * GetHighlight() const
Definition: TEveManager.h:130
TEveUtil representation of TGLSceneInfo.
Definition: TEveSceneInfo.h:25
TEveScene * GetScene() const
Definition: TEveSceneInfo.h:40
Eve representation of TGLScene.
Definition: TEveScene.h:27
TGLScenePad * GetGLScene() const
Definition: TEveScene.h:60
virtual void UserRePickedElement(TEveElement *el)
Called when secondary selection becomes empty.
virtual void UserPickedElement(TEveElement *el, Bool_t multi=kFALSE)
Called when user picks/clicks on an element.
virtual void UserUnPickedElement(TEveElement *el)
Called when secondary selection becomes empty.
static void SetColorBrightness(Float_t value, Bool_t full_redraw=kFALSE)
Tweak all ROOT colors to become brighter (if value > 0) or darker (value < 0).
Definition: TEveUtil.cxx:280
List of Viewers providing common operations on TEveViewer collections.
Definition: TEveViewer.h:80
void SwitchColorSet()
Switch background color.
Definition: TEveViewer.cxx:659
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
Definition: TEveViewer.cxx:438
Bool_t fShowTooltip
Definition: TEveViewer.h:86
virtual void RemoveElementLocal(TEveElement *el)
Decompoundofy el, call base-class version.
Definition: TEveViewer.cxx:368
void OnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::MouseOver() signal.
Definition: TEveViewer.cxx:540
void SetColorBrightness(Float_t b)
Set color brightness.
Definition: TEveViewer.cxx:651
void OnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::Clicked().
Definition: TEveViewer.cxx:606
void OnUnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::UnMouseOver().
Definition: TEveViewer.cxx:584
virtual void RemoveElementsLocal()
Decompoundofy children, call base-class version.
Definition: TEveViewer.cxx:377
void OnReClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::ReClicked().
Definition: TEveViewer.cxx:623
void OnReMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::ReMouseOver().
Definition: TEveViewer.cxx:562
virtual void AddElement(TEveElement *el)
Call base-class implementation.
Definition: TEveViewer.cxx:359
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
Definition: TEveViewer.cxx:458
void SceneDestructing(TEveScene *scene)
Callback done from a TEveScene destructor allowing proper removal of the scene from affected viewers.
Definition: TEveViewer.cxx:489
void HandleTooltip()
Show / hide tooltip for various MouseOver events.
Definition: TEveViewer.cxx:509
Bool_t fUseLightColorSet
Definition: TEveViewer.h:89
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
Definition: TEveViewer.cxx:414
virtual void Connect()
Connect to TGLViewer class-signals.
Definition: TEveViewer.cxx:390
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::UnClicked().
Definition: TEveViewer.cxx:640
void DeleteAnnotations()
Delete annotations from all viewers.
Definition: TEveViewer.cxx:476
virtual ~TEveViewerList()
Destructor.
Definition: TEveViewer.cxx:349
TEveViewerList(const TEveViewerList &)
Eve representation of TGLViewer.
Definition: TEveViewer.h:31
virtual void RemoveElementLocal(TEveElement *el)
Remove element 'el' from the list of children and also remove appropriate GLScene from GLViewer's lis...
Definition: TEveViewer.cxx:280
void SetGLViewer(TGLViewer *viewer, TGFrame *frame)
Set TGLViewer that is represented by this object.
Definition: TEveViewer.cxx:144
static Bool_t fgInitInternal
Definition: TEveViewer.h:40
virtual void PostDock()
Virtual function called after a window is docked.
Definition: TEveViewer.cxx:124
void SwitchStereo()
Switch stereo mode.
Definition: TEveViewer.cxx:234
virtual Bool_t HandleElementPaste(TEveElement *el)
Receive a pasted object.
Definition: TEveViewer.cxx:310
TEveViewer(const TEveViewer &)
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Return TEveViewer icon.
Definition: TEveViewer.cxx:135
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
Definition: TEveViewer.cxx:223
virtual void AddScene(TEveScene *scene)
Add 'scene' to the list of scenes.
Definition: TEveViewer.cxx:262
static Bool_t fgRecreateGlOnDockOps
Definition: TEveViewer.h:41
TGLSAViewer * SpawnGLViewer(TGedEditor *ged=0, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE)
Spawn new GLViewer and adopt it.
Definition: TEveViewer.cxx:156
virtual void PreUndock()
Virtual function called before a window is undocked.
Definition: TEveViewer.cxx:106
TGLViewer * fGLViewer
Definition: TEveViewer.h:37
static void InitInternal()
Initialize static data-members according to running conditions.
Definition: TEveViewer.cxx:93
TGFrame * fGLViewerFrame
Definition: TEveViewer.h:38
virtual void RemoveElementsLocal()
Remove all children, forwarded to GLViewer.
Definition: TEveViewer.cxx:289
virtual ~TEveViewer()
Destructor.
Definition: TEveViewer.cxx:80
virtual TObject * GetEditorObject(const TEveException &eh="TEveViewer::GetEditorObject ") const
Object to be edited when this is selected, returns the TGLViewer.
Definition: TEveViewer.cxx:298
TGLEmbeddedViewer * SpawnGLEmbeddedViewer(TGedEditor *ged=0, Int_t border=0)
Spawn new GLViewer and adopt it.
Definition: TEveViewer.cxx:201
Encapsulates TGFrame into an eve-window.
Definition: TEveWindow.h:336
TGFrame * fGUIFrame
Definition: TEveWindow.h:342
TGCompositeFrame * GetGUICompositeFrame()
Returns the registered top-frame of this eve-window dynamic-casted to composite-frame.
virtual void PreUndock()
Virtual function called before a window is undocked.
Definition: TEveWindow.cxx:691
TEveCompositeFrame * fEveFrame
Definition: TEveWindow.h:218
virtual void PostDock()
Virtual function called after a window is docked.
Definition: TEveWindow.cxx:704
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1101
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
Definition: TGFrame.cxx:932
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1133
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition: TGFrame.h:227
virtual void SetCleanup(Int_t=kLocalCleanup)
Definition: TGFrame.h:242
virtual void MapWindow()
map window
Definition: TGFrame.h:229
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:231
Minimal GL-viewer that can be embedded in a standard ROOT frames.
Base-class and default implementation of event-handler for TGLViewer.
virtual void TriggerTooltip(const char *text)
Trigger display of tooltip.
virtual void RemoveTooltip()
Hide the tooltip.
Encapsulation of format / contents of an OpenGL buffer.
Definition: TGLFormat.h:36
void SetStereo(Bool_t db)
Set the surface as stereo/non-stereo buffered.
Definition: TGLFormat.cxx:203
@ kLODHigh
Definition: TGLRnrCtx.h:67
The top level standalone GL-viewer - created via plugin manager.
Definition: TGLSAViewer.h:38
Base class for extended scene context.
Definition: TGLSceneInfo.h:27
TGLSceneInfo * AddScene(TGLSceneBase *scene)
Add new scene, appropriate scene-info is created.
void RemoveAllScenes()
Remove all scenes from the viewer, their scene-infos are deleted.
void RemoveScene(TGLSceneBase *scene)
Remove scene from the viewer, its scene-info is deleted.
virtual Bool_t IsChanged() const
virtual void DeleteOverlayAnnotations()
Delete overlay elements that are annotations.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:57
virtual void SetEventHandler(TGEventHandler *handler)
Set the event-handler.
Definition: TGLViewer.cxx:2291
TGEventHandler * GetEventHandler() const
Definition: TGLViewer.h:379
void RequestDraw(Short_t LOD=TGLRnrCtx::kLODMed)
Post request for redraw of viewer at level of detail 'LOD' Request is directed via cross thread gVirt...
Definition: TGLViewer.cxx:438
virtual void CreateGLWidget()
Definition: TGLViewer.h:227
void SetSmartRefresh(Bool_t smart_ref)
Definition: TGLViewer.h:232
virtual void DestroyGLWidget()
Definition: TGLViewer.h:228
void UseLightColorSet()
Use the light color-set.
Definition: TGLViewer.cxx:1624
virtual void PostSceneBuildSetup(Bool_t resetCameras)
Perform post scene-build setup.
Definition: TGLViewer.cxx:392
void UseDarkColorSet()
Use the dark color-set.
Definition: TGLViewer.cxx:1615
TGLWidget * GetGLWidget()
Definition: TGLViewer.h:225
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:877
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:891
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition: TQObject.h:48
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition: TQObject.cxx:866
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
Definition: TQObject.cxx:1024
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
Bool_t IsNull() const
Definition: TString.h:402
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
Definition: TTimer.cxx:256
const Int_t n
Definition: legend1.C:16