diff --git a/ChangeLog b/ChangeLog index b3d500430..75360fe9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-05-07 Mike Kestner + + * gtk/Gtk.metadata : hide SpinButton with_range ctor. + * gtk/Makefile.am : add new custom. + * gtk/SpinButton.custom : implement with_range ctor for subclassing. + 2004-05-07 Mike Kestner * gtk/Gtk.metadata : hide ListStore and TreeStore newv ctors. diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 6e71e9f7a..69e121401 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -172,6 +172,7 @@ 1 out 1 + 1 1 Attach 1 diff --git a/gtk/Makefile.am b/gtk/Makefile.am index e11c50d0a..43c10aee1 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -60,6 +60,7 @@ customs = \ RadioMenuItem.custom \ ScrolledWindow.custom \ SelectionData.custom \ + SpinButton.custom \ Stock.custom \ Style.custom \ Table.custom \ diff --git a/gtk/SpinButton.custom b/gtk/SpinButton.custom new file mode 100644 index 000000000..6036a4448 --- /dev/null +++ b/gtk/SpinButton.custom @@ -0,0 +1,27 @@ +// Gtk.SpinButton.custom - Gtk SpinButton class customizations +// +// Author: Mike Kestner +// +// Copyright (C) 2004 Novell, Inc. +// +// This code is inserted after the automatically generated code. + + [DllImport ("libgtk-win32-2.0-0.dll")] + static extern IntPtr gtk_spin_button_new_with_range (double min, double max, double step); + + public SpinButton (double min, double max, double step) : base (IntPtr.Zero) + { + if (GetType() != typeof (SpinButton)) { + Adjustment adj = new Adjustment (min, min, max, step, 10 * step, 0); + string[] names = new string [1]; + GLib.Value[] vals = new GLib.Value [1]; + names [0] = "adjustment"; + vals [0] = new GLib.Value (adj); + CreateNativeObject (names, vals); + vals [0].Dispose (); + return; + } + + Raw = gtk_spin_button_new_with_range (min, max, step); + } +