TreePath FixedHeightTreeModelLayout::getPathForRow(const UInt32& row) const { //UInt32 RootVisibilityDependantRow(row); //if(!isRootVisible()) //{ // RootVisibilityDependantRow += 1; //} UInt32 i(0); TreePathSetConstItor VisiblePathSetItor(_VisiblePathSet.begin()); while(i<row && VisiblePathSetItor != _VisiblePathSet.end()) { ++i; ++VisiblePathSetItor; } if(VisiblePathSetItor != _VisiblePathSet.end()) { return (*VisiblePathSetItor); } else { return TreePath(); } }
TreePath PropertyTreeModel::pathFromRow(PropertyRow* row) { TreePath result; if(row) while(row->parent()){ int childIndex = row->parent()->childIndex(row); YASLI_ESCAPE(childIndex >= 0, return TreePath()); result.insert(result.begin(), childIndex); row = row->parent(); } return result; }
TreePath SceneGraphTreeModel::createPath(NodeUnrecPtr node) const { std::deque<boost::any> PathVec; NodeUnrecPtr recNode(node); if(recNode != NULL) { while(recNode != NULL && recNode != getRootNode()) { PathVec.push_front(boost::any(recNode)); recNode = recNode->getParent(); } if(recNode != NULL) { PathVec.push_front(boost::any(recNode)); } else { return TreePath(); } } return TreePath(PathVec, const_cast<SceneGraphTreeModel*>(this)); }
TreePath SceneGraphTreeModel::getPathForNode(NodeUnrecPtr theNode) const { std::deque<boost::any> ResultPath; if(theNode != NULL && getInternalRoot() != NULL && theNode != getInternalRoot()) { NodeUnrecPtr parentNode(theNode); while(parentNode != NULL && parentNode != getInternalRoot()) { ResultPath.push_front(boost::any(parentNode)); parentNode = parentNode->getParent(); } ResultPath.push_front(boost::any(getRootNode())); } return TreePath(ResultPath, TreeModelUnrecPtr(const_cast<SceneGraphTreeModel*>(this))); }
TreePath VariableHeightTreeModelLayout::getPathClosestTo(const Pnt2f& Loc) const { //TODO:Implement return TreePath(); }
TreePath VariableHeightTreeModelLayout::getPathForRow(const UInt32& row) const { //TODO:Implement return TreePath(); }