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);
53 TGFont* smallFont = 0;
57 TGFontPool *
pool = gClient->GetFontPool();
58 TGFont* defaultFont = pool->GetFont(defaultFontStruct);
59 FontAttributes_t
attributes = defaultFont->GetFontAttributes();
60 smallFont = pool->GetFont(attributes.fFamily, 8, attributes.fWeight, attributes.fSlant);
67 TGCompositeFrame* vf2 =
new TGVerticalFrame(
this);
68 AddFrame(vf2,
new TGLayoutHints(kLHintsExpandX, 2, 2, 2, 2));
73 TGLabel* xx =
new TGLabel(vf2,
"GlobalScales ", fTextGC->GetGC());
74 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft ,2,2,4,4));
77 vf2->AddFrame(scaleEditor);
81 vf2->AddFrame(
new TGHorizontal3DLine(vf2),
new TGLayoutHints(kLHintsExpandX,4 ,8, 3, 3));
83 TGLabel* xx =
new TGLabel(vf2,
"Projections ", fTextGC->GetGC());
84 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft ,2,2,4,4));
86 vf2->AddFrame(
new TGLabel(vf2,
"Track behaviour when crossing y=0 in RhoZ-view:"),
new TGLayoutHints(kLHintsLeft ,2,2,0,0));
94 vf2->AddFrame(
new TGHorizontal3DLine(vf2),
new TGLayoutHints(kLHintsExpandX ,4 ,8, 8, 2));
96 TGLabel* xx =
new TGLabel(vf2,
"General Colors ", fTextGC->GetGC());
97 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft,2,2,4,4));
107 TGHorizontalFrame* top =
new TGHorizontalFrame(vf2);
110 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
118 TGFrame* lf =
new TGHorizontalFrame(hf, 100, 16, kFixedSize);
119 TGLabel*
label =
new TGLabel(lf,
"Higlight");
120 label->SetTextFont(smallFont);
121 hf->AddFrame(lf,
new TGLayoutHints(kLHintsLeft |kLHintsCenterY , 0, 0, 0,0));
125 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
131 m_colorRnrCtxSelectWidget->Connect(
"ColorChosen(Color_t)",
"CmsShowCommonPopup",
this,
"changeSelectionColorSet(Color_t)");
133 TGFrame* lf =
new TGHorizontalFrame(hf, 100, 16, kFixedSize);
134 TGLabel*
label =
new TGLabel(lf,
"Selection");
135 label->SetTextFont(smallFont);
136 hf->AddFrame(lf,
new TGLayoutHints(kLHintsLeft |kLHintsCenterY , 0, 0, 0,0));
140 vf2->AddFrame(
new TGHorizontal3DLine(vf2),
new TGLayoutHints(kLHintsExpandX ,4 ,8, 8, 2));
147 TGLabel* xx =
new TGLabel(vf2,
"DetectorColors ", fTextGC->GetGC());
148 vf2->AddFrame(xx,
new TGLayoutHints(kLHintsLeft,2,2,8,0));
151 TGHSlider* transpWidget2D = 0;
152 TGHSlider* transpWidget3D = 0;
153 TGCompositeFrame* top =
new TGVerticalFrame(vf2);
154 vf2->AddFrame(top,
new TGLayoutHints(kLHintsNormal, 2, 2, 2, 0));
157 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
158 hf->AddFrame(
new TGLabel(hf,
"Tansparency 2D:"),
new TGLayoutHints(kLHintsBottom, 2, 2, 3, 3));
159 transpWidget2D =
new TGHSlider(hf, 100, kSlider1);
160 hf->AddFrame( transpWidget2D);
161 top->AddFrame(hf,
new TGLayoutHints( kLHintsNormal, 0, 0, 2, 2));
164 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
165 hf->AddFrame(
new TGLabel(hf,
"Tansparency 3D:") ,
new TGLayoutHints(kLHintsBottom,2, 2, 2, 2 ));
166 transpWidget3D =
new TGHSlider(hf, 100, kSlider1);
167 hf->AddFrame( transpWidget3D);
168 top->AddFrame(hf,
new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 10));
178 for (
int k = 0;
k < 3; ++
k)
180 TGHorizontalFrame* hf =
new TGHorizontalFrame(top);
183 for (
int j = 0 ;
j < 2; ++
j)
188 m_colorSelectWidget[
i]->Connect(
"ColorChosen(Color_t)",
"CmsShowCommonPopup",
this,
"changeGeomColor(Color_t)");
190 TGFrame* lf =
new TGHorizontalFrame(hf, 100, 16, kFixedSize);
192 label->SetTextFont(smallFont);
193 hf->AddFrame(lf,
new TGLayoutHints(kLHintsLeft |kLHintsCenterY , 0, 0, 0,0));
200 m_backgroundButton->Connect(
"Clicked()",
"CmsShowCommonPopup",
this,
"switchBackground()");
202 transpWidget2D->SetRange(0, 100);
204 transpWidget2D->Connect(
"PositionChanged(Int_t)",
"CmsShowCommonPopup",
this,
"changeGeomTransparency2D(Int_t)");
206 transpWidget3D->SetRange(0, 100);
208 transpWidget3D->Connect(
"PositionChanged(Int_t)",
"CmsShowCommonPopup",
this,
"changeGeomTransparency3D(Int_t)");
210 SetWindowName(
"Common Preferences");
212 Resize(GetDefaultSize());
214 CenterOnParent(kTRUE, TGTransientFrame::kTopRight);
233 TGColorSelect *
cs = (TGColorSelect *) gTQSender;
242 TGColorSelect *
cs = (TGColorSelect *) gTQSender;
245 for (TEveElement::List_i it = gEve->GetViewers()->BeginChildren(); it != gEve->GetViewers()->EndChildren(); ++it)
247 TGLViewer*
v = ((TEveViewer*)(*it))->GetGLViewer();
250 colorset.Selection(cs->WidgetId()).SetColor(idx);
251 colorset.Selection(cs->WidgetId()+1).SetColor(idx);
289 TGLColor&
glc = colorset.Selection(3);
290 hci = TColor::GetColor(glc.GetRed(), glc.GetGreen(), glc.GetBlue());
294 TGLColor&
glc = colorset.Selection(1);
295 sci = TColor::GetColor(glc.GetRed(), glc.GetGreen(), glc.GetBlue());
304 ptr->attach(param,
this);
306 TGFrame* pframe = ptr->build(frame);
307 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)
void setGeomColor(FWGeomColorIndex, Color_t)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::auto_ptr< FWViewEnergyScale > m_energyScale
TGLColorSet m_darkColorSet
FWEnumParameter m_trackBreak
Color_t geomColor(FWGeomColorIndex) const