]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveBase/AliEveCascadeEditor.cxx
From Boris - revival of AliEveCascade classes.
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveCascadeEditor.cxx
CommitLineData
2991d609 1// @(#)root/eve:$Id$
2// Author: Matevz Tadel 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, 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 "AliEveCascadeEditor.h"
11#include "AliEveCascade.h"
12
13#include "TVirtualPad.h"
14#include "TColor.h"
15
16// Cleanup these includes:
17#include "TGLabel.h"
18#include "TGButton.h"
19#include "TGNumberEntry.h"
20#include "TGColorSelect.h"
21#include "TGDoubleSlider.h"
22
23
24//______________________________________________________________________________
25// GUI editor for AliEveCascade.
26//
27
28ClassImp(AliEveCascadeEditor)
29
30//______________________________________________________________________________
31AliEveCascadeEditor::AliEveCascadeEditor(const TGWindow *p, Int_t width, Int_t height,
32 UInt_t options, Pixel_t back) :
33 TGedFrame(p, width, height, options | kVerticalFrame, back),
34 fM(0),
35 fInfoLabel0(0),
36 fInfoLabel1(0),
37 fXButton(0)
38 // Initialize widget pointers to 0
39{
40 // Constructor.
41
42 MakeTitle("AliEveCascade");
43
44 fInfoLabel0 = new TGLabel(this);
45 fInfoLabel0->SetTextJustify(kTextLeft);
46 AddFrame(fInfoLabel0, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
47 8, 0, 2, 0));
48
49 fInfoLabel1 = new TGLabel(this);
50 fInfoLabel1->SetTextJustify(kTextLeft);
51 AddFrame(fInfoLabel1, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
52 8, 0, 2, 0));
53
54 fXButton = new TGTextButton(this, "Detailed View");
55 AddFrame(fXButton, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 1, 1, 0, 0));
56 fXButton->Connect("Clicked()", "AliEveCascadeEditor", this, "DisplayDetailed()");
57}
58
59/******************************************************************************/
60
61//______________________________________________________________________________
62void AliEveCascadeEditor::SetModel(TObject* obj)
63{
64 // Set model object.
65
66 fM = dynamic_cast<AliEveCascade*>(obj);
67
68 // Set values of widgets
69 fInfoLabel0->SetText(Form("Radius = %f, DCA = %f", fM->GetRadius(), fM->GetDaughterDCA()));
70 fInfoLabel1->SetText(Form("Pt = %f", fM->GetPt()));
71}
72
73/******************************************************************************/
74
75// Implements callback/slot methods
76
77//______________________________________________________________________________
78// void AliEveCascadeEditor::DoXYZZ()
79// {
80// // Slot for XYZZ.
81//
82// fM->SetXYZZ(fXYZZ->GetValue());
83// Update();
84// }
85
86void AliEveCascadeEditor::DisplayDetailed()
87{
88 printf("Hura!\n");
89}