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(0),
30
31 fBrightness(0),
32 fColorSet(0)
33{
34 MakeTitle("TEveViewerList");
35
36 Int_t labelW = 63;
37 fBrightness = new TEveGValuator(this, "Brightness:", 90, 0);
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
58}
59
60////////////////////////////////////////////////////////////////////////////////
61/// Slot for brightness.
62
64{
65 fColorSet->SetText(fM->UseLightColorSet()?"DarkColorSet": "Light ColorSet");
67}
68
69////////////////////////////////////////////////////////////////////////////////
70/// Slot for color set.
71
73{
74 fColorSet->SetText(fM->UseLightColorSet()? "Light ColorSet":"Dark ColorSet");
76}
@ kVerticalFrame
Definition GuiTypes.h:381
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define ClassImp(name)
Definition Rtypes.h:377
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsTop
Definition TGLayout.h:27
winID h TVirtualViewer3D TVirtualGLPainter p
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
void SetLabelWidth(Int_t w)
void SetNELength(Int_t l)
Composite GUI element for single value selection (supports label, number-entry and slider).
void SetLimits(Int_t min, Int_t max)
Set limits of the represented value for integer values.
virtual void Build(Bool_t connect=kTRUE)
Create sub-components (label, number entry, slider).
Float_t GetValue() const
virtual void SetValue(Float_t v, Bool_t emit=kFALSE)
Set value, optionally emit signal.
GUI editor for TEveViewerList.
TEveViewerListEditor(const TEveViewerListEditor &)
virtual void SetModel(TObject *obj)
Set model object.
void SwitchColorSet()
Slot for color set.
void DoBrightness()
Slot for brightness.
List of Viewers providing common operations on TEveViewer collections.
Definition TEveViewer.h:80
void SwitchColorSet()
Switch background color.
Float_t GetColorBrightness() const
Definition TEveViewer.h:126
void SetColorBrightness(Float_t b)
Set color brightness.
Bool_t UseLightColorSet() const
Definition TEveViewer.h:129
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
virtual void SetText(TGHotString *new_label)
Set new button text.
Definition TGButton.cxx:644
ROOT GUI Window base class.
Definition TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:95
Mother of all ROOT objects.
Definition TObject.h:41
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:869