gtkspinbuttonsci.c File Reference

#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <locale.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include "gdk/gdkkeysyms.h"
#include "gtk/gtkbindings.h"
#include "gtk/gtkmain.h"
#include "gtk/gtksettings.h"
#include "gtkmarshalers.h"
#include "gtkintl.h"
#include "gtkspinbuttonsci.h"

Go to the source code of this file.

Defines

#define MIN_SPIN_BUTTON_SCI_WIDTH   30
#define SPIN_BUTTON_SCI_INITIAL_TIMER_DELAY   200
#define SPIN_BUTTON_SCI_TIMER_DELAY   20
#define MAX_TIMER_CALLS   5
#define EPSILON   1e-10
#define MAX_DIGITS   20
#define MIN_ARROW_WIDTH   6
#define NO_ARROW   2
#define add_spin_binding(binding_set, keyval, mask, scroll)

Enumerations

enum  {
  PROP_0, PROP_ADJUSTMENT, PROP_CLIMB_RATE, PROP_DIGITS,
  PROP_SNAP_TO_TICKS, PROP_NUMERIC, PROP_WRAP, PROP_UPDATE_POLICY,
  PROP_VALUE
}
enum  {
  INPUT, OUTPUT, VALUE_CHANGED, CHANGE_VALUE,
  LAST_SIGNAL
}

Functions

