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
21
22////////////////////////////////////////////////////////////////////////////////
23/// Constructor.
24
26 UInt_t options, Pixel_t back) :
27 TGedFrame(p, width, height, options | kVerticalFrame, back),
28 fM(nullptr),
29
30 fBrightness(nullptr),
31 fColorSet(nullptr)
32{
33 MakeTitle("TEveViewerList");
34
35 Int_t labelW = 63;
36 fBrightness = new TEveGValuator(this, "Brightness:", 90, 0);
41 fBrightness->Connect("ValueSet(Double_t)", "TEveViewerListEditor", this, "DoBrightness()");
43
44 fColorSet = new TGTextButton(this , "Switch ColorSet");
45 fColorSet->Connect("Clicked()", "TEveViewerListEditor", this, "SwitchColorSet()");
47}
48
49////////////////////////////////////////////////////////////////////////////////
50/// Set model object.
51
53{
54 fM = dynamic_cast<TEveViewerList*>(obj);
55
57}
58
59////////////////////////////////////////////////////////////////////////////////
60/// Slot for brightness.
61
63{
64 fColorSet->SetText(fM->UseLightColorSet()?"DarkColorSet": "Light ColorSet");
66}
67
68////////////////////////////////////////////////////////////////////////////////
69/// Slot for color set.
70
72{
73 fColorSet->SetText(fM->UseLightColorSet()? "Light ColorSet":"Dark ColorSet");
75}
@ kVerticalFrame
Definition GuiTypes.h:381
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
@ 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 Build(Bool_t connect=kTRUE) override
Create sub-components (label, number entry, slider).
void SetLimits(Int_t min, Int_t max)
Set limits of the represented value for integer values.
Float_t GetValue() const
virtual void SetValue(Float_t v, Bool_t emit=kFALSE)
Set value, optionally emit signal.
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
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:1109
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:638
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:94
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:865