示例#1
0
 public void verArbolSemantico(nodo arbol, TreeStore lista, TreeIter iter)
 {
     if (arbol != null)
     {
         TreeIter iter1 = lista.AppendValues(iter, getTypeNode(arbol));
         arbol.hijos.ForEach(hijo =>
         {
             verArbolSemantico(hijo, lista, iter1);
         });
     }
     treeview2.Model = lista;
 }
示例#2
0
 public void verArbol(nodo arbol, TreeStore lista, TreeIter iter)
 {
     if (arbol != null)
     {
         TreeIter iter1 = lista.AppendValues(iter, arbol.nombre);
         arbol.hijos.ForEach(hijo =>
         {
             verArbol(hijo, lista, iter1);
         });
     }
     treeview1.Model = lista;
 }
示例#3
0
        static void BuildTreeChildren(TreeStore store, TreeIter parent, ParsedDocument parsedDocument)
        {
            if (parsedDocument.CompilationUnit == null)
            {
                return;
            }
            foreach (IType cls in parsedDocument.CompilationUnit.Types)
            {
                TreeIter childIter;
                if (!parent.Equals(TreeIter.Zero))
                {
                    childIter = store.AppendValues(parent, cls);
                }
                else
                {
                    childIter = store.AppendValues(cls);
                }

                AddTreeClassContents(store, childIter, parsedDocument, cls);
            }
        }
        /// <summary>
        /// Appends to the tree store underneath the given iterator.
        /// </summary>
        /// <typeparam name="TValue"></typeparam>
        /// <param name="store"></param>
        /// <param name="iter"></param>
        /// <param name="tree"></param>
        /// <param name="nodeName"></param>
        private static void AppendToTreeStore <TValue>(
            TreeStore store,
            TreeIter iter,
            HierarchicalPathTreeCollection <TValue> tree,
            string nodeName)
        {
            // Insert the node into the tree.
            TreeIter childIter = store.AppendValues(iter, nodeName, tree.Path.Last, tree);

            // Insert the children into the tree.
            AppendChildrenToTreeStore(store, childIter, tree);
        }
示例#5
0
    private void OnTilesetChanged(Level level)
    {
        Tileset tileset = level.Tileset;

        TreeStore store = new TreeStore(typeof(Tilegroup));

        foreach (Tilegroup group in tileset.Tilegroups.Values)
        {
            store.AppendValues(group);
        }
        Model = store;
    }
示例#6
0
 private void ASTToTreeView(TreeWrapper root, TreeIter rootIter)
 {
     for (int i = 0; i < root.ChildCount; i++)
     {
         var      node     = root.GetChild(i);
         TreeIter nodeIter = _asrSource.AppendValues(rootIter, node.Text);
         if (node.ChildCount != 0)
         {
             ASTToTreeView(node, nodeIter);
         }
     }
 }
示例#7
0
    private void AddNodes(TreeStore tree, TreeIter iter, List <TokenWrapper> tokensList)
    {
        if (tokensList == null)
        {
            return;
        }

        for (int i = 0; i < tokensList.Count; i++)
        {
            tree.AppendValues(iter, String.Format("{0} | {1}", i, tokensList[i].Text));
        }
    }
        private void BuildModuleList()
        {
            store = new TreeStore(typeof(string), typeof(Type));

            foreach (Type type in Assembly.GetExecutingAssembly().GetTypes())
            {
                foreach (TestModuleAttribute attr in type.GetCustomAttributes(typeof(TestModuleAttribute), false))
                {
                    store.AppendValues(attr.Name, type);
                }
            }
        }
        static TreeIter AddOption(TreeStore model, string propertyName, string displayName, string example)
        {
            bool isBool = false;

            if (!string.IsNullOrEmpty(propertyName))
            {
                PropertyInfo info = GetPropertyByName(propertyName);
                isBool = info.PropertyType == typeof(bool);
            }

            return(model.AppendValues(propertyName, displayName, example, !string.IsNullOrEmpty(propertyName) && isBool, !string.IsNullOrEmpty(propertyName) && !isBool));
        }
