当前位置: 首页>>代码示例>>C++>>正文


C++ Path::push_back方法代码示例

本文整理汇总了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;
}
开发者ID:pk-codebox-evo,项目名称:mysql-workbench,代码行数:10,代码来源:listmodel_wrapper.cpp

示例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;
}
开发者ID:pk-codebox-evo,项目名称:mysql-workbench,代码行数:14,代码来源:treemodel_wrapper.cpp


注:本文中的gtk::treemodel::Path::push_back方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。