XfceItembar

XfceItembar —

Container widget with configurable orientation.

Synopsis




            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,
                                             int 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,
                                             int position);
void        xfce_itembar_set_child_expand   (XfceItembar *itembar,
                                             GtkWidget *item,
                                             gboolean expand);
gboolean    xfce_itembar_get_child_expand   (XfceItembar *itembar,
                                             GtkWidget *item);
int         xfce_itembar_get_n_items        (XfceItembar *itembar);
int         xfce_itembar_get_item_index     (XfceItembar *itembar,
                                             GtkWidget *item);
GtkWidget*  xfce_itembar_get_nth_item       (XfceItembar *itembar,
                                             int 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,
                                             int x,
                                             int y);
int         xfce_itembar_get_drop_index     (XfceItembar *itembar,
                                             int x,
                                             int y);

Object Hierarchy


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

Implemented Interfaces

XfceItembar implements AtkImplementorIface.

Properties


  "orientation"          GtkOrientation        : Read / Write

Child Properties


  "expand"               gboolean              : Read / Write

Signal Prototypes


"contents-changed"
            void        user_function      (XfceItembar *itembar,
                                            gpointer user_data);
"orientation-changed"
            void        user_function      (XfceItembar *itembar,
                                            GtkOrientation orientation,
                                            gpointer user_data);

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 struct contains private data only, and should be accessed using the functions below.


xfce_itembar_new ()

GtkWidget*  xfce_itembar_new                (GtkOrientation orientation);

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 : an XfceItembar
orientation : new GtkOrientation

xfce_itembar_get_orientation ()

GtkOrientation xfce_itembar_get_orientation (XfceItembar *itembar);

itembar : an XfceItembar
Returns : GtkOrienation of itembar.

xfce_itembar_insert ()

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

Insert new item at position on itembar.

itembar : an 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 : an 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 : an XfceItembar
item : GtkWidget to add

xfce_itembar_reorder_child ()

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

Move item to a new position on itembar.

itembar : an 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 : an 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);

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

xfce_itembar_get_n_items ()

int         xfce_itembar_get_n_items        (XfceItembar *itembar);

itembar : an XfceItembar
Returns : the number of items on itembar.

xfce_itembar_get_item_index ()

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

itembar : an 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,
                                             int n);

itembar : an 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 : an 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 : an XfceItembar

xfce_itembar_event_window_is_raised ()

gboolean    xfce_itembar_event_window_is_raised
                                            (XfceItembar *itembar);

itembar : an XfceItembar
Returns : TRUE if event window is raised.

xfce_itembar_get_item_at_point ()

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

itembar : an 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 ()

int         xfce_itembar_get_drop_index     (XfceItembar *itembar,
                                             int x,
                                             int 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 : an 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.

Properties

The "orientation" property

  "orientation"          GtkOrientation        : Read / Write

The orientation of the XfceItembar.

Default value: GTK_ORIENTATION_HORIZONTAL

Child Properties

The "expand" child property

  "expand"               gboolean              : Read / Write

Whether the child of the XfceItembar should fill available space.

Default value: FALSE

Signals

The "contents-changed" signal

void        user_function                  (XfceItembar *itembar,
                                            gpointer user_data);

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

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.