Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
49
52
53////////////////////////////////////////////////////////////////////////////////
54/// Constructor.
55///
56/// The base-class TEveWindowFrame is constructed without a frame so
57/// a default composite-frame is instantiated and stored in fGUIFrame.
58/// Cleanup is set to no-cleanup as viewers need to be zapped with some
59/// more care.
60
61TEveViewer::TEveViewer(const char* n, const char* t) :
62 TEveWindowFrame(nullptr, n, t),
63 fGLViewer (nullptr),
64 fGLViewerFrame (nullptr)
65{
67 fGUIFrame->SetCleanup(kNoCleanup); // the gl-viewer's frame deleted elsewhere.
68
69 if (!fgInitInternal)
70 {
72 }
73}
74
75////////////////////////////////////////////////////////////////////////////////
76/// Destructor.
77
87
88////////////////////////////////////////////////////////////////////////////////
89/// Initialize static data-members according to running conditions.
90
92{
93 // Determine if display is running on a mac.
94 // This also works for ssh connection mac->linux.
95 fgRecreateGlOnDockOps = (gVirtualX->SupportsExtension("Apple-WM") == 1);
96
98}
99
100////////////////////////////////////////////////////////////////////////////////
101/// Virtual function called before a window is undocked.
102/// On mac we have to force recreation of gl-context.
103
105{
108 {
109 // Mac only: TGLWidget can be already deleted
110 // in case of recursive delete
111 if (fGLViewer->GetGLWidget())
112 {
114 }
115 }
116}
117
118////////////////////////////////////////////////////////////////////////////////
119/// Virtual function called after a window is docked.
120/// On mac we have to force recreation of gl-context.
121
129
130////////////////////////////////////////////////////////////////////////////////
131/// Return TEveViewer icon.
132
137
138////////////////////////////////////////////////////////////////////////////////
139/// Set TGLViewer that is represented by this object.
140/// The old gl-viewer is deleted.
141
143{
144 delete fGLViewer;
146 fGLViewerFrame = frame;
147
149}
150
151////////////////////////////////////////////////////////////////////////////////
152/// Spawn new GLViewer and adopt it.
153
155{
156 static const TEveException kEH("TEveViewer::SpawnGLViewer ");
157
159
160 TGLFormat *form = nullptr;
161 if (stereo && quad_buf)
162 {
163 form = new TGLFormat;
164 form->SetStereo(kTRUE);
165 }
166
167 cf->SetEditable(kTRUE);
168 TGLSAViewer* v = nullptr;
169 try
170 {
171 v = new TGLSAViewer(cf, nullptr, ged, form);
172 }
173 catch (std::exception&)
174 {
175 Error("SpawnGLViewer", "Insufficient support from the graphics hardware. Aborting.");
177 }
178 cf->SetEditable(kFALSE);
179 v->ToggleEditObject();
180 v->DisableCloseMenuEntries();
181 if (gEnv->GetValue("Eve.Viewer.HideMenus", 1) == 1)
182 {
183 v->EnableMenuBarHiding();
184 }
185 SetGLViewer(v, v->GetFrame());
186
187 if (stereo)
188 v->SetStereo(kTRUE, quad_buf);
189
190 if (fEveFrame == nullptr)
191 PreUndock();
192
193 return v;
194}
195
196////////////////////////////////////////////////////////////////////////////////
197/// Spawn new GLViewer and adopt it.
198
200{
201 static const TEveException kEH("TEveViewer::SpawnGLEmbeddedViewer ");
202
204
205 TGLEmbeddedViewer* v = new TGLEmbeddedViewer(cf, nullptr, ged, border);
206 SetGLViewer(v, v->GetFrame());
207
209
211
212 if (fEveFrame == nullptr)
213 PreUndock();
214
215 return v;
216}
217
218////////////////////////////////////////////////////////////////////////////////
219/// Redraw viewer immediately.
220
226
227////////////////////////////////////////////////////////////////////////////////
228/// Switch stereo mode.
229/// This only works TGLSAViewers and, of course, with stereo support
230/// provided by the OpenGL driver.
231
233{
234 TGLSAViewer *v = dynamic_cast<TGLSAViewer*>(fGLViewer);
235
236 if (!v) {
237 Warning("SwitchStereo", "Only supported for TGLSAViewer.");
238 return;
239 }
240
241 v->DestroyGLWidget();
242 TGLFormat *f = v->GetFormat();
244 f->SetStereo(!f->IsStereo());
245 v->SetStereo(f->IsStereo());
246 try
247 {
248 v->CreateGLWidget();
249 }
250 catch (std::exception&)
251 {
252 Error("SwitchStereo", "Insufficient support from the graphics hardware. Reverting.");
253 goto switch_stereo;
254 }
255}
256
257////////////////////////////////////////////////////////////////////////////////
258/// Add 'scene' to the list of scenes.
259
261{
262 static const TEveException eh("TEveViewer::AddScene ");
263
264 TGLSceneInfo* glsi = fGLViewer->AddScene(scene->GetGLScene());
265 if (glsi != nullptr) {
266 TEveSceneInfo* si = new TEveSceneInfo(this, scene, glsi);
267 AddElement(si);
268 } else {
269 throw(eh + "scene already in the viewer.");
270 }
271}
272
273////////////////////////////////////////////////////////////////////////////////
274/// Remove element 'el' from the list of children and also remove
275/// appropriate GLScene from GLViewer's list of scenes.
276/// Virtual from TEveElement.
277
282
283////////////////////////////////////////////////////////////////////////////////
284/// Remove all children, forwarded to GLViewer.
285/// Virtual from TEveElement.
286
291
292////////////////////////////////////////////////////////////////////////////////
293/// Object to be edited when this is selected, returns the TGLViewer.
294/// Virtual from TEveElement.
295
297{
298 if (!fGLViewer)
299 throw(eh + "fGLViewer not set.");
300 return fGLViewer;
301}
302
303////////////////////////////////////////////////////////////////////////////////
304/// Receive a pasted object. TEveViewer only accepts objects of
305/// class TEveScene.
306/// Virtual from TEveElement.
307
309{
310 static const TEveException eh("TEveViewer::HandleElementPaste ");
311
312 TEveScene* scene = dynamic_cast<TEveScene*>(el);
313 if (scene != nullptr) {
315 return kTRUE;
316 } else {
317 Warning(eh.Data(), "class TEveViewer only accepts TEveScene paste argument.");
318 return kFALSE;
319 }
320}
321
322/** \class TEveViewerList
323\ingroup TEve
324List of Viewers providing common operations on TEveViewer collections.
325*/
326
327
328////////////////////////////////////////////////////////////////////////////////
329
330TEveViewerList::TEveViewerList(const char* n, const char* t) :
331 TEveElementList(n, t),
332 fShowTooltip (kTRUE),
333
334 fBrightness(0),
335 fUseLightColorSet(kFALSE)
336{
337 // Constructor.
338
340 Connect();
341}
342
343////////////////////////////////////////////////////////////////////////////////
344/// Destructor.
345
350
351////////////////////////////////////////////////////////////////////////////////
352/// Call base-class implementation.
353/// If compound is open and compound of the new element is not set,
354/// the el's compound is set to this.
355
357{
359 el->IncParentIgnoreCnt();
360}
361
362////////////////////////////////////////////////////////////////////////////////
363/// Decompoundofy el, call base-class version.
364
370
371////////////////////////////////////////////////////////////////////////////////
372/// Decompoundofy children, call base-class version.
373
375{
376 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
377 {
378 (*i)->DecParentIgnoreCnt();
379 }
380
382}
383
384////////////////////////////////////////////////////////////////////////////////
385/// Connect to TGLViewer class-signals.
386
388{
389 TQObject::Connect("TGLViewer", "MouseOver(TObject*,UInt_t)",
390 "TEveViewerList", this, "OnMouseOver(TObject*,UInt_t)");
391
392 TQObject::Connect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
393 "TEveViewerList", this, "OnReMouseOver(TObject*,UInt_t)");
394
395 TQObject::Connect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
396 "TEveViewerList", this, "OnUnMouseOver(TObject*,UInt_t)");
397
398 TQObject::Connect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
399 "TEveViewerList", this, "OnClicked(TObject*,UInt_t,UInt_t)");
400
401 TQObject::Connect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
402 "TEveViewerList", this, "OnReClicked(TObject*,UInt_t,UInt_t)");
403
404 TQObject::Connect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
405 "TEveViewerList", this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
406}
407
408////////////////////////////////////////////////////////////////////////////////
409/// Disconnect from TGLViewer class-signals.
410
412{
413 TQObject::Disconnect("TGLViewer", "MouseOver(TObject*,UInt_t)",
414 this, "OnMouseOver(TObject*,UInt_t)");
415
416 TQObject::Disconnect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
417 this, "OnReMouseOver(TObject*,UInt_t)");
418
419 TQObject::Disconnect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
420 this, "OnUnMouseOver(TObject*,UInt_t)");
421
422 TQObject::Disconnect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
423 this, "OnClicked(TObject*,UInt_t,UInt_t)");
424
425 TQObject::Disconnect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
426 this, "OnReClicked(TObject*,UInt_t,UInt_t)");
427
428 TQObject::Disconnect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
429 this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
430}
431
432////////////////////////////////////////////////////////////////////////////////
433/// Repaint viewers that are tagged as changed.
434
436{
437 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
438 {
439 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
440 if (glv->IsChanged())
441 {
442 if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
443 if (dropLogicals) glv->SetSmartRefresh(kFALSE);
444
445 glv->RequestDraw(TGLRnrCtx::kLODHigh);
446
447 if (dropLogicals) glv->SetSmartRefresh(kTRUE);
448 }
449 }
450}
451
452////////////////////////////////////////////////////////////////////////////////
453/// Repaint all viewers.
454
456{
457 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
458 {
459 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
460
461 if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
462 if (dropLogicals) glv->SetSmartRefresh(kFALSE);
463
464 glv->RequestDraw(TGLRnrCtx::kLODHigh);
465
466 if (dropLogicals) glv->SetSmartRefresh(kTRUE);
467 }
468}
469
470////////////////////////////////////////////////////////////////////////////////
471/// Delete annotations from all viewers.
472
474{
475 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
476 {
477 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
478 glv->DeleteOverlayAnnotations();
479 }
480}
481
482////////////////////////////////////////////////////////////////////////////////
483/// Callback done from a TEveScene destructor allowing proper
484/// removal of the scene from affected viewers.
485
487{
488 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
489 {
491 List_i j = viewer->BeginChildren();
492 while (j != viewer->EndChildren())
493 {
495 ++j;
496 if (sinfo->GetScene() == scene)
497 viewer->RemoveElement(sinfo);
498 }
499 }
500}
501
502////////////////////////////////////////////////////////////////////////////////
503/// Show / hide tooltip for various MouseOver events.
504/// Must be called from slots where sender is TGLEventHandler.
505
507{
508 if (fShowTooltip)
509 {
510 TGLViewer *glw = dynamic_cast<TGLViewer*>((TQObject*) gTQSender);
511 TGLEventHandler *glh = (TGLEventHandler*) glw->GetEventHandler();
512 if (gEve->GetHighlight()->NumChildren() == 1)
513 {
515 if ( ! title.IsNull())
516 glh->TriggerTooltip(title);
517 }
518 else
519 {
520 glh->RemoveTooltip();
521 }
522 }
523}
524
525////////////////////////////////////////////////////////////////////////////////
526/// Slot for global TGLViewer::MouseOver() signal.
527///
528/// The attempt is made to determine the TEveElement being
529/// represented by the physical shape and global highlight is updated
530/// accordingly.
531///
532/// If TEveElement::IsPickable() returns false, the element is not
533/// highlighted.
534///
535/// Highlight is always in single-selection mode.
536
538{
539 TEveElement *el = dynamic_cast<TEveElement*>(obj);
540 if (el && !el->IsPickable())
541 el = nullptr;
542
543 void *qsender = gTQSender;
546
548}
549
550////////////////////////////////////////////////////////////////////////////////
551/// Slot for global TGLViewer::ReMouseOver().
552///
553/// The obj is dyn-casted to the TEveElement and global selection is
554/// updated accordingly.
555///
556/// If TEveElement::IsPickable() returns false, the element is not
557/// selected.
558
560{
561 TEveElement* el = dynamic_cast<TEveElement*>(obj);
562 if (el && !el->IsPickable())
563 el = nullptr;
564
565 void *qsender = gTQSender;
568
570}
571
572////////////////////////////////////////////////////////////////////////////////
573/// Slot for global TGLViewer::UnMouseOver().
574///
575/// The obj is dyn-casted to the TEveElement and global selection is
576/// updated accordingly.
577///
578/// If TEveElement::IsPickable() returns false, the element is not
579/// selected.
580
582{
583 TEveElement* el = dynamic_cast<TEveElement*>(obj);
584 if (el && !el->IsPickable())
585 el = nullptr;
586
587 void *qsender = gTQSender;
590
592}
593
594////////////////////////////////////////////////////////////////////////////////
595/// Slot for global TGLViewer::Clicked().
596///
597/// The obj is dyn-casted to the TEveElement and global selection is
598/// updated accordingly.
599///
600/// If TEveElement::IsPickable() returns false, the element is not
601/// selected.
602
603void TEveViewerList::OnClicked(TObject *obj, UInt_t /*button*/, UInt_t state)
604{
605 TEveElement* el = dynamic_cast<TEveElement*>(obj);
606 if (el && !el->IsPickable())
607 el = nullptr;
609}
610
611////////////////////////////////////////////////////////////////////////////////
612/// Slot for global TGLViewer::ReClicked().
613///
614/// The obj is dyn-casted to the TEveElement and global selection is
615/// updated accordingly.
616///
617/// If TEveElement::IsPickable() returns false, the element is not
618/// selected.
619
620void TEveViewerList::OnReClicked(TObject *obj, UInt_t /*button*/, UInt_t /*state*/)
621{
622 TEveElement* el = dynamic_cast<TEveElement*>(obj);
623 if (el && !el->IsPickable())
624 el = nullptr;
626}
627
628////////////////////////////////////////////////////////////////////////////////
629/// Slot for global TGLViewer::UnClicked().
630///
631/// The obj is dyn-casted to the TEveElement and global selection is
632/// updated accordingly.
633///
634/// If TEveElement::IsPickable() returns false, the element is not
635/// selected.
636
637void TEveViewerList::OnUnClicked(TObject *obj, UInt_t /*button*/, UInt_t /*state*/)
638{
639 TEveElement* el = dynamic_cast<TEveElement*>(obj);
640 if (el && !el->IsPickable())
641 el = nullptr;
643}
644
645////////////////////////////////////////////////////////////////////////////////
646/// Set color brightness.
647
652
653////////////////////////////////////////////////////////////////////////////////
654/// Switch background color.
655
657{
659 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
660 {
661 TGLViewer* glv = ((TEveViewer*)*i)->GetGLViewer();
663 glv->UseLightColorSet();
664 else
665 glv->UseDarkColorSet();
666
667 glv->RequestDraw(TGLRnrCtx::kLODHigh);
668 }
669}
const Mask_t kKeyControlMask
Definition GuiTypes.h:197
#define b(i)
Definition RSha256.hxx:100
#define f(i)
Definition RSha256.hxx:104
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:77
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
R__EXTERN TApplication * gApplication
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TEnv * gEnv
Definition TEnv.h:170
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:208
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition TError.cxx:252
R__EXTERN TEveManager * gEve
#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:46
#define gVirtualX
Definition TVirtualX.h:337
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:490
A list of TEveElements.
void SetChildClass(TClass *c)
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()
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
Int_t NumChildren() const
virtual void RemoveElementLocal(TEveElement *el)
Perform additional local removal of el.
static const TGPicture * fgListTreeIcons[9]
Definition TEveElement.h:54
List_t::iterator List_i
Definition TEveElement.h:72
virtual void RemoveElementsLocal()
Perform additional local removal of all elements.
Exception class thrown by TEve classes and macros.
Definition TEveUtil.h:102
TEveSelection * GetSelection() const
TEveSelection * GetHighlight() const
TEveUtil representation of TGLSceneInfo.
static TClass * Class()
Eve representation of TGLScene.
Definition TEveScene.h:27
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:275
void SwitchColorSet()
Switch background color.
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
~TEveViewerList() override
Destructor.
Bool_t fShowTooltip
Definition TEveViewer.h:86
void RemoveElementsLocal() override
Decompoundofy children, call base-class version.
void AddElement(TEveElement *el) override
Call base-class implementation.
void OnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::MouseOver() signal.
void SetColorBrightness(Float_t b)
Set color brightness.
void OnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::Clicked().
void OnUnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::UnMouseOver().
void OnReClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::ReClicked().
void OnReMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::ReMouseOver().
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
void SceneDestructing(TEveScene *scene)
Callback done from a TEveScene destructor allowing proper removal of the scene from affected viewers.
void RemoveElementLocal(TEveElement *el) override
Decompoundofy el, call base-class version.
void HandleTooltip()
Show / hide tooltip for various MouseOver events.
Bool_t fUseLightColorSet
Definition TEveViewer.h:89
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
virtual void Connect()
Connect to TGLViewer class-signals.
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::UnClicked().
void DeleteAnnotations()
Delete annotations from all viewers.
TEveViewerList(const TEveViewerList &)
Eve representation of TGLViewer.
Definition TEveViewer.h:31
void SetGLViewer(TGLViewer *viewer, TGFrame *frame)
Set TGLViewer that is represented by this object.
static Bool_t fgInitInternal
Definition TEveViewer.h:40
void SwitchStereo()
Switch stereo mode.
TGLSAViewer * SpawnGLViewer(TGedEditor *ged=nullptr, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE)
Spawn new GLViewer and adopt it.
void RemoveElementsLocal() override
Remove all children, forwarded to GLViewer.
TObject * GetEditorObject(const TEveException &eh="TEveViewer::GetEditorObject ") const override
Object to be edited when this is selected, returns the TGLViewer.
TGLEmbeddedViewer * SpawnGLEmbeddedViewer(TGedEditor *ged=nullptr, Int_t border=0)
Spawn new GLViewer and adopt it.
TEveViewer(const TEveViewer &)
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
virtual void AddScene(TEveScene *scene)
Add 'scene' to the list of scenes.
static Bool_t fgRecreateGlOnDockOps
Definition TEveViewer.h:41
Bool_t HandleElementPaste(TEveElement *el) override
Receive a pasted object.
TGLViewer * fGLViewer
Definition TEveViewer.h:37
void PreUndock() override
Virtual function called before a window is undocked.
static TClass * Class()
const TGPicture * GetListTreeIcon(Bool_t open=kFALSE) override
Return TEveViewer icon.
static void InitInternal()
Initialize static data-members according to running conditions.
TGFrame * fGLViewerFrame
Definition TEveViewer.h:38
void PostDock() override
Virtual function called after a window is docked.
~TEveViewer() override
Destructor.
void RemoveElementLocal(TEveElement *el) override
Remove element 'el' from the list of children and also remove appropriate GLScene from GLViewer's lis...
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.
TEveCompositeFrame * fEveFrame
Definition TEveWindow.h:218
virtual void PostDock()
Virtual function called after a window is docked.
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition TGFrame.cxx:1141
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0) override
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition TGFrame.h:204
void MapWindow() override
map window
Definition TGFrame.h:206
void UnmapWindow() override
unmap window
Definition TGFrame.h:208
virtual void SetCleanup(Int_t=kLocalCleanup)
Definition TGFrame.h:219
Minimal GL-viewer that can be embedded in a standard ROOT frames.
Base-class and default implementation of event-handler for TGLViewer.
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.
The top level standalone GL-viewer - created via plugin manager.
Definition TGLSAViewer.h:38
Base class for extended scene context.
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.
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.
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...
virtual void CreateGLWidget()
Definition TGLViewer.h:225
void SetSmartRefresh(Bool_t smart_ref)
Definition TGLViewer.h:230
virtual void DestroyGLWidget()
Definition TGLViewer.h:226
virtual void PostSceneBuildSetup(Bool_t resetCameras)
Perform post scene-build setup.
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:41
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:865
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
Basic string class.
Definition TString.h:138
Bool_t IsNull() const
Definition TString.h:422
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:261
const Int_t n
Definition legend1.C:16