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)
const 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)
const 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(
nullptr==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;
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.
FWFramedTextTableCellRenderer * m_rowRenderer
std::vector< int > m_sortedToUnsortedIndices
int numberOfColumns() const override
Number of columns in the table.
void setData(const std::string &)
int unsortedRowNumber(int iSortedRowNumber) const override
std::vector< std::string > getTitles() const override
returns the title names for each column
std::vector< FWTableViewManager::TableEntry > * m_tableFormats
FWTableCellRendererBase * rowHeader(int iSortedRowNumber) const override
Returns the renderer for the row header for the sorted row number iSortedRowNumber.
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
FWColorManager & colorManager() const
~FWTableViewTableManager() override
std::vector< FWExpressionEvaluator > m_evaluators
void implSort(int iCol, bool iSortOrder) override
const Items & items() const
const FWEventItem * item() const
FWTableWidget * m_tableWidget
void setGraphicsContext(const TGGC *iContext)
FWTextTableCellRenderer * m_renderer
const FWTableView * m_view
void setData(const std::string &, bool isSelected)
TGGC * m_highlightContext
int numberOfRows() const override
Number of rows in the table.
const TClass * modelType() const
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
const void * modelData(int iIndex) const
ModelInfo modelInfo(int iIndex) const
bool hasRowHeaders() const override
require all cells to be the same height
bool m_caughtExceptionInCellRender