16 #include "TGScrollBar.h"
17 #include "TGTableLayout.h"
18 #include "TGResourcePool.h"
45 m_bodyTable(iManager),
50 m_showingVSlider(
true),
51 m_showingHSlider(
true),
53 m_descendingSort(
true),
55 m_headerBackground(0),
56 m_headerForeground(0),
59 SetLayoutManager(
new TGTableLayout(
this,3,3) );
64 if (
m_bodyTable->
cellDataIsSortable())
m_header->Connect(
"buttonReleased(Int_t,Int_t,Event_t*,Int_t,Int_t)",
"FWTableWidget",
this,
"buttonReleasedInHeader(Int_t,Int_t,Event_t*,Int_t,Int_t)");
69 m_body->Connect(
"buttonReleased(Int_t,Int_t,Event_t*,Int_t,Int_t)",
"FWTableWidget",
this,
"buttonReleasedInBody(Int_t,Int_t,Event_t*,Int_t,Int_t)");
75 for(std::vector<unsigned int>::iterator it = columnWidths.begin(), itEnd=columnWidths.end(), itHeader=headerWidths.begin();
92 m_rowHeader->Connect(
"buttonReleased(Int_t,Int_t,Event_t*,Int_t,Int_t)",
"FWTableWidget",
this,
"buttonReleasedInBody(Int_t,Int_t,Event_t*,Int_t,Int_t)");
93 m_rowHeader->Connect(
"buttonReleased(Int_t,Int_t,Event_t*,Int_t,Int_t)",
"FWTableWidget",
this,
"buttonReleasedInRowHeader(Int_t,Int_t,Event_t*,Int_t,Int_t)");
99 m_hSlider->Connect(
"ProcessedEvent(Event_t*)",
"FWTableWidget",
this,
"childrenEvent(Event_t *)");
103 m_vSlider->Connect(
"ProcessedEvent(Event_t*)",
"FWTableWidget",
this,
"childrenEvent(Event_t *)");
111 m_hSlider->SetEditDisabled(kEditDisable | kEditDisableGrab | kEditDisableBtnEnable);
112 m_vSlider->SetEditDisabled(kEditDisable | kEditDisableGrab | kEditDisableBtnEnable);
113 m_bodyTable->Connect(
"dataChanged()",
"FWTableWidget",
this,
"dataChanged()");
131 gClient->GetResourcePool()->GetGCPool()->FreeGC(
m_lineSeparator->GetGC());
168 TGFrame::SetBackgroundColor(iColor);
174 m_header->SetBackgroundColor(iColor);
177 m_body->SetBackgroundColor(iColor);
178 fClient->NeedRedraw(
m_body);
179 fClient->NeedRedraw(
this);
186 GCValues_t
t = *(gClient->GetResourcePool()->GetFrameGC()->GetAttributes());
198 GCValues_t
t = *(gClient->GetResourcePool()->GetFrameGC()->GetAttributes());
211 GCValues_t
t = *(gClient->GetResourcePool()->GetFrameGC()->GetAttributes());
212 m_lineSeparator = gClient->GetResourcePool()->GetGCPool()->GetGC(&t,kTRUE);
226 TGCompositeFrame::Resize(w,h);
233 bool redoLayout=
false;
236 UInt_t fullWidth = def.fWidth;
243 headerHeight =
m_header->GetHeight();
245 UInt_t fullHeight = def.fHeight + headerHeight;
249 if (sBarWidth == 0 && sBarHeight > 0 && h < fullHeight + sBarHeight)
251 else if (sBarHeight == 0 && sBarWidth > 0 && h < fullWidth + sBarWidth)
253 fullWidth += sBarWidth;
254 fullHeight += sBarHeight;
298 if(w != GetWidth() || h != GetHeight()) {
301 TGCompositeFrame::MoveResize(x,y,w,h);
309 switch (GET_MSG(msg)) {
311 switch (GET_SUBMSG(msg)) {
312 case kSB_SLIDERTRACK:
323 switch (GET_SUBMSG(msg)) {
324 case kSB_SLIDERTRACK:
343 Int_t btn =
event->fCode;
344 Int_t keyMod =
event->fState;
346 if (btn == kButton1 || btn == kButton3) {
359 Int_t btn =
event->fCode;
360 Int_t keyMod =
event->fState;
382 if(btn != kButton1 && btn != kButton3) {
return;}
383 if(row>=-1 and row < m_bodyTable->numberOfRows()) {
384 Int_t globalX,globalY;
386 gVirtualX->TranslateCoordinates(
m_body->GetId(),
387 gClient->GetDefaultRoot()->GetId(),
388 event->fX,
event->fY,globalX,globalY,childdum);
397 keyMod = (keyMod&(kKeyShiftMask|kKeyControlMask));
401 args[1]=(Long_t)column;
403 args[3]=(Long_t)keyMod;
404 args[4]=(Long_t)iGlobalX;
405 args[5]=(Long_t)iGlobalY;
406 Emit(
"cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)",args);
424 keyMod = (keyMod&(kKeyShiftMask|kKeyControlMask));
429 args[2]=(Long_t)keyMod;
430 args[3]=(Long_t)iGlobalX;
431 args[4]=(Long_t)iGlobalY;
432 Emit(
"rowClicked(Int_t,Int_t,Int_t,Int_t,Int_t)",args);
438 keyMod = (keyMod&(kKeyShiftMask|kKeyControlMask));
441 args[0]=(Long_t)column;
443 args[2]=(Long_t)keyMod;
444 Emit(
"columnClicked(Int_t,Int_t,Int_t)",args);
463 for(std::vector<unsigned int>::iterator it = columnWidths.begin(), itEnd=columnWidths.end(), itHeader=headerWidths.begin();
466 if(*itHeader > *it) {
475 bool layoutDoneByhandleResize =
handleResize(GetWidth(), GetHeight());
476 if (needs_layout && ! layoutDoneByhandleResize)
480 gClient->NeedRedraw(
m_body);
489 Int_t btn =
event->fCode;
490 if(btn != kButton1 && btn != kButton3) {
return;}
496 Int_t btn =
event->fCode;
497 if(btn != kButton1 && btn != kButton3) {
return;}
507 TGDimension returnValue;
509 returnValue.fHeight +=
m_header->GetDefaultHeight();
512 returnValue.fWidth +=
m_rowHeader->GetDefaultWidth();
515 returnValue.fHeight +=
m_hSlider->GetDefaultHeight();
516 returnValue.fWidth +=
m_vSlider->GetDefaultWidth();
virtual bool cellDataIsSortable() const
void sort(int iCol, bool iSortOrder)
Call to have table sorted on values in column iCol with the sort order being descending if iSortOrder...
virtual int unsortedRowNumber(int iSortedRowNumber) const =0
when passed the index to the sorted order of the rows it returns the original row number from the und...
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void buttonReleasedInRowHeader(Int_t row, Event_t *event, Int_t relX, Int_t relY)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.