/* * magicBox.C * * Created on: 5 sie 2021 * Author: Daniel Wielanek * E-mail: daniel.wielanek@gmail.com * Warsaw University of Technology, Faculty of Physics */ #include #include #include #include #include #include #include #include class MagicBox : public TEveBox { public: MagicBox() {}; virtual ~MagicBox() {}; ClassDef(MagicBox, 0) }; class MagicBoxEditor : public TGedFrame { TObject* fTemp; public: MagicBoxEditor(const TGWindow* p = 0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground()) : TGedFrame(p, width, height, options, back) { MakeTitle("MagicEditor"); fTemp = nullptr; TGVerticalFrame* statFrame = CreateEditorTabSubFrame("First Tab"); }; virtual void SetModel(TObject* obj) { if (fTemp != nullptr) return; fTemp = obj; CreateEditorTabSubFrame("Second Tab"); fGedEditor->GetTab()->HideFrame(fGedEditor->GetTab()->GetTabTab("Second Tab")); fGedEditor->GetTab()->ShowFrame(fGedEditor->GetTab()->GetTabTab("Second Tab")); // fGedEditor->GetTab()->MapSubwindows(); // fGedEditor->GetTab()->Layout(); // fGedEditor->MapSubwindows(); // fGedEditor->Layout(); }; virtual ~MagicBoxEditor() {}; ClassDef(MagicBoxEditor, 1); };