本文整理汇总了C++中gtk::treemodel::Path::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ Path::push_back方法的具体用法?C++ Path::push_back怎么用?C++ Path::push_back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gtk::treemodel::Path
的用法示例。
在下文中一共展示了Path::push_back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//------------------------------------------------------------------------------
Gtk::TreeModel::Path node2path(const ::bec::NodeId& node) {
const int depth = node.depth();
Gtk::TreeModel::Path path;
for (int i = 0; i < depth; i++)
path.push_back(node[i]);
return path;
}
示例2:
Gtk::TreeModel::Path TreeModelWrapper::get_path_vfunc(const iterator& iter) const {
bec::NodeId node = node_for_iter(iter);
Gtk::TreeModel::Path path;
if (node.is_valid()) {
const int node_depth = node.depth();
// get path from an iterator. The iterator points to the node, so
// we have to trim the root node prefix so we have a path to the tree
for (int i = bec::NodeId(_root_node_path).depth(); i < node_depth; i++)
path.push_back(node[i]);
}
return path;
}