示例#10
0
    private void createAndFillTreeView(Gtk.TreeView tv, treeviewType tvType, Constants.EncoderGI encoderGI, ArrayList array)
    {
        createTreeView(tv, tvType, encoderGI);
        TreeStore store = getStore(tvType, encoderGI);

        tv.Model = store;

        foreach (string [] line in array)
        {
            store.AppendValues(line);
        }
    }
        void FillRemotes()
        {
            var state = new TreeViewState(treeRemotes, 4);

            state.Save();
            storeRemotes.Clear();
            string currentRemote = repo.GetCurrentRemote();

            foreach (Remote remote in repo.GetRemotes())
            {
                // Take into account fetch/push ref specs.
                string   text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name;
                string   url  = remote.Url;
                TreeIter it   = storeRemotes.AppendValues(remote, text, url, null, remote.Name);
                foreach (string branch in repo.GetRemoteBranches(remote.Name))
                {
                    storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch);
                }
            }
            state.Load();
        }
示例#12
0
        static void BuildTreeChildren(TreeStore store, TreeIter parent, XContainer p)
        {
            foreach (XNode n in p.Nodes)
            {
                TreeIter childIter;
                if (!parent.Equals(TreeIter.Zero))
                {
                    childIter = store.AppendValues(parent, n);
                }
                else
                {
                    childIter = store.AppendValues(n);
                }

                var c = n as XContainer;
                if (c != null && c.FirstChild != null)
                {
                    BuildTreeChildren(store, childIter, c);
                }
            }
        }
        async void FillRemotes()
        {
            try {
                var state = new TreeViewState(treeRemotes, 4);
                state.Save();
                storeRemotes.Clear();
                var    token         = destroyTokenSource.Token;
                string currentRemote = await repo.GetCurrentRemoteAsync(token);

                if (token.IsCancellationRequested)
                {
                    return;
                }
                foreach (Remote remote in await repo.GetRemotesAsync(token))
                {
                    if (token.IsCancellationRequested)
                    {
                        return;
                    }
                    // Take into account fetch/push ref specs.
                    string   text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name;
                    string   url  = remote.Url;
                    TreeIter it   = storeRemotes.AppendValues(remote, text, url, null, remote.Name);

                    var remoteBranches = await repo.GetRemoteBranchesAsync(remote.Name, token);

                    if (token.IsCancellationRequested)
                    {
                        return;
                    }
                    foreach (string branch in remoteBranches)
                    {
                        storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch);
                    }
                }
                state.Load();
            } catch (Exception e) {
                LoggingService.LogInternalError(e);
            }
        }
示例#14
0
        public MainWindow(Library library)
        {
            Glade.XML gxml = new Glade.XML(null, "PaperMiners.MainWindow.glade", "mainwindow", null);
            gxml.Autoconnect(this);
            overview.Model = treeStore;

            Gtk.TreeViewColumn authorColumn = new Gtk.TreeViewColumn();
            authorColumn.Title      = "Authors";
            authorColumn.FixedWidth = 100;
            authorColumn.Expand     = false;
            authorColumn.Resizable  = true;
            authorColumn.Sizing     = TreeViewColumnSizing.Fixed;

            Gtk.CellRendererText authorCell = new Gtk.CellRendererText();

            authorColumn.PackStart(authorCell, true);

            Gtk.TreeViewColumn titleColumn = new Gtk.TreeViewColumn();
            titleColumn.Title = "Title";

            Gtk.CellRendererText titleCell = new Gtk.CellRendererText();
            titleColumn.PackStart(titleCell, true);

            authorColumn.AddAttribute(authorCell, "text", 0);
            titleColumn.AddAttribute(titleCell, "text", 1);
            foreach (Topic topic in Enum.GetValues(typeof(Topic)))
            {
                if (topic != Topic.None)
                {
                    TreeIter iter = treeStore.AppendValues(Utils.TopicName(topic));
                    foreach (Paper pap in library.Papers.Where(x => x.MainTopic == topic))
                    {
                        treeStore.AppendValues(iter, Utils.ToCommaAnd(pap.Authors), pap.Title);
                    }
                }
            }

            overview.AppendColumn(authorColumn);
            overview.AppendColumn(titleColumn);
        }
