32 #import "CoreGTK/CGTKSpinButton.h"
36 -(id)initWithAdjustment:(GtkAdjustment*) adjustment andClimbRate:(gdouble) climbRate andDigits:(guint) digits
38 self = [
super initWithGObject:(GObject *)gtk_spin_button_new(adjustment, climbRate, digits)];
48 -(id)initWithRangeWithMin:(gdouble) min andMax:(gdouble) max andStep:(gdouble) step
50 self = [
super initWithGObject:(GObject *)gtk_spin_button_new_with_range(min, max, step)];
62 return GTK_SPIN_BUTTON([
self GOBJECT]);
65 -(void)configureWithAdjustment:(GtkAdjustment*) adjustment andClimbRate:(gdouble) climbRate andDigits:(guint) digits
67 gtk_spin_button_configure(GTK_SPIN_BUTTON([
self GOBJECT]), adjustment, climbRate, digits);
72 return gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON([
self GOBJECT]));
77 return gtk_spin_button_get_digits(GTK_SPIN_BUTTON([
self GOBJECT]));
80 -(void)getIncrementsWithStep:(gdouble*) step andPage:(gdouble*) page
82 gtk_spin_button_get_increments(GTK_SPIN_BUTTON([
self GOBJECT]), step, page);
87 return (gtk_spin_button_get_numeric(GTK_SPIN_BUTTON([
self GOBJECT])) ? YES : NO);
90 -(void)getRangeWithMin:(gdouble*) min andMax:(gdouble*) max
92 gtk_spin_button_get_range(GTK_SPIN_BUTTON([
self GOBJECT]), min, max);
97 return (gtk_spin_button_get_snap_to_ticks(GTK_SPIN_BUTTON([
self GOBJECT])) ? YES : NO);
102 return gtk_spin_button_get_update_policy(GTK_SPIN_BUTTON([
self GOBJECT]));
107 return gtk_spin_button_get_value(GTK_SPIN_BUTTON([
self GOBJECT]));
112 return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON([
self GOBJECT]));
117 return (gtk_spin_button_get_wrap(GTK_SPIN_BUTTON([
self GOBJECT])) ? YES : NO);
120 -(void)setAdjustment:(GtkAdjustment*) adjustment
122 gtk_spin_button_set_adjustment(GTK_SPIN_BUTTON([
self GOBJECT]), adjustment);
125 -(void)setDigits:(guint) digits
127 gtk_spin_button_set_digits(GTK_SPIN_BUTTON([
self GOBJECT]), digits);
130 -(void)setIncrementsWithStep:(gdouble) step andPage:(gdouble) page
132 gtk_spin_button_set_increments(GTK_SPIN_BUTTON([
self GOBJECT]), step, page);
135 -(void)setNumeric:(BOOL) numeric
137 gtk_spin_button_set_numeric(GTK_SPIN_BUTTON([
self GOBJECT]), (numeric ? TRUE : FALSE));
140 -(void)setRangeWithMin:(gdouble) min andMax:(gdouble) max
142 gtk_spin_button_set_range(GTK_SPIN_BUTTON([
self GOBJECT]), min, max);
145 -(void)setSnapToTicks:(BOOL) snapToTicks
147 gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON([
self GOBJECT]), (snapToTicks ? TRUE : FALSE));
150 -(void)setUpdatePolicy:(GtkSpinButtonUpdatePolicy) policy
152 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON([
self GOBJECT]), policy);
155 -(void)setValue:(gdouble) value
157 gtk_spin_button_set_value(GTK_SPIN_BUTTON([
self GOBJECT]), value);
160 -(void)setWrap:(BOOL) wrap
162 gtk_spin_button_set_wrap(GTK_SPIN_BUTTON([
self GOBJECT]), (wrap ? TRUE : FALSE));
165 -(void)spinWithDirection:(GtkSpinType) direction andIncrement:(gdouble) increment
167 gtk_spin_button_spin(GTK_SPIN_BUTTON([
self GOBJECT]), direction, increment);
172 gtk_spin_button_update(GTK_SPIN_BUTTON([
self GOBJECT]));
id initWithGObject:(GObject *obj)