## XfceItembar XfceItembar — Container widget with configurable orientation. |

## Synopsis

    #include <libxfce4panel/libxfce4panel.h>

                        XfceItembar;
    GtkWidget *         xfce_itembar_new                    (GtkOrientation orientation);
    void                xfce_itembar_set_orientation        (XfceItembar *itembar,
                                                             GtkOrientation orientation);
    GtkOrientation      xfce_itembar_get_orientation        (XfceItembar *itembar);
    void                xfce_itembar_insert                 (XfceItembar *itembar,
                                                             GtkWidget *item,
                                                             gint position);
    void                xfce_itembar_append                 (XfceItembar *itembar,
                                                             GtkWidget *item);
    void                xfce_itembar_prepend                (XfceItembar *itembar,
                                                             GtkWidget *item);
    void                xfce_itembar_reorder_child          (XfceItembar *itembar,
                                                             GtkWidget *item,
                                                             gint position);
    void                xfce_itembar_set_child_expand       (XfceItembar *itembar,
                                                             GtkWidget *item,
                                                             gboolean expand);
    gboolean            xfce_itembar_get_child_expand       (XfceItembar *itembar,
                                                             GtkWidget *item);
    void                xfce_itembar_set_allow_expand       (XfceItembar *itembar,
                                                             gboolean allow);
    gint                xfce_itembar_get_n_items            (XfceItembar *itembar);
    gint                xfce_itembar_get_item_index         (XfceItembar *itembar,
                                                             GtkWidget *item);
    GtkWidget *         xfce_itembar_get_nth_item           (XfceItembar *itembar,
                                                             gint n);
    void                xfce_itembar_raise_event_window     (XfceItembar *itembar);
    void                xfce_itembar_lower_event_window     (XfceItembar *itembar);
    gboolean            xfce_itembar_event_window_is_raised (XfceItembar *itembar);
    GtkWidget *         xfce_itembar_get_item_at_point      (XfceItembar *itembar,
                                                             gint x,
                                                             gint y);
    gint                xfce_itembar_get_drop_index         (XfceItembar *itembar,
                                                             gint x,
                                                             gint y);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----XfceItembar

## Implemented Interfaces

XfceItembar implements AtkImplementorIface and GtkBuildable.

## Properties

      "orientation"              GtkOrientation        : Read / Write

## Child Properties

      "expand"                   gboolean              : Read / Write

## Signals

      "contents-changed"                               : Run First
      "orientation-changed"                            : Run First

## Description

XfceItembar is a container widget that can hold multiple widgets. The orientation of the bar is configurable and can be changed at any time.

## Details

### XfceItembar

    typedef struct _XfceItembar XfceItembar;

The XfceItembar struct contains private data only, and should be accessed using the functions below.

### xfce_itembar_new ()

    GtkWidget *         xfce_itembar_new                    (GtkOrientation orientation);

Creates a new XfceItembar widget.

`orientation` : | GtkOrientation for new itembar.
Returns : | new XfceItembar widget with `orientation`.

### xfce_itembar_set_orientation ()

    void                xfce_itembar_set_orientation        (XfceItembar *itembar,
                                                             GtkOrientation orientation);

Set the orienation of `itembar`.

`itembar` : | a XfceItembar
`orientation` : | new GtkOrientation

### xfce_itembar_get_orientation ()

    GtkOrientation      xfce_itembar_get_orientation        (XfceItembar *itembar);

Return the orientation of the XfceItembar.

`itembar` : | a XfceItembar
Returns : | GtkOrienation of `itembar`.

### xfce_itembar_insert ()

    void                xfce_itembar_insert                 (XfceItembar *itembar,
                                                             GtkWidget *item,
                                                             gint position);

Insert new item at `position` on `itembar`.

`itembar` : | a XfceItembar
`item` : | GtkWidget to insert
`position` : | position for `item`

### xfce_itembar_append ()

    void                xfce_itembar_append                 (XfceItembar *itembar,
                                                             GtkWidget *item);

Add a new item at the end of `itembar`.

`itembar` : | a XfceItembar
`item` : | GtkWidget to add

### xfce_itembar_prepend ()

    void                xfce_itembar_prepend                (XfceItembar *itembar,
                                                             GtkWidget *item);

Add a new item at the start of `itembar`.

`itembar` : | a XfceItembar
`item` : | GtkWidget to add

### xfce_itembar_reorder_child ()

    void                xfce_itembar_reorder_child          (XfceItembar *itembar,
                                                             GtkWidget *item,
                                                             gint position);

Move `item` to a new position on `itembar`.

`itembar` : | a XfceItembar
`item` : | a child GtkWidget of `itembar`
`position` : | new index for `item`

### xfce_itembar_set_child_expand ()

    void                xfce_itembar_set_child_expand       (XfceItembar *itembar,
                                                             GtkWidget *item,
                                                             gboolean expand);

Sets whether `item` should expand when the size of `itembar` increases.