static void gtk_spin_button_sci_class_init (GtkSpinbuttonsciClass *klass)
static void gtk_spin_button_sci_editable_init (GtkEditableClass *iface)
static void gtk_spin_button_sci_init (GtkSpinbuttonsci *spin_button_sci)
static void gtk_spin_button_sci_finalize (GObject *object)
static void gtk_spin_button_sci_destroy (GtkObject *object)
static void gtk_spin_button_sci_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
static void gtk_spin_button_sci_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
static void gtk_spin_button_sci_map (GtkWidget *widget)
static void gtk_spin_button_sci_unmap (GtkWidget *widget)
static void gtk_spin_button_sci_realize (GtkWidget *widget)
static void gtk_spin_button_sci_unrealize (GtkWidget *widget)
static void gtk_spin_button_sci_size_request (GtkWidget *widget, GtkRequisition *requisition)
static void gtk_spin_button_sci_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
static gint gtk_spin_button_sci_expose (GtkWidget *widget, GdkEventExpose *event)
static gint gtk_spin_button_sci_button_press (GtkWidget *widget, GdkEventButton *event)
static gint gtk_spin_button_sci_button_release (GtkWidget *widget, GdkEventButton *event)
static gint gtk_spin_button_sci_motion_notify (GtkWidget *widget, GdkEventMotion *event)
static gint gtk_spin_button_sci_enter_notify (GtkWidget *widget, GdkEventCrossing *event)
static gint gtk_spin_button_sci_leave_notify (GtkWidget *widget, GdkEventCrossing *event)
static gint gtk_spin_button_sci_focus_out (GtkWidget *widget, GdkEventFocus *event)
static void gtk_spin_button_sci_grab_notify (GtkWidget *widget, gboolean was_grabbed)
static void gtk_spin_button_sci_state_changed (GtkWidget *widget, GtkStateType previous_state)
static void gtk_spin_button_sci_draw_arrow (GtkSpinbuttonsci *spin_button_sci, GtkArrowType arrow_type)
static gint gtk_spin_button_sci_timer (GtkSpinbuttonsci *spin_button_sci)
static void gtk_spin_button_sci_stop_spinning (GtkSpinbuttonsci *spin)
static void gtk_spin_button_sci_value_changed (GtkAdjustment *adjustment, GtkSpinbuttonsci *spin_button_sci)
static gint gtk_spin_button_sci_key_release (GtkWidget *widget, GdkEventKey *event)
static gint gtk_spin_button_sci_scroll (GtkWidget *widget, GdkEventScroll *event)
static void gtk_spin_button_sci_activate (GtkEntry *entry)
static void gtk_spin_button_sci_snap (GtkSpinbuttonsci *spin_button_sci, gdouble val)
static void gtk_spin_button_sci_insert_text (GtkEditable *editable, const gchar *new_text, gint new_text_length, gint *position)
static void gtk_spin_button_sci_real_spin (GtkSpinbuttonsci *spin_button_sci, gdouble step)
static void gtk_spin_button_sci_real_change_value (GtkSpinbuttonsci *spin, GtkScrollType scroll)
static gint gtk_spin_button_sci_default_input (GtkSpinbuttonsci *spin_button_sci, gdouble *new_val)
static gint gtk_spin_button_sci_default_output (GtkSpinbuttonsci *spin_button_sci)
static gint spin_button_sci_get_arrow_size (GtkSpinbuttonsci *spin_button_sci)
static gint spin_button_sci_get_shadow_type (GtkSpinbuttonsci *spin_button_sci)
static void spin_button_sci_redraw (GtkSpinbuttonsci *spin_button_sci)
GType gtk_spin_button_sci_get_type (void)
static int compute_double_length (double val, int digits)
static void get_borders (GtkEntry *entry, gint *xborder, gint *yborder)
static gboolean spin_button_sci_at_limit (GtkSpinbuttonsci *spin_button_sci, GtkArrowType arrow)
static void start_spinning (GtkSpinbuttonsci *spin, GtkArrowType click_child, gdouble step)
void gtk_spin_button_sci_configure (GtkSpinbuttonsci *spin_button_sci, GtkAdjustment *adjustment, gdouble climb_rate, guint digits)
GtkWidget * gtk_spin_button_sci_new (GtkAdjustment *adjustment, gdouble climb_rate, guint digits)
GtkWidget * gtk_spin_button_sci_new_with_range (gdouble min, gdouble max, gdouble step)
static void adjustment_changed_cb (GtkAdjustment *adjustment, gpointer data)
void gtk_spin_button_sci_set_adjustment (GtkSpinbuttonsci *spin_button_sci, GtkAdjustment *adjustment)
GtkAdjustment * gtk_spin_button_sci_get_adjustment (GtkSpinbuttonsci *spin_button_sci)
void gtk_spin_button_sci_set_digits (GtkSpinbuttonsci *spin_button_sci, guint digits)
guint gtk_spin_button_sci_get_digits (GtkSpinbuttonsci *spin_button_sci)
void gtk_spin_button_sci_set_increments (GtkSpinbuttonsci *spin_button_sci, gdouble step, gdouble page)
void gtk_spin_button_sci_get_increments (GtkSpinbuttonsci *spin_button_sci, gdouble *step, gdouble *page)
void gtk_spin_button_sci_set_range (GtkSpinbuttonsci *spin_button_sci, gdouble min, gdouble max)
void gtk_spin_button_sci_get_range (GtkSpinbuttonsci *spin_button_sci, gdouble *min, gdouble *max)
void gtk_spin_button_sci_set_suffix (GtkSpinbuttonsci *spin_button_sci, gchar *suffix)
gdouble gtk_spin_button_sci_get_value (GtkSpinbuttonsci *spin_button_sci)
gint gtk_spin_button_sci_get_value_as_int (GtkSpinbuttonsci *spin_button_sci)
void gtk_spin_button_sci_set_value (GtkSpinbuttonsci *spin_button_sci, gdouble value)
void gtk_spin_button_sci_set_update_policy (GtkSpinbuttonsci *spin_button_sci, GtkSpinbuttonsciUpdatePolicy policy)
GtkSpinbuttonsciUpdatePolicy gtk_spin_button_sci_get_update_policy (GtkSpinbuttonsci *spin_button_sci)
void gtk_spin_button_sci_set_numeric (GtkSpinbuttonsci *spin_button_sci, gboolean numeric)
gboolean gtk_spin_button_sci_get_numeric (GtkSpinbuttonsci *spin_button_sci)
void gtk_spin_button_sci_set_wrap (GtkSpinbuttonsci *spin_button_sci, gboolean wrap)
gboolean gtk_spin_button_sci_get_wrap (GtkSpinbuttonsci *spin_button_sci)
void gtk_spin_button_sci_set_snap_to_ticks (GtkSpinbuttonsci *spin_button_sci, gboolean snap_to_ticks)
gboolean gtk_spin_button_sci_get_snap_to_ticks (GtkSpinbuttonsci *spin_button_sci)
void gtk_spin_button_sci_spin (GtkSpinbuttonsci *spin_button_sci, GtkSpinsciType direction, gdouble increment)
void gtk_spin_button_sci_update (GtkSpinbuttonsci *spin_button_sci)

Variables

static GtkEntryClass * parent_class = NULL
static guint spinbuttonsci_signals [LAST_SIGNAL] = {0}


Define Documentation

#define add_spin_binding (  binding_set,
keyval,
mask,
scroll   ) 
 

Value:

gtk_binding_entry_add_signal (binding_set, keyval, mask,             \
                                "change_value", 1,                     \
                                GTK_TYPE_SCROLL_TYPE, scroll)

Definition at line 193 of file gtkspinbuttonsci.c.

#define EPSILON   1e-10
 

Definition at line 54 of file gtkspinbuttonsci.c.

#define MAX_DIGITS   20
 

Definition at line 55 of file gtkspinbuttonsci.c.

#define MAX_TIMER_CALLS   5
 

Definition at line 53 of file gtkspinbuttonsci.c.

