GnomeDockItem

Name

GnomeDockItem — A dockable widget.

Synopsis


#include <gnome.h>


struct      GnomeDockItem
enum        GnomeDockItemBehavior
#define     GNOME_DOCK_ITEM_NOT_LOCKED      (x)
GtkWidget*  gnome_dock_item_new             (const gchar *name,
                                             GnomeDockItemBehavior behavior);
GtkWidget*  gnome_dock_item_get_child       (GnomeDockItem *dock_item);
char*       gnome_dock_item_get_name        (GnomeDockItem *dock_item);
void        gnome_dock_item_set_shadow_type (GnomeDockItem *dock_item,
                                             GtkShadowType type);
GtkShadowType gnome_dock_item_get_shadow_type
                                            (GnomeDockItem *dock_item);
gboolean    gnome_dock_item_set_orientation (GnomeDockItem *dock_item,
                                             GtkOrientation orientation);
GtkOrientation gnome_dock_item_get_orientation
                                            (GnomeDockItem *dock_item);
GnomeDockItemBehavior gnome_dock_item_get_behavior
                                            (GnomeDockItem *dock_item);
gboolean    gnome_dock_item_detach          (GnomeDockItem *item,
                                             gint x,
                                             gint y);
void        gnome_dock_item_attach          (GnomeDockItem *item,
                                             GtkWidget *parent,
                                             gint x,
                                             gint y);
void        gnome_dock_item_grab_pointer    (GnomeDockItem *item);
void        gnome_dock_item_drag_floating   (GnomeDockItem *item,
                                             gint x,
                                             gint y);
void        gnome_dock_item_handle_size_request
                                            (GnomeDockItem *item,
                                             GtkRequisition *requisition);
void        gnome_dock_item_get_floating_position
                                            (GnomeDockItem *item,
                                             gint *x,
                                             gint *y);


Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBin
                     +----GnomeDockItem

Signal Prototypes


'dock-drag-begin'
            void        user_function      (GnomeDockItem *dockitem,
                                            gpointer user_data);
'dock-drag-end'
            void        user_function      (GnomeDockItem *dockitem,
                                            gpointer user_data);
'dock-drag-motion'
            void        user_function      (GnomeDockItem *dockitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer user_data);
'dock-detach'
            void        user_function      (GnomeDockItem *dockitem,
                                            gpointer user_data);

Description

GnomeDockItem is a container widget that can be used to make widgets dockable. "Making a widget dockable" means that the widget gets a handle through which users can drag it around the dock widget or detach it so that it gets displayed into its own window (thus becoming a "floating" item).

Details


GnomeDockItem

struct GnomeDockItem;


GnomeDockItemBehavior

typedef enum
{
  GNOME_DOCK_ITEM_BEH_NORMAL = 0,
  GNOME_DOCK_ITEM_BEH_EXCLUSIVE = 1 << 0,
  GNOME_DOCK_ITEM_BEH_NEVER_FLOATING = 1 << 1,
  GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL = 1 << 2,
  GNOME_DOCK_ITEM_BEH_NEVER_HORIZONTAL = 1 << 3,
  GNOME_DOCK_ITEM_BEH_LOCKED = 1 << 4
} GnomeDockItemBehavior;


GNOME_DOCK_ITEM_NOT_LOCKED()

#define GNOME_DOCK_ITEM_NOT_LOCKED(x) (! (GNOME_DOCK_ITEM(x)->behavior \
                                          & GNOME_DOCK_ITEM_BEH_LOCKED))

x : 


gnome_dock_item_new()

GtkWidget*  gnome_dock_item_new             (const gchar *name,
                                             GnomeDockItemBehavior behavior);

Create a new GnomeDockItem named name, with the specified behavior.

name : Name for the new itembehavior : Behavior for the new itemReturns : A new GnomeDockItem widget.


gnome_dock_item_get_child()

GtkWidget*  gnome_dock_item_get_child       (GnomeDockItem *dock_item);

