CMS 3D CMS Logo

FWCollectionSummaryWidget.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWCollectionSummaryWidget
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Sat Feb 14 10:02:32 CST 2009
11 //
12 
13 // system include files
14 #include <iostream>
15 #include <vector>
16 #include <functional>
17 #include "TGButton.h"
18 #include "TGResourcePool.h"
19 #include "TVirtualX.h"
24 
25 // user include files
29 
32 
36 
37 //
38 // constants, enums and typedefs
39 //
41  std::vector<sigc::connection> m_connections;
42 
44  for_each(
45  m_connections.begin(), m_connections.end(), std::bind(&sigc::connection::disconnect, std::placeholders::_1));
46  }
47  void push_back(const sigc::connection& iC) { m_connections.push_back(iC); }
48  void reserve(size_t iSize) { m_connections.reserve(iSize); }
49 };
50 
51 //
52 // static data member definitions
53 //
54 namespace {
55  class BorderlessTextButton : public TGTextButton {
56  public:
57  BorderlessTextButton(const TGWindow* p = nullptr,
58  const char* s = nullptr,
59  Int_t id = -1,
60  GContext_t norm = GetDefaultGC()(),
61  FontStruct_t font = GetDefaultFontStruct())
62  : TGTextButton(p, s, id, norm, font, 0) {
63  //by default, it uses too much padding
64  fMTop = -3;
65  fMBottom = -3;
66  }
67 
68  void DoRedraw() override;
69  };
70 
71  void BorderlessTextButton::DoRedraw() {
72  gVirtualX->ClearArea(fId, fBorderWidth, fBorderWidth, fWidth - (fBorderWidth << 1), fHeight - (fBorderWidth << 1));
73  //TGFrame::DoRedraw();
74 
75  int x, y;
76  if (fTMode & kTextLeft) {
77  x = fMLeft + 4;
78  } else if (fTMode & kTextRight) {
79  x = fWidth - fTWidth - fMRight - 4;
80  } else {
81  x = (fWidth - fTWidth + fMLeft - fMRight) >> 1;
82  }
83 
84  if (fTMode & kTextTop) {
85  y = fMTop + 3;
86  } else if (fTMode & kTextBottom) {
87  y = fHeight - fTHeight - fMBottom - 3;
88  } else {
89  y = (fHeight - fTHeight + fMTop - fMBottom) >> 1;
90  }
91 
92  Int_t hotpos = fLabel->GetHotPos();
93 
94  fTLayout->DrawText(fId, fNormGC, x, y, 0, -1);
95  if (hotpos)
96  fTLayout->UnderlineChar(fId, fNormGC, x, y, hotpos - 1);
97  }
98 } // namespace
99 
100 static const TGPicture* filtered(bool iBackgroundIsBlack) {
101  if (iBackgroundIsBlack) {
102  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "filtered-blackbg.png");
103  return s;
104  }
105  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "filtered-whitebg.png");
106  return s;
107 }
108 
109 static const TGPicture* filtered_over(bool iBackgroundIsBlack) {
110  if (iBackgroundIsBlack) {
111  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "filtered-whitebg-over.png");
112  return s;
113  }
114  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "filtered-whitebg-over.png");
115  return s;
116 }
117 
118 static const TGPicture* alert_over(bool iBackgroundIsBlack) {
119  if (iBackgroundIsBlack) {
120  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "icon-alert-blackbg-over.png");
121  return s;
122  }
123  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "icon-alert-whitebg-over.png");
124  return s;
125 }
126 
127 static const TGPicture* alert(bool iBackgroundIsBlack) {
128  if (iBackgroundIsBlack) {
129  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "icon-alert-blackbg.png");
130  return s;
131  }
132  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "icon-alert-whitebg.png");
133  return s;
134 }
135 
136 static const TGPicture* unfiltered(bool iBackgroundIsBlack) {
137  if (iBackgroundIsBlack) {
138  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "unfiltered-blackbg.png");
139  return s;
140  }
141  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "unfiltered-whitebg.png");
142  return s;
143 }
144 static const TGPicture* unfiltered_over(bool iBackgroundIsBlack) {
145  if (iBackgroundIsBlack) {
146  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "unfiltered-blackbg-over.png");
147  return s;
148  }
149  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "unfiltered-whitebg-over.png");
150  return s;
151 }
152 
153 static const TGPicture* info(bool iBackgroundIsBlack) {
154  if (iBackgroundIsBlack) {
155  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "info2-blackbg.png");
156  return s;
157  }
158  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "info2-whitebg.png");
159  return s;
160 }
161 
162 static const TGPicture* info_over(bool iBackgroundIsBlack) {
163  if (iBackgroundIsBlack) {
164  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "info2-blackbg-over.png");
165  return s;
166  }
167  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "info2-whitebg-over.png");
168  return s;
169 }
170 
171 static const TGPicture* info_disabled(bool iBackgroundIsBlack) {
172  if (iBackgroundIsBlack) {
173  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "info2-blackbg-disabled.png");
174  return s;
175  }
176  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "info2-whitebg-disabled.png");
177  return s;
178 }
179 
180 static const TGPicture* arrow_right(bool iBackgroundIsBlack) {
181  if (iBackgroundIsBlack) {
182  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-white-right-blackbg.png");
183  return s;
184  }
185  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-black-right-whitebg.png");
186  return s;
187 }
188 
189 static const TGPicture* arrow_right_disabled(bool iBackgroundIsBlack) {
190  if (iBackgroundIsBlack) {
191  static const TGPicture* s =
192  gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-white-right-disabled-blackbg.png");
193  return s;
194  }
195  static const TGPicture* s =
196  gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-black-right-disabled-whitebg.png");
197  return s;
198 }
199 
200 static const TGPicture* arrow_down(bool iBackgroundIsBlack) {
201  if (iBackgroundIsBlack) {
202  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-white-down-blackbg.png");
203  return s;
204  }
205  static const TGPicture* s = gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-black-down-whitebg.png");
206  return s;
207 }
208 
209 static const TGPicture* arrow_down_disabled(bool iBackgroundIsBlack) {
210  if (iBackgroundIsBlack) {
211  static const TGPicture* s =
212  gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-white-down-disabled-blackbg.png");
213  return s;
214  }
215  static const TGPicture* s =
216  gClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "arrow-black-down-disabled-whitebg.png");
217  return s;
218 }
219 
220 static const unsigned long kWidgetColor = 0x2f2f2f;
221 static const unsigned long kWidgetColorLight = 0xdfdfdf;
222 //
223 // constructors and destructor
224 //
225 FWCollectionSummaryWidget::FWCollectionSummaryWidget(TGFrame* iParent, FWEventItem& iItem, TGLayoutHints* iHints)
226  : TGCompositeFrame(iParent),
227  m_collection(&iItem),
228  m_hints(iHints),
229  m_parent(iParent),
230  m_collectionShown(false),
231  m_tableContext(nullptr),
232  m_indexForColor(-1),
233  m_colorPopup(nullptr),
234  m_tableManager(nullptr),
235  m_tableWidget(nullptr),
236  m_backgroundIsWhite(false),
237  m_connectionHolder(new FWCollectionSummaryWidgetConnectionHolder) {
238  SetBackgroundColor(kWidgetColor);
239  const unsigned int backgroundColor = kBlack;
240 
241  TGCompositeFrame* hFrame = new TGHorizontalFrame(this, 10, 10, 0, backgroundColor);
242  m_holder = hFrame;
243  this->AddFrame(hFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX));
244 
249  m_showHideButton->Connect("Clicked()", "FWCollectionSummaryWidget", this, "toggleShowHide()");
250  m_showHideButton->SetToolTipText("show/hide individual collection items");
251  m_collectionShown = false;
252  hFrame->AddFrame(m_showHideButton, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 6, 10));
253 
254  //m_isVisibleButton = new TGCheckButton(this,"");
255  //m_isVisibleButton->SetState(kButtonDown, kFALSE);
257  m_isVisibleButton = new FWBoxIconButton(this, m_isVisibleCheckBox, -1, GetWhiteGC()());
258  m_isVisibleButton->SetBackgroundColor(backgroundColor);
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()");
262 
264  m_colorSelectWidget = new FWBoxIconButton(this, m_colorSelectBox, -1, GetWhiteGC()());
265  hFrame->AddFrame(m_colorSelectWidget, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 1));
266  //m_colorSelectWidget->Connect("ColorSelected(Pixel_t)", "FWCollectionSummaryWidget", this, "colorChangeRequested(Pixel_t)");
267  m_colorSelectWidget->Connect("Clicked()", "FWCollectionSummaryWidget", this, "colorClicked()");
268  m_colorSelectWidget->SetBackgroundColor(backgroundColor);
269  m_colorSelectWidget->SetToolTipText("set default color of items in collection");
270  GCValues_t t = *(GetWhiteGC().GetAttributes());
271  m_graphicsContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&t, kTRUE);
273 
274  m_label = new BorderlessTextButton(this, m_collection->name().c_str());
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");
281 
286  hFrame->AddFrame(m_stateButton, new TGLayoutHints(kLHintsCenterY | kLHintsLeft));
287  itemChanged();
288  displayChanged();
289  m_stateButton->Connect("Clicked()", "FWCollectionSummaryWidget", this, "stateClicked()");
290  m_stateButton->SetToolTipText("select collection and show filter");
291 
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");
297 
300  std::bind(&FWCollectionSummaryWidget::displayChanged, this)));
305 
306  MapSubwindows();
307  Layout();
308  MapWindow();
309 }
310 
311 // FWCollectionSummaryWidget::FWCollectionSummaryWidget(const FWCollectionSummaryWidget& rhs)
312 // {
313 // // do actual copying here;
314 // }
315 
317  delete m_colorPopup;
318  /* the following deletes lead to an infinite loop at the end of the job
319  delete m_hints;
320  delete m_showHideButton;
321  delete m_isVisibleButton;
322  delete m_colorSelectWidget;
323  delete m_stateButton;
324  delete m_infoButton;
325  */
326  gClient->GetResourcePool()->GetGCPool()->FreeGC(m_graphicsContext->GetGC());
327  delete m_connectionHolder;
328 }
329 
330 //
331 // assignment operators
332 //
333 // const FWCollectionSummaryWidget& FWCollectionSummaryWidget::operator=(const FWCollectionSummaryWidget& rhs)
334 // {
335 // //An exception safe implementation is
336 // FWCollectionSummaryWidget temp(rhs);
337 // swap(rhs);
338 //
339 // return *this;
340 // }
341 
342 //
343 // member functions
344 //
345 static void setLabelBackgroundColor(TGTextButton* iLabel, bool iIsSelected, bool iBackgroundIsWhite) {
346  if (iIsSelected) {
347  if (iBackgroundIsWhite) {
348  iLabel->SetBackgroundColor(0x7777FF);
349  } else {
350  iLabel->SetBackgroundColor(0x0000FF);
351  }
352  } else {
353  if (iBackgroundIsWhite) {
354  iLabel->SetBackgroundColor(0xFFFFFF);
355  } else {
356  iLabel->SetBackgroundColor(0x000000);
357  }
358  }
359 }
360 
362  m_graphicsContext->SetForeground(gVirtualX->GetPixel(m_collection->defaultDisplayProperties().color()));
363  fClient->NeedRedraw(m_colorSelectWidget);
365  fClient->NeedRedraw(m_isVisibleButton);
367  fClient->NeedRedraw(m_label);
368 }
369 
371  const TGPicture* picture = nullptr;
372  const TGPicture* down = nullptr;
373  const TGPicture* disabled = nullptr;
374  if (m_collection->hasError()) {
375  picture = alert(!m_backgroundIsWhite);
378  m_stateButton->SetToolTipText(m_collection->errorMessage().c_str());
379  } else {
380  if (!m_collection->filterExpression().empty()) {
381  picture = filtered(!m_backgroundIsWhite);
384  } else {
385  picture = unfiltered(!m_backgroundIsWhite);
388  }
389  m_stateButton->SetToolTipText("select collection and show filter");
390  }
391  m_stateButton->swapIcons(picture, down, disabled);
392 }
393 
395  if (-1 == m_indexForColor) {
397  changeProperties.setColor(color);
398  m_collection->setDefaultDisplayProperties(changeProperties);
399  return;
400  }
401 
403  changeProperties.setColor(color);
405 }
406 
410  changeProperties.setIsVisible(m_isVisibleCheckBox->isChecked());
411  m_collection->setDefaultDisplayProperties(changeProperties);
412  fClient->NeedRedraw(m_isVisibleButton);
413 }
414 
415 static TGGC* selectContext() {
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());
421  //s_context->SetForeground(gVirtualX->GetPixel(kBlue+2));
422  }
423  return s_context;
424 }
425 
427  const TGPicture* picture = nullptr;
428  const TGPicture* down = nullptr;
429  const TGPicture* disabled = nullptr;
430 
431  if (m_collectionShown) {
432  picture = arrow_right(!m_backgroundIsWhite);
435  m_collectionShown = false;
436  HideFrame(m_tableWidget);
437  m_hints->SetLayoutHints(kLHintsExpandX);
438  } else {
439  picture = arrow_down(!m_backgroundIsWhite);
442  m_collectionShown = true;
443 
444  if (nullptr == m_tableManager) {
445  GCValues_t t = *(GetWhiteGC().GetAttributes());
446  t.fFont = gClient->GetResourcePool()->GetIconFont()->GetFontHandle();
447  m_tableContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&t, kTRUE);
448 
449  TGGC* hilightContext = selectContext();
452  m_tableWidget->SetHeaderBackgroundColor(fClient->GetResourcePool()->GetFrameGC()->GetBackground());
453  colorTable();
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",
457  this,
458  "modelSelected(Int_t,Int_t,Int_t,Int_t,Int_t)");
459 
460  MapSubwindows();
461  Layout();
462  }
463  ShowFrame(m_tableWidget);
464  m_hints->SetLayoutHints(kLHintsExpandX | kLHintsExpandY);
465  //NOTE: if I don't do the resize then the vertical scrollbars for the table are
466  // messed up when the number of entries in the table can be fully scene but
467  // a scrollbar is still added which thinks only a tiny area of the list can be seen
468  m_tableWidget->Resize(m_tableWidget->GetWidth(), m_tableWidget->GetHeight());
469  }
470 
471  if (nullptr != m_parent) {
472  m_parent->Layout();
473  }
475 }
476 
478  if (nullptr == m_colorPopup) {
479  std::vector<Color_t> colors;
481 
482  m_colorPopup = new FWColorPopup(gClient->GetDefaultRoot(), m_collection->defaultDisplayProperties().color());
484  m_colorPopup->Connect("ColorSelected(Color_t)", "FWCollectionSummaryWidget", this, "colorChangeRequested(Color_t)");
485  }
486 }
487 
490  m_indexForColor = -1;
491 
493  Window_t wdummy;
494  Int_t ax, ay;
495  gVirtualX->TranslateCoordinates(m_colorSelectWidget->GetId(),
496  gClient->GetDefaultRoot()->GetId(),
497  0,
498  m_colorSelectWidget->GetHeight(),
499  ax,
500  ay,
501  wdummy);
502  m_colorPopup->SetName(m_collection->name().c_str());
503  std::vector<Color_t> colors;
507  m_colorPopup->PlacePopup(ax, ay, m_colorPopup->GetDefaultWidth(), m_colorPopup->GetDefaultHeight());
508 }
509 
510 void FWCollectionSummaryWidget::itemColorClicked(int iIndex, Int_t iRootX, Int_t iRootY) {
512  m_indexForColor = iIndex;
513 
515  std::vector<Color_t> colors;
518  m_colorPopup->SetName(m_collection->modelName(iIndex).c_str());
520  m_colorPopup->PlacePopup(iRootX, iRootY, m_colorPopup->GetDefaultWidth(), m_colorPopup->GetDefaultHeight());
521 }
522 
523 void FWCollectionSummaryWidget::modelSelected(Int_t iRow, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY) {
524  if (iKeyMod & kKeyControlMask) {
525  m_collection->toggleSelect(iRow);
526  } else {
529  m_collection->select(iRow);
530  }
531  if (iButton == kButton3) {
532  requestForModelContextMenu(iGlobalX, iGlobalY);
533  }
534 }
535 
537  Emit("requestForInfo(FWEventItem*)", reinterpret_cast<long>(iItem));
538 }
539 
541  Emit("requestForFilter(FWEventItem*)", reinterpret_cast<long>(iItem));
542 }
543 
545  Emit("requestForErrorInfo(FWEventItem*)", reinterpret_cast<long>(iItem));
546 }
547 
549  Emit("requestForController(FWEventItem*)", reinterpret_cast<long>(iItem));
550 }
551 
552 void FWCollectionSummaryWidget::requestForModelContextMenu(Int_t iGlobalX, Int_t iGlobalY) {
553  Long_t args[2];
554  args[0] = static_cast<Long_t>(iGlobalX);
555  args[1] = static_cast<Long_t>(iGlobalY);
556  Emit("requestForModelContextMenu(Int_t,Int_t)", args);
557 }
558 
560  if (!m_collection->itemIsSelected()) {
561  //NOTE: Want to be sure if models are selected then their collection is also selected
564  }
566 }
567 
569  if (!m_collection->itemIsSelected()) {
570  //NOTE: Want to be sure if models are selected then their collection is also selected
573  }
575 }
576 
578  if (!m_collection->itemIsSelected()) {
579  //NOTE: Want to be sure if models are selected then their collection is also selected
582  }
584 }
585 
587  if (iToWhite == m_backgroundIsWhite) {
588  return;
589  }
590  Pixel_t bc = 0x000000;
591  Pixel_t fg = 0xffffff;
592  if (iToWhite) {
593  bc = 0xffffff;
594  fg = 0x000000;
595  m_backgroundIsWhite = true;
596  SetBackgroundColor(kWidgetColorLight);
597  m_isVisibleButton->setNormCG(GetBlackGC()());
598  m_colorSelectWidget->setNormCG(GetBlackGC()());
599  selectContext()->SetForeground(0xafafFF);
600  } else {
601  m_backgroundIsWhite = false;
602  SetBackgroundColor(kWidgetColor);
603  m_isVisibleButton->setNormCG(GetWhiteGC()());
604  m_colorSelectWidget->setNormCG(GetWhiteGC()());
605  selectContext()->SetForeground(gClient->GetResourcePool()->GetSelectedGC()->GetBackground());
606  }
607  //this forces the icons to be changed to the correct background
608  itemChanged();
609  m_graphicsContext->SetForeground(gVirtualX->GetPixel(m_collection->defaultDisplayProperties().color()));
610  {
611  const TGPicture* picture = info(!m_backgroundIsWhite);
612  const TGPicture* over = info_over(!m_backgroundIsWhite);
613  const TGPicture* disabled = info_disabled(!m_backgroundIsWhite);
614  m_infoButton->swapIcons(picture, over, disabled);
615  }
616  if (m_collectionShown) {
617  const TGPicture* picture = arrow_down(!m_backgroundIsWhite);
618  const TGPicture* down = arrow_down_disabled(!m_backgroundIsWhite);
619  const TGPicture* disabled = arrow_down_disabled(!m_backgroundIsWhite);
621  } else {
622  const TGPicture* picture = arrow_right(!m_backgroundIsWhite);
623  const TGPicture* down = arrow_right_disabled(!m_backgroundIsWhite);
626  }
627  colorTable();
628  m_holder->SetBackgroundColor(bc);
630  m_label->SetTextColor(fg);
631  m_isVisibleButton->SetBackgroundColor(bc);
632  m_colorSelectWidget->SetBackgroundColor(bc);
633  fClient->NeedRedraw(m_isVisibleButton);
634  fClient->NeedRedraw(m_colorSelectWidget);
635  fClient->NeedRedraw(m_holder);
636  fClient->NeedRedraw(this);
637 }
638 
640  if (nullptr == m_tableWidget) {
641  return;
642  }
643  if (m_backgroundIsWhite) {
646  m_tableContext->SetForeground(0x000000);
647  } else {
650  m_tableContext->SetForeground(0xffffff);
651  }
652 }
653 //
654 // const member functions
655 //
656 
657 //
658 // static member functions
659 //
660 
static const TString & coreIcondir()
void Resize(UInt_t w, UInt_t h) override
void setColor(Color_t iColor)
static const TGPicture * info(bool iBackgroundIsBlack)
void InitContent(const char *name, const std::vector< Color_t > &colors, bool backgroundIsBlack=true)
FWCollectionSummaryWidget(TGFrame *iParent, FWEventItem &iItem, TGLayoutHints *)
bool isChecked() const
string disabled
Definition: mps_check.py:68
static const TGPicture * arrow_down(bool iBackgroundIsBlack)
bool itemIsSelected() const
Definition: FWEventItem.cc:537
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
void SetHeaderBackgroundColor(Pixel_t)
static TGGC * selectContext()
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
const std::string & errorMessage() const
returns error string if there was a problem this event
Definition: FWEventItem.cc:541
void SetName(const char *iName) override
static const TGPicture * alert(bool iBackgroundIsBlack)
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:64
void select(int iIndex) const
Definition: FWEventItem.cc:224
void SetLineSeparatorColor(Pixel_t)
static const TGPicture * alert_over(bool iBackgroundIsBlack)
static const TGPicture * arrow_right(bool iBackgroundIsBlack)
BackgroundColorIndex backgroundColorIndex() const
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
void setDefaultDisplayProperties(const FWDisplayProperties &)
Definition: FWEventItem.cc:138
std::string modelName(int iIndex) const
Definition: FWEventItem.cc:471
ClassImp(FWCollectionSummaryWidget)
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
static const TGPicture * filtered(bool iBackgroundIsBlack)
static const TGPicture * unfiltered_over(bool iBackgroundIsBlack)
void itemColorClicked(int iIndex, Int_t iRootX, Int_t iRootY)
bool hasError() const
returns true if failed to get data for this event
Definition: FWEventItem.cc:539
FWCustomIconsButton * m_showHideButton
FWItemChangeSignal itemChanged_
Definition: FWEventItem.h:181
static const TGPicture * info_disabled(bool iBackgroundIsBlack)
const std::string & filterExpression() const
Definition: FWEventItem.cc:491
FWCollectionSummaryWidgetConnectionHolder * m_connectionHolder
void ResetColors(const std::vector< Color_t > &colors, bool backgroundIsBlack=true)
void SetSelection(Color_t)
void setChecked(bool iChecked)
void SetBackgroundColor(Pixel_t) override
static const TGPicture * filtered_over(bool iBackgroundIsBlack)
void selectItem()
Definition: FWEventItem.cc:514
static void setLabelBackgroundColor(TGTextButton *iLabel, bool iIsSelected, bool iBackgroundIsWhite)
const std::string & name() const
Definition: FWEventItem.cc:435
void setNormCG(GContext_t)
static const TGPicture * info_over(bool iBackgroundIsBlack)
const Int_t colors[8]
Definition: colors.py:1
static const unsigned long kWidgetColor
static const TGPicture * arrow_down_disabled(bool iBackgroundIsBlack)
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
Definition: FWEventItem.cc:247
float x
static const unsigned long kWidgetColorLight
void swapIcons(const TGPicture *&iUpIcon, const TGPicture *&iDownIcon, const TGPicture *&iDisabledIcon)
FWColorManager * colorManager() const
Definition: FWEventItem.h:126
static const TGPicture * arrow_right_disabled(bool iBackgroundIsBlack)
void setIsVisible(bool iSet)
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
void fillLimitedColors(std::vector< Color_t > &cv) const
void modelSelected(Int_t iRow, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY)
void colorChangeRequested(Color_t iColorIndex)
FWCollectionSummaryTableManager * m_tableManager
void requestForModelContextMenu(Int_t, Int_t)
static const TGPicture * unfiltered(bool iBackgroundIsBlack)
void toggleSelect(int iIndex) const
Definition: FWEventItem.cc:236
void setColor(GContext_t iColorContext)
FWItemChangeSignal filterChanged_
Definition: FWEventItem.h:193