#define MIN_ARROW_WIDTH   6
 

Definition at line 56 of file gtkspinbuttonsci.c.

#define MIN_SPIN_BUTTON_SCI_WIDTH   30
 

Definition at line 50 of file gtkspinbuttonsci.c.

#define NO_ARROW   2
 

Definition at line 153 of file gtkspinbuttonsci.c.

#define SPIN_BUTTON_SCI_INITIAL_TIMER_DELAY   200
 

Definition at line 51 of file gtkspinbuttonsci.c.

#define SPIN_BUTTON_SCI_TIMER_DELAY   20
 

Definition at line 52 of file gtkspinbuttonsci.c.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
PROP_0 
PROP_ADJUSTMENT 
PROP_CLIMB_RATE 
PROP_DIGITS 
PROP_SNAP_TO_TICKS 
PROP_NUMERIC 
PROP_WRAP 
PROP_UPDATE_POLICY 
PROP_VALUE 

Definition at line 58 of file gtkspinbuttonsci.c.

anonymous enum
 

Enumerator:
INPUT 
OUTPUT 
VALUE_CHANGED 
CHANGE_VALUE 
LAST_SIGNAL 

Definition at line 71 of file gtkspinbuttonsci.c.


Function Documentation

static void adjustment_changed_cb (  GtkAdjustment *  adjustment,
gpointer  data
)  [static]
 

Definition at line 1699 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, GTK_SPIN_BUTTON_SCI, and _GtkSpinbuttonsci::timer_step.

static int compute_double_length (  double  val,
int  digits
)  [static]
 

Definition at line 611 of file gtkspinbuttonsci.c.

static void get_borders (  GtkEntry *  entry,
gint *  xborder,
gint *  yborder
)  [static]
 

Definition at line 636 of file gtkspinbuttonsci.c.

static void gtk_spin_button_sci_activate (  GtkEntry *  entry  )  [static]
 

Definition at line 1428 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_update(), and parent_class.

static gint gtk_spin_button_sci_button_press (  GtkWidget *  widget,
GdkEventButton *  event
)  [static]
 

Definition at line 1109 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::button, FALSE, GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_update(), _GtkSpinbuttonsci::panel, parent_class, start_spinning(), and TRUE.

static gint gtk_spin_button_sci_button_release (  GtkWidget *  widget,
GdkEventButton *  event
)  [static]
 

Definition at line 1156 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, _GtkSpinbuttonsci::button, _GtkSpinbuttonsci::click_child, EPSILON, GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_real_spin(), gtk_spin_button_sci_stop_spinning(), _GtkSpinbuttonsci::jump_to_limits, parent_class, spin_button_sci_get_arrow_size(), spin_button_sci_redraw(), and TRUE.

static void gtk_spin_button_sci_class_init (  GtkSpinbuttonsciClass *  klass  )  [static]
 

Definition at line 199 of file gtkspinbuttonsci.c.

References _gtk_marshal_BOOLEAN__VOID(), _gtk_marshal_INT__POINTER(), _gtk_marshal_VOID__ENUM, _gtk_marshal_VOID__VOID, add_spin_binding, CHANGE_VALUE, FALSE, gtk_spin_button_sci_activate(), gtk_spin_button_sci_button_press(), gtk_spin_button_sci_button_release(), gtk_spin_button_sci_destroy(), gtk_spin_button_sci_enter_notify(), gtk_spin_button_sci_expose(), gtk_spin_button_sci_finalize(), gtk_spin_button_sci_focus_out(), gtk_spin_button_sci_get_property(), gtk_spin_button_sci_grab_notify(), gtk_spin_button_sci_key_release(), gtk_spin_button_sci_leave_notify(), gtk_spin_button_sci_map(), gtk_spin_button_sci_motion_notify(), gtk_spin_button_sci_real_change_value(), gtk_spin_button_sci_realize(), gtk_spin_button_sci_scroll(), gtk_spin_button_sci_set_property(), gtk_spin_button_sci_size_allocate(), gtk_spin_button_sci_size_request(), gtk_spin_button_sci_state_changed(), gtk_spin_button_sci_unmap(), gtk_spin_button_sci_unrealize(), INPUT, MAX_DIGITS, OUTPUT, P_, parent_class, PROP_ADJUSTMENT, PROP_CLIMB_RATE, PROP_DIGITS, PROP_NUMERIC, PROP_SNAP_TO_TICKS, PROP_UPDATE_POLICY, PROP_VALUE, PROP_WRAP, spinbuttonsci_signals, and VALUE_CHANGED.

void gtk_spin_button_sci_configure (  GtkSpinbuttonsci *  spin_button_sci,
GtkAdjustment *  adjustment,
gdouble  climb_rate,
guint  digits
) 
 