Retrieve the child of item.

dock_item : Returns : The child of item.


gnome_dock_item_get_name()

char*       gnome_dock_item_get_name        (GnomeDockItem *dock_item);

Retrieve the name of item.

dock_item : Returns : The name of item as a malloc()ed zero-terminated string.


gnome_dock_item_set_shadow_type()

void        gnome_dock_item_set_shadow_type (GnomeDockItem *dock_item,
                                             GtkShadowType type);

Set the shadow type for dock_item.

dock_item : A GnomeDockItem widgettype : The shadow type for dock_item


gnome_dock_item_get_shadow_type()

GtkShadowType gnome_dock_item_get_shadow_type
                                            (GnomeDockItem *dock_item);

Retrieve the shadow type of dock_item.

dock_item : A GnomeDockItem widget.Returns : dock_item's shadow type.


gnome_dock_item_set_orientation()

gboolean    gnome_dock_item_set_orientation (GnomeDockItem *dock_item,
                                             GtkOrientation orientation);

Set the orientation for dock_item.

dock_item : A GnomeDockItem widgetorientation : New orientation for dock_itemReturns : TRUE if the operation succeeds, FALSE if it fails.


gnome_dock_item_get_orientation()

GtkOrientation gnome_dock_item_get_orientation
                                            (GnomeDockItem *dock_item);

Retrieve the orientation of dock_item.

dock_item : A GnomeDockItem widget.Returns : The current orientation of dock_item.


gnome_dock_item_get_behavior()

GnomeDockItemBehavior gnome_dock_item_get_behavior
                                            (GnomeDockItem *dock_item);

Retrieve the behavior of dock_item.

dock_item : A GnomeDockItem widget.Returns : The behavior of dock_item.


gnome_dock_item_detach()

gboolean    gnome_dock_item_detach          (GnomeDockItem *item,
                                             gint x,
                                             gint y);

item : x : y : Returns


gnome_dock_item_attach()

void        gnome_dock_item_attach          (GnomeDockItem *item,
                                             GtkWidget *parent,
                                             gint x,
                                             gint y);

item : parent : x : y : 


gnome_dock_item_grab_pointer()

void        gnome_dock_item_grab_pointer    (GnomeDockItem *item);

item : 


gnome_dock_item_drag_floating()

void        gnome_dock_item_drag_floating   (GnomeDockItem *item,
                                             gint x,
                                             gint y);

item : x : y : 


gnome_dock_item_handle_size_request()

void        gnome_dock_item_handle_size_request
                                            (GnomeDockItem *item,
                                             GtkRequisition *requisition);

item : requisition : 


gnome_dock_item_get_floating_position()

void        gnome_dock_item_get_floating_position
                                            (GnomeDockItem *item,
                                             gint *x,
                                             gint *y);

item : x : y : 

Signals


The 'dock-drag-begin' signal

void        user_function                  (GnomeDockItem *dockitem,
                                            gpointer user_data);

This signal is emitted as soon as the user starts dragging the dock item.

dockitem :the object which received the signal. user_data :user data set when the signal handler was connected.


The 'dock-drag-end' signal

void        user_function                  (GnomeDockItem *dockitem,
                                            gpointer user_data);

This signal is emitted at the end of a dock item drag.

dockitem :the object which received the signal. user_data :user data set when the signal handler was connected.


The 'dock-drag-motion' signal

void        user_function                  (GnomeDockItem *dockitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer user_data);

This signal is emitted while the item is being dragged and reports that the pointer position has changed.

dockitem :the object which received the signal.arg1 :the new X coordinate of the upper left corner of the item.arg2 :the new Y coordinate of the upper left corner of the item. user_data :user data set when the signal handler was connected.


The 'dock-detach' signal

void        user_function                  (GnomeDockItem *dockitem,
                                            gpointer user_data);

This signal is emitted when an item is detached from its parent dock band and thus becomes a floating item.

dockitem :the object which received the signal. user_data :user data set when the signal handler was connected.