Warning, file /include/root/TEveGedEditor.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEveGedEditor
0013 #define ROOT_TEveGedEditor
0014
0015 #include "TGedEditor.h"
0016 #include "TGedFrame.h"
0017 #include "TGButton.h"
0018
0019 class TEveElement;
0020 class TContextMenu;
0021
0022
0023
0024
0025
0026 class TEveGedEditor : public TGedEditor
0027 {
0028 TEveGedEditor(const TEveGedEditor&);
0029 TEveGedEditor& operator=(const TEveGedEditor&);
0030
0031 public:
0032 typedef TGedFrame* (*NameFrameCreator_t)(TEveGedEditor*, const TGWindow* parent, const char* tab_name);
0033
0034 protected:
0035 TEveElement *fElement;
0036 TObject *fObject;
0037
0038 TGedFrame* CreateNameFrame(const TGWindow* parent, const char* tab_name) override;
0039
0040 static Int_t fgMaxExtraEditors;
0041 static TList *fgExtraEditors;
0042
0043 static TContextMenu *fgContextMenu;
0044
0045 public:
0046 TEveGedEditor(TCanvas* canvas=nullptr, UInt_t width=250, UInt_t height=400);
0047 ~TEveGedEditor() override;
0048
0049 void CloseWindow() override;
0050
0051 TEveElement* GetEveElement() const;
0052
0053 void DisplayElement(TEveElement* re);
0054 void DisplayObject(TObject* obj);
0055
0056 void SetModel(TVirtualPad* pad, TObject* obj, Int_t event, Bool_t force=kFALSE) override;
0057 void Update(TGedFrame* gframe=nullptr) override;
0058
0059
0060
0061 static void SpawnNewEditor(TObject* obj);
0062 static void ElementChanged(TEveElement* el);
0063 static void ElementDeleted(TEveElement* el);
0064
0065 static void DestroyEditors();
0066
0067 static TContextMenu* GetContextMenu();
0068
0069 ClassDefOverride(TEveGedEditor, 0);
0070 };
0071
0072
0073
0074
0075
0076
0077 class TEveGedNameFrame : public TGedFrame
0078 {
0079 private:
0080 TEveGedNameFrame(const TEveGedNameFrame&);
0081 TEveGedNameFrame& operator=(const TEveGedNameFrame&);
0082
0083 protected:
0084 TGTextButton *fNCButton;
0085
0086 public:
0087 TEveGedNameFrame(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30,
0088 UInt_t options=kChildFrame | kHorizontalFrame);
0089 ~TEveGedNameFrame() override;
0090
0091 void SetModel(TObject* obj) override;
0092
0093 void SpawnEditorClone();
0094
0095 ClassDefOverride(TEveGedNameFrame, 0);
0096 };
0097
0098
0099
0100
0101
0102
0103 class TEveGedNameTextButton : public TGTextButton
0104 {
0105 private:
0106 TEveGedNameTextButton(const TEveGedNameTextButton&);
0107 TEveGedNameTextButton& operator=(const TEveGedNameTextButton&);
0108
0109 TEveGedNameFrame *fFrame;
0110
0111 public:
0112 TEveGedNameTextButton(TEveGedNameFrame* p);
0113 ~TEveGedNameTextButton() override;
0114
0115 Bool_t HandleButton(Event_t* event) override;
0116
0117 ClassDefOverride(TEveGedNameTextButton, 0);
0118 };
0119
0120 #endif