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 "TVirtualX.h"
29
30/** \class TEveViewer
31\ingroup TEve
32Eve representation of TGLViewer.
33
34The gl-viewer is owned by this class and is deleted in destructor.
35
36The frame is not deleted, it is expected that the gl-viewer implementation
37will delete that. TGLSAViewer and TGEmbeddedViewer both do so.
38This could be an optional argument to SetGLViewer. A frame could be
39passed as well.
40
41When stand-alone viewer is requested, it will come up with menu-hiding
42enabled by default. If you dislike this, add the following line to rootrc
43file (or set corresponding gEnv entry in application initialization):
44~~~ {.cpp}
45 Eve.Viewer.HideMenus: off
46~~~
47*/
48
50
53
54////////////////////////////////////////////////////////////////////////////////
55/// Constructor.
56///
57/// The base-class TEveWindowFrame is constructed without a frame so
58/// a default composite-frame is instantiated and stored in fGUIFrame.
59/// Cleanup is set to no-cleanup as viewers need to be zapped with some
60/// more care.
61
62TEveViewer::TEveViewer(const char* n, const char* t) :
63 TEveWindowFrame(0, n, t),
64 fGLViewer (0),
65 fGLViewerFrame (0)
66{
68 fGUIFrame->SetCleanup(kNoCleanup); // the gl-viewer's frame deleted elsewhere.
69
70 if (!fgInitInternal)
71 {
73 }
74}
75
76////////////////////////////////////////////////////////////////////////////////
77/// Destructor.
78
80{
82
85 fGLViewerFrame->ReparentWindow(gClient->GetDefaultRoot());
86 TTimer::SingleShot(150, "TGLViewer", fGLViewer, "Delete()");
87}
88
89////////////////////////////////////////////////////////////////////////////////
90/// Initialize static data-members according to running conditions.
91
93{
94 // Determine if display is running on a mac.
95 // This also works for ssh connection mac->linux.
96 fgRecreateGlOnDockOps = (gVirtualX->SupportsExtension("Apple-WM") == 1);
97
99}
100
101////////////////////////////////////////////////////////////////////////////////
102/// Virtual function called before a window is undocked.
103/// On mac we have to force recreation of gl-context.
104
106{
109 {
110 // Mac only: TGLWidget can be already deleted
111 // in case of recursive delete
112 if (fGLViewer->GetGLWidget())
113 {
115 }
116 }
117}
118
119////////////////////////////////////////////////////////////////////////////////
120/// Virtual function called after a window is docked.
121/// On mac we have to force recreation of gl-context.
122
124{
127 }
129}
130
131////////////////////////////////////////////////////////////////////////////////
132/// Return TEveViewer icon.
133
135{
137}
138
139////////////////////////////////////////////////////////////////////////////////
140/// Set TGLViewer that is represented by this object.
141/// The old gl-viewer is deleted.
142
144{
145 delete fGLViewer;
146 fGLViewer = viewer;
147 fGLViewerFrame = frame;
148
150}
151
152////////////////////////////////////////////////////////////////////////////////
153/// Spawn new GLViewer and adopt it.
154
156{
157 static const TEveException kEH("TEveViewer::SpawnGLViewer ");
158
160
161 TGLFormat *form = 0;
162 if (stereo && quad_buf)
163 {
164 form = new TGLFormat;
165 form->SetStereo(kTRUE);
166 }
167
168 cf->SetEditable(kTRUE);
169 TGLSAViewer* v = 0;
170 try
171 {
172 v = new TGLSAViewer(cf, 0, ged, form);
173 }
174 catch (std::exception&)
175 {
176 Error("SpawnGLViewer", "Insufficient support from the graphics hardware. Aborting.");
178 }
179 cf->SetEditable(kFALSE);
180 v->ToggleEditObject();
181 v->DisableCloseMenuEntries();
182 if (gEnv->GetValue("Eve.Viewer.HideMenus", 1) == 1)
183 {
184 v->EnableMenuBarHiding();
185 }
186 SetGLViewer(v, v->GetFrame());
187
188 if (stereo)
189 v->SetStereo(kTRUE, quad_buf);
190
191 if (fEveFrame == 0)
192 PreUndock();
193
194 return v;
195}
196
197////////////////////////////////////////////////////////////////////////////////
198/// Spawn new GLViewer and adopt it.
199
201{
202 static const TEveException kEH("TEveViewer::SpawnGLEmbeddedViewer ");
203
205
206 TGLEmbeddedViewer* v = new TGLEmbeddedViewer(cf, 0, ged, border);
207 SetGLViewer(v, v->GetFrame());
208
210
212
213 if (fEveFrame == 0)
214 PreUndock();
215
216 return v;
217}
218
219////////////////////////////////////////////////////////////////////////////////
220/// Redraw viewer immediately.
221
222void TEveViewer::Redraw(Bool_t resetCameras)
223{
224 if (resetCameras) fGLViewer->PostSceneBuildSetup(kTRUE);
226}
227
228////////////////////////////////////////////////////////////////////////////////
229/// Switch stereo mode.
230/// This only works TGLSAViewers and, of course, with stereo support
231/// provided by the OpenGL driver.
232
234{
235 TGLSAViewer *v = dynamic_cast<TGLSAViewer*>(fGLViewer);
236
237 if (!v) {
238 Warning("SwitchStereo", "Only supported for TGLSAViewer.");
239 return;
240 }
241
242 v->DestroyGLWidget();
243 TGLFormat *f = v->GetFormat();
244switch_stereo:
245 f->SetStereo(!f->IsStereo());
246 v->SetStereo(f->IsStereo());
247 try
248 {
249 v->CreateGLWidget();
250 }
251 catch (std::exception&)
252 {
253 Error("SwitchStereo", "Insufficient support from the graphics hardware. Reverting.");
254 goto switch_stereo;
255 }
256}
257
258////////////////////////////////////////////////////////////////////////////////
259/// Add 'scene' to the list of scenes.
260
262{
263 static const TEveException eh("TEveViewer::AddScene ");
264
265 TGLSceneInfo* glsi = fGLViewer->AddScene(scene->GetGLScene());
266 if (glsi != 0) {
267 TEveSceneInfo* si = new TEveSceneInfo(this, scene, glsi);
268 AddElement(si);
269 } else {
270 throw(eh + "scene already in the viewer.");
271 }
272}
273
274////////////////////////////////////////////////////////////////////////////////
275/// Remove element 'el' from the list of children and also remove
276/// appropriate GLScene from GLViewer's list of scenes.
277/// Virtual from TEveElement.
278
280{
281 fGLViewer->RemoveScene(((TEveSceneInfo*)el)->GetGLScene());
282}
283
284////////////////////////////////////////////////////////////////////////////////
285/// Remove all children, forwarded to GLViewer.
286/// Virtual from TEveElement.
287
289{
291}
292
293////////////////////////////////////////////////////////////////////////////////
294/// Object to be edited when this is selected, returns the TGLViewer.
295/// Virtual from TEveElement.
296
298{
299 if (!fGLViewer)
300 throw(eh + "fGLViewer not set.");
301 return fGLViewer;
302}
303
304////////////////////////////////////////////////////////////////////////////////
305/// Receive a pasted object. TEveViewer only accepts objects of
306/// class TEveScene.
307/// Virtual from TEveElement.
308
310{
311 static const TEveException eh("TEveViewer::HandleElementPaste ");
312
313 TEveScene* scene = dynamic_cast<TEveScene*>(el);
314 if (scene != 0) {
315 AddScene(scene);
316 return kTRUE;
317 } else {
318 Warning(eh.Data(), "class TEveViewer only accepts TEveScene paste argument.");
319 return kFALSE;
320 }
321}
322
323/** \class TEveViewerList
324\ingroup TEve
325List of Viewers providing common operations on TEveViewer collections.
326*/
327
329
330////////////////////////////////////////////////////////////////////////////////
331
332TEveViewerList::TEveViewerList(const char* n, const char* t) :
333 TEveElementList(n, t),
334 fShowTooltip (kTRUE),
335
336 fBrightness(0),
337 fUseLightColorSet(kFALSE)
338{
339 // Constructor.
340
342 Connect();
343}
344
345////////////////////////////////////////////////////////////////////////////////
346/// Destructor.
347
349{
350 Disconnect();
351}
352
353////////////////////////////////////////////////////////////////////////////////
354/// Call base-class implementation.
355/// If compound is open and compound of the new element is not set,
356/// the el's compound is set to this.
357
359{
361 el->IncParentIgnoreCnt();
362}
363
364////////////////////////////////////////////////////////////////////////////////
365/// Decompoundofy el, call base-class version.
366
368{
369 el->DecParentIgnoreCnt();
371}
372
373////////////////////////////////////////////////////////////////////////////////
374/// Decompoundofy children, call base-class version.
375
377{
378 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
379 {
380 (*i)->DecParentIgnoreCnt();
381 }
382
384}
385
386////////////////////////////////////////////////////////////////////////////////
387/// Connect to TGLViewer class-signals.
388
390{
391 TQObject::Connect("TGLViewer", "MouseOver(TObject*,UInt_t)",
392 "TEveViewerList", this, "OnMouseOver(TObject*,UInt_t)");
393
394 TQObject::Connect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
395 "TEveViewerList", this, "OnReMouseOver(TObject*,UInt_t)");
396
397 TQObject::Connect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
398 "TEveViewerList", this, "OnUnMouseOver(TObject*,UInt_t)");
399
400 TQObject::Connect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
401 "TEveViewerList", this, "OnClicked(TObject*,UInt_t,UInt_t)");
402
403 TQObject::Connect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
404 "TEveViewerList", this, "OnReClicked(TObject*,UInt_t,UInt_t)");
405
406 TQObject::Connect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
407 "TEveViewerList", this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
408}
409
410////////////////////////////////////////////////////////////////////////////////
411/// Disconnect from TGLViewer class-signals.
412
414{
415 TQObject::Disconnect("TGLViewer", "MouseOver(TObject*,UInt_t)",
416 this, "OnMouseOver(TObject*,UInt_t)");
417
418 TQObject::Disconnect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
419 this, "OnReMouseOver(TObject*,UInt_t)");
420
421 TQObject::Disconnect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
422 this, "OnUnMouseOver(TObject*,UInt_t)");
423
424 TQObject::Disconnect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
425 this, "OnClicked(TObject*,UInt_t,UInt_t)");
426
427 TQObject::Disconnect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
428 this, "OnReClicked(TObject*,UInt_t,UInt_t)");
429
430 TQObject::Disconnect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
431 this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
432}
433
434////////////////////////////////////////////////////////////////////////////////
435/// Repaint viewers that are tagged as changed.
436
438{
439 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
440 {
441 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
442 if (glv->IsChanged())
443 {
444 if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
445 if (dropLogicals) glv->SetSmartRefresh(kFALSE);
446
448
449 if (dropLogicals) glv->SetSmartRefresh(kTRUE);
450 }
451 }
452}
453
454////////////////////////////////////////////////////////////////////////////////
455/// Repaint all viewers.
456
457void TEveViewerList::RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
458{
459 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
460 {
461 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
462
463 if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
464 if (dropLogicals) glv->SetSmartRefresh(kFALSE);
465
467
468 if (dropLogicals) glv->SetSmartRefresh(kTRUE);
469 }
470}
471
472////////////////////////////////////////////////////////////////////////////////
473/// Delete annotations from all viewers.
474
476{
477 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
478 {
479 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
481 }
482}
483
484////////////////////////////////////////////////////////////////////////////////
485/// Callback done from a TEveScene destructor allowing proper
486/// removal of the scene from affected viewers.
487
489{
490 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
491 {
492 TEveViewer* viewer = (TEveViewer*) *i;
493 List_i j = viewer->BeginChildren();
494 while (j != viewer->EndChildren())
495 {
496 TEveSceneInfo* sinfo = (TEveSceneInfo*) *j;
497 ++j;
498 if (sinfo->GetScene() == scene)
499 viewer->RemoveElement(sinfo);
500 }
501 }
502}
503
504////////////////////////////////////////////////////////////////////////////////
505/// Show / hide tooltip for various MouseOver events.
506/// Must be called from slots where sender is TGLEventHandler.
507
509{
510 if (fShowTooltip)
511 {
512 TGLViewer *glw = dynamic_cast<TGLViewer*>((TQObject*) gTQSender);
514 if (gEve->GetHighlight()->NumChildren() == 1)
515 {
517 if ( ! title.IsNull())
518 glh->TriggerTooltip(title);
519 }
520 else
521 {
522 glh->RemoveTooltip();
523 }
524 }
525}
526
527////////////////////////////////////////////////////////////////////////////////
528/// Slot for global TGLViewer::MouseOver() signal.
529///
530/// The attempt is made to determine the TEveElement being
531/// represented by the physical shape and global highlight is updated
532/// accordingly.
533///
534/// If TEveElement::IsPickable() returns false, the element is not
535/// highlighted.
536///
537/// Highlight is always in single-selection mode.
538
540{
541 TEveElement *el = dynamic_cast<TEveElement*>(obj);
542 if (el && !el->IsPickable())
543 el = 0;
544
545 void *qsender = gTQSender;
547 gTQSender = qsender;
548
550}
551
552////////////////////////////////////////////////////////////////////////////////
553/// Slot for global TGLViewer::ReMouseOver().
554///
555/// The obj is dyn-casted to the TEveElement and global selection is
556/// updated accordingly.
557///
558/// If TEveElement::IsPickable() returns false, the element is not
559/// selected.
560
562{
563 TEveElement* el = dynamic_cast<TEveElement*>(obj);
564 if (el && !el->IsPickable())
565 el = 0;
566
567 void *qsender = gTQSender;
569 gTQSender = qsender;
570
572}
573
574////////////////////////////////////////////////////////////////////////////////
575/// Slot for global TGLViewer::UnMouseOver().
576///
577/// The obj is dyn-casted to the TEveElement and global selection is
578/// updated accordingly.
579///
580/// If TEveElement::IsPickable() returns false, the element is not
581/// selected.
582
584{
585 TEveElement* el = dynamic_cast<TEveElement*>(obj);
586 if (el && !el->IsPickable())
587 el = 0;
588
589 void *qsender = gTQSender;
591 gTQSender = qsender;
592
594}
595
596////////////////////////////////////////////////////////////////////////////////
597/// Slot for global TGLViewer::Clicked().
598///
599/// The obj is dyn-casted to the TEveElement and global selection is
600/// updated accordingly.
601///
602/// If TEveElement::IsPickable() returns false, the element is not
603/// selected.
604
605void TEveViewerList::OnClicked(TObject *obj, UInt_t /*button*/, UInt_t state)
606{
607 TEveElement* el = dynamic_cast<TEveElement*>(obj);
608 if (el && !el->IsPickable())
609 el = 0;
611}
612
613////////////////////////////////////////////////////////////////////////////////
614/// Slot for global TGLViewer::ReClicked().
615///
616/// The obj is dyn-casted to the TEveElement and global selection is
617/// updated accordingly.
618///
619/// If TEveElement::IsPickable() returns false, the element is not
620/// selected.
621
622void TEveViewerList::OnReClicked(TObject *obj, UInt_t /*button*/, UInt_t /*state*/)
623{
624 TEveElement* el = dynamic_cast<TEveElement*>(obj);
625 if (el && !el->IsPickable())
626 el = 0;
628}
629
630////////////////////////////////////////////////////////////////////////////////
631/// Slot for global TGLViewer::UnClicked().
632///
633/// The obj is dyn-casted to the TEveElement and global selection is
634/// updated accordingly.
635///
636/// If TEveElement::IsPickable() returns false, the element is not
637/// selected.
638
639void TEveViewerList::OnUnClicked(TObject *obj, UInt_t /*button*/, UInt_t /*state*/)
640{
641 TEveElement* el = dynamic_cast<TEveElement*>(obj);
642 if (el && !el->IsPickable())
643 el = 0;
645}
646
647////////////////////////////////////////////////////////////////////////////////
648/// Set color brightness.
649
651{
653}
654
655////////////////////////////////////////////////////////////////////////////////
656/// Switch background color.
657
659{
661 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
662 {
663 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
665 glv->UseLightColorSet();
666 else
667 glv->UseDarkColorSet();
668
670 }
671}
int Int_t
Definition: CPyCppyy.h:43
unsigned int UInt_t
Definition: CPyCppyy.h:44
void Class()
Definition: Class.C:29
const Mask_t kKeyControlMask
Definition: GuiTypes.h:197
#define b(i)
Definition: RSha256.hxx:100
#define f(i)
Definition: RSha256.hxx:104
const Bool_t kFALSE
Definition: RtypesCore.h:101
bool Bool_t
Definition: RtypesCore.h:63
float Float_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassImp(name)
Definition: Rtypes.h:364
R__EXTERN TApplication * gApplication
Definition: TApplication.h:165
R__EXTERN TEnv * gEnv
Definition: TEnv.h:170
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
#define gClient
Definition: TGClient.h:157
@ kNoCleanup
Definition: TGFrame.h:40
@ kLHintsExpandY
Definition: TGLayout.h:31
@ kLHintsNormal
Definition: TGLayout.h:32
@ kLHintsExpandX
Definition: TGLayout.h:30
R__EXTERN void * gTQSender
Definition: TQObject.h:44
#define gVirtualX
Definition: TVirtualX.h:338
virtual void Terminate(Int_t status=0)
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:433
void SetChildClass(TClass *c)
Definition: TEveElement.h:465
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
virtual void AddElement(TEveElement *el)
Add el to the list of children.
List_t fChildren
Definition: TEveElement.h:81
virtual TString GetHighlightTooltip()
Definition: TEveElement.h:125
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
Bool_t IsPickable() const
Definition: TEveElement.h:341
List_i EndChildren()
Definition: TEveElement.h:167
Int_t NumChildren() const
Definition: TEveElement.h:170
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:65
List_i BeginChildren()
Definition: TEveElement.h:166
List_t::iterator List_i
Definition: TEveElement.h:72
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:276
List of Viewers providing common operations on TEveViewer collections.
Definition: TEveViewer.h:80
void SwitchColorSet()
Switch background color.
Definition: TEveViewer.cxx:658
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
Definition: TEveViewer.cxx:437
Bool_t fShowTooltip
Definition: TEveViewer.h:86
virtual void RemoveElementLocal(TEveElement *el)
Decompoundofy el, call base-class version.
Definition: TEveViewer.cxx:367
void OnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::MouseOver() signal.
Definition: TEveViewer.cxx:539
void SetColorBrightness(Float_t b)
Set color brightness.
Definition: TEveViewer.cxx:650
void OnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::Clicked().
Definition: TEveViewer.cxx:605
void OnUnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::UnMouseOver().
Definition: TEveViewer.cxx:583
virtual void RemoveElementsLocal()
Decompoundofy children, call base-class version.
Definition: TEveViewer.cxx:376
void OnReClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::ReClicked().
Definition: TEveViewer.cxx:622
void OnReMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::ReMouseOver().
Definition: TEveViewer.cxx:561
virtual void AddElement(TEveElement *el)
Call base-class implementation.
Definition: TEveViewer.cxx:358
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
Definition: TEveViewer.cxx:457
void SceneDestructing(TEveScene *scene)
Callback done from a TEveScene destructor allowing proper removal of the scene from affected viewers.
Definition: TEveViewer.cxx:488
void HandleTooltip()
Show / hide tooltip for various MouseOver events.
Definition: TEveViewer.cxx:508
Bool_t fUseLightColorSet
Definition: TEveViewer.h:89
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
Definition: TEveViewer.cxx:413
virtual void Connect()
Connect to TGLViewer class-signals.
Definition: TEveViewer.cxx:389
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::UnClicked().
Definition: TEveViewer.cxx:639
void DeleteAnnotations()
Delete annotations from all viewers.
Definition: TEveViewer.cxx:475
virtual ~TEveViewerList()
Destructor.
Definition: TEveViewer.cxx:348
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:279
void SetGLViewer(TGLViewer *viewer, TGFrame *frame)
Set TGLViewer that is represented by this object.
Definition: TEveViewer.cxx:143
static Bool_t fgInitInternal
Definition: TEveViewer.h:40
virtual void PostDock()
Virtual function called after a window is docked.
Definition: TEveViewer.cxx:123
void SwitchStereo()
Switch stereo mode.
Definition: TEveViewer.cxx:233
virtual Bool_t HandleElementPaste(TEveElement *el)
Receive a pasted object.
Definition: TEveViewer.cxx:309
TEveViewer(const TEveViewer &)
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Return TEveViewer icon.
Definition: TEveViewer.cxx:134
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
Definition: TEveViewer.cxx:222
virtual void AddScene(TEveScene *scene)
Add 'scene' to the list of scenes.
Definition: TEveViewer.cxx:261
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:155
virtual void PreUndock()
Virtual function called before a window is undocked.
Definition: TEveViewer.cxx:105
TGLViewer * fGLViewer
Definition: TEveViewer.h:37
static void InitInternal()
Initialize static data-members according to running conditions.
Definition: TEveViewer.cxx:92
TGFrame * fGLViewerFrame
Definition: TEveViewer.h:38
virtual void RemoveElementsLocal()
Remove all children, forwarded to GLViewer.
Definition: TEveViewer.cxx:288
virtual ~TEveViewer()
Destructor.
Definition: TEveViewer.cxx:79
virtual TObject * GetEditorObject(const TEveException &eh="TEveViewer::GetEditorObject ") const
Object to be edited when this is selected, returns the TGLViewer.
Definition: TEveViewer.cxx:297
TGLEmbeddedViewer * SpawnGLEmbeddedViewer(TGedEditor *ged=0, Int_t border=0)
Spawn new GLViewer and adopt it.
Definition: TEveViewer.cxx:200
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:690
TEveCompositeFrame * fEveFrame
Definition: TEveWindow.h:218
virtual void PostDock()
Virtual function called after a window is docked.
Definition: TEveWindow.cxx:703
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1117
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
Definition: TGFrame.cxx:948
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1149
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition: TGFrame.h:80
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:202
virtual void SetCleanup(Int_t=kLocalCleanup)
Definition: TGFrame.h:217
virtual void MapWindow()
map window
Definition: TGFrame.h:204
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:206
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:28
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:55
virtual void SetEventHandler(TGEventHandler *handler)
Set the event-handler.
Definition: TGLViewer.cxx:2290
TGEventHandler * GetEventHandler() const
Definition: TGLViewer.h:377
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:437
virtual void CreateGLWidget()
Definition: TGLViewer.h:225
void SetSmartRefresh(Bool_t smart_ref)
Definition: TGLViewer.h:230
virtual void DestroyGLWidget()
Definition: TGLViewer.h:226
void UseLightColorSet()
Use the light color-set.
Definition: TGLViewer.cxx:1623
virtual void PostSceneBuildSetup(Bool_t resetCameras)
Perform post scene-build setup.
Definition: TGLViewer.cxx:391
void UseDarkColorSet()
Use the dark color-set.
Definition: TGLViewer.cxx:1614
TGLWidget * GetGLWidget()
Definition: TGLViewer.h:223
This class describes layout hints used by the layout classes.
Definition: TGLayout.h:50
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
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:879
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:893
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:869
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:1027
Basic string class.
Definition: TString.h:136
const char * Data() const
Definition: TString.h:369
Bool_t IsNull() const
Definition: TString.h:407
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