GnomeScanParamWidget

## GnomeScanParamWidget GnomeScanParamWidget — A generic parameter widget |

## Synopsis

    #define             GS_DEFINE_PARAM_WIDGET              (TypeName, type_name)
    #define             GS_DEFINE_PARAM_WIDGET_HEADER       (TypeName, type_name)
                        GnomeScanParamWidget;
    GtkWidget*          gnome_scan_param_widget_new         (GnomeScanSettings *settings,
                                                             GnomeScanPlugin *plugin,
                                                             GParamSpec *pspec);
    void                gnome_scan_param_widget_set_value   (GnomeScanParamWidget *widget,
                                                             GValue *value);
    void                gnome_scan_param_widget_changed     (GnomeScanParamWidget *widget);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkHBox
                                           +----GnomeScanParamWidget

## Implemented Interfaces

GnomeScanParamWidget implements AtkImplementorIface and GtkBuildable.

## Properties

      "param-spec"               gpointer              : Read / Write / Construct Only
      "plugin"                   GnomeScanPlugin       : Read / Write / Construct Only
      "settings"                 GnomeScanSettings     : Read / Write / Construct Only
      "value"                    GValue                : Read / Write

## Description

This widget build it self automatically considering the GParamSpec passed to the constructor.

## Details

### GS_DEFINE_PARAM_WIDGET()

    #define             GS_DEFINE_PARAM_WIDGET(TypeName, type_name)

Generate all boiler plate code for creating a new GnomeScanParamWidget derived class.

`TypeName` : | class name
`type_name` : | function prefix

### GS_DEFINE_PARAM_WIDGET_HEADER()

    #define             GS_DEFINE_PARAM_WIDGET_HEADER(TypeName, type_name)

Generate all boiler plate header declaration for creating a new GnomeScanParamWidget derived class.

`TypeName` : | class name
`type_name` : | function prefix

### GnomeScanParamWidget

    typedef struct {
      GnomeScanSettings*	settings;
      GnomeScanPlugin*	plugin;
      GParamSpec		*pspec;
      GValue		*value;

      gboolean		shows_label;
      gboolean		expands;
      gboolean		shows_unit;
    } GnomeScanParamWidget;

### gnome_scan_param_widget_new ()

    GtkWidget*          gnome_scan_param_widget_new         (GnomeScanSettings *settings,
                                                             GnomeScanPlugin *plugin,
                                                             GParamSpec *pspec);

Build a new GnomeScanParamWidget from `pspec` widget_type. Initialize settings with `pspec` default value if needed.

`settings` : | The GnomeScanSettings where to store values
`plugin` : | The GnomeScanPlugin to configure
`pspec` : | The GParamSpec to be managed
Returns : | The new GnomeScanParamWidget

### gnome_scan_param_widget_set_value ()

    void                gnome_scan_param_widget_set_value   (GnomeScanParamWidget *widget,
                                                             GValue *value);

Set the value of the widget. It's up to you to ensure the value correspond to the param spec.

`widget` : | a GnomeScanParamWidget
`value` : | a GValue

### gnome_scan_param_widget_changed ()

    void                gnome_scan_param_widget_changed     (GnomeScanParamWidget *widget);

Trigger changed signal, as if user have touched the GUI.

`widget` : | a GnomeScanParamWidget

## Property Details

### The "`param-spec`" property

      "param-spec"               gpointer              : Read / Write / Construct Only

The param spec the widget is representing. A widget can handle only one GParamSpec per instance, the widget being builded upon construction depending on the GParamSpec.

### The "`plugin`" property

      "plugin"                   GnomeScanPlugin       : Read / Write / Construct Only

### The "`settings`" property

      "settings"                 GnomeScanSettings     : Read / Write / Construct Only

### The "`value`" property

      "value"                    GValue                : Read / Write

The current value associated with the param-spec.