Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveViewerListEditor.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 "TEveViewer.h"
14#include "TEveGValuators.h"
15
16/** \class TEveViewerListEditor
17\ingroup TEve
18GUI editor for TEveViewerList.
19*/
20
22
23////////////////////////////////////////////////////////////////////////////////
24/// Constructor.
25
27 UInt_t options, Pixel_t back) :
28 TGedFrame(p, width, height, options | kVerticalFrame, back),
29 fM(nullptr),
30
31 fBrightness(nullptr),
32 fColorSet(nullptr)
33{
34 MakeTitle("TEveViewerList");
35
36 Int_t labelW = 63;
37 fBrightness = new TEveGValuator(this, "Brightness:", 90, 0);
38 fBrightness->SetLabelWidth(labelW);
39 fBrightness->SetNELength(4);
40 fBrightness->Build();
41 fBrightness->SetLimits(-2, 2 , 41 , TGNumberFormat::kNESRealTwo);
42 fBrightness->Connect("ValueSet(Double_t)", "TEveViewerListEditor", this, "DoBrightness()");
44
45 fColorSet = new TGTextButton(this , "Switch ColorSet");
46 fColorSet->Connect("Clicked()", "TEveViewerListEditor", this, "SwitchColorSet()");
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// Set model object.
52
54{
55 fM = dynamic_cast<TEveViewerList*>(obj);
56
57 fBrightness->SetValue(fM->GetColorBrightness());
58}
59
60////////////////////////////////////////////////////////////////////////////////
61/// Slot for brightness.
62
64{
65 fColorSet->SetText(fM->UseLightColorSet()?"DarkColorSet": "Light ColorSet");
66 fM->SetColorBrightness(fBrightness->GetValue());
67}
68
69////////////////////////////////////////////////////////////////////////////////
70/// Slot for color set.
71
73{
74 fColorSet->SetText(fM->UseLightColorSet()? "Light ColorSet":"Dark ColorSet");
75 fM->SwitchColorSet();
76}
@ kVerticalFrame
Definition GuiTypes.h:381
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
int Int_t
Definition RtypesCore.h:45
unsigned int UInt_t
Definition RtypesCore.h:46
#define ClassImp(name)
Definition Rtypes.h:377
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsTop
Definition TGLayout.h:27
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Composite GUI element for single value selection (supports label, number-entry and slider).
GUI editor for TEveViewerList.
void SetModel(TObject *obj) override
Set model object.
TEveViewerListEditor(const TEveViewerListEditor &)
void SwitchColorSet()
Slot for color set.
void DoBrightness()
Slot for brightness.
List of Viewers providing common operations on TEveViewer collections.
Definition TEveViewer.h:80
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
@ kNESRealTwo
Fixed fraction real, two digit.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
ROOT GUI Window base class.
Definition TGWindow.h:23
TGedFrame(const TGedFrame &)=delete
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:95
Mother of all ROOT objects.
Definition TObject.h:41