Definition at line 1604 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI, and gtk_spin_button_sci_set_adjustment().

static gint gtk_spin_button_sci_default_input (  GtkSpinbuttonsci *  spin_button_sci,
gdouble *  new_val
)  [static]
 

Definition at line 1562 of file gtkspinbuttonsci.c.

References FALSE, and GTK_INPUT_ERROR.

static gint gtk_spin_button_sci_default_output (  GtkSpinbuttonsci *  spin_button_sci  )  [static]
 

Definition at line 1575 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, buf, _GtkSpinbuttonsci::digits, FALSE, and _GtkSpinbuttonsci::sci_suffix.

static void gtk_spin_button_sci_destroy (  GtkObject *  object  )  [static]
 

Definition at line 513 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_set_suffix(), gtk_spin_button_sci_stop_spinning(), and parent_class.

static void gtk_spin_button_sci_draw_arrow (  GtkSpinbuttonsci *  spin_button_sci,
GtkArrowType  arrow_type
)  [static]
 

Definition at line 862 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI, height, NO_ARROW, spin_button_sci_at_limit(), spin_button_sci_get_arrow_size(), TRUE, and width.

static void gtk_spin_button_sci_editable_init (  GtkEditableClass *  iface  )  [static]
 

Definition at line 376 of file gtkspinbuttonsci.c.

References gtk_spin_button_sci_insert_text().

static gint gtk_spin_button_sci_enter_notify (  GtkWidget *  widget,
GdkEventCrossing *  event
)  [static]
 

Definition at line 971 of file gtkspinbuttonsci.c.

References FALSE, GTK_SPIN_BUTTON_SCI, _GtkSpinbuttonsci::in_child, _GtkSpinbuttonsci::panel, and spin_button_sci_redraw().

static gint gtk_spin_button_sci_expose (  GtkWidget *  widget,
GdkEventExpose *  event
)  [static]
 

Definition at line 788 of file gtkspinbuttonsci.c.

References FALSE, GTK_IS_SPIN_BUTTON_SCI, GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_draw_arrow(), _GtkSpinbuttonsci::panel, parent_class, and spin_button_sci_get_shadow_type().

static void gtk_spin_button_sci_finalize (  GObject *  object  )  [static]
 

Definition at line 505 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_set_adjustment(), and parent_class.

static gint gtk_spin_button_sci_focus_out (  GtkWidget *  widget,
GdkEventFocus *  event
)  [static]
 

Definition at line 1007 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_update(), and parent_class.

