25 m_caughtExceptionInCellRender(
false)
38 m_rowFillContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gc,kTRUE);
66 std::vector<std::string>
ret;
68 for (
unsigned int i = 0;
i <
n; ++
i) {
95 fwLog(
fwlog::kError) <<
"Error: caught exception in the cell renderer while evaluating an expression. Return -999. Error is suppressed in future\n";
105 snprintf(s,
sizeof(s),
"%d",
int(rint(ret)));
108 snprintf(s,
sizeof(s),
"0x%x",
int(rint(ret)));
111 snprintf(s,
sizeof(s),
int(rint(ret)) != 0 ?
"true" :
"false");
114 snprintf(fs,
sizeof(fs),
"%%.%df", precision);
115 snprintf(s,
sizeof(s), fs, ret);
122 SetForeground(gVirtualX->GetPixel(kWhite));
125 SetForeground(gVirtualX->GetPixel(kBlack));
137 SetForeground(0xffffff);
149 bool operator () (
const std::pair<bool, double> &i1,
150 const std::pair<bool, double> &i2)
153 if (i1.first and not i2.first)
155 if (i2.first and not i1.first)
158 else return i1.second > i2.second;
162 bool operator () (
const std::pair<bool, double> &i1,
163 const std::pair<bool, double> &i2)
166 if (i1.first and not i2.first)
168 if (i2.first and not i1.first)
171 else return i1.second < i2.second;
177 const std::vector<FWExpressionEvaluator> &evaluators,
178 std::multimap<std::pair<bool, double>,
int,
S>& iMap,
179 std::vector<int>& oNewSort)
190 iMap.insert(std::make_pair(
195 std::vector<int>::iterator itVec = oNewSort.begin();
196 for(
typename std::multimap<std::pair<bool, double>,
int,
S>::iterator
208 static const bool sort_down =
true;
213 if (iSortOrder == sort_down) {
214 std::multimap<std::pair<bool, double>, int, itemOrderGt>
s;
217 std::multimap<std::pair<bool, double>, int, itemOrderLt>
s;
228 std::vector<int> visible;
230 std::vector<int> invisible;
236 visible.push_back(
i);
237 else invisible.push_back(
i);
240 visible.begin(), visible.end());
242 invisible.begin(), invisible.end());
258 if(0==item) {
return;}
261 for (std::vector<FWTableViewManager::TableEntry>::const_iterator
288 SetForeground(gVirtualX->GetPixel(kWhite));
291 SetForeground(gVirtualX->GetPixel(kBlack));
295 displayProperties().color()));
301 std::ostringstream
s;
virtual FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const
FWTableViewTableManager(const FWTableView *)
Color_t background() const
const FWDisplayProperties & displayProperties() const
FWTableViewManager * m_manager
void dataChanged()
Called if mouse button pressed in Row Header, defaults is to do nothing.
virtual int unsortedRowNumber(int iSortedRowNumber) const
virtual int numberOfRows() const
Number of rows in the table.
FWFramedTextTableCellRenderer * m_rowRenderer
std::vector< int > m_sortedToUnsortedIndices
void setData(const std::string &)
std::vector< FWTableViewManager::TableEntry > * m_tableFormats
virtual std::vector< std::string > getTitles() const
returns the title names for each column
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
FWColorManager & colorManager() const
virtual int numberOfColumns() const
Number of columns in the table.
std::vector< FWExpressionEvaluator > m_evaluators
const Items & items() const
virtual bool hasRowHeaders() const
require all cells to be the same height
virtual ~FWTableViewTableManager()
const FWEventItem * item() const
FWTableWidget * m_tableWidget
virtual void implSort(int iCol, bool iSortOrder)
void setGraphicsContext(const TGGC *iContext)
virtual FWTableCellRendererBase * rowHeader(int iSortedRowNumber) const
Returns the renderer for the row header for the sorted row number iSortedRowNumber.
FWTextTableCellRenderer * m_renderer
const FWTableView * m_view
void setData(const std::string &, bool isSelected)
TGGC * m_highlightContext
double S(const TLorentzVector &, const TLorentzVector &)
const TClass * modelType() const
volatile std::atomic< bool > shutdown_flag false
const void * modelData(int iIndex) const
ModelInfo modelInfo(int iIndex) const
tuple size
Write out results.
bool m_caughtExceptionInCellRender