Esempio n. 1
0
        public StatList(ProfilerEventHandler data, DisplayOptions options) : base()
        {
            store = new StatStore(data, options);
            Model = new TreeModelAdapter(store);
            Selection.SelectPath(new TreePath("0"));
            AppendColumn("Percent", new CellRendererText(), "text", 1);
            TreeViewColumn col = new TreeViewColumn("Method", new CellRendererText(), "text", 0);

            AppendColumn(col);
            ExpanderColumn   = col;
            options.Changed += delegate { Model = new TreeModelAdapter(new StatStore(data, options)); };
        }
Esempio n. 2
0
        //the GTK# version of this has 'out' instead of 'ref', preventing passing the x,y values in
        public static bool GetTooltipContext(this TreeView tree, ref int x, ref int y, bool keyboardTip,
                                             out TreeModel model, out TreePath path, out Gtk.TreeIter iter)
        {
            IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(TreeIter)));
            IntPtr handle;
            IntPtr intPtr2;
            bool   result = gtk_tree_view_get_tooltip_context(tree.Handle, ref x, ref y, keyboardTip, out handle, out intPtr2, intPtr);

            model = TreeModelAdapter.GetObject(handle, false);
            path  = intPtr2 == IntPtr.Zero ? null : ((TreePath)GLib.Opaque.GetOpaque(intPtr2, typeof(TreePath), false));
            iter  = TreeIter.New(intPtr);
            Marshal.FreeHGlobal(intPtr);
            return(result);
        }
Esempio n. 3
0
        public NodeStore() : base()
        {
            d_valueGetters    = new List <MethodInfo>();
            d_customRenderers = new List <CustomRenderer>();

            d_primaryKeys = new Dictionary <Type, MethodInfo>();
            d_sortColumns = new Dictionary <int, MethodInfo>();
            d_sortColumn  = -1;
            d_sortable    = new Dictionary <int, bool>();

            d_adapter = new TreeModelAdapter(this);

            Scan();

            Connect(this);
        }