示例#15
0
        public RepositoryView(ExploreView exploreView, ICredentialsProvider credentialsProvider)
        {
            this.exploreView         = exploreView;
            menu                     = new RepositoryMenu(exploreView);
            this.credentialsProvider = credentialsProvider;

            // setup main column with image/text data
            TreeViewColumn     column = new TreeViewColumn();
            CellRendererText   crt    = new CellRendererText();
            CellRendererPixbuf crp    = new CellRendererPixbuf();

            column.Title = "Repository";
            column.PackStart(crp, false);
            column.PackStart(crt, true);
            column.AddAttribute(crp, "pixbuf", 0);
            column.AddAttribute(crt, "text", 1);
            column.SetCellDataFunc(crt, new Gtk.TreeCellDataFunc(RenderRepositoryName));
            AppendColumn(column);

            WorkspaceInfo[] infos = Workstation.Current.GetAllLocalWorkspaceInfo();
            foreach (WorkspaceInfo info in infos)
            {
                ICredentials         credentials = credentialsProvider.GetCredentials(info.ServerUri, null);
                TeamFoundationServer tfs         = TeamFoundationServerFactory.GetServer(info.ServerUri.ToString(), credentials);
                VersionControlServer vcs         = tfs.GetService(typeof(VersionControlServer)) as VersionControlServer;

                Workspace workspace = vcs.GetWorkspace(info.Name, info.OwnerName);
                workspace.RefreshMappings();

                string       label      = String.Format("{0}@{1}", info.Name, info.ServerUri.Host.ToString());
                Gtk.TreeIter serverIter = store.AppendValues(Images.Repository, label, info.ServerUri.ToString(), VersionControlPath.RootFolder, workspace, true);
                store.AppendValues(serverIter, null, "", "", "", null, true);
            }

            Model            = store;
            HeadersVisible   = true;
            KeyReleaseEvent += MyKeyReleaseEventHandler;

            ShowAll();
        }
示例#16
0
        /// <summary>
        /// To add ArtItem into GUI
        /// </summary>
        /// <param name="type">ArtType to update</param>
        /// <param name="store">Store</param>
        /// <param name="iter">Iter to be defined</param>
        /// <returns>numbers remaining item</returns>
        public int AddArt(ArtType type, ref TreeStore store)
        {
            TreeIter iter;                                      // = new TreeIter();

            Gdk.Pixbuf imagePreview;                            // Thumbnail
            int        remainingArt = 0;                        // Number of remaining item
            ArtItem    item         = null;
            String     description  = "Description unvailable"; // Default description

            if (_xml.InitGetArt(type) != 0)
            {
                item = _xml.GetArtItem(out remainingArt);
                Console.WriteLine("Remaining Art to fetch : " + remainingArt);
            }
            else
            {
                return(0);
            }

            if (item != null)
            {
                try {
                    imagePreview = new Gdk.Pixbuf(item.ThumbnailFile);
                }
                catch (GLib.GException e) {
                    Console.WriteLine("Error with " + item.Url + " : " + e.Message);
                    imagePreview = new Gdk.Pixbuf(Conf.Homedir + "no-thumbnail.png");
                }

                /*catch (System.NullReferenceException ex) {
                 *      Console.WriteLine ("Error with " + item.Url + " : " + ex.Message);
                 *      imagePreview = new Gdk.Pixbuf(Conf.Homedir + "no-thumbnail.png" );
                 * }*/

                try {
                    Console.WriteLine("Description :" + item.Description + " " + type);
                    description = item.Description;
                }
                catch (System.NullReferenceException ex) {}
            }
            else
            {
                Console.Error.WriteLine("No ArtItem available");
                imagePreview = new Gdk.Pixbuf(Conf.Homedir + "no-thumbnail.png");
            }

            iter = store.AppendValues(imagePreview, description);

            _guiArts.Add(iter, item);               // Insert the corresponding ArtItem into an Hashtable

            return(remainingArt);
        }
示例#17
0
        void Update()
        {
            if (tree.IsRealized)
            {
                tree.ScrollToPoint(0, 0);
            }

            treeViewState.Save();

            store.Clear();

            if (!DebuggingService.IsPaused)
            {
                return;
            }

            try {
                var processes = DebuggingService.DebuggerSession.GetProcesses();

                if (processes.Length == 1)
                {
                    AppendThreads(TreeIter.Zero, processes[0]);
                }
                else
                {
                    foreach (var process in processes)
                    {
                        TreeIter iter = store.AppendValues(null, process.Id.ToString(), process.Name, process, (int)Pango.Weight.Normal, "");
                        AppendThreads(iter, process);
                    }
                }
            } catch (Exception ex) {
                LoggingService.LogInternalError(ex);
            }

            tree.ExpandAll();

            treeViewState.Load();
        }
