|  |  |  | Libxfce4panel Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Child Properties | Signals | ||||
#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);
  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----XfceItembar
XfceItembar is a container widget that can hold multiple widgets. The orientation of the bar is configurable and can be changed at any time.
typedef struct _XfceItembar XfceItembar;
The XfceItembar struct contains private data only, and should be accessed using the functions below.
GtkWidget *         xfce_itembar_new                    (GtkOrientation orientation);
Creates a new XfceItembar widget.
| 
 | GtkOrientation for new itembar. | 
| Returns : | new XfceItembar widget with orientation. | 
void xfce_itembar_set_orientation (XfceItembar *itembar,GtkOrientation orientation);
Set the orienation of itembar.
| 
 | a XfceItembar | 
| 
 | new GtkOrientation | 
GtkOrientation      xfce_itembar_get_orientation        (XfceItembar *itembar);
Return the orientation of the XfceItembar.
| 
 | a XfceItembar | 
| Returns : | GtkOrienation of itembar. | 
void xfce_itembar_insert (XfceItembar *itembar,GtkWidget *item,gint position);
Insert new item at position on itembar.
| 
 | a XfceItembar | 
| 
 | GtkWidget to insert | 
| 
 | position for item | 
void xfce_itembar_append (XfceItembar *itembar,GtkWidget *item);
Add a new item at the end of itembar.
| 
 | a XfceItembar | 
| 
 | GtkWidget to add | 
void xfce_itembar_prepend (XfceItembar *itembar,GtkWidget *item);
Add a new item at the start of itembar.
| 
 | a XfceItembar | 
| 
 | GtkWidget to add | 
void xfce_itembar_reorder_child (XfceItembar *itembar,GtkWidget *item,gint position);
Move item to a new position on itembar.
| 
 | a XfceItembar | 
| 
 | a child GtkWidget of itembar | 
| 
 | new index for item | 
void xfce_itembar_set_child_expand (XfceItembar *itembar,GtkWidget *item,gboolean expand);
Sets whether item should expand when the size of itembar increases.
| 
 | a XfceItembar | 
| 
 | a child GtkWidget of itembar | 
| 
 | whether to expand the item | 
gboolean xfce_itembar_get_child_expand (XfceItembar *itembar,GtkWidget *item);
Return if the GtkWidget in the XfceItembar expands when the panel is resized.
| 
 | a XfceItembar | 
| 
 | a child GtkWidget of itembar | 
| Returns : | TRUEifitemwill expand when the size ofitembarincreases,
         otherwiseFALSE. | 
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().
| 
 | a XfceItembar | 
| 
 | TRUEwhen the expansion is allowed. | 
gint                xfce_itembar_get_n_items            (XfceItembar *itembar);
Return the number of items on a XfceItembar.
| 
 | a XfceItembar | 
| Returns : | the number of items on itembar. | 
gint xfce_itembar_get_item_index (XfceItembar *itembar,GtkWidget *item);
The index if the child GtkWidget in a XfceItembar.
| 
 | a XfceItembar | 
| 
 | a child GtkWidget of itembar | 
| Returns : | the index of itemor -1 ifitembardoes not containitem. | 
GtkWidget * xfce_itembar_get_nth_item (XfceItembar *itembar,gint n);
Return the GtkWidget inside the XfceItembar with the n's
index.
| 
 | a XfceItembar | 
| 
 | a position on the itembar | 
| Returns : | the n's item onitembar, orNULLif the
itembar does not contain ann'th item. | 
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()
| 
 | a XfceItembar | 
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()
| 
 | a XfceItembar | 
gboolean            xfce_itembar_event_window_is_raised (XfceItembar *itembar);
Whether the event window of the XfceItembar is raised.
| 
 | a XfceItembar | 
| Returns : | TRUEif event window is raised. | 
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.
| 
 | a XfceItembar | 
| 
 | x coordinate relative to the itembar window | 
| 
 | y coordinate relative to the itembar window | 
| Returns : | a GtkWidget or NULL. | 
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.
| 
 | a XfceItembar | 
| 
 | x coordinate of a point on the itembar | 
| 
 | y coordinate of a point on the itembar | 
| Returns : | The position corresponding to the point ( x,y) on the
itembar. | 
"orientation" property  "orientation"              GtkOrientation        : Read / Write
The orientation of the XfceItembar.
Default value: GTK_ORIENTATION_HORIZONTAL
"expand" child property  "expand"                   gboolean              : Read / Write
Whether the child of the XfceItembar should fill available space.
Default value: FALSE
"contents-changed" signalvoid 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.
| 
 | the object which emitted the signal | 
| 
 | user data set when the signal handler was connected. | 
"orientation-changed" signalvoid user_function (XfceItembar *itembar, GtkOrientation orientation, gpointer user_data) : Run First
Emitted when the orientation of the itembar changes.
| 
 | the object which emitted the signal | 
| 
 | the new GtkOrientation of the itembar | 
| 
 | user data set when the signal handler was connected. |