![]() | ![]() | ![]() | Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyValUnitGwyValUnit — Value entry with unit and selection of unit prefix |
GwyValUnit; 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
typedef struct { GtkVBoxClass parent_class; void (*value_changed)(GwyValUnit *val_unit); gpointer reserved1; gpointer reserved2; } GwyValUnitClass;
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.
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.
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.
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. |
<< GwyToolbox | Shader >> |