2 // Author: Matevz Tadel 2009
4 /**************************************************************************
5 * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #include "AliEveGedEditor.h"
14 //==============================================================================
16 //==============================================================================
18 //______________________________________________________________________________
19 // Full description of AliEveGedNameFrame
22 ClassImp(AliEveGedNameFrame)
24 //______________________________________________________________________________
25 AliEveGedNameFrame::AliEveGedNameFrame(const TGWindow *p) :
31 fB = new TGTextButton(this);
32 AddFrame(fB, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY));
35 //______________________________________________________________________________
36 void AliEveGedNameFrame::SetModel(TObject* obj)
41 fB->SetText(Form("%s [%s]", obj->GetName(), obj->ClassName()));
43 fB->SetText("No object selected");
47 //==============================================================================
49 //==============================================================================
51 //______________________________________________________________________________
52 // Full description of AliEveGedEditor
55 ClassImp(AliEveGedEditor)
57 //______________________________________________________________________________
58 AliEveGedEditor::AliEveGedEditor() :
63 // Remove old name-frame -- it is created in TGedEditor constructor
64 // so virtuals are not active yet.
65 fTabContainer->RemoveAll();
67 // Replace with a new one.
68 TGedFrame* nf = CreateNameFrame(fTabContainer, "Style");
69 nf->SetGedEditor(this);
71 fTabContainer->AddFrame(nf, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2));
74 //______________________________________________________________________________
75 TGedFrame* AliEveGedEditor::CreateNameFrame(const TGWindow* parent, const char* /*tab_name*/)
77 // Create name-frame for a tab.
79 return new AliEveGedNameFrame(parent);