示例#18
0
        TreeIter AddPropertyComboBox(TreeIter iter, string id, string name, string[] values, string text)
        {
            var store = new TreeStore(typeof(string));

            foreach (string value in values)
            {
                store.AppendValues(value);
            }

            return(!iter.Equals(nulliter) ?
                   listStore.AppendValues(iter, "", false, name, true, "", false, false, store, text, true, true, id, "", false, "", "", false) :
                   listStore.AppendValues("", false, name, true, "", false, false, store, text, true, true, id, "", false, "", "", false));
        }
        void BuildTreeChildren(TreeStore store, TreeIter parent, ParsedDocument parsedDocument)
        {
            if (parsedDocument == null)
            {
                return;
            }

            foreach (var unresolvedCls in parsedDocument.TopLevelTypeDefinitions)
            {
                TreeIter childIter;
                if (!parent.Equals(TreeIter.Zero))
                {
                    childIter = store.AppendValues(parent, unresolvedCls);
                }
                else
                {
                    childIter = store.AppendValues(unresolvedCls);
                }

                AddTreeClassContents(store, childIter, parsedDocument, unresolvedCls, unresolvedCls);
            }
        }
示例#20
0
        public BadOptionsDialog(Gtk.Window parent, ArrayList badOptions) : base(parent, "BadOptionsDialog")
        {
            badOptionsTreeStore  = new TreeStore(typeof(string));
            badOptionsTree.Model = badOptionsTreeStore;
            badOptionsTree.AppendColumn("Name", new CellRendererText(), "text", 0);

            badOptionsTree.Selection.SelectFunction = new TreeSelectionFunc(SelectFunc);

            for (int x = 0; x < badOptions.Count; x++)
            {
                badOptionsTreeStore.AppendValues(new string[] { badOptions[x].ToString() });
            }
        }
示例#21
0
    protected void fillTreeView(Gtk.TreeView tv, TreeStore store)
    {
        //add a string for first row (for checking or unchecking all)
        store.AppendValues("", "", "", "", "", "", true, "", false, "");

        foreach (string jump in jumpsNormal)
        {
            string [] myStringFull = jump.Split(new char[] { ':' });
            store.AppendValues(
                myStringFull[1],                                                                                                                 //uniqueID
                simpleString,
                myStringFull[4],                                                                                                                 //type
                myStringFull[5],                                                                                                                 //tf
                myStringFull[6],                                                                                                                 //tf
                createStringCalculatingKgs(oldPersonWeight, Convert.ToDouble(Util.ChangeDecimalSeparator(myStringFull[8]))),                     //old weight
                true,
                createStringCalculatingKgs(newPersonWeight, Convert.ToDouble(Util.ChangeDecimalSeparator(myStringFull[8]))),                     //new weight 1
                false,
                createStringCalculatingPercent(oldPersonWeight, newPersonWeight, Convert.ToDouble(Util.ChangeDecimalSeparator(myStringFull[8]))) //new weight 2
                );
        }

        foreach (string jump in jumpsReactive)
        {
            string [] myStringFull = jump.Split(new char[] { ':' });
            store.AppendValues(
                myStringFull[1],                                                                                                                 //uniqueID
                reactiveString,
                myStringFull[4],                                                                                                                 //type
                myStringFull[10],                                                                                                                //tf (AVG)
                myStringFull[11],                                                                                                                //tf (AVG)
                createStringCalculatingKgs(oldPersonWeight, Convert.ToDouble(Util.ChangeDecimalSeparator(myStringFull[8]))),                     //old weight
                true,
                createStringCalculatingKgs(newPersonWeight, Convert.ToDouble(Util.ChangeDecimalSeparator(myStringFull[8]))),                     //new weight 1
                false,
                createStringCalculatingPercent(oldPersonWeight, newPersonWeight, Convert.ToDouble(Util.ChangeDecimalSeparator(myStringFull[8]))) //new weight 2
                );
        }
    }
