Logo ROOT   6.10/09
Reference Guide
TEveStraightLineSetEditor.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 
13 #include "TEveStraightLineSet.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 TEveStraightLineSetEditor
25 \ingroup TEve
26 Editor for TEveStraightLineSet 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  // Initialize widget pointers to 0
39 {
40  MakeTitle("TEveStraightLineSet");
41 
42  TGHorizontalFrame* frame = new TGHorizontalFrame(this);
43 
44  fRnrMarkers = new TGCheckButton(frame, "RnrMarkers");
45  frame->AddFrame(fRnrMarkers, new TGLayoutHints(kLHintsLeft, 1, 2, 1, 1));
46  fRnrMarkers->Connect
47  ("Toggled(Bool_t)",
48  "TEveStraightLineSetEditor", this, "DoRnrMarkers()");
49 
50  fRnrLines = new TGCheckButton(frame, "RnrLines");
51  frame->AddFrame(fRnrLines, new TGLayoutHints(kLHintsLeft, 2, 1, 1, 1));
52  fRnrLines->Connect
53  ("Toggled(Bool_t)",
54  "TEveStraightLineSetEditor", this, "DoRnrLines()");
55 
56  AddFrame(frame, new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
57 }
58 
59 ////////////////////////////////////////////////////////////////////////////////
60 /// Set model object.
61 
63 {
64  fM = dynamic_cast<TEveStraightLineSet*>(obj);
65 
66  // Set values of widgets
69 }
70 
71 ////////////////////////////////////////////////////////////////////////////////
72 /// Slot for RnrMarkers.
73 
75 {
77  Update();
78 }
79 
80 ////////////////////////////////////////////////////////////////////////////////
81 /// Slot for RnrLines.
82 
84 {
86  Update();
87 }
void DoRnrMarkers()
Slot for RnrMarkers.
virtual void SetModel(TObject *obj)
Set model object.
virtual void SetRnrLines(Bool_t x)
int Int_t
Definition: RtypesCore.h:41
virtual void SetRnrMarkers(Bool_t x)
Editor for TEveStraightLineSet class.
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
unsigned int UInt_t
Definition: RtypesCore.h:42
#define ClassImp(name)
Definition: Rtypes.h:336
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
std::string MakeTitle(std::string_view version, std::string_view histname, std::string_view title, std::string_view axis)
Definition: speedtest.cxx:115
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Bool_t GetRnrLines()
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
virtual Bool_t GetRnrMarkers()
void DoRnrLines()
Slot for RnrLines.
Set of straight lines with optional markers along the lines.