GtkAdjustment* gtk_spin_button_sci_get_adjustment (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_adjustment: :

Get the adjustment associated with a GtkSpinbuttonsci

Return value: the GtkAdjustment of

Definition at line 1763 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

guint gtk_spin_button_sci_get_digits (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_digits: : a GtkSpinbuttonsci

Fetches the precision of . See gtk_spin_button_sci_set_digits().

Returns: the current precision

Definition at line 1804 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

void gtk_spin_button_sci_get_increments (  GtkSpinbuttonsci *  spin_button_sci,
gdouble *  step,
gdouble *  page
) 
 

Definition at line 1841 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

gboolean gtk_spin_button_sci_get_numeric (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_numeric: : a GtkSpinbuttonsci

Returns whether non-numeric text can be typed into the spin button. See gtk_spin_button_sci_set_numeric().

Return value: TRUE if only numeric text can be entered

Definition at line 2057 of file gtkspinbuttonsci.c.

References FALSE, and GTK_IS_SPIN_BUTTON_SCI.

static void gtk_spin_button_sci_get_property (  GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec
)  [static]
 

Definition at line 434 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, _GtkSpinbuttonsci::climb_rate, _GtkSpinbuttonsci::digits, GTK_SPIN_BUTTON_SCI, _GtkSpinbuttonsci::numeric, PROP_ADJUSTMENT, PROP_CLIMB_RATE, PROP_DIGITS, PROP_NUMERIC, PROP_SNAP_TO_TICKS, PROP_UPDATE_POLICY, PROP_VALUE, PROP_WRAP, _GtkSpinbuttonsci::snap_to_ticks, _GtkSpinbuttonsci::update_policy, and _GtkSpinbuttonsci::wrap.

void gtk_spin_button_sci_get_range (  GtkSpinbuttonsci *  spin_button_sci,
gdouble *  min,
gdouble *  max
) 
 

gtk_spin_button_sci_get_range: : a GtkSpinbuttonsci : location to store minimum allowed value, or NULL : location to store maximum allowed value, or NULL

Gets the range allowed for . See gtk_spin_button_sci_set_range().

Definition at line 1893 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

gboolean gtk_spin_button_sci_get_snap_to_ticks (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_snap_to_ticks: : a GtkSpinbuttonsci

Returns whether the values are corrected to the nearest step. See gtk_spin_button_sci_set_snap_to_ticks().

Return value: TRUE if values are snapped to the nearest step.

Definition at line 2174 of file gtkspinbuttonsci.c.

References FALSE, and GTK_IS_SPIN_BUTTON_SCI.

GType gtk_spin_button_sci_get_type (  void   ) 
 

Definition at line 156 of file gtkspinbuttonsci.c.

References gtk_spin_button_sci_class_init(), gtk_spin_button_sci_editable_init(), and gtk_spin_button_sci_init().

GtkSpinbuttonsciUpdatePolicy gtk_spin_button_sci_get_update_policy (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_update_policy: : a GtkSpinbuttonsci

Gets the update behavior of a spin button. See gtk_spin_button_sci_set_update_policy().

Return value: the current update policy

Definition at line 2017 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI, and GTK_SPIN_SCI_UPDATE_ALWAYS.

gdouble gtk_spin_button_sci_get_value (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_value: : a GtkSpinbuttonsci

Get the value in the .

Return value: the value of

Definition at line 1933 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

gint gtk_spin_button_sci_get_value_as_int (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_value_as_int: : a GtkSpinbuttonsci

Get the value represented as an integer.

Return value: the value of

Definition at line 1949 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

gboolean gtk_spin_button_sci_get_wrap (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_get_wrap: : a GtkSpinbuttonsci

Returns whether the spin button's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded. See gtk_spin_button_sci_set_wrap().

Return value: TRUE if the spin button wraps around

Definition at line 2099 of file gtkspinbuttonsci.c.

References FALSE, and GTK_IS_SPIN_BUTTON_SCI.

static void gtk_spin_button_sci_grab_notify (  GtkWidget *  widget,
gboolean  was_grabbed
)  [static]
 

Definition at line 1017 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_stop_spinning(), and spin_button_sci_redraw().

static void gtk_spin_button_sci_init (  GtkSpinbuttonsci *  spin_button_sci  )  [static]
 

Definition at line 476 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, _GtkSpinbuttonsci::adjustment_safety, _GtkSpinbuttonsci::button, _GtkSpinbuttonsci::click_child, _GtkSpinbuttonsci::climb_rate, _GtkSpinbuttonsci::digits, FALSE, gtk_spin_button_sci_set_adjustment(), _GtkSpinbuttonsci::in_child, _GtkSpinbuttonsci::jump_to_limits, _GtkSpinbuttonsci::need_timer, NO_ARROW, _GtkSpinbuttonsci::numeric, _GtkSpinbuttonsci::panel, _GtkSpinbuttonsci::sci_extension_magnitude_arrows, _GtkSpinbuttonsci::sci_fixed_point_mantisse, _GtkSpinbuttonsci::sci_max_left_digits, _GtkSpinbuttonsci::sci_suffix, _GtkSpinbuttonsci::snap_to_ticks, _GtkSpinbuttonsci::timer, _GtkSpinbuttonsci::timer_calls, _GtkSpinbuttonsci::timer_step, TRUE, _GtkSpinbuttonsci::update_policy, and _GtkSpinbuttonsci::wrap.

static void gtk_spin_button_sci_insert_text (  GtkEditable *  editable,
const gchar *  new_text,
gint  new_text_length,
gint *  position
)  [static]
 

Definition at line 1438 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, _GtkSpinbuttonsci::numeric, and parent_class.

static gint gtk_spin_button_sci_key_release (  GtkWidget *  widget,
GdkEventKey *  event
)  [static]
 

Definition at line 1387 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, GTK_SPIN_BUTTON_SCI, _GtkSpinbuttonsci::timer_calls, _GtkSpinbuttonsci::timer_step, and TRUE.

static gint gtk_spin_button_sci_leave_notify (  GtkWidget *  widget,
GdkEventCrossing *  event
)  [static]
 

Definition at line 995 of file gtkspinbuttonsci.c.

References FALSE, GTK_SPIN_BUTTON_SCI, _GtkSpinbuttonsci::in_child, NO_ARROW, and spin_button_sci_redraw().

static void gtk_spin_button_sci_map (  GtkWidget *  widget  )  [static]
 

Definition at line 522 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, and parent_class.

static gint gtk_spin_button_sci_motion_notify (  GtkWidget *  widget,
GdkEventMotion *  event
)  [static]
 

Definition at line 1205 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::button, FALSE, GTK_SPIN_BUTTON_SCI, _GtkSpinbuttonsci::in_child, _GtkSpinbuttonsci::panel, parent_class, and spin_button_sci_redraw().

GtkWidget* gtk_spin_button_sci_new (  GtkAdjustment *  adjustment,
gdouble  climb_rate,
guint  digits
) 
 

Definition at line 1634 of file gtkspinbuttonsci.c.

References gtk_spin_button_sci_configure(), and GTK_TYPE_SPIN_BUTTON_SCI.

GtkWidget* gtk_spin_button_sci_new_with_range (  gdouble  min,
gdouble  max,
gdouble  step
) 
 

gtk_spin_button_sci_new_with_range: : Minimum allowable value : Maximum allowable value : Increment added or subtracted by spinning the widget

This is a convenience constructor that allows creation of a numeric GtkSpinbuttonsci without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * is the default. The precision of the spin button is equivalent to the precision of .

Return value: The new spin button as a GtkWidget.

Definition at line 1665 of file gtkspinbuttonsci.c.

References gtk_spin_button_sci_configure(), gtk_spin_button_sci_set_numeric(), GTK_TYPE_SPIN_BUTTON_SCI, MAX_DIGITS, and TRUE.

static void gtk_spin_button_sci_real_change_value (  GtkSpinbuttonsci *  spin,
GtkScrollType  scroll
)  [static]
 

Definition at line 1302 of file gtkspinbuttonsci.c.

References EPSILON, gtk_spin_button_sci_real_spin(), gtk_spin_button_sci_update(), MAX_TIMER_CALLS, and _GtkSpinbuttonsci::timer_step.

static void gtk_spin_button_sci_real_spin (  GtkSpinbuttonsci *  spin_button_sci,
gdouble  step
)  [static]
 

Definition at line 1520 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, EPSILON, MAX, MIN, spin_button_sci_redraw(), and _GtkSpinbuttonsci::wrap.

static void gtk_spin_button_sci_realize (  GtkWidget *  widget  )  [static]
 

Definition at line 542 of file gtkspinbuttonsci.c.

References FALSE, GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_default_output(), OUTPUT, _GtkSpinbuttonsci::panel, parent_class, spin_button_sci_get_arrow_size(), and spinbuttonsci_signals.

static gint gtk_spin_button_sci_scroll (  GtkWidget *  widget,
GdkEventScroll *  event
)  [static]
 

Definition at line 1043 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, FALSE, GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_real_spin(), and TRUE.

void gtk_spin_button_sci_set_adjustment (  GtkSpinbuttonsci *  spin_button_sci,
GtkAdjustment *  adjustment
) 
 

gtk_spin_button_sci_set_adjustment: : a GtkSpinbuttonsci : a GtkAdjustment to replace the existing adjustment

Replaces the GtkAdjustment associated with .

Definition at line 1717 of file gtkspinbuttonsci.c.

References adjustment_changed_cb(), GTK_IS_SPIN_BUTTON_SCI, and gtk_spin_button_sci_value_changed().

void gtk_spin_button_sci_set_digits (  GtkSpinbuttonsci *  spin_button_sci,
guint  digits
) 
 

gtk_spin_button_sci_set_digits: : a GtkSpinbuttonsci : the number of digits after the decimal point to be displayed for the spin button's value

Set the precision to be displayed by . Up to 20 digit precision is allowed.

Definition at line 1779 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI, and gtk_spin_button_sci_value_changed().

void gtk_spin_button_sci_set_increments (  GtkSpinbuttonsci *  spin_button_sci,
gdouble  step,
gdouble  page
) 
 

Definition at line 1821 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

void gtk_spin_button_sci_set_numeric (  GtkSpinbuttonsci *  spin_button_sci,
gboolean  numeric
) 
 

gtk_spin_button_sci_set_numeric: : a GtkSpinbuttonsci : flag indicating if only numeric entry is allowed.

Sets the flag that determines if non-numeric text can be typed into the spin button.

Definition at line 2033 of file gtkspinbuttonsci.c.

References FALSE, and GTK_IS_SPIN_BUTTON_SCI.

static void gtk_spin_button_sci_set_property (  GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec
)  [static]
 

Definition at line 382 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, _GtkSpinbuttonsci::climb_rate, _GtkSpinbuttonsci::digits, GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_configure(), gtk_spin_button_sci_set_adjustment(), gtk_spin_button_sci_set_numeric(), gtk_spin_button_sci_set_snap_to_ticks(), gtk_spin_button_sci_set_update_policy(), gtk_spin_button_sci_set_value(), gtk_spin_button_sci_set_wrap(), PROP_ADJUSTMENT, PROP_CLIMB_RATE, PROP_DIGITS, PROP_NUMERIC, PROP_SNAP_TO_TICKS, PROP_UPDATE_POLICY, PROP_VALUE, and PROP_WRAP.

void gtk_spin_button_sci_set_range (  GtkSpinbuttonsci *  spin_button_sci,
gdouble  min,
gdouble  max
) 
 

gtk_spin_button_sci_set_range: : a GtkSpinbuttonsci : minimum allowable value : maximum allowable value

Sets the minimum and maximum allowable values for

Definition at line 1862 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI, and gtk_spin_button_sci_set_value().

void gtk_spin_button_sci_set_snap_to_ticks (  GtkSpinbuttonsci *  spin_button_sci,
gboolean  snap_to_ticks
) 
 

gtk_spin_button_sci_set_snap_to_ticks: : a GtkSpinbuttonsci : a flag indicating if invalid values should be corrected.

Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.

Definition at line 2145 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI, and gtk_spin_button_sci_update().

void gtk_spin_button_sci_set_suffix (  GtkSpinbuttonsci *  spin_button_sci,
gchar *  suffix
) 
 

gtk_spin_button_sci_set_suffix: : a GtkSpinbuttonsci : suffix or unit string appended to number, or NULL to disable

Sets the optional number suffix or unit string for

Definition at line 1913 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::sci_suffix.

void gtk_spin_button_sci_set_update_policy (  GtkSpinbuttonsci *  spin_button_sci,
GtkSpinbuttonsciUpdatePolicy  policy
) 
 

gtk_spin_button_sci_set_update_policy: : a GtkSpinbuttonsci : a GtkSpinbuttonsciUpdatePolicy value

Sets the update behavior of a spin button. This determines whether the spin button is always updated or only when a valid value is set.

Definition at line 1995 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI.

void gtk_spin_button_sci_set_value (  GtkSpinbuttonsci *  spin_button_sci,
gdouble  value
) 
 

gtk_spin_button_sci_set_value: : a GtkSpinbuttonsci : the new value

Set the value of .

Definition at line 1970 of file gtkspinbuttonsci.c.

References EPSILON, FALSE, GTK_IS_SPIN_BUTTON_SCI, gtk_spin_button_sci_default_output(), OUTPUT, and spinbuttonsci_signals.

void gtk_spin_button_sci_set_wrap (  GtkSpinbuttonsci *  spin_button_sci,
gboolean  wrap
) 
 

gtk_spin_button_sci_set_wrap: : a GtkSpinbuttonsci : a flag indicating if wrapping behavior is performed.

Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.

Definition at line 2073 of file gtkspinbuttonsci.c.

References FALSE, and GTK_IS_SPIN_BUTTON_SCI.

static void gtk_spin_button_sci_size_allocate (  GtkWidget *  widget,
GtkAllocation *  allocation
)  [static]
 

Definition at line 736 of file gtkspinbuttonsci.c.

References GTK_IS_SPIN_BUTTON_SCI, GTK_SPIN_BUTTON_SCI, MIN, parent_class, spin_button_sci_get_arrow_size(), and spin_button_sci_redraw().

static void gtk_spin_button_sci_size_request (  GtkWidget *  widget,
GtkRequisition *  requisition
)  [static]
 

Definition at line 668 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, compute_double_length(), _GtkSpinbuttonsci::digits, get_borders(), GTK_SPIN_BUTTON_SCI, MAX, MIN, MIN_SPIN_BUTTON_SCI_WIDTH, parent_class, spin_button_sci_get_arrow_size(), and width.

static void gtk_spin_button_sci_snap (  GtkSpinbuttonsci *  spin_button_sci,
gdouble  val
)  [static]
 

Definition at line 1400 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, EPSILON, FALSE, gtk_spin_button_sci_default_output(), OUTPUT, and spinbuttonsci_signals.

void gtk_spin_button_sci_spin (  GtkSpinbuttonsci *  spin_button_sci,
GtkSpinsciType  direction,
gdouble  increment
) 
 

gtk_spin_button_sci_spin: : a GtkSpinbuttonsci : a GtkSpinsciType indicating the direction to spin. : step increment to apply in the specified direction.

Increment or decrement a spin button's value in a specified direction by a specified amount.

Definition at line 2191 of file gtkspinbuttonsci.c.

References EPSILON, GTK_IS_SPIN_BUTTON_SCI, gtk_spin_button_sci_real_spin(), GTK_SPIN_SCI_END, GTK_SPIN_SCI_HOME, GTK_SPIN_SCI_PAGE_BACKWARD, GTK_SPIN_SCI_PAGE_FORWARD, GTK_SPIN_SCI_STEP_BACKWARD, GTK_SPIN_SCI_STEP_FORWARD, and GTK_SPIN_SCI_USER_DEFINED.

static void gtk_spin_button_sci_state_changed (  GtkWidget *  widget,
GtkStateType  previous_state
)  [static]
 

Definition at line 1030 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, gtk_spin_button_sci_stop_spinning(), and spin_button_sci_redraw().

static void gtk_spin_button_sci_stop_spinning (  GtkSpinbuttonsci *  spin  )  [static]
 

Definition at line 1067 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, _GtkSpinbuttonsci::button, _GtkSpinbuttonsci::click_child, FALSE, _GtkSpinbuttonsci::need_timer, NO_ARROW, _GtkSpinbuttonsci::timer, _GtkSpinbuttonsci::timer_calls, and _GtkSpinbuttonsci::timer_step.

static gint gtk_spin_button_sci_timer (  GtkSpinbuttonsci *  spin_button_sci  )  [static]
 

Definition at line 1239 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::click_child, FALSE, gtk_spin_button_sci_real_spin(), gtk_spin_button_sci_timer(), MAX_TIMER_CALLS, SPIN_BUTTON_SCI_TIMER_DELAY, _GtkSpinbuttonsci::timer, _GtkSpinbuttonsci::timer_step, and TRUE.

static void gtk_spin_button_sci_unmap (  GtkWidget *  widget  )  [static]
 

Definition at line 532 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, and parent_class.

static void gtk_spin_button_sci_unrealize (  GtkWidget *  widget  )  [static]
 

Definition at line 596 of file gtkspinbuttonsci.c.

References GTK_SPIN_BUTTON_SCI, _GtkSpinbuttonsci::panel, and parent_class.

void gtk_spin_button_sci_update (  GtkSpinbuttonsci *  spin_button_sci  ) 
 

gtk_spin_button_sci_update: : a GtkSpinbuttonsci

Manually force an update of the spin button.

Definition at line 2272 of file gtkspinbuttonsci.c.

References EPSILON, FALSE, GTK_INPUT_ERROR, GTK_IS_SPIN_BUTTON_SCI, gtk_spin_button_sci_default_input(), gtk_spin_button_sci_default_output(), gtk_spin_button_sci_snap(), gtk_spin_button_sci_value_changed(), GTK_SPIN_SCI_UPDATE_ALWAYS, GTK_SPIN_SCI_UPDATE_IF_VALID, INPUT, OUTPUT, spin_button_sci_redraw(), and spinbuttonsci_signals.

static void gtk_spin_button_sci_value_changed (  GtkAdjustment *  adjustment,
GtkSpinbuttonsci *  spin_button_sci
)  [static]
 

Definition at line 1282 of file gtkspinbuttonsci.c.

References FALSE, gtk_spin_button_sci_default_output(), OUTPUT, spin_button_sci_redraw(), spinbuttonsci_signals, and VALUE_CHANGED.

static gboolean spin_button_sci_at_limit (  GtkSpinbuttonsci *  spin_button_sci,
GtkArrowType  arrow
)  [static]
 

Definition at line 837 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::adjustment, EPSILON, FALSE, TRUE, and _GtkSpinbuttonsci::wrap.

static gint spin_button_sci_get_arrow_size (  GtkSpinbuttonsci *  spin_button_sci  )  [static]
 

Definition at line 2107 of file gtkspinbuttonsci.c.

References MAX, and MIN_ARROW_WIDTH.

static gint spin_button_sci_get_shadow_type (  GtkSpinbuttonsci *  spin_button_sci  )  [static]
 

spin_button_sci_get_shadow_type: : a GtkSpinbuttonsci

Convenience function to Get the shadow type from the underlying widget's style.

Return value: the GtkShadowType

Definition at line 2127 of file gtkspinbuttonsci.c.

static void spin_button_sci_redraw (  GtkSpinbuttonsci *  spin_button_sci  )  [static]
 

Definition at line 2326 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::panel, and TRUE.

static void start_spinning (  GtkSpinbuttonsci *  spin,
GtkArrowType  click_child,
gdouble  step
)  [static]
 

Definition at line 1087 of file gtkspinbuttonsci.c.

References _GtkSpinbuttonsci::click_child, gtk_spin_button_sci_real_spin(), gtk_spin_button_sci_timer(), _GtkSpinbuttonsci::need_timer, SPIN_BUTTON_SCI_INITIAL_TIMER_DELAY, spin_button_sci_redraw(), _GtkSpinbuttonsci::timer, _GtkSpinbuttonsci::timer_step, and TRUE.


Variable Documentation

GtkEntryClass* parent_class = NULL [static]
 

Definition at line 150 of file gtkspinbuttonsci.c.

guint spinbuttonsci_signals[LAST_SIGNAL] = {0} [static]
 

Definition at line 151 of file gtkspinbuttonsci.c.


Generated on Sat Apr 1 09:04:35 2006 for GXSM by  doxygen 1.4.6