示例#22
0
        public void AddMethods(string type, List <CodeRecord> records)
        {
            NamespaceCodeRecord ns = new NamespaceCodeRecord()
            {
                Name = type
            };
            var total_lines   = 0;
            var covered_lines = 0;

            var iter = TStore.AppendValues(ns);

            records.Sort((a, b) => {
                return(a.Name.CompareTo(b.Name));
            });
            foreach (var r in records)
            {
                total_lines   += r.GetLines().Length;
                covered_lines += r.GetHits();
                TStore.AppendValues(iter, r);
            }
            ns.Coverage = 1.0 * covered_lines / total_lines;
        }
        // Wizard Page 1

        protected void BtnBrowse_Clicked(object sender, EventArgs e)
        {
            var dialog = new FileDialog(this, FileChooserAction.SelectFolder);
            var result = dialog.Run();

            if (result == ResponseType.Ok)
            {
                entryGameDir.Text     = dialog.FileName;
                entryGameDir.Position = entryGameDir.Text.Length;

                treestore1.Clear();
                treestore1.AppendValues("Scanning directory...");

                if (scanningThread != null && scanningThread.IsAlive)
                {
                    scanningThread.Abort();
                }

                scanningThread = new Thread(new ThreadStart(this.ScanningThread));
                scanningThread.Start();
            }
        }
示例#24
0
        TreeIter AppendFileInfo(ChangeSetItem n)
        {
            Gdk.Pixbuf statusicon = VersionControlService.LoadIconForStatus(n.Status);
            string     lstatus    = VersionControlService.GetStatusLabel(n.Status);

            string scolor = null;

            string localpath = n.LocalPath.ToRelative(changeSet.BaseLocalPath);

            if (localpath.Length > 0 && localpath[0] == System.IO.Path.DirectorySeparatorChar)
            {
                localpath = localpath.Substring(1);
            }
            if (localpath == "")
            {
                localpath = ".";
            }                               // not sure if this happens

            bool hasComment = false;        //GetCommitMessage (n.LocalPath).Length > 0;
            bool commit     = true;         //changeSet.ContainsFile (n.LocalPath);

            Gdk.Pixbuf fileIcon;
            if (n.IsDirectory)
            {
                fileIcon = ImageService.GetPixbuf(MonoDevelop.Ide.Gui.Stock.ClosedFolder, Gtk.IconSize.Menu);
            }
            else
            {
                fileIcon = DesktopService.GetPixbufForFile(n.LocalPath, Gtk.IconSize.Menu);
            }

            TreeIter it = filestore.AppendValues(statusicon, lstatus, GLib.Markup.EscapeText(localpath).Split('\n'), commit, false, n.LocalPath.ToString(), true, hasComment, fileIcon, n.HasLocalChanges, scolor);

            if (!n.IsDirectory)
            {
                filestore.AppendValues(it, statusicon, "", new string[0], false, true, n.LocalPath.ToString(), false, false, fileIcon, false, null);
            }
            return(it);
        }
示例#25
0
        void Update()
        {
            if (tree.IsRealized)
            {
                tree.ScrollToPoint(0, 0);
            }

            treeViewState.Save();

            store.Clear();

            if (!DebuggingService.IsPaused)
            {
                return;
            }

            try {
                ProcessInfo[] currentProcesses = DebuggingService.DebuggerSession.GetProcesses();

                if (currentProcesses.Length == 1)
                {
                    AppendThreads(TreeIter.Zero, currentProcesses [0]);
                }
                else
                {
                    foreach (ProcessInfo p in currentProcesses)
                    {
                        TreeIter it = store.AppendValues(null, p.Id.ToString(), p.Name, p, (int)Pango.Weight.Normal, "");
                        AppendThreads(it, p);
                    }
                }
            } catch (Exception ex) {
                MessageService.ShowException(ex);
            }

            tree.ExpandAll();

            treeViewState.Load();
        }
