25 m_caughtExceptionInCellRender(
false) {
36 m_rowFillContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gc, kTRUE);
57 std::vector<std::string>
ret;
59 for (
unsigned int i = 0;
i <
n; ++
i) {
82 fwLog(
fwlog::kError) <<
"Error: caught exception in the cell renderer while evaluating an expression. Return " 83 "-999. Error is suppressed in future\n";
93 snprintf(s,
sizeof(s),
"%d",
int(rint(ret)));
96 snprintf(s,
sizeof(s),
"0x%x",
int(rint(ret)));
99 snprintf(s,
sizeof(s),
int(rint(ret)) != 0 ?
"true" :
"false");
102 snprintf(fs,
sizeof(fs),
"%%.%df", precision);
103 snprintf(s,
sizeof(s), fs, ret);
134 bool operator()(
const std::pair<bool, double> &
i1,
const std::pair<bool, double> &
i2)
const {
136 if (i1.first and not i2.first)
138 if (i2.first and not i1.first)
142 return i1.second > i2.second;
146 bool operator()(
const std::pair<bool, double> &
i1,
const std::pair<bool, double> &
i2)
const {
148 if (i1.first and not i2.first)
150 if (i2.first and not i1.first)
154 return i1.second < i2.second;
157 template <
typename S>
160 const std::vector<FWExpressionEvaluator> &evaluators,
161 std::multimap<std::pair<bool, double>,
int,
S> &iMap,
162 std::vector<int> &oNewSort) {
174 std::vector<int>::iterator itVec = oNewSort.begin();
175 for (
typename std::multimap<std::pair<bool, double>,
int,
S>::iterator it = iMap.begin(), itEnd = iMap.end();
184 static const bool sort_down =
true;
189 if (iSortOrder == sort_down) {
190 std::multimap<std::pair<bool, double>,
int, itemOrderGt>
s;
193 std::multimap<std::pair<bool, double>,
int, itemOrderLt>
s;
202 std::vector<int> visible;
204 std::vector<int> invisible;
210 visible.push_back(
i);
212 invisible.push_back(
i);
230 if (
nullptr == item) {
235 for (std::vector<FWTableViewManager::TableEntry>::const_iterator
i =
m_tableFormats->begin(),
266 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
ret
prodAgent to be discontinued
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