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


C# TreeModel.GetIter方法代码示例

本文整理汇总了C#中TreeModel.GetIter方法的典型用法代码示例。如果您正苦于以下问题:C# TreeModel.GetIter方法的具体用法?C# TreeModel.GetIter怎么用?C# TreeModel.GetIter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TreeModel的用法示例。


在下文中一共展示了TreeModel.GetIter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EventsListFromPaths

        /// <summary>
        /// Fill a list of events from a list of paths, if the first and unique path is an EventType the list
        /// is filled with al the child events in this EventType category.
        /// </summary>
        /// <param name = "model">Model.</param>
        /// <param name="events">Events.</param>
        /// <param name="paths">Paths.</param>
        public static List<TimelineEventLongoMatch> EventsListFromPaths(TreeModel model, TreePath[] paths)
        {
            List<TimelineEventLongoMatch> events = new List<TimelineEventLongoMatch> ();

            // If it's an EventType or a Player, traverse all children to fill the list
            if (paths.Length == 1 && !(model.GetValue (paths [0]) is TimelineEventLongoMatch)) {
                TreeIter parentIter;
                TreeIter child;
                bool hasChild;

                model.GetIter (out parentIter, paths [0]);
                hasChild = model.IterHasChild (parentIter);
                model.IterChildren (out child, parentIter);
                while (hasChild) {
                    TimelineEventLongoMatch evt = model.GetValue (child, 0) as TimelineEventLongoMatch;
                    if (evt != null) {
                        events.Add (evt);
                    }
                    hasChild = model.IterNext (ref child);
                }
            } else {
                foreach (var path in paths) {
                    TimelineEventLongoMatch evt = model.GetValue (path) as TimelineEventLongoMatch;
                    if (evt != null) {
                        events.Add (evt);
                    }
                }
            }
            return events;
        }
开发者ID:LongoMatch,项目名称:longomatch,代码行数:37,代码来源:TreeViewHelpers.cs

示例2: TemplatesTreeViewSelection

		bool TemplatesTreeViewSelection (TreeSelection selection, TreeModel model, TreePath path, bool path_currently_selected)
		{
			TreeIter iter;
			if (model.GetIter (out iter, path)) {
				var template = model.GetValue (iter, TemplateColumn) as SolutionTemplate;
				if (template == null) {
					return false;
				}
			}

			return true;
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:12,代码来源:GtkNewProjectDialogBackend.cs

示例3: TemplateCategoriesTreeViewSelection

		bool TemplateCategoriesTreeViewSelection (TreeSelection selection, TreeModel model, TreePath path, bool path_currently_selected)
		{
			TreeIter iter;
			if (model.GetIter (out iter, path)) {
				var category = model.GetValue (iter, TemplateCategoryColumn) as TemplateCategory;
				if (category.IsTopLevel) {
					return false;
				}
			}

			return true;
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:12,代码来源:GtkNewProjectDialogBackend.cs

示例4: IterPrev

		//generally useful function... why not in model already?
		static bool IterPrev (TreeModel model, ref TreeIter iter)
		{
			TreePath tp = model.GetPath (iter);
			return tp.Prev() && model.GetIter (out iter, tp);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:6,代码来源:CollectionEditor.cs

示例5: tree_select

        // the treeview is selected
        private bool tree_select(TreeSelection selection, TreeModel model, TreePath path, bool selected)
        {
            if (this != Global.Core.Library.DynamicTree)
                Global.Core.Library.DynamicTree.Selection.UnselectAll ();

            if (this != Global.Core.Library.FolderTree)
                Global.Core.Library.FolderTree.Selection.UnselectAll ();

            if (this != Global.Core.Library.PlaylistTree)
                Global.Core.Library.PlaylistTree.Selection.UnselectAll ();

            //if it isnt already selected
            if (!selected)
            {
                Global.Core.TopBar.SelectedTree = this;
                Global.Core.Library.MediaTree.SetFilter (FilterMedia);
                Global.Core.Library.MediaTree.Refilter ();

                //raise the event
                if (TreeSelected != null)
                {
                    TreeIter iter;
                    if (model.GetIter (out iter, path))
                        TreeSelected (model, iter);
                }
            }

            return true;
        }
开发者ID:gsterjov,项目名称:fusemc,代码行数:30,代码来源:OrganizerTree.cs


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