示例#26
0
        void AppendCategory(CounterCategory cat)
        {
            IEnumerable <Counter> counters = cat.Counters.Where(c => c is TimerCounter);

            if (counters.Any())
            {
                TimeSpan time  = TimeSpan.Zero;
                TimeSpan min   = TimeSpan.MaxValue;
                TimeSpan max   = TimeSpan.Zero;
                int      count = 0;
                foreach (TimerCounter c in counters)
                {
                    if (c.CountWithDuration > 0)
                    {
                        time  += c.TotalTime;
                        count += c.CountWithDuration;
                        if (c.MinTime < min)
                        {
                            min = c.MinTime;
                        }
                        if (c.MaxTime > max)
                        {
                            max = c.MaxTime;
                        }
                    }
                }
                double avg = count > 0 ? (time.TotalMilliseconds / count) : 0d;
                if (count == 0)
                {
                    min = TimeSpan.Zero;
                }

                TreeIter it = store.AppendValues(null, cat.Name, count, (float)time.TotalMilliseconds, (float)avg, (double)min.TotalMilliseconds, (double)max.TotalMilliseconds, false, null, null, true, false, normalColor);
                foreach (Counter c in counters)
                {
                    AppendCounter(it, (TimerCounter)c);
                }
            }
        }
        void AddValues(XmlElement cat, TreeIter iter)
        {
            string lab;

            if (cat.GetAttribute("main") == "yes")
            {
                lab = "<b>" + GLib.Markup.EscapeText(Mono.Unix.Catalog.GetString(cat.GetAttribute("_label"))) + "</b>";
            }
            else
            {
                lab = GLib.Markup.EscapeText(Mono.Unix.Catalog.GetString(cat.GetAttribute("_label")));
            }

            if (iter.Equals(TreeIter.Zero))
            {
                store.AppendValues(Mono.Unix.Catalog.GetString(cat.GetAttribute("name")), lab, false);
            }
            else
            {
                store.AppendValues(iter, Mono.Unix.Catalog.GetString(cat.GetAttribute("name")), lab, false);
            }
        }
示例#28
0
        protected override void FillTree()
        {
            TreeIter catIter;

            store = new TreeStore(typeof(object), typeof(bool));

            filter.IgnoreUpdates = true;
            /* Periods */
            catIter = store.AppendValues(new StringObject(Catalog.GetString("Periods")), false);
            foreach (Period p in project.Periods)
            {
                store.AppendValues(catIter, p, false);
            }

            catIter = store.AppendValues(new StringObject(Catalog.GetString("Timers")), false);
            foreach (Timer t in project.Timers)
            {
                store.AppendValues(catIter, t, false);
            }

            foreach (EventType evType in project.EventTypes)
            {
                catIter = store.AppendValues(evType, true);
                filter.FilterEventType(evType, true);

                if (evType is AnalysisEventType)
                {
                    foreach (Tag tag in (evType as AnalysisEventType).Tags)
                    {
                        store.AppendValues(catIter, tag, false);
                    }
                }
            }

            var tagsByGroup = project.Dashboard.CommonTagsByGroup.ToDictionary(x => x.Key, x => x.Value);

            foreach (string grp in tagsByGroup.Keys)
            {
                TreeIter grpIter = store.AppendValues(new StringObject(grp), false);
                foreach (Tag tag in tagsByGroup[grp])
                {
                    store.AppendValues(grpIter, tag, false);
                }
            }

            filter.IgnoreUpdates = false;
            filter.Update();
            Model = store;
        }
		void AddItem (ComponentIndexFile ifile, ItemToolboxNode co)
		{
			Gdk.Pixbuf img = co.Icon != null ? co.Icon.ScaleSimple (16, 16, Gdk.InterpType.Bilinear) : null;
			if (showCategories) {
				TreeIter it;
				bool found = false;
				if (store.GetIterFirst (out it)) {
					do {
						if (co.Category == (string) store.GetValue (it, ColName)) {
							found = true;
							break;
						}
					}
					while (store.IterNext (ref it));
				}
				if (!found)
					it = store.AppendValues (false, co.Category, string.Empty, string.Empty, string.Empty, null, null, false, (int)Pango.Weight.Bold);
				store.AppendValues (it, currentItems.ContainsKey (co), co.Name, string.Empty, ifile.Name, ifile.Location, img, co, true, (int)Pango.Weight.Normal);
			}
			else
				store.AppendValues (currentItems.ContainsKey (co), co.Name, string.Empty, ifile.Name, ifile.Location, img, co, true, (int)Pango.Weight.Normal);
		}
示例#30
0
        public void AddNode(TreeIter iter, Gtk.Widget widget)
        {
            Stetic.Wrapper.Widget wrapper = GetVisibleWrapper(widget);
            if (wrapper == null)
            {
                return;
            }

            Gdk.Pixbuf icon = wrapper.ClassDescriptor.Icon.ScaleSimple(16, 16, Gdk.InterpType.Bilinear);
            string     txt  = widget.Name;

            if (!iter.Equals(TreeIter.Zero))
            {
                iter = store.AppendValues(iter, icon, txt, wrapper, true);
            }
            else
            {
                iter = store.AppendValues(icon, txt, wrapper, true);
            }

            FillChildren(iter, wrapper);
        }