GwyValUnit

GwyValUnit — Value entry with unit and selection of unit prefix

Synopsis




GtkWidget*  gwy_val_unit_new                (gchar *label_text,
                                             GwySIUnit *si_unit);
void        gwy_val_unit_set_value          (GwyValUnit *val_unit,
                                             gdouble value);
gdouble     gwy_val_unit_get_value          (GwyValUnit *val_unit);
void        gwy_val_unit_signal_value_changed
                                            (GwyValUnit *val_unit);

Description

Details

gwy_val_unit_new ()

GtkWidget*  gwy_val_unit_new                (gchar *label_text,
                                             GwySIUnit *si_unit);

Creates label, adjustment and selection to set value with unit.

label_text : label to appear on the left side
si_unit : base unit to appear on the right side
Returns : new widget.

Since 1.4.


gwy_val_unit_set_value ()

void        gwy_val_unit_set_value          (GwyValUnit *val_unit,
                                             gdouble value);

sets value and automatically chooses its prefix to appear in selection.

val_unit : GwyValUnit widget
value : value to be set

Since 1.4.


gwy_val_unit_get_value ()

gdouble     gwy_val_unit_get_value          (GwyValUnit *val_unit);

Computes actual value of adjustment and unit prefix.

val_unit : GwyValUnit widget
Returns : actual value

Since 1.4.


gwy_val_unit_signal_value_changed ()

void        gwy_val_unit_signal_value_changed
                                            (GwyValUnit *val_unit);

val_unit :