mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 06:05:30 +00:00
6b46f2fb3a
* gtk/Gtk.metadata : hide SpinButton with_range ctor. * gtk/Makefile.am : add new custom. * gtk/SpinButton.custom : implement with_range ctor for subclassing. svn path=/trunk/gtk-sharp/; revision=26942
28 lines
848 B
Plaintext
28 lines
848 B
Plaintext
// Gtk.SpinButton.custom - Gtk SpinButton class customizations
|
|
//
|
|
// Author: Mike Kestner <mkestner@ximian.com>
|
|
//
|
|
// 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);
|
|
}
|
|
|