]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveBase/AliEveGedEditor.cxx
Removing obsolete macros which used the AliTPCtracker
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveGedEditor.cxx
CommitLineData
71505d99 1// $Id$
2// Author: Matevz Tadel 2009
3
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 **************************************************************************/
9
10#include "AliEveGedEditor.h"
11#include <TGButton.h>
12
13
14//==============================================================================
02864764 15// AliEveGedNameFrame
71505d99 16//==============================================================================
17
18//______________________________________________________________________________
02864764 19// Full description of AliEveGedNameFrame
71505d99 20//
21
02864764 22ClassImp(AliEveGedNameFrame)
71505d99 23
24//______________________________________________________________________________
02864764 25AliEveGedNameFrame::AliEveGedNameFrame(const TGWindow *p) :
26 TGedFrame(p),
27 fB(0)
71505d99 28{
29 // Constructor.
30
31 fB = new TGTextButton(this);
32 AddFrame(fB, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY));
33}
34
35//______________________________________________________________________________
02864764 36void AliEveGedNameFrame::SetModel(TObject* obj)
71505d99 37{
38 // Set model object.
39
40 if (obj)
41 fB->SetText(Form("%s [%s]", obj->GetName(), obj->ClassName()));
42 else
43 fB->SetText("No object selected");
44}
45
46
47//==============================================================================
48// AliEveGedEditor
49//==============================================================================
50
51//______________________________________________________________________________
52// Full description of AliEveGedEditor
53//
54
55ClassImp(AliEveGedEditor)
56
57//______________________________________________________________________________
58AliEveGedEditor::AliEveGedEditor() :
59 TEveGedEditor()
60{
61 // Constructor.
62
63 // Remove old name-frame -- it is created in TGedEditor constructor
64 // so virtuals are not active yet.
65 fTabContainer->RemoveAll();
66
67 // Replace with a new one.
68 TGedFrame* nf = CreateNameFrame(fTabContainer, "Style");
69 nf->SetGedEditor(this);
70 nf->SetModelClass(0);
9699b466 71 fTabContainer->AddFrame(nf, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2));
71505d99 72}
73
74//______________________________________________________________________________
75TGedFrame* AliEveGedEditor::CreateNameFrame(const TGWindow* parent, const char* /*tab_name*/)
76{
77 // Create name-frame for a tab.
78
02864764 79 return new AliEveGedNameFrame(parent);
71505d99 80}