## gtk_lineObjectWidget

gtk_lineObjectWidget — Defines a specialised GtkHBox to choose all characteristic of lines.

## Synopsis

    #define             LINE_OBJECT_TYPE
    #define             LINE_OBJECT                         (obj)
    #define             LINE_OBJECT_CLASS                   (klass)
    #define             IS_LINE_OBJECT                      (obj)
    #define             IS_LINE_OBJECT_CLASS                (klass)
                        LineObject;
                        LineObjectClass;
    GType               lineObject_get_type                 (void);
    GtkWidget*          lineObjectNew                       (const gchar *label);
    void                lineObjectSet_use                   (LineObject *line,
                                                             gboolean status);
    void                lineObjectSet_width                 (LineObject *line,
                                                             gint width);
    void                lineObjectSet_color                 (LineObject *line,
                                                             float rgb[3]);
    void                lineObjectSet_stipple               (LineObject *line,
                                                             guint16 stipple);
    GtkWidget*          lineObjectGet_optionVBox            (LineObject *line);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkVBox
                                           +----LineObject

## Implemented Interfaces

LineObject implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Signals

      "color-changed"                                  : Run First / Action
      "stipple-changed"                                : Run First / Action
      "use-changed"                                    : Run First / Action
      "width-changed"                                  : Run First / Action

## Description

This widget looks like a GtkComboBox and it displays a list of preset patterns for line. These patterns are defined by a guint16 value that is given to OpenGL for line stipple.

This widget can emit a "stipple-selected" signal that is a wrapper around the "changed" signal, but it is emitted only when a stipple is selected and this stipple is passed to the call back.

## Details

### LINE_OBJECT_TYPE

    #define LINE_OBJECT_TYPE         (lineObject_get_type ())

Get the associated GType to the LineObject objects.

Since 3.4

### LINE_OBJECT()

    #define LINE_OBJECT(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), LINE_OBJECT_TYPE, LineObject))

Cast the given object to a LineObject object.

`obj` : | the widget to cast.

Since 3.4

### LINE_OBJECT_CLASS()

    #define LINE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LINE_OBJECT_TYPE, LineObjectClass))

Cast the given class to a LineObjectClass object.

`klass` : | the class to cast.

Since 3.4

### IS_LINE_OBJECT()

    #define IS_LINE_OBJECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LINE_OBJECT_TYPE))

Get if the given object is a valid LineObject object.

`obj` : | the object to test.

Since 3.4

### IS_LINE_OBJECT_CLASS()

    #define IS_LINE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LINE_OBJECT_TYPE))

Get if the given class is a valid LineObjectClass class.

`klass` : | the class to test.

Since 3.4

### LineObject

    typedef struct _LineObject LineObject;

Private structure to store informations of a LineObject object.

Since 3.4

### LineObjectClass

    typedef struct _LineObjectClass LineObjectClass;

Private structure to store informations of a LineObjectClass object.

Since 3.4

### lineObject_get_type ()

    GType               lineObject_get_type                 (void);

GType are unique numbers to identify objects.

Returns : | the GType associated with LineObject objects.

Since 3.4

### lineObjectNew ()

    GtkWidget*          lineObjectNew                       (const gchar *label);

A LineObject widget is a widget allowing to choose the properties of a line. These properties are the line stipple pattern, its colour and its width. The colour is available through GtkRange and with a ColorComboBox widget. There is also a checkbox allowing to turn the line on or off.

`label` : | the name of the group, output in bold.
Returns : | a newly created LineObject widget.

Since 3.4

### lineObjectSet_use ()

    void                lineObjectSet_use                   (LineObject *line,
                                                             gboolean status);

The line can be turn on or off, call this routine to change the interface status.

`line` : | the object to modify ;
`status` : | a boolean.

### lineObjectSet_width ()

    void                lineObjectSet_width                 (LineObject *line,
                                                             gint width);

The line can be drawn with a given width, call this routine to change the interface value.

`line` : | the object to modify ;
`width` : | a value.

### lineObjectSet_color ()

    void                lineObjectSet_color                 (LineObject *line,
                                                             float rgb[3]);

The line can is drawn in a given colour. Change the interface values using this routine. The colour ranges are updated and if it correspond to a registered colour, it is selected in the combobox.

`line` : | the object to modify ;
`rgb` : | a RGB array.

### lineObjectSet_stipple ()

    void                lineObjectSet_stipple               (LineObject *line,
                                                             guint16 stipple);

The line can be drawn with a given stipple pattern, call this routine to change the interface value.

`line` : | the object to modify ;
`stipple` : | a value.

### lineObjectGet_optionVBox ()

    GtkWidget*          lineObjectGet_optionVBox            (LineObject *line);

Give access to the GtkVBox of the expander.

`line` : | the object to get the GtkVBox.
Returns : | a GtkWidget.

Since 3.6

## Signal Details

### The `"color-changed"` signal

    void                user_function                      (LineObject *line,
                                                            gpointer    color,
                                                            gpointer    user_data)      : Run First / Action

This signal is emitted when the colour of the line is changed.

`line` : | the LineObject that emits the signal ;
`color` : | the new color values (three RGB values).
`user_data` : | user data set when the signal handler was connected.

Since 3.4

### The `"stipple-changed"` signal

    void                user_function                      (LineObject *line,
                                                            guint       stipple,
                                                            gpointer    user_data)      : Run First / Action

This signal is emitted when the stipple pattern of the line is changed.

`line` : | the LineObject that emits the signal ;
`stipple` : | the new stipple pattern.
`user_data` : | user data set when the signal handler was connected.

Since 3.4

### The `"use-changed"` signal

    void                user_function                      (LineObject *line,
                                                            gboolean    used,
                                                            gpointer    user_data)      : Run First / Action

This signal is emitted when the usage check box is changed.

`line` : | the LineObject that emits the signal ;
`used` : | TRUE if the line is used.
`user_data` : | user data set when the signal handler was connected.

Since 3.4

### The `"width-changed"` signal

    void                user_function                      (LineObject *line,
                                                            gint        width,
                                                            gpointer    user_data)      : Run First / Action

This signal is emitted when the width of the line is changed.

`line` : | the LineObject that emits the signal ;
`width` : | the new width.
`user_data` : | user data set when the signal handler was connected.

Since 3.4

## See Also

ColorComboBox and StippleComboBox