GwyValUnit

GwyValUnit — Value entry with unit and selection of unit prefix

Synopsis




            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);

Object Hierarchy


  GObject
   +----GtkObject
         +----GtkWidget
               +----GtkContainer
                     +----GtkBox
                           +----GtkHBox
                                 +----GwyValUnit

Implemented Interfaces

GwyValUnit implements AtkImplementorIface.

Signal Prototypes


"value-changed"
            void        user_function      (GwyValUnit *gwyvalunit,
                                            gpointer user_data);

Description

Details

GwyValUnit

typedef struct _GwyValUnit GwyValUnit;


GwyValUnitClass

typedef struct {
    GtkVBoxClass parent_class;

    void (*value_changed)(GwyValUnit *val_unit);

    gpointer reserved1;
    gpointer reserved2;
} GwyValUnitClass;


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.

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

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

gwy_val_unit_signal_value_changed ()

void        gwy_val_unit_signal_value_changed
                                            (GwyValUnit *val_unit);

val_unit :

Signals

The "value-changed" signal

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.