Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveGedEditor.h
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#ifndef ROOT_TEveGedEditor
13#define ROOT_TEveGedEditor
14
15#include "TGedEditor.h"
16#include "TGedFrame.h"
17#include "TGButton.h"
18
19class TEveElement;
20class TContextMenu;
21
22//==============================================================================
23// TEveGedEditor
24//==============================================================================
25
27{
28 TEveGedEditor(const TEveGedEditor&); // Not implemented
29 TEveGedEditor& operator=(const TEveGedEditor&); // Not implemented
30
31public:
32 typedef TGedFrame* (*NameFrameCreator_t)(TEveGedEditor*, const TGWindow* parent, const char* tab_name);
33
34protected:
35 TEveElement *fElement; // Cached eve-element pointer.
36 TObject *fObject; // Cached tobj pointer.
37
38 TGedFrame* CreateNameFrame(const TGWindow* parent, const char* tab_name) override;
39
42
44
45public:
46 TEveGedEditor(TCanvas* canvas=nullptr, UInt_t width=250, UInt_t height=400);
47 ~TEveGedEditor() override;
48
49 void CloseWindow() override;
50
52
54 void DisplayObject(TObject* obj);
55
56 void SetModel(TVirtualPad* pad, TObject* obj, Int_t event, Bool_t force=kFALSE) override;
57 void Update(TGedFrame* gframe=nullptr) override;
58
59 // --- Statics for extra editors. ---
60
61 static void SpawnNewEditor(TObject* obj);
62 static void ElementChanged(TEveElement* el);
63 static void ElementDeleted(TEveElement* el);
64
65 static void DestroyEditors();
66
68
69 ClassDefOverride(TEveGedEditor, 0); // Specialization of TGedEditor for proper update propagation to TEveManager.
70};
71
72
73//==============================================================================
74// TEveGedNameFrame
75//==============================================================================
76
78{
79private:
80 TEveGedNameFrame(const TEveGedNameFrame&); // Not implemented
81 TEveGedNameFrame& operator=(const TEveGedNameFrame&); // Not implemented
82
83protected:
84 TGTextButton *fNCButton; // Name/Class button.
85
86public:
87 TEveGedNameFrame(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30,
89 ~TEveGedNameFrame() override;
90
91 void SetModel(TObject* obj) override;
92
93 void SpawnEditorClone();
94
95 ClassDefOverride(TEveGedNameFrame, 0); // Top name-frame used in EVE.
96};
97
98
99//==============================================================================
100// TEveGedNameTextButton
101//==============================================================================
102
104{
105private:
108
110
111public:
113 ~TEveGedNameTextButton() override;
114
115 Bool_t HandleButton(Event_t* event) override;
116
117 ClassDefOverride(TEveGedNameTextButton, 0); // Button for GED name-frame.
118};
119
120#endif
@ kChildFrame
Definition GuiTypes.h:379
@ kHorizontalFrame
Definition GuiTypes.h:382
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
The Canvas class.
Definition TCanvas.h:23
This class provides an interface to context sensitive popup menus.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
Specialization of TGedEditor for proper update propagation to TEveManager.
static Int_t fgMaxExtraEditors
TGedFrame * CreateNameFrame(const TGWindow *parent, const char *tab_name) override
Create name-frame for a tab.
TEveElement * GetEveElement() const
Return eve-element if it is the model object.
TObject * fObject
static void ElementDeleted(TEveElement *el)
Element is being deleted. Close editors showing it.
void DisplayElement(TEveElement *re)
Show a TEveElement in editor.
TEveElement * fElement
static TContextMenu * GetContextMenu()
Return context menu object shared among eve-ged-editors.
TEveGedEditor & operator=(const TEveGedEditor &)
static TContextMenu * fgContextMenu
static TList * fgExtraEditors
void CloseWindow() override
Called from window-manger close button.
void Update(TGedFrame *gframe=nullptr) override
Virtual method from TGedEditor, called on every change.
void SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE) override
Set model object.
ClassDefOverride(TEveGedEditor, 0)
static void DestroyEditors()
Destroys all editors. Called from EVE termination.
TEveGedEditor(const TEveGedEditor &)
void DisplayObject(TObject *obj)
Show a TObject in editor.
static void ElementChanged(TEveElement *el)
Element was changed. Update editors showing it.
~TEveGedEditor() override
Destructor.
static void SpawnNewEditor(TObject *obj)
Static function to create a new extra editor.
Specialization of TGedNameFrame used in EVE.
void SpawnEditorClone()
Create a new floating editor with current object.
void SetModel(TObject *obj) override
Set model object.
TGTextButton * fNCButton
TEveGedNameFrame & operator=(const TEveGedNameFrame &)
~TEveGedNameFrame() override
Destructor.
ClassDefOverride(TEveGedNameFrame, 0)
TEveGedNameFrame(const TEveGedNameFrame &)
Specialization of TGTextButton for EVE name frame.
TEveGedNameTextButton & operator=(const TEveGedNameTextButton &)
Bool_t HandleButton(Event_t *event) override
Handle button.
ClassDefOverride(TEveGedNameTextButton, 0)
~TEveGedNameTextButton() override
Destructor.
TEveGedNameFrame * fFrame
TEveGedNameTextButton(const TEveGedNameTextButton &)
Yield an action as soon as it is clicked.
Definition TGButton.h:142
ROOT GUI Window base class.
Definition TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
Event structure.
Definition GuiTypes.h:174