18 #include "TGResourcePool.h"
19 #include "TVirtualX.h"
55 class BorderlessTextButton :
public TGTextButton {
57 BorderlessTextButton(
const TGWindow*
p =
nullptr,
58 const char*
s =
nullptr,
60 GContext_t norm = GetDefaultGC()(),
61 FontStruct_t font = GetDefaultFontStruct())
62 : TGTextButton(
p,
s,
id, norm, font, 0) {
68 void DoRedraw()
override;
71 void BorderlessTextButton::DoRedraw() {
72 gVirtualX->ClearArea(fId, fBorderWidth, fBorderWidth, fWidth - (fBorderWidth << 1), fHeight - (fBorderWidth << 1));
76 if (fTMode & kTextLeft) {
78 }
else if (fTMode & kTextRight) {
79 x = fWidth - fTWidth - fMRight - 4;
81 x = (fWidth - fTWidth + fMLeft - fMRight) >> 1;
84 if (fTMode & kTextTop) {
86 }
else if (fTMode & kTextBottom) {
87 y = fHeight - fTHeight - fMBottom - 3;
89 y = (fHeight - fTHeight + fMTop - fMBottom) >> 1;
92 Int_t hotpos = fLabel->GetHotPos();
94 fTLayout->DrawText(fId, fNormGC, x, y, 0, -1);
96 fTLayout->UnderlineChar(fId, fNormGC, x, y, hotpos - 1);
100 static const TGPicture*
filtered(
bool iBackgroundIsBlack) {
101 if (iBackgroundIsBlack) {
110 if (iBackgroundIsBlack) {
118 static const TGPicture*
alert_over(
bool iBackgroundIsBlack) {
119 if (iBackgroundIsBlack) {
127 static const TGPicture*
alert(
bool iBackgroundIsBlack) {
128 if (iBackgroundIsBlack) {
136 static const TGPicture*
unfiltered(
bool iBackgroundIsBlack) {
137 if (iBackgroundIsBlack) {
145 if (iBackgroundIsBlack) {
153 static const TGPicture*
info(
bool iBackgroundIsBlack) {
154 if (iBackgroundIsBlack) {
162 static const TGPicture*
info_over(
bool iBackgroundIsBlack) {
163 if (iBackgroundIsBlack) {
172 if (iBackgroundIsBlack) {
181 if (iBackgroundIsBlack) {
190 if (iBackgroundIsBlack) {
191 static const TGPicture*
s =
195 static const TGPicture*
s =
200 static const TGPicture*
arrow_down(
bool iBackgroundIsBlack) {
201 if (iBackgroundIsBlack) {
210 if (iBackgroundIsBlack) {
211 static const TGPicture*
s =
215 static const TGPicture*
s =
226 : TGCompositeFrame(iParent),
230 m_collectionShown(
false),
231 m_tableContext(nullptr),
233 m_colorPopup(nullptr),
234 m_tableManager(nullptr),
235 m_tableWidget(nullptr),
236 m_backgroundIsWhite(
false),
238 SetBackgroundColor(kWidgetColor);
239 const unsigned int backgroundColor = kBlack;
241 TGCompositeFrame* hFrame =
new TGHorizontalFrame(
this, 10, 10, 0, backgroundColor);
243 this->AddFrame(hFrame,
new TGLayoutHints(kLHintsTop | kLHintsExpandX));
249 m_showHideButton->Connect(
"Clicked()",
"FWCollectionSummaryWidget",
this,
"toggleShowHide()");
252 hFrame->AddFrame(
m_showHideButton,
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 6, 10));
259 m_isVisibleButton->SetToolTipText(
"make all items in collection visible/invisible");
260 hFrame->AddFrame(
m_isVisibleButton,
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 0, 1));
261 m_isVisibleButton->Connect(
"Clicked()",
"FWCollectionSummaryWidget",
this,
"toggleItemVisible()");
267 m_colorSelectWidget->Connect(
"Clicked()",
"FWCollectionSummaryWidget",
this,
"colorClicked()");
270 GCValues_t
t = *(GetWhiteGC().GetAttributes());
275 m_label->SetBackgroundColor(backgroundColor);
276 m_label->SetTextJustify(kTextLeft | kTextCenterY);
277 m_label->SetTextColor(static_cast<Pixel_t>(gVirtualX->GetPixel(kWhite)));
278 hFrame->AddFrame(
m_label,
new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX, 5, 5));
279 m_label->Connect(
"Clicked()",
"FWCollectionSummaryWidget",
this,
"labelClicked()");
280 m_label->SetToolTipText(
"select collection and show controller");
286 hFrame->AddFrame(
m_stateButton,
new TGLayoutHints(kLHintsCenterY | kLHintsLeft));
289 m_stateButton->Connect(
"Clicked()",
"FWCollectionSummaryWidget",
this,
"stateClicked()");
290 m_stateButton->SetToolTipText(
"select collection and show filter");
294 hFrame->AddFrame(
m_infoButton,
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 2));
295 m_infoButton->Connect(
"Clicked()",
"FWCollectionSummaryWidget",
this,
"infoClicked()");
296 m_infoButton->SetToolTipText(
"select collection and show data info");
347 if (iBackgroundIsWhite) {
348 iLabel->SetBackgroundColor(0x7777FF);
350 iLabel->SetBackgroundColor(0x0000FF);
353 if (iBackgroundIsWhite) {
354 iLabel->SetBackgroundColor(0xFFFFFF);
356 iLabel->SetBackgroundColor(0x000000);
371 const TGPicture* picture =
nullptr;
372 const TGPicture*
down =
nullptr;
373 const TGPicture*
disabled =
nullptr;
389 m_stateButton->SetToolTipText(
"select collection and show filter");
416 static TGGC* s_context =
nullptr;
417 if (
nullptr == s_context) {
418 GCValues_t hT = *(gClient->GetResourcePool()->GetSelectedGC()->GetAttributes());
419 s_context = gClient->GetResourcePool()->GetGCPool()->GetGC(&hT, kTRUE);
420 s_context->SetForeground(s_context->GetBackground());
427 const TGPicture* picture =
nullptr;
428 const TGPicture*
down =
nullptr;
429 const TGPicture*
disabled =
nullptr;
437 m_hints->SetLayoutHints(kLHintsExpandX);
445 GCValues_t
t = *(GetWhiteGC().GetAttributes());
446 t.fFont = gClient->GetResourcePool()->GetIconFont()->GetFontHandle();
447 m_tableContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&t, kTRUE);
454 AddFrame(
m_tableWidget,
new TGLayoutHints(kLHintsBottom | kLHintsExpandX | kLHintsExpandY));
455 m_tableWidget->Connect(
"rowClicked(Int_t,Int_t,Int_t,Int_t,Int_t)",
456 "FWCollectionSummaryWidget",
458 "modelSelected(Int_t,Int_t,Int_t,Int_t,Int_t)");
464 m_hints->SetLayoutHints(kLHintsExpandX | kLHintsExpandY);
479 std::vector<Color_t>
colors;
484 m_colorPopup->Connect(
"ColorSelected(Color_t)",
"FWCollectionSummaryWidget",
this,
"colorChangeRequested(Color_t)");
496 gClient->GetDefaultRoot()->GetId(),
503 std::vector<Color_t>
colors;
515 std::vector<Color_t>
colors;
524 if (iKeyMod & kKeyControlMask) {
531 if (iButton == kButton3) {
537 Emit(
"requestForInfo(FWEventItem*)", reinterpret_cast<long>(iItem));
541 Emit(
"requestForFilter(FWEventItem*)", reinterpret_cast<long>(iItem));
545 Emit(
"requestForErrorInfo(FWEventItem*)", reinterpret_cast<long>(iItem));
549 Emit(
"requestForController(FWEventItem*)", reinterpret_cast<long>(iItem));
554 args[0] =
static_cast<Long_t
>(iGlobalX);
555 args[1] =
static_cast<Long_t
>(iGlobalY);
556 Emit(
"requestForModelContextMenu(Int_t,Int_t)", args);
590 Pixel_t bc = 0x000000;
591 Pixel_t fg = 0xffffff;
596 SetBackgroundColor(kWidgetColorLight);
602 SetBackgroundColor(kWidgetColor);
605 selectContext()->SetForeground(gClient->GetResourcePool()->GetSelectedGC()->GetBackground());
static const TString & coreIcondir()
const FWDisplayProperties & defaultDisplayProperties() const
void setColor(Color_t iColor)
FWModelChangeManager * changeManager() const
const FWDisplayProperties & displayProperties() const
uint16_t *__restrict__ id
std::string modelName(int iIndex) const
const std::string & name() const
FWColorManager * colorManager() const
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
const std::string & filterExpression() const
FWItemChangeSignal defaultDisplayPropertiesChanged_
void fillLimitedColors(std::vector< Color_t > &cv) const
bool itemIsSelected() const
void setDefaultDisplayProperties(const FWDisplayProperties &)
BackgroundColorIndex backgroundColorIndex() const
FWItemChangeSignal itemChanged_
ClassImp(AliDaqEventHeader)
uint16_t const *__restrict__ x
void setChecked(bool iChecked)
bool hasError() const
returns true if failed to get data for this event
FWSelectionManager * selectionManager() const
void toggleSelect(int iIndex) const
const std::string & errorMessage() const
returns error string if there was a problem this event
m_collection(iC.consumes< T >(iConfig.getParameter< edm::InputTag >("collectionName")))
void select(int iIndex) const
ModelInfo modelInfo(int iIndex) const
void setIsVisible(bool iSet)
void setColor(GContext_t iColorContext)
FWItemChangeSignal filterChanged_