GnomeDockBand

Name

GnomeDockBand — A widget implementing dock bands.

Synopsis


#include <gnome.h>


struct      GnomeDockBand
struct      GnomeDockBandChild
GtkWidget*  gnome_dock_band_new             (void);
void        gnome_dock_band_set_orientation (GnomeDockBand *band,
                                             GtkOrientation orientation);
GtkOrientation gnome_dock_band_get_orientation
                                            (GnomeDockBand *band);
gboolean    gnome_dock_band_insert          (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset,
                                             gint position);
gboolean    gnome_dock_band_prepend         (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset);
gboolean    gnome_dock_band_append          (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset);
void        gnome_dock_band_set_child_offset
                                            (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset);
guint       gnome_dock_band_get_child_offset
                                            (GnomeDockBand *band,
                                             GtkWidget *child);
void        gnome_dock_band_move_child      (GnomeDockBand *band,
                                             GList *old_child,
                                             guint new_num);
guint       gnome_dock_band_get_num_children
                                            (GnomeDockBand *band);
void        gnome_dock_band_drag_begin      (GnomeDockBand *band,
                                             GnomeDockItem *item);
gboolean    gnome_dock_band_drag_to         (GnomeDockBand *band,
                                             GnomeDockItem *item,
                                             gint x,
                                             gint y);
void        gnome_dock_band_drag_end        (GnomeDockBand *band,
                                             GnomeDockItem *item);
GnomeDockItem* gnome_dock_band_get_item_by_name
                                            (GnomeDockBand *band,
                                             const char *name,
                                             guint *position_return,
                                             guint *offset_return);
void        gnome_dock_band_layout_add      (GnomeDockBand *band,
                                             GnomeDockLayout *layout,
                                             GnomeDockPlacement placement,
                                             guint band_num);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GnomeDockBand

Description

GnomeDockBand is a widget implementing a "dock band", i.e. an horizontal or vertical stripe containing dockable widgets.

The application programmer does not normally need to use GnomeDockBands directly; they are mostly used by the GnomeDock widget to implement its functionality. For an explanation of the way dock bands are used within a dock, check out the documentation for the GnomeDock widget.

Details


GnomeDockBand

struct GnomeDockBand;


GnomeDockBandChild

struct GnomeDockBandChild
{
  GtkWidget *widget;

  /* Maximum (requested) offset from the previous child.  */
  guint offset;

  /* Actual offset.  */
  guint real_offset;

  guint drag_offset;

  GtkAllocation drag_allocation;

  guint prev_space, foll_space;
  guint drag_prev_space, drag_foll_space;

  guint max_space_requisition;
};


gnome_dock_band_new()

GtkWidget*  gnome_dock_band_new             (void);

Create a new GnomeDockBand widget.

Returns : The new GnomeDockBand widget.


gnome_dock_band_set_orientation()

void        gnome_dock_band_set_orientation (GnomeDockBand *band,
                                             GtkOrientation orientation);

Set the orientation for band.

band : A GnomeDockBand widgetorientation : New orientation for band


gnome_dock_band_get_orientation()

GtkOrientation gnome_dock_band_get_orientation
                                            (GnomeDockBand *band);

Retrieve the orientation of the specified band.

band : A GnomeDockBand widgetReturns : The orientation of band.


gnome_dock_band_insert()

gboolean    gnome_dock_band_insert          (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset,
                                             gint position);

Add child to band at the specified position, with the specified offset from the previous item (or from the beginning of the band, if this is the first item).

band : A GnomeDockBand widgetchild : The widget to be added to bandoffset : Offset from the previous itemposition : Position within the bandReturns : TRUE if successful, FALSE if the operation fails.


gnome_dock_band_prepend()

gboolean    gnome_dock_band_prepend         (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset);

Add child to band with the specified offset as the first element.

band : A GnomeDockBand widgetchild : A widget to be added to bandoffset : Offset (in pixels) from the beginning of the bandReturns : TRUE if successful, FALSE if the operation fails.


gnome_dock_band_append()

gboolean    gnome_dock_band_append          (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset);

Add child to band with the specified offset as the last element.

band : A GnomeDockBand widgetchild : A widget to be added to bandoffset : Offset (in pixels) from the last item of the bandReturns : TRUE if successful, FALSE if the operation fails.


gnome_dock_band_set_child_offset()

void        gnome_dock_band_set_child_offset
                                            (GnomeDockBand *band,
                                             GtkWidget *child,
                                             guint offset);

Set the offset for the specified child of band.

band : A GnomeDockBand widgetchild : Child of band whose offset must be changedoffset : New offset value for child


gnome_dock_band_get_child_offset()

guint       gnome_dock_band_get_child_offset
                                            (GnomeDockBand *band,
                                             GtkWidget *child);

Retrieve the offset of child in band.

band : A GnomeDockBand widgetchild : Child of band whose offset must be retrievedReturns : The offset of child.


gnome_dock_band_move_child()

void        gnome_dock_band_move_child      (GnomeDockBand *band,
                                             GList *old_child,
                                             guint new_num);

band : old_child : new_num : 


gnome_dock_band_get_num_children()

guint       gnome_dock_band_get_num_children
                                            (GnomeDockBand *band);

Retrieve the number of children in band.

band : A GnomeDockBand widgetReturns : The number of children in band.


gnome_dock_band_drag_begin()

void        gnome_dock_band_drag_begin      (GnomeDockBand *band,
                                             GnomeDockItem *item);

band : item : 


gnome_dock_band_drag_to()

gboolean    gnome_dock_band_drag_to         (GnomeDockBand *band,
                                             GnomeDockItem *item,
                                             gint x,
                                             gint y);

band : item : x : y : Returns


gnome_dock_band_drag_end()

void        gnome_dock_band_drag_end        (GnomeDockBand *band,
                                             GnomeDockItem *item);

band : item : 


gnome_dock_band_get_item_by_name()

GnomeDockItem* gnome_dock_band_get_item_by_name
                                            (GnomeDockBand *band,
                                             const char *name,
                                             guint *position_return,
                                             guint *offset_return);

Retrieve a named item from band, and return its position and offset in *position_return and offset_return.

band : A GnomeDockBand widgetname : Name of the child to be retrievedposition_return : Pointer to a variable holding the position of the named childoffset_return : Pointer to a variable holding the offset of the named childReturns : The child whose name is name, or NULL if no child of band has such name.


gnome_dock_band_layout_add()

void        gnome_dock_band_layout_add      (GnomeDockBand *band,
                                             GnomeDockLayout *layout,
                                             GnomeDockPlacement placement,
                                             guint band_num);

band : layout : placement : band_num :