`itembar` : | a XfceItembar
`item` : | a child GtkWidget of `itembar`
`expand` : | whether to expand the item

### xfce_itembar_get_child_expand ()

    gboolean            xfce_itembar_get_child_expand       (XfceItembar *itembar,
                                                             GtkWidget *item);

Return if the GtkWidget in the XfceItembar expands when the panel is resized.

`itembar` : | a XfceItembar
`item` : | a child GtkWidget of `itembar`
Returns : | `TRUE` if `item` will expand when the size of `itembar` increases, otherwise `FALSE`.

### xfce_itembar_set_allow_expand ()

    void                xfce_itembar_set_allow_expand       (XfceItembar *itembar,
                                                             gboolean allow);

Set whether the 'expand' child property is honored.

See also: `xfce_itembar_set_child_expand()`.

`itembar` : | a XfceItembar
`allow` : | `TRUE` when the expansion is allowed.

### xfce_itembar_get_n_items ()

    gint                xfce_itembar_get_n_items            (XfceItembar *itembar);

Return the number of items on a XfceItembar.

`itembar` : | a XfceItembar
Returns : | the number of items on `itembar`.

### xfce_itembar_get_item_index ()

    gint                xfce_itembar_get_item_index         (XfceItembar *itembar,
                                                             GtkWidget *item);

The index if the child GtkWidget in a XfceItembar.

`itembar` : | a XfceItembar
`item` : | a child GtkWidget of `itembar`
Returns : | the index of `item` or -1 if `itembar` does not contain `item`.

### xfce_itembar_get_nth_item ()

    GtkWidget *         xfce_itembar_get_nth_item           (XfceItembar *itembar,
                                                             gint n);

Return the GtkWidget inside the XfceItembar with the `n`'s index.

`itembar` : | a XfceItembar
`n` : | a position on the itembar
Returns : | the `n`'s item on `itembar`, or `NULL` if the itembar does not contain an `n`'th item.

### xfce_itembar_raise_event_window ()

    void                xfce_itembar_raise_event_window     (XfceItembar *itembar);

Raise the event window of `itembar`. This causes all events, like mouse clicks or key presses to be send to the itembar and not to any item.

See also: `xfce_itembar_lower_event_window()`

`itembar` : | a XfceItembar

### xfce_itembar_lower_event_window ()

    void                xfce_itembar_lower_event_window     (XfceItembar *itembar);

Lower the event window of `itembar`. This causes all events, like mouse clicks or key presses to be send to the items, before reaching the itembar.

See also: `xfce_itembar_raise_event_window()`

`itembar` : | a XfceItembar

### xfce_itembar_event_window_is_raised ()

    gboolean            xfce_itembar_event_window_is_raised (XfceItembar *itembar);

Whether the event window of the XfceItembar is raised.

`itembar` : | a XfceItembar
Returns : | `TRUE` if event window is raised.

### xfce_itembar_get_item_at_point ()

    GtkWidget *         xfce_itembar_get_item_at_point      (XfceItembar *itembar,
                                                             gint x,
                                                             gint y);

Return the GtkWidget in the XfceItembar that is below the (x,y) coordinate.

`itembar` : | a XfceItembar
`x` : | x coordinate relative to the itembar window
`y` : | y coordinate relative to the itembar window
Returns : | a GtkWidget or `NULL`.

### xfce_itembar_get_drop_index ()

    gint                xfce_itembar_get_drop_index         (XfceItembar *itembar,
                                                             gint x,
                                                             gint y);

Returns the position corresponding to the indicated point on `itembar`. This is useful when dragging items to the itembar: this function returns the position a new item should be inserted.

`x` and `y` are in `itembar` coordinates.

`itembar` : | a XfceItembar
`x` : | x coordinate of a point on the itembar
`y` : | y coordinate of a point on the itembar
Returns : | The position corresponding to the point (`x`, `y`) on the itembar.

## Property Details

### The `"orientation"` property

      "orientation"              GtkOrientation        : Read / Write

The orientation of the XfceItembar.

Default value: GTK_ORIENTATION_HORIZONTAL

## Child Property Details

### The `"expand"` child property

      "expand"                   gboolean              : Read / Write

Whether the child of the XfceItembar should fill available space.

Default value: FALSE

## Signal Details

### The `"contents-changed"` signal

    void                user_function                      (XfceItembar *itembar,
                                                            gpointer     user_data)      : Run First

Emitted when the contents of the itembar change, either by adding a child, removing a child, or reordering a child.

`itembar` : | the object which emitted the signal
`user_data` : | user data set when the signal handler was connected.

### The `"orientation-changed"` signal

    void                user_function                      (XfceItembar   *itembar,
                                                            GtkOrientation orientation,
                                                            gpointer       user_data)        : Run First

Emitted when the orientation of the itembar changes.

`itembar` : | the object which emitted the signal
`orientation` : | the new GtkOrientation of the itembar
`user_data` : | user data set when the signal handler was connected.

## See Also

GtkHBox and GtkVBox.