18 #include <sigc++/sigc++.h>
19 #include <boost/bind.hpp>
57 const TGWindow*
p, UInt_t
w, UInt_t
h) :
58 TGTransientFrame(gClient->GetDefaultRoot(),p,w,h),
59 m_detailViewManager(iManager),
60 m_colorManager(iColorMgr),
65 SetCleanup(kDeepCleanup);
67 TGVerticalFrame* vf =
new TGVerticalFrame(
this);
68 AddFrame(vf,
new TGLayoutHints(kLHintsExpandX|kLHintsExpandY, 2, 2, 2, 4));
84 TGTextButton *detailedViewButton =
new TGTextButton(
this,
"Open Detailed View", 0);
85 AddFrame(detailedViewButton,
new TGLayoutHints(kLHintsExpandX, 4, 4, 4, 4));
88 m_colorSelectWidget->Connect(
"ColorChosen(Color_t)",
"CmsShowModelPopup",
this,
"changeModelColor(Color_t)");
89 m_isVisibleButton->Connect(
"Toggled(Bool_t)",
"CmsShowModelPopup",
this,
"toggleModelVisible(Bool_t)");
91 this,
"changeModelOpacity(Int_t)");
93 SetWindowName(
"Object Controller");
95 Resize(GetDefaultSize());
109 m_colorSelectWidget->Disconnect(
"ColorSelected(Pixel_t)",
this,
"changeModelColor(Pixel_t)");
110 m_opacitySlider->Disconnect(
"PositionChanged(Int_t)",
this,
"changeModelOpacity(Int_t)");
111 m_isVisibleButton->Disconnect(
"Toggled(Bool_t)",
this,
"toggleModelVisible(Bool_t)");
143 bool multipleNames =
false, multipleColors =
false, multipleVis =
false,
144 multipleTransparecy =
false;
147 std::set<FWModelId>::const_iterator
id =
m_models.begin();
157 for (std::set<FWModelId>::const_iterator
i = ++(
m_models.begin()),
163 multipleNames = multipleNames || (item->
name() !=
i->item()->name());
164 multipleColors = multipleColors || (props.
color() != nextProps.
color());
166 multipleTransparecy = multipleTransparecy
171 std::ostringstream
s;
194 TGTextButton *button;
198 button =
new TGTextButton(
this,
"dummy",
index);
199 AddFrame(button,
new TGLayoutHints(kLHintsExpandX, 4, 4, 4, 4));
200 TGCompositeFrame* cf = (TGCompositeFrame*)button->GetParent();
205 button->Connect(
"Clicked()",
"CmsShowModelPopup",
this,
"clicked()");
208 else if (!viewChoices.empty())
211 for (
size_t i = 0,
e = viewChoices.size();
i !=
e; ++
i)
219 for (
size_t i = 0,
e = viewChoices.size();
i !=
e; ++
i)
237 Resize(GetDefaultSize());
321 i->item()->setDisplayProperties(
i->index(), changeProperties);
340 i->item()->setDisplayProperties(
i->index(), changeProperties);
358 i->item()->setDisplayProperties(
i->index(), changeProperties);
373 TGTextButton *
cs =
static_cast<TGTextButton *
>(gTQSender);
374 int iIndex = cs->WidgetId();
const std::set< FWModelId > & selected() const
FWDialogBuilder & addHSlider(size_t size, TGHSlider **out=0)
void setColor(Color_t iColor)
const FWDisplayProperties & displayProperties() const
auto_ptr< ClusterSequence > cs
void SetColorByIndex(Color_t iColor)
std::string modelName(int iIndex) const
const std::string & name() const
FWDialogBuilder & addLabel(const char *text, size_t fontSize=12, size_t weight=0, TGLabel **out=0)
FWItemChangeSignal goingToBeDestroyed_
Char_t transparency() const
FWDialogBuilder & addHSeparator(size_t horizontalPadding=4, size_t verticalPadding=3)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::vector< std::string > detailViewsFor(const FWModelId &) const
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
void setTransparency(Char_t transparency)
void openDetailViewFor(const FWModelId &, const std::string &)
sigc::signal< void, const FWSelectionManager & > selectionChanged_
FWModelChangeSignal changed_
ModelInfo modelInfo(int iIndex) const
void setIsVisible(bool iSet)
FWDialogBuilder & addCheckbox(const char *text, TGCheckButton **out=0)
FWDialogBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & addColorPicker(const FWColorManager *manager, FWColorSelect **out=0)