| Gwyddion Widgets Library Reference Manual |
|---|
GwyValUnit — Value entry with unit and selection of unit prefix
struct GwyValUnit; struct GwyValUnitClass; 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);
GObject
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBox
+----GtkHBox
+----GwyValUnit
struct GwyValUnitClass {
GtkVBoxClass parent_class;
void (*value_changed)(GwyValUnit *val_unit);
gpointer reserved1;
gpointer reserved2;
};
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. |
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 |
gdouble gwy_val_unit_get_value (GwyValUnit *val_unit);
Computes actual value of adjustment and unit prefix.
| val_unit : | GwyValUnit widget |
| Returns : | actual value |
void gwy_val_unit_signal_value_changed
(GwyValUnit *val_unit);
| val_unit : |
void user_function (GwyValUnit *gwyvalunit, gpointer user_data);
| gwyvalunit : | the object which received the signal. |
| user_data : | user data set when the signal handler was connected. |
| << GwyShader | Widget Utilities >> |