2004-05-07 Mike Kestner <mkestner@ximian.com>
* gtk/Gtk.metadata : hide ListStore and TreeStore newv ctors. * gtk/ListStore.custom : rework the ctors for subclassing. * gtk/TreeStore.custom : rework the ctors for subclassing. svn path=/trunk/gtk-sharp/; revision=26941
This commit is contained in:
parent
50da743482
commit
50d266b30b
4 changed files with 34 additions and 19 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-05-07 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/Gtk.metadata : hide ListStore and TreeStore newv ctors.
|
||||
* gtk/ListStore.custom : rework the ctors for subclassing.
|
||||
* gtk/TreeStore.custom : rework the ctors for subclassing.
|
||||
|
||||
2004-05-07 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/Gtk.metadata : hide HScale and VScale with_range ctors.
|
||||
|
|
|
@ -127,8 +127,7 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkLayout']/method[@name='SetHadjustment']/*/*[@type='GtkAdjustment*']" name="null_ok">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkLayout']/method[@name='SetVadjustment']/*/*[@type='GtkAdjustment*']" name="null_ok">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkLayout']/signal[@name='SetScrollAdjustments']" name="name">ScrollAdjustmentsSet</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/constructor[@cname='gtk_list_store_newv']/*/*[@name='types']" name="array">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/constructor[@cname='gtk_list_store_newv']/*/*[@name='types']" name="params">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/constructor[@cname='gtk_list_store_newv']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='Append']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='InsertAfter']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='InsertBefore']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
|
@ -217,8 +216,7 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkTreeModelSort']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='GetSelected']/*/*" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='GetSelectedRows']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_newv']/*/*[@name='types']" name="array">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_newv']/*/*[@name='types']" name="params">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_newv']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Append']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='InsertAfter']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='InsertBefore']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
|
|
|
@ -80,25 +80,30 @@
|
|||
return AppendValues ((Array) values);
|
||||
}
|
||||
|
||||
public ListStore (params GLib.GType[] types) : base (IntPtr.Zero)
|
||||
{
|
||||
CreateNativeObject (new string [0], new GLib.Value [0]);
|
||||
SetColumnTypes (types);
|
||||
}
|
||||
|
||||
public ListStore (params Type[] types) : base (IntPtr.Zero)
|
||||
{
|
||||
if (GetType() != typeof (ListStore))
|
||||
throw new InvalidOperationException ("Can't chain to this constructor from subclasses.");
|
||||
IntPtr[] ctypes = new IntPtr[types.Length];
|
||||
GLib.GType[] gtypes = new GLib.GType[types.Length];
|
||||
int i = 0;
|
||||
foreach (Type type in types) {
|
||||
GLib.GType ctype = GLibSharp.TypeConverter.LookupType (type);
|
||||
if (ctype == GLib.GType.None) {
|
||||
ctypes[i] = GLibSharp.ManagedValue.GType.Val;
|
||||
gtypes[i] = GLibSharp.ManagedValue.GType;
|
||||
} else if (ctype == GLib.GType.Invalid) {
|
||||
throw new Exception ("Unknown type");
|
||||
} else {
|
||||
ctypes[i] = ctype.Val;
|
||||
gtypes[i] = ctype;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
Raw = gtk_list_store_newv (ctypes.Length, ctypes);
|
||||
CreateNativeObject (new string [0], new GLib.Value [0]);
|
||||
SetColumnTypes (gtypes);
|
||||
}
|
||||
|
||||
public object GetValue(Gtk.TreeIter iter, int column) {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
// Gtk.TreeStore.Custom - Gtk TreeStore class customizations
|
||||
//
|
||||
// Author: Kristian Rietveld <kris@gtk.org>
|
||||
// Authors: Kristian Rietveld <kris@gtk.org>
|
||||
// Mike Kestner <mkestner@ximian.com>
|
||||
//
|
||||
// (c) 2002 Kristian Rietveld
|
||||
// Copyright (c) 2002 Kristian Rietveld
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
|
||||
|
@ -125,26 +127,30 @@
|
|||
return AppendValues ((Array) values);
|
||||
}
|
||||
|
||||
public TreeStore (params GLib.GType[] types) : base (IntPtr.Zero)
|
||||
{
|
||||
CreateNativeObject (new string [0], new GLib.Value [0]);
|
||||
SetColumnTypes (types);
|
||||
}
|
||||
|
||||
public TreeStore (params Type[] types) : base (IntPtr.Zero)
|
||||
{
|
||||
if (GetType() != typeof (TreeStore))
|
||||
throw new InvalidOperationException ("Can't chain to this constructor from subclasses.");
|
||||
|
||||
IntPtr[] ctypes = new IntPtr[types.Length];
|
||||
GLib.GType[] gtypes = new GLib.GType[types.Length];
|
||||
int i = 0;
|
||||
foreach (Type type in types) {
|
||||
GLib.GType ctype = GLibSharp.TypeConverter.LookupType (type);
|
||||
if (ctype == GLib.GType.None) {
|
||||
ctypes[i] = GLibSharp.ManagedValue.GType.Val;
|
||||
gtypes[i] = GLibSharp.ManagedValue.GType;
|
||||
} else if (ctype == GLib.GType.Invalid) {
|
||||
throw new Exception ("Unknown type");
|
||||
} else {
|
||||
ctypes[i] = ctype.Val;
|
||||
gtypes[i] = ctype;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
Raw = gtk_tree_store_newv (ctypes.Length, ctypes);
|
||||
CreateNativeObject (new string [0], new GLib.Value [0]);
|
||||
SetColumnTypes (gtypes);
|
||||
}
|
||||
|
||||
public object GetValue (Gtk.TreeIter iter, int column) {
|
||||
|
|
Loading…
Reference in a new issue