2004-05-07 Mike Kestner <mkestner@ximian.com>
* gtk/Gtk.metadata : map AccelLabel ctor parm to prop and hide Adjustment ctor. * gtk/Adjustment.custom : add set accessors for Upper/Lower and implement ctor with subclassing. * gtk/CheckMenuItem.custom : return from subclass branch. * gtk/ImageMenuItem.custom : return from subclass branch. * gtk/MenuItem.custom : return from subclass branch. * gtk/RadioMenuItem.custom : return from subclass branch. * gtk/glue/adjustment.c : add setters for lower/upper. svn path=/trunk/gtk-sharp/; revision=26938
This commit is contained in:
parent
133a5c8715
commit
50c0b90864
8 changed files with 68 additions and 0 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2004-05-07 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/Gtk.metadata : map AccelLabel ctor parm to prop and hide
|
||||
Adjustment ctor.
|
||||
* gtk/Adjustment.custom : add set accessors for Upper/Lower and
|
||||
implement ctor with subclassing.
|
||||
* gtk/CheckMenuItem.custom : return from subclass branch.
|
||||
* gtk/ImageMenuItem.custom : return from subclass branch.
|
||||
* gtk/MenuItem.custom : return from subclass branch.
|
||||
* gtk/RadioMenuItem.custom : return from subclass branch.
|
||||
* gtk/glue/adjustment.c : add setters for lower/upper.
|
||||
|
||||
2004-05-07 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/Gtk.metadata : hide some *MenuItem ctors.
|
||||
|
|
|
@ -4,6 +4,25 @@
|
|||
// This code is inserted after the automatically generated code.
|
||||
//
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size);
|
||||
|
||||
public Adjustment (double value, double lower, double upper, double step_increment, double page_increment, double page_size) : base (IntPtr.Zero)
|
||||
{
|
||||
if (GetType () != typeof (Adjustment)) {
|
||||
CreateNativeObject (new string [0], new GLib.Value [0]);
|
||||
Value = value;
|
||||
Lower = lower;
|
||||
Upper = upper;
|
||||
StepIncrement = step_increment;
|
||||
PageIncrement = page_increment;
|
||||
PageSize = page_size;
|
||||
return;
|
||||
}
|
||||
|
||||
Raw = gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size);
|
||||
}
|
||||
|
||||
[DllImport("gtksharpglue")]
|
||||
static extern void gtksharp_gtk_adjustment_set_bounds (IntPtr i, double lower, double upper, double step_increment, double page_increment, double page_size);
|
||||
|
||||
|
@ -20,18 +39,31 @@ public void SetBounds (double lower, double upper, double step_increment, double
|
|||
[DllImport ("gtksharpglue")]
|
||||
static extern double gtksharp_gtk_adjustment_get_lower (IntPtr i);
|
||||
|
||||
[DllImport ("gtksharpglue")]
|
||||
static extern void gtksharp_gtk_adjustment_set_lower (IntPtr i, double lower);
|
||||
|
||||
public double Lower {
|
||||
get {
|
||||
return gtksharp_gtk_adjustment_get_lower (this.Handle);
|
||||
}
|
||||
set {
|
||||
gtksharp_gtk_adjustment_set_lower (Handle, value);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport ("gtksharpglue")]
|
||||
static extern double gtksharp_gtk_adjustment_get_upper (IntPtr i);
|
||||
|
||||
[DllImport ("gtksharpglue")]
|
||||
static extern void gtksharp_gtk_adjustment_set_upper (IntPtr i, double upper);
|
||||
|
||||
public double Upper {
|
||||
get {
|
||||
return gtksharp_gtk_adjustment_get_upper (this.Handle);
|
||||
}
|
||||
set {
|
||||
gtksharp_gtk_adjustment_set_upper (Handle, value);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport ("gtksharpglue")]
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
al.SetAlignment (0.0f, 0.5f);
|
||||
Add (al);
|
||||
al.AccelWidget = this;
|
||||
return;
|
||||
}
|
||||
|
||||
Raw = gtk_check_menu_item_new_with_mnemonic (label);
|
||||
|
|
|
@ -60,6 +60,8 @@
|
|||
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowInserted']" name="name">EmitRowInserted</attr>
|
||||
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowsReordered']" name="name">EmitRowsReordered</attr>
|
||||
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SortColumnChanged']" name="name">ChangeSortColumn</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkAccelLabel']/constructor[@cname='gtk_accel_label_new']/*/*[@name='string']" name="property_name">label</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkAdjustment']/constructor[@cname='gtk_adjustment_new']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkAdjustment']/method[@name='Changed']" name="name">Change</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkAdjustment']/method[@name='ValueChanged']" name="name">ChangeValue</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkArrow']/method[@name='Set']" name="hidden">1</attr>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
al.SetAlignment (0.0f, 0.5f);
|
||||
Add (al);
|
||||
al.AccelWidget = this;
|
||||
return;
|
||||
}
|
||||
|
||||
Raw = gtk_image_menu_item_new_with_mnemonic (label);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
al.SetAlignment (0.0f, 0.5f);
|
||||
Add (al);
|
||||
al.AccelWidget = this;
|
||||
return;
|
||||
}
|
||||
|
||||
Raw = gtk_menu_item_new_with_mnemonic (label);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
al.SetAlignment (0.0f, 0.5f);
|
||||
Add (al);
|
||||
al.AccelWidget = this;
|
||||
return;
|
||||
}
|
||||
|
||||
Raw = gtk_radio_menu_item_new_with_mnemonic (IntPtr.Zero, label);
|
||||
|
|
|
@ -15,8 +15,10 @@ void gtksharp_gtk_adjustment_set_bounds (GtkAdjustment *adj,
|
|||
gdouble page_size);
|
||||
|
||||
gdouble gtksharp_gtk_adjustment_get_lower (GtkAdjustment *adj);
|
||||
void gtksharp_gtk_adjustment_set_lower (GtkAdjustment *adj, gdouble lower);
|
||||
|
||||
gdouble gtksharp_gtk_adjustment_get_upper (GtkAdjustment *adj);
|
||||
void gtksharp_gtk_adjustment_set_upper (GtkAdjustment *adj, gdouble upper);
|
||||
|
||||
gdouble gtksharp_gtk_adjustment_get_step_increment (GtkAdjustment *adj);
|
||||
|
||||
|
@ -54,12 +56,28 @@ gtksharp_gtk_adjustment_get_lower (GtkAdjustment *adj)
|
|||
return adj->lower;
|
||||
}
|
||||
|
||||
void
|
||||
gtksharp_gtk_adjustment_set_lower (GtkAdjustment *adj, gdouble lower)
|
||||
{
|
||||
adj->lower = lower;
|
||||
|
||||
gtk_adjustment_changed (adj);
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gtk_adjustment_get_upper (GtkAdjustment *adj)
|
||||
{
|
||||
return adj->upper;
|
||||
}
|
||||
|
||||
void
|
||||
gtksharp_gtk_adjustment_set_upper (GtkAdjustment *adj, gdouble upper)
|
||||
{
|
||||
adj->upper = upper;
|
||||
|
||||
gtk_adjustment_changed (adj);
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gtk_adjustment_get_step_increment (GtkAdjustment *adj)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue