#include "TEveViewerListEditor.h"
#include "TEveViewer.h"
#include "TEveGValuators.h"
ClassImp(TEveViewerListEditor);
TEveViewerListEditor::TEveViewerListEditor(const TGWindow *p, Int_t width, Int_t height,
UInt_t options, Pixel_t back) :
TGedFrame(p, width, height, options | kVerticalFrame, back),
fM(0),
fBrightness(0),
fColorSet(0)
{
MakeTitle("TEveViewerList");
Int_t labelW = 63;
fBrightness = new TEveGValuator(this, "Brightness:", 90, 0);
fBrightness->SetLabelWidth(labelW);
fBrightness->SetNELength(4);
fBrightness->Build();
fBrightness->SetLimits(-2, 2 , 41 , TGNumberFormat::kNESRealTwo);
fBrightness->Connect("ValueSet(Double_t)", "TEveViewerListEditor", this, "DoBrightness()");
AddFrame(fBrightness, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
fColorSet = new TGTextButton(this , "Switch ColorSet");
fColorSet->Connect("Clicked()", "TEveViewerListEditor", this, "SwitchColorSet()");
AddFrame(fColorSet, new TGLayoutHints(kLHintsLeft, 2, 1, 4, 4));
}
void TEveViewerListEditor::SetModel(TObject* obj)
{
fM = dynamic_cast<TEveViewerList*>(obj);
fBrightness->SetValue(fM->GetColorBrightness());
}
void TEveViewerListEditor::DoBrightness()
{
fColorSet->SetText(fM->UseLightColorSet()?"DarkColorSet": "Light ColorSet");
fM->SetColorBrightness(fBrightness->GetValue());
}
void TEveViewerListEditor::SwitchColorSet()
{
fColorSet->SetText(fM->UseLightColorSet()? "Light ColorSet":"Dark ColorSet");
fM->SwitchColorSet();
}
TEveViewerListEditor.cxx:1 TEveViewerListEditor.cxx:2 TEveViewerListEditor.cxx:3 TEveViewerListEditor.cxx:4 TEveViewerListEditor.cxx:5 TEveViewerListEditor.cxx:6 TEveViewerListEditor.cxx:7 TEveViewerListEditor.cxx:8 TEveViewerListEditor.cxx:9 TEveViewerListEditor.cxx:10 TEveViewerListEditor.cxx:11 TEveViewerListEditor.cxx:12 TEveViewerListEditor.cxx:13 TEveViewerListEditor.cxx:14 TEveViewerListEditor.cxx:15 TEveViewerListEditor.cxx:16 TEveViewerListEditor.cxx:17 TEveViewerListEditor.cxx:18 TEveViewerListEditor.cxx:19 TEveViewerListEditor.cxx:20 TEveViewerListEditor.cxx:21 TEveViewerListEditor.cxx:22 TEveViewerListEditor.cxx:23 TEveViewerListEditor.cxx:24 TEveViewerListEditor.cxx:25 TEveViewerListEditor.cxx:26 TEveViewerListEditor.cxx:27 TEveViewerListEditor.cxx:28 TEveViewerListEditor.cxx:29 TEveViewerListEditor.cxx:30 TEveViewerListEditor.cxx:31 TEveViewerListEditor.cxx:32 TEveViewerListEditor.cxx:33 TEveViewerListEditor.cxx:34 TEveViewerListEditor.cxx:35 TEveViewerListEditor.cxx:36 TEveViewerListEditor.cxx:37 TEveViewerListEditor.cxx:38 TEveViewerListEditor.cxx:39 TEveViewerListEditor.cxx:40 TEveViewerListEditor.cxx:41 TEveViewerListEditor.cxx:42 TEveViewerListEditor.cxx:43 TEveViewerListEditor.cxx:44 TEveViewerListEditor.cxx:45 TEveViewerListEditor.cxx:46 TEveViewerListEditor.cxx:47 TEveViewerListEditor.cxx:48 TEveViewerListEditor.cxx:49 TEveViewerListEditor.cxx:50 TEveViewerListEditor.cxx:51 TEveViewerListEditor.cxx:52 TEveViewerListEditor.cxx:53 TEveViewerListEditor.cxx:54 TEveViewerListEditor.cxx:55 TEveViewerListEditor.cxx:56 TEveViewerListEditor.cxx:57 TEveViewerListEditor.cxx:58 TEveViewerListEditor.cxx:59 TEveViewerListEditor.cxx:60 TEveViewerListEditor.cxx:61 TEveViewerListEditor.cxx:62 TEveViewerListEditor.cxx:63 TEveViewerListEditor.cxx:64 TEveViewerListEditor.cxx:65 TEveViewerListEditor.cxx:66 TEveViewerListEditor.cxx:67 TEveViewerListEditor.cxx:68 TEveViewerListEditor.cxx:69 TEveViewerListEditor.cxx:70 TEveViewerListEditor.cxx:71 TEveViewerListEditor.cxx:72 TEveViewerListEditor.cxx:73 TEveViewerListEditor.cxx:74 TEveViewerListEditor.cxx:75 TEveViewerListEditor.cxx:76 TEveViewerListEditor.cxx:77 TEveViewerListEditor.cxx:78 TEveViewerListEditor.cxx:79 TEveViewerListEditor.cxx:80 TEveViewerListEditor.cxx:81