Logo ROOT   6.14/05
Reference Guide
TEveLineEditor.cxx
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #include "TEveLineEditor.h"
13 #include "TEveLine.h"
14 
15 #include "TVirtualPad.h"
16 #include "TColor.h"
17 
18 #include "TGLabel.h"
19 #include "TGButton.h"
20 #include "TGNumberEntry.h"
21 #include "TGColorSelect.h"
22 #include "TGDoubleSlider.h"
23 
24 /** \class TEveLineEditor
25 \ingroup TEve
26 Editor for TEveLine class.
27 */
28 
30 
31 ////////////////////////////////////////////////////////////////////////////////
32 /// Constructor.
33 
35  UInt_t options, Pixel_t back) :
36  TGedFrame (p, width, height, options | kVerticalFrame, back),
37  fM (0),
38  fRnrLine (0),
39  fRnrPoints (0),
40  fSmooth (0)
41 {
42  fPriority = 20;
43  {
45 
46  fRnrPoints = new TGCheckButton(f, "Draw Marker");
47  f->AddFrame(fRnrPoints, new TGLayoutHints(kLHintsLeft, 2,1,0,0));
48  fRnrPoints->Connect("Toggled(Bool_t)", "TEveLineEditor", this, "DoRnrPoints()");
49 
50  fRnrLine = new TGCheckButton(f, "Draw Line");
51  f->AddFrame(fRnrLine, new TGLayoutHints(kLHintsLeft, 1,2,0,0));
52  fRnrLine->Connect("Toggled(Bool_t)", "TEveLineEditor", this, "DoRnrLine()");
53 
54  AddFrame(f, new TGLayoutHints(kLHintsTop, 0,0,2,1));
55  }
56  fSmooth = new TGCheckButton(this, "Smooth line");
58  fSmooth->Connect("Toggled(Bool_t)", "TEveLineEditor", this, "DoSmooth()");
59 }
60 
61 ////////////////////////////////////////////////////////////////////////////////
62 /// Set model object.
63 
65 {
66  fM = dynamic_cast<TEveLine*>(obj);
67 
69  fRnrPoints->SetState(fM->fRnrPoints ? kButtonDown : kButtonUp);
70  fSmooth->SetState(fM->fSmooth ? kButtonDown : kButtonUp);
71 }
72 
73 ////////////////////////////////////////////////////////////////////////////////
74 /// Slot for RnrLine.
75 
77 {
79  Update();
80 }
81 
82 ////////////////////////////////////////////////////////////////////////////////
83 /// Slot for RnrPoints.
84 
86 {
88  Update();
89 }
90 
91 ////////////////////////////////////////////////////////////////////////////////
92 /// Slot for anti-alias.
93 
95 {
96  fM->SetSmooth(fSmooth->IsOn());
97  Update();
98 }
TGCheckButton * fRnrLine
void DoSmooth()
Slot for anti-alias.
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
Definition: TEveLine.cxx:144
TGCheckButton * fSmooth
An arbitrary polyline with fixed line and marker attributes.
Definition: TEveLine.h:24
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
virtual void SetModel(TObject *obj)
Set model object.
Editor for TEveLine class.
#define f(i)
Definition: RSha256.hxx:104
int Int_t
Definition: RtypesCore.h:41
void DoRnrPoints()
Slot for RnrPoints.
TEveLineEditor(const TEveLineEditor &)
ULong_t Pixel_t
Definition: GuiTypes.h:39
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition: TGedFrame.cxx:73
virtual Bool_t IsOn() const
Definition: TGButton.h:311
Bool_t fSmooth
Definition: TEveLine.h:37
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
Definition: TQObject.cxx:867
Bool_t fRnrLine
Definition: TEveLine.h:35
unsigned int UInt_t
Definition: RtypesCore.h:42
Bool_t fRnrPoints
Definition: TEveLine.h:36
void SetRnrLine(Bool_t r)
Set rendering of line. Propagate to projected lines.
Definition: TEveLine.cxx:125
#define ClassImp(name)
Definition: Rtypes.h:359
TEveLine * fM
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
Mother of all ROOT objects.
Definition: TObject.h:37
void DoRnrLine()
Slot for RnrLine.
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
TGCheckButton * fRnrPoints
void SetSmooth(Bool_t r)
Set smooth rendering. Propagate to projected lines.
Definition: TEveLine.cxx:163
Int_t fPriority
Definition: TGedFrame.h:59