5 #include "TGComboBox.h"
8 #include "TGResourcePool.h"
10 #include "TGLViewer.h"
11 #include "TEveManager.h"
12 #include "TEveViewer.h"
33 TGTransientFrame(gClient->GetDefaultRoot(),p,w,h),
35 m_backgroundButton(0),
38 m_colorRnrCtxHighlightWidget(0),
39 m_colorRnrCtxSelectWidget(0)
41 SetCleanup(kDeepCleanup);
44 const TGFont *font = gClient->GetFont(
"-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-iso8859-1");
46 font = gClient->GetResourcePool()->GetDefaultFont();
48 gval.fMask = kGCBackground | kGCFont | kGCForeground;
49 gval.fFont = font->GetFontHandle();
50 fTextGC = gClient->GetGC(&gval, kTRUE);
55 TGCompositeFrame* vf2 =
new TGVerticalFrame(
this);
56 AddFrame(vf2,
new TGLayoutHints(kLHintsExpandX, 2, 2, 2, 2));
61 TGLabel* xx =
new TGLabel(vf2,
"GlobalScales ", fTextGC->GetGC());
62 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft ,2,2,4,4));
65 vf2->AddFrame(scaleEditor);
69 vf2->AddFrame(
new TGHorizontal3DLine(vf2),
new TGLayoutHints(kLHintsExpandX,4 ,8, 3, 3));
71 TGLabel* xx =
new TGLabel(vf2,
"Projections ", fTextGC->GetGC());
72 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft ,2,2,4,4));
74 vf2->AddFrame(
new TGLabel(vf2,
"Track behaviour when crossing y=0 in RhoZ-view:"),
new TGLayoutHints(kLHintsLeft ,2,2,0,0));
82 vf2->AddFrame(
new TGHorizontal3DLine(vf2),
new TGLayoutHints(kLHintsExpandX ,4 ,8, 8, 2));
84 TGLabel* xx =
new TGLabel(vf2,
"General Colors ", fTextGC->GetGC());
85 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft,2,2,4,4));
91 TGFont* smallFont = 0;
95 TGFontPool *
pool = gClient->GetFontPool();
96 TGFont* defaultFont = pool->GetFont(defaultFontStruct);
97 FontAttributes_t
attributes = defaultFont->GetFontAttributes();
98 smallFont = pool->GetFont(attributes.fFamily, 8, attributes.fWeight, attributes.fSlant);
109 TGHorizontalFrame*
top =
new TGHorizontalFrame(vf2);
112 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
120 TGHorizontalFrame* lf =
new TGHorizontalFrame(hf, 100, 16, kFixedSize);
121 TGLabel*
label =
new TGLabel(lf,
"Higlight");
122 label->SetTextFont(smallFont);
124 hf->AddFrame(lf,
new TGLayoutHints(kLHintsLeft |kLHintsCenterY , 0, 0, 0,0));
128 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
134 m_colorRnrCtxSelectWidget->Connect(
"ColorChosen(Color_t)",
"CmsShowCommonPopup",
this,
"changeSelectionColorSet(Color_t)");
136 TGHorizontalFrame* lf =
new TGHorizontalFrame(hf, 100, 16, kFixedSize);
137 TGLabel*
label =
new TGLabel(lf,
"Selection");
138 label->SetTextFont(smallFont);
140 hf->AddFrame(lf,
new TGLayoutHints(kLHintsLeft |kLHintsCenterY , 0, 0, 0,0));
144 vf2->AddFrame(
new TGHorizontal3DLine(vf2),
new TGLayoutHints(kLHintsExpandX ,4 ,8, 8, 2));
151 TGLabel* xx =
new TGLabel(vf2,
"DetectorColors ", fTextGC->GetGC());
152 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft,2,2,8,0));
155 TGHSlider* transpWidget2D = 0;
156 TGHSlider* transpWidget3D = 0;
157 TGCompositeFrame*
top =
new TGVerticalFrame(vf2);
158 vf2->AddFrame(top,
new TGLayoutHints(kLHintsNormal, 2, 2, 2, 0));
161 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
162 hf->AddFrame(
new TGLabel(hf,
"Tansparency 2D:"),
new TGLayoutHints(kLHintsBottom, 2, 2, 3, 3));
163 transpWidget2D =
new TGHSlider(hf, 100, kSlider1);
164 hf->AddFrame( transpWidget2D);
165 top->AddFrame(hf,
new TGLayoutHints( kLHintsNormal, 0, 0, 2, 2));
168 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
169 hf->AddFrame(
new TGLabel(hf,
"Tansparency 3D:") ,
new TGLayoutHints(kLHintsBottom,2, 2, 2, 2 ));
170 transpWidget3D =
new TGHSlider(hf, 100, kSlider1);
171 hf->AddFrame( transpWidget3D);
172 top->AddFrame(hf,
new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 10));
182 for (
int k = 0;
k < 3; ++
k)
184 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
187 for (
int j = 0 ;
j < 2; ++
j)
192 m_colorSelectWidget[
i]->Connect(
"ColorChosen(Color_t)",
"CmsShowCommonPopup",
this,
"changeGeomColor(Color_t)");
194 TGHorizontalFrame* lf =
new TGHorizontalFrame(hf, 100, 16, kFixedSize);
196 label->SetTextFont(smallFont);
198 hf->AddFrame(lf,
new TGLayoutHints(kLHintsLeft |kLHintsCenterY , 0, 0, 0,0));
205 m_backgroundButton->Connect(
"Clicked()",
"CmsShowCommonPopup",
this,
"switchBackground()");
207 transpWidget2D->SetRange(0, 100);
209 transpWidget2D->Connect(
"PositionChanged(Int_t)",
"CmsShowCommonPopup",
this,
"changeGeomTransparency2D(Int_t)");
211 transpWidget3D->SetRange(0, 100);
213 transpWidget3D->Connect(
"PositionChanged(Int_t)",
"CmsShowCommonPopup",
this,
"changeGeomTransparency3D(Int_t)");
215 SetWindowName(
"Common Preferences");
217 Resize(GetDefaultSize());
219 CenterOnParent(kTRUE, TGTransientFrame::kTopRight);
238 TGColorSelect *
cs = (TGColorSelect *) gTQSender;
247 TGColorSelect *
cs = (TGColorSelect *) gTQSender;
250 for (TEveElement::List_i it = gEve->GetViewers()->BeginChildren(); it != gEve->GetViewers()->EndChildren(); ++it)
252 TGLViewer*
v = ((TEveViewer*)(*it))->GetGLViewer();
255 colorset.Selection(cs->WidgetId()).SetColor(idx);
256 colorset.Selection(cs->WidgetId()+1).SetColor(idx);
294 TGLColor&
glc = colorset.Selection(3);
295 hci = TColor::GetColor(glc.GetRed(), glc.GetGreen(), glc.GetBlue());
299 TGLColor&
glc = colorset.Selection(1);
300 sci = TColor::GetColor(glc.GetRed(), glc.GetGreen(), glc.GetBlue());
309 ptr->attach(param,
this);
311 TGFrame* pframe = ptr->build(frame);
312 frame->AddFrame(pframe,
new TGLayoutHints(kLHintsExpandX, 0, 0, 2,2));
TGLColorSet m_lightColorSet
auto_ptr< ClusterSequence > cs
static const HistoName names[]
Color_t geomTransparency(bool projected) const
void SetColorByIndex(Color_t iColor)
FWBoolParameter m_drawBreakPoints
static boost::shared_ptr< FWParameterSetterBase > makeSetterFor(FWParameterBase *)
const FWColorManager * colorManager() const
Bool_t isColorSetDark() const
void setGeomTransparency(int val, bool projected)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void setGeomColor(FWGeomColorIndex, Color_t)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
std::auto_ptr< FWViewEnergyScale > m_energyScale
TGLColorSet m_darkColorSet
FWEnumParameter m_trackBreak
Color_t geomColor(FWGeomColorIndex) const