#include <Fireworks/Core/interface/FWGeometryTableManagerBase.h>
Classes | |
class | ColorBoxRenderer |
struct | NodeInfo |
Public Types | |
enum | Bits { kExpanded = BIT(0), kVisNodeSelf = BIT(1), kVisNodeChld = BIT(2), kHighlighted = BIT(3), kSelected = BIT(4) } |
typedef Entries_v::iterator | Entries_i |
typedef std::vector< NodeInfo > | Entries_v |
Public Member Functions | |
void | applyTransparencyFromEditor () |
void | cancelEditor (bool) |
virtual bool | cellDataIsSortable () const |
virtual const char * | cellName (const NodeInfo &) const |
bool | firstColumnClicked (int row, int xPos) |
FWGeometryTableManagerBase () | |
FWGeometryTableManagerBase (const FWGeometryTableManagerBase &) | |
int | getLevelOffset () const |
void | getNodeMatrix (const NodeInfo &nodeInfo, TGeoHMatrix &mat) const |
void | getNodePath (int, std::string &) const |
NodeInfo * | getSelected () |
virtual std::vector< std::string > | getTitles () const |
returns the title names for each column | |
virtual bool | getVisibility (const NodeInfo &nodeInfo) const |
virtual bool | getVisibilityChld (const NodeInfo &nodeInfo) const |
virtual void | implSort (int, bool) |
Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'. | |
void | loadGeometry (TGeoNode *, TObjArray *) |
bool | nodeImported (int idx) const |
virtual int | numberOfRows () const |
Number of rows in the table. | |
const FWGeometryTableManagerBase & | operator= (const FWGeometryTableManagerBase &) |
virtual void | recalculateVisibility ()=0 |
void | redrawTable (bool setExpand=false) |
Entries_v & | refEntries () |
NodeInfo & | refEntry (int i) |
std::vector< int > | rowToIndex () |
void | setBackgroundToWhite (bool) |
void | setCellValueEditor (TGTextEntry *editor) |
virtual void | setDaughtersSelfVisibility (int selectedIdx, bool v) |
void | setDaughtersSelfVisibility (bool) |
void | setLevelOffset (int x) |
virtual void | setVisibility (NodeInfo &, bool) |
virtual void | setVisibilityChld (NodeInfo &, bool) |
void | showEditor (int) |
virtual const std::string | title () const |
virtual int | unsortedRowNumber (int unsorted) const |
when passed the index to the sorted order of the rows it returns the original row number from the underlying data | |
virtual | ~FWGeometryTableManagerBase () |
Static Public Member Functions | |
static void | getNNodesTotal (TGeoNode *geoNode, int &off) |
Public Attributes | |
ColorBoxRenderer | m_colorBoxRenderer |
TGTextEntry * | m_editor |
int | m_editTransparencyIdx |
Entries_v | m_entries |
TGGC * | m_highlightContext |
int | m_highlightIdx |
int | m_levelOffset |
FWTextTreeCellRenderer | m_renderer |
std::vector< int > | m_row_to_index |
Protected Member Functions | |
virtual bool | nodeIsParent (const NodeInfo &) const |
Friends | |
class | FWGeometryTableViewBase |
Description: [one line class summary]
Usage: <usage>
Definition at line 37 of file FWGeometryTableManagerBase.h.
typedef Entries_v::iterator FWGeometryTableManagerBase::Entries_i |
Definition at line 86 of file FWGeometryTableManagerBase.h.
typedef std::vector<NodeInfo> FWGeometryTableManagerBase::Entries_v |
Definition at line 85 of file FWGeometryTableManagerBase.h.
Definition at line 44 of file FWGeometryTableManagerBase.h.
{ kExpanded = BIT(0), kVisNodeSelf = BIT(1), kVisNodeChld = BIT(2), kHighlighted = BIT(3), kSelected = BIT(4) };
FWGeometryTableManagerBase::FWGeometryTableManagerBase | ( | ) |
Definition at line 103 of file FWGeometryTableManagerBase.cc.
References FWTextTableCellRenderer::height(), m_colorBoxRenderer, FWGeometryTableManagerBase::ColorBoxRenderer::m_height, m_highlightContext, m_renderer, FWGeometryTableManagerBase::ColorBoxRenderer::m_width, and FWTextTableCellRenderer::setHighlightContext().
: m_highlightIdx(-1), m_levelOffset(0), m_editor(0), m_editTransparencyIdx(-1) { m_colorBoxRenderer.m_width = 50; m_colorBoxRenderer.m_height = m_renderer.height(); GCValues_t gval; gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures; gval.fForeground = gVirtualX->GetPixel(kGray);//gClient->GetResourcePool()->GetFrameHiliteColor(); gval.fBackground = gVirtualX->GetPixel(kWhite);//gClient->GetResourcePool()->GetFrameBgndColor(); gval.fFillStyle = kFillOpaqueStippled; // kFillTiled; gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap(); gval.fGraphicsExposures = kFALSE; m_highlightContext = gClient->GetGC(&gval, kTRUE); m_renderer.setHighlightContext( m_highlightContext); }
FWGeometryTableManagerBase::~FWGeometryTableManagerBase | ( | ) | [virtual] |
Definition at line 125 of file FWGeometryTableManagerBase.cc.
{ }
FWGeometryTableManagerBase::FWGeometryTableManagerBase | ( | const FWGeometryTableManagerBase & | ) |
void FWGeometryTableManagerBase::applyTransparencyFromEditor | ( | ) |
Definition at line 278 of file FWGeometryTableManagerBase.cc.
References cancelEditor(), fwLog, fwlog::kError, m_editor, m_editTransparencyIdx, m_entries, and lumiQTWidget::t.
Referenced by FWGeometryTableViewBase::transparencyChanged().
{ if ( m_editTransparencyIdx >= 0) { using boost::lexical_cast; using boost::bad_lexical_cast; try { int t = lexical_cast<int>(m_editor->GetText()); if (t > 100 || t < 0 ) { fwLog(fwlog::kError) << "Transparency must be set in procentage [0-100]."; return; } m_entries[m_editTransparencyIdx].m_transparency = 100 - t; cancelEditor(true); } catch (bad_lexical_cast &) { fwLog(fwlog::kError) << "Bad Lexical cast. Transparency must be set in procentage [0-100]."; } } }
void FWGeometryTableManagerBase::cancelEditor | ( | bool | redraw | ) |
Definition at line 300 of file FWGeometryTableManagerBase.cc.
References m_editor, m_editTransparencyIdx, and redrawTable().
Referenced by applyTransparencyFromEditor(), and FWGeometryTableViewBase::cellClicked().
{ m_editTransparencyIdx = -1; if ( m_editor->IsMapped()) { m_editor->UnmapWindow(); if (redraw) redrawTable(); } }
virtual bool FWGeometryTableManagerBase::cellDataIsSortable | ( | ) | const [inline, virtual] |
Reimplemented from FWTableManagerBase.
Definition at line 184 of file FWGeometryTableManagerBase.h.
References funct::false.
{ return false ; }
virtual const char* FWGeometryTableManagerBase::cellName | ( | const NodeInfo & | ) | const [inline, virtual] |
Reimplemented in FWGeometryTableManager.
Definition at line 118 of file FWGeometryTableManagerBase.h.
{ return 0;}
bool FWGeometryTableManagerBase::firstColumnClicked | ( | int | row, |
int | xPos | ||
) |
Definition at line 172 of file FWGeometryTableManagerBase.cc.
References FWTableManagerBase::dataChanged(), kExpanded, m_entries, m_levelOffset, recalculateVisibility(), rowToIndex(), and FWTableManagerBase::visualPropertiesChanged().
Referenced by FWGeometryTableViewBase::cellClicked().
{ if (row == -1) return false; int idx = rowToIndex()[row]; // printf("click %s \n", m_entries[idx].name()); int off = 0; if (idx >= 0) off = (m_entries[idx].m_level - m_levelOffset)* 20; // printf("compare %d %d level %d\n" , xPos, off, idx); if (xPos > off && xPos < (off + 20)) { m_entries[idx].switchBit(kExpanded); recalculateVisibility(); dataChanged(); visualPropertiesChanged(); return false; } return true; }
int FWGeometryTableManagerBase::getLevelOffset | ( | ) | const [inline] |
Definition at line 150 of file FWGeometryTableManagerBase.h.
References m_levelOffset.
Referenced by FWEveDetectorGeo::Paint().
{ return m_levelOffset; }
void FWGeometryTableManagerBase::getNNodesTotal | ( | TGeoNode * | geoNode, |
int & | off | ||
) | [inline, static] |
Definition at line 205 of file FWGeometryTableManagerBase.h.
References i.
Referenced by FWOverlapTableManager::addOverlapEntry(), FWGeometryTableManager::importChildren(), FWGeometryTableManager::loadGeometry(), FWEveDetectorGeo::paintChildNodesRecurse(), FWEveOverlap::paintChildNodesRecurse(), FWGeometryTableManager::recalculateVisibilityNodeRec(), FWOverlapTableManager::recalculateVisibilityNodeRec(), FWGeometryTableManager::recalculateVisibilityVolumeRec(), FWOverlapTableView::refreshTable3D(), FWGeometryTableManager::setDaughtersSelfVisibility(), FWOverlapTableManager::setDaughtersSelfVisibility(), and setDaughtersSelfVisibility().
{ int nD = geoNode->GetNdaughters(); off += nD; for (int i = 0; i < nD; ++i ) { getNNodesTotal(geoNode->GetDaughter(i), off); } }
void FWGeometryTableManagerBase::getNodeMatrix | ( | const NodeInfo & | nodeInfo, |
TGeoHMatrix & | mat | ||
) | const |
Definition at line 203 of file FWGeometryTableManagerBase.cc.
References m_entries, FWGeometryTableManagerBase::NodeInfo::m_node, and FWGeometryTableManagerBase::NodeInfo::m_parent.
Referenced by FWEveOverlap::Paint(), and FWEveDetectorGeo::Paint().
{ // utility used by browser and FWGeoNode // printf("================ FWGeometryTableManagerBase::getNodeMatri \n"); int pIdx = data.m_parent; while (pIdx > 0) { // printf("%s [%d]\n",m_entries.at(pIdx).name(), m_entries.at(pIdx).m_level ); mtx.MultiplyLeft(m_entries.at(pIdx).m_node->GetMatrix()); pIdx = m_entries.at(pIdx).m_parent; } // printf("right %s [%d]\n",data.name(), data.m_level ); mtx.Multiply(data.m_node->GetMatrix()); }
void FWGeometryTableManagerBase::getNodePath | ( | int | idx, |
std::string & | path | ||
) | const |
Definition at line 238 of file FWGeometryTableManagerBase.cc.
References i, m_entries, and mergeVDriftHistosByStation::name.
Referenced by FWGeometryTableViewBase::cdNode(), FWGeometryTableViewBase::cdUp(), and FWGeometryTableViewBase::chosenItem().
{ std::vector<std::string> relPath; while(idx >= 0) { relPath.push_back( m_entries[idx].name()); // printf("push %s \n",m_entries[idx].name() ); idx = m_entries[idx].m_parent; } size_t ns = relPath.size(); for (size_t i = 1; i < ns; ++i ) { path +="/"; path += relPath[ns-i -1]; // printf("push_back add to path %s\n", path.c_str()); } }
NodeInfo* FWGeometryTableManagerBase::getSelected | ( | ) |
std::vector< std::string > FWGeometryTableManagerBase::getTitles | ( | ) | const [virtual] |
returns the title names for each column
Implements FWTableManagerBase.
Reimplemented in FWOverlapTableManager.
Definition at line 141 of file FWGeometryTableManagerBase.cc.
References FWTableManagerBase::numberOfColumns().
{ std::vector<std::string> returnValue; returnValue.reserve(numberOfColumns()); returnValue.push_back("Name"); returnValue.push_back("Color"); returnValue.push_back("Opcty"); returnValue.push_back("RnrSelf"); returnValue.push_back("RnrChildren"); returnValue.push_back("Material"); return returnValue; }
bool FWGeometryTableManagerBase::getVisibility | ( | const NodeInfo & | nodeInfo | ) | const [virtual] |
Reimplemented in FWGeometryTableManager.
Definition at line 346 of file FWGeometryTableManagerBase.cc.
References kVisNodeSelf, and FWGeometryTableManagerBase::NodeInfo::testBit().
{ return data.testBit(kVisNodeSelf); }
bool FWGeometryTableManagerBase::getVisibilityChld | ( | const NodeInfo & | nodeInfo | ) | const [virtual] |
Reimplemented in FWGeometryTableManager.
Definition at line 351 of file FWGeometryTableManagerBase.cc.
References kVisNodeChld, and FWGeometryTableManagerBase::NodeInfo::testBit().
{ return data.testBit(kVisNodeChld); }
virtual void FWGeometryTableManagerBase::implSort | ( | int | iCol, |
bool | iSortOrder | ||
) | [inline, virtual] |
Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'.
Implements FWTableManagerBase.
Definition at line 135 of file FWGeometryTableManagerBase.h.
{}
void FWGeometryTableManagerBase::loadGeometry | ( | TGeoNode * | , |
TObjArray * | |||
) |
Reimplemented in FWGeometryTableManager.
bool FWGeometryTableManagerBase::nodeImported | ( | int | idx | ) | const |
virtual bool FWGeometryTableManagerBase::nodeIsParent | ( | const NodeInfo & | ) | const [inline, protected, virtual] |
Reimplemented in FWGeometryTableManager, and FWOverlapTableManager.
Definition at line 111 of file FWGeometryTableManagerBase.h.
{ return false; }
int FWGeometryTableManagerBase::numberOfRows | ( | ) | const [virtual] |
Number of rows in the table.
Implements FWTableManagerBase.
Definition at line 135 of file FWGeometryTableManagerBase.cc.
References m_row_to_index.
{ return m_row_to_index.size(); }
const FWGeometryTableManagerBase& FWGeometryTableManagerBase::operator= | ( | const FWGeometryTableManagerBase & | ) |
virtual void FWGeometryTableManagerBase::recalculateVisibility | ( | ) | [pure virtual] |
Implemented in FWGeometryTableManager, and FWOverlapTableManager.
Referenced by firstColumnClicked(), and redrawTable().
void FWGeometryTableManagerBase::redrawTable | ( | bool | setExpand = false | ) |
Definition at line 221 of file FWGeometryTableManagerBase.cc.
References FWTableManagerBase::dataChanged(), m_entries, recalculateVisibility(), and FWTableManagerBase::visualPropertiesChanged().
Referenced by FWGeometryTableView::autoExpandCallback(), cancelEditor(), FWGeometryTableViewBase::refreshTable3D(), FWGeometryTableViewBase::setColumnSelected(), and showEditor().
{ // std::cerr << "GeometryTableManagerBase::redrawTable ------------------------------------- \n"; if (m_entries.empty()) return; // if (setExpand) checkExpandLevel(); recalculateVisibility(); dataChanged(); visualPropertiesChanged(); }
Entries_v& FWGeometryTableManagerBase::refEntries | ( | ) | [inline] |
Definition at line 142 of file FWGeometryTableManagerBase.h.
References m_entries.
Referenced by FWGeometryTableViewBase::cdTop(), FWGeometryTableViewBase::cdUp(), FWGeometryTableViewBase::cellClicked(), FWGeometryTableViewBase::checkExpandLevel(), FWGeoMaterialValidator::fillOptions(), FWGeoTopNode::getFirstSelectedTableIndex(), FWEveDetectorGeo::GetHighlightTooltip(), FWEveOverlap::GetHighlightTooltip(), FWGeometryTableViewBase::nodeColorChangeRequested(), FWEveOverlap::Paint(), FWEveDetectorGeo::Paint(), FWGeoTopNode::paintShape(), FWOverlapTableView::refreshTable3D(), FWGeometryTableViewBase::reloadColors(), FWGeometryTableView::setPath(), FWGeoTopNode::SetStateOf(), FWGeometryTableViewBase::setTopNodePathFromConfig(), FWGeoTopNode::UnHighlighted(), FWGeoTopNode::UnSelected(), FWGeometryTableView::updateFilter(), and FWGeometryTableView::updateVisibilityTopNode().
{return m_entries;}
NodeInfo& FWGeometryTableManagerBase::refEntry | ( | int | i | ) | [inline] |
Definition at line 143 of file FWGeometryTableManagerBase.h.
Referenced by FWGeometryTableViewBase::chosenItem(), and FWGeometryTableViewBase::setColumnSelected().
std::vector<int> FWGeometryTableManagerBase::rowToIndex | ( | ) | [inline] |
Definition at line 132 of file FWGeometryTableManagerBase.h.
References m_row_to_index.
Referenced by FWGeometryTableViewBase::cellClicked(), and firstColumnClicked().
{ return m_row_to_index; }
void FWGeometryTableManagerBase::setBackgroundToWhite | ( | bool | iToWhite | ) |
Definition at line 161 of file FWGeometryTableManagerBase.cc.
References m_renderer, FWTextTreeCellRenderer::setBlackIcon(), and FWTextTableCellRenderer::setGraphicsContext().
Referenced by FWGeometryTableViewBase::setBackgroundColor().
{ if(iToWhite) { m_renderer.setGraphicsContext(&TGFrame::GetBlackGC()); } else { m_renderer.setGraphicsContext(&TGFrame::GetWhiteGC()); } m_renderer.setBlackIcon(iToWhite); }
void FWGeometryTableManagerBase::setCellValueEditor | ( | TGTextEntry * | editor | ) |
Definition at line 260 of file FWGeometryTableManagerBase.cc.
References idDealer::editor, m_editor, m_renderer, and FWTextTreeCellRenderer::setCellEditor().
Referenced by FWGeometryTableViewBase::postConst().
{ m_editor = editor; m_renderer.setCellEditor(m_editor); }
void FWGeometryTableManagerBase::setDaughtersSelfVisibility | ( | int | selectedIdx, |
bool | v | ||
) | [virtual] |
Reimplemented in FWGeometryTableManager, and FWOverlapTableManager.
Definition at line 327 of file FWGeometryTableManagerBase.cc.
References data, getNNodesTotal(), m_entries, n, setVisibility(), and setVisibilityChld().
{ TGeoNode *parentNode = m_entries[selectedIdx].m_node; int nD = parentNode->GetNdaughters(); int dOff = 0; for (int n = 0; n != nD; ++n) { int idx = selectedIdx + 1 + n + dOff; NodeInfo& data = m_entries[idx]; setVisibility(data, v); setVisibilityChld(data, v); getNNodesTotal(parentNode->GetDaughter(n), dOff); } }
void FWGeometryTableManagerBase::setDaughtersSelfVisibility | ( | bool | ) |
Referenced by FWGeometryTableViewBase::chosenItem().
void FWGeometryTableManagerBase::setLevelOffset | ( | int | x | ) | [inline] |
Definition at line 151 of file FWGeometryTableManagerBase.h.
References m_levelOffset, and x.
Referenced by FWOverlapTableView::recalculate(), FWGeometryTableView::setPath(), and FWGeometryTableViewBase::setPath().
{ m_levelOffset =x; }
void FWGeometryTableManagerBase::setVisibility | ( | NodeInfo & | data, |
bool | x | ||
) | [virtual] |
Reimplemented in FWGeometryTableManager.
Definition at line 314 of file FWGeometryTableManagerBase.cc.
References kVisNodeSelf, and FWGeometryTableManagerBase::NodeInfo::setBitVal().
Referenced by FWGeometryTableViewBase::cellClicked(), FWGeometryTableViewBase::chosenItem(), and setDaughtersSelfVisibility().
{ data.setBitVal(kVisNodeSelf, x); }
void FWGeometryTableManagerBase::setVisibilityChld | ( | NodeInfo & | data, |
bool | x | ||
) | [virtual] |
Reimplemented in FWGeometryTableManager.
Definition at line 321 of file FWGeometryTableManagerBase.cc.
References kVisNodeChld, and FWGeometryTableManagerBase::NodeInfo::setBitVal().
Referenced by FWGeometryTableViewBase::cellClicked(), and setDaughtersSelfVisibility().
{ data.setBitVal(kVisNodeChld, x); }
void FWGeometryTableManagerBase::showEditor | ( | int | row | ) |
Definition at line 266 of file FWGeometryTableManagerBase.cc.
References m_editor, m_editTransparencyIdx, m_entries, and redrawTable().
Referenced by FWGeometryTableViewBase::cellClicked().
{ m_editTransparencyIdx = row; m_editor->UnmapWindow(); m_editor->SetText(Form("%d", 100 - m_entries[row].m_transparency)); m_editor->Resize(40, 17); m_editor->SetCursorPosition(2); redrawTable(); }
const std::string FWGeometryTableManagerBase::title | ( | ) | const [virtual] |
Definition at line 155 of file FWGeometryTableManagerBase.cc.
{ return "Geometry"; }
int FWGeometryTableManagerBase::unsortedRowNumber | ( | int | iSortedRowNumber | ) | const [virtual] |
when passed the index to the sorted order of the rows it returns the original row number from the underlying data
Implements FWTableManagerBase.
Definition at line 130 of file FWGeometryTableManagerBase.cc.
{
return unsorted;
}
friend class FWGeometryTableViewBase [friend] |
Definition at line 39 of file FWGeometryTableManagerBase.h.
Definition at line 191 of file FWGeometryTableManagerBase.h.
Referenced by FWGeometryTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), and FWGeometryTableManagerBase().
TGTextEntry* FWGeometryTableManagerBase::m_editor |
Definition at line 199 of file FWGeometryTableManagerBase.h.
Referenced by applyTransparencyFromEditor(), cancelEditor(), setCellValueEditor(), and showEditor().
Definition at line 200 of file FWGeometryTableManagerBase.h.
Referenced by applyTransparencyFromEditor(), cancelEditor(), FWGeometryTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), and showEditor().
Definition at line 195 of file FWGeometryTableManagerBase.h.
Referenced by FWOverlapTableManager::addOverlapEntry(), applyTransparencyFromEditor(), FWGeometryTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), FWGeometryTableManager::checkHierarchy(), FWGeometryTableManager::checkRegionOfInterest(), firstColumnClicked(), getNodeMatrix(), getNodePath(), FWGeometryTableManager::importChildren(), FWOverlapTableManager::importOverlaps(), FWGeometryTableManager::loadGeometry(), FWOverlapTableManager::recalculateVisibility(), FWGeometryTableManager::recalculateVisibility(), FWGeometryTableManager::recalculateVisibilityNodeRec(), FWOverlapTableManager::recalculateVisibilityNodeRec(), FWGeometryTableManager::recalculateVisibilityVolumeRec(), redrawTable(), refEntries(), refEntry(), FWGeometryTableManager::resetRegionOfInterest(), FWGeometryTableManager::setDaughtersSelfVisibility(), FWOverlapTableManager::setDaughtersSelfVisibility(), setDaughtersSelfVisibility(), showEditor(), and FWGeometryTableManager::updateFilter().
TGGC* FWGeometryTableManagerBase::m_highlightContext [mutable] |
Definition at line 189 of file FWGeometryTableManagerBase.h.
Referenced by FWGeometryTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), and FWGeometryTableManagerBase().
Definition at line 88 of file FWGeometryTableManagerBase.h.
Definition at line 197 of file FWGeometryTableManagerBase.h.
Referenced by FWGeometryTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), firstColumnClicked(), getLevelOffset(), FWGeometryTableManager::loadGeometry(), and setLevelOffset().
Definition at line 190 of file FWGeometryTableManagerBase.h.
Referenced by FWGeometryTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), FWGeometryTableManagerBase(), setBackgroundToWhite(), and setCellValueEditor().
std::vector<int> FWGeometryTableManagerBase::m_row_to_index |
Definition at line 193 of file FWGeometryTableManagerBase.h.
Referenced by FWGeometryTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), FWGeometryTableManager::loadGeometry(), numberOfRows(), FWOverlapTableManager::recalculateVisibility(), FWGeometryTableManager::recalculateVisibility(), FWGeometryTableManager::recalculateVisibilityNodeRec(), FWOverlapTableManager::recalculateVisibilityNodeRec(), FWGeometryTableManager::recalculateVisibilityVolumeRec(), and rowToIndex().