26 m_caughtExceptionInCellRender(
false)
39 m_rowFillContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gc,kTRUE);
67 std::vector<std::string>
ret;
69 for (
unsigned int i = 0;
i <
n; ++
i) {
96 fwLog(
fwlog::kError) <<
"Error: caught exception in the cell renderer while evaluating an expression. Return -999. Error is suppressed in future\n";
106 snprintf(s,
sizeof(s),
"%d",
int(rint(ret)));
109 snprintf(s,
sizeof(s),
"0x%x",
int(rint(ret)));
112 snprintf(s,
sizeof(s),
int(rint(ret)) != 0 ?
"true" :
"false");
115 snprintf(fs,
sizeof(fs),
"%%.%df", precision);
116 snprintf(s,
sizeof(s), fs, ret);
123 SetForeground(gVirtualX->GetPixel(kWhite));
126 SetForeground(gVirtualX->GetPixel(kBlack));
138 SetForeground(0xffffff);
150 bool operator () (
const std::pair<bool, double> &i1,
151 const std::pair<bool, double> &i2)
154 if (i1.first and not i2.first)
156 if (i2.first and not i1.first)
159 else return i1.second > i2.second;
163 bool operator () (
const std::pair<bool, double> &i1,
164 const std::pair<bool, double> &i2)
167 if (i1.first and not i2.first)
169 if (i2.first and not i1.first)
172 else return i1.second < i2.second;
178 const std::vector<FWExpressionEvaluator> &evaluators,
179 std::multimap<std::pair<bool, double>,
int, S>& iMap,
180 std::vector<int>& oNewSort)
191 iMap.insert(std::make_pair(
196 std::vector<int>::iterator itVec = oNewSort.begin();
197 for(
typename std::multimap<std::pair<bool, double>,
int,S>::iterator
209 static const bool sort_down =
true;
214 if (iSortOrder == sort_down) {
215 std::multimap<std::pair<bool, double>, int, itemOrderGt>
s;
218 std::multimap<std::pair<bool, double>, int, itemOrderLt>
s;
229 std::vector<int> visible;
231 std::vector<int> invisible;
237 visible.push_back(
i);
238 else invisible.push_back(
i);
241 visible.begin(), visible.end());
243 invisible.begin(), invisible.end());
259 if(0==item) {
return;}
262 for (std::vector<FWTableViewManager::TableEntry>::const_iterator
289 SetForeground(gVirtualX->GetPixel(kWhite));
292 SetForeground(gVirtualX->GetPixel(kBlack));
296 displayProperties().color()));
302 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
const TClass * modelType() const
const void * modelData(int iIndex) const
ModelInfo modelInfo(int iIndex) const
tuple size
Write out results.
bool m_caughtExceptionInCellRender