![]() |
![]() |
![]() |
GDL Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
enum GdlDockItemBehavior; enum GdlDockItemFlags; struct GdlDockItem; struct GdlDockItemClass; #define GDL_DOCK_ITEM_FLAGS (item) #define GDL_DOCK_ITEM_IN_DRAG (item) #define GDL_DOCK_ITEM_IN_PREDRAG (item) #define GDL_DOCK_ITEM_ICONIFIED (item) #define GDL_DOCK_ITEM_USER_ACTION (item) #define GDL_DOCK_ITEM_NOT_LOCKED (item) #define GDL_DOCK_ITEM_NO_GRIP (item) #define GDL_DOCK_ITEM_SET_FLAGS (item, flag) #define GDL_DOCK_ITEM_UNSET_FLAGS (item, flag) #define GDL_DOCK_ITEM_HAS_GRIP (item) #define GDL_DOCK_ITEM_CANT_CLOSE (item) #define GDL_DOCK_ITEM_CANT_ICONIFY (item) GtkWidget * gdl_dock_item_new (const gchar *name
,const gchar *long_name
,GdlDockItemBehavior behavior
); GtkWidget * gdl_dock_item_new_with_stock (const gchar *name
,const gchar *long_name
,const gchar *stock_id
,GdlDockItemBehavior behavior
); void gdl_dock_item_dock_to (GdlDockItem *item
,GdlDockItem *target
,GdlDockPlacement position
,gint docking_param
); void gdl_dock_item_set_orientation (GdlDockItem *item
,GtkOrientation orientation
); GtkWidget * gdl_dock_item_get_tablabel (GdlDockItem *item
); void gdl_dock_item_set_tablabel (GdlDockItem *item
,GtkWidget *tablabel
); GtkWidget * gdl_dock_item_get_grip (GdlDockItem *item
); void gdl_dock_item_hide_grip (GdlDockItem *item
); void gdl_dock_item_show_grip (GdlDockItem *item
); void gdl_dock_item_notify_selected (GdlDockItem *item
); void gdl_dock_item_notify_deselected (GdlDockItem *item
); void gdl_dock_item_bind (GdlDockItem *item
,GtkWidget *dock
); void gdl_dock_item_unbind (GdlDockItem *item
); void gdl_dock_item_hide_item (GdlDockItem *item
); void gdl_dock_item_iconify_item (GdlDockItem *item
); void gdl_dock_item_show_item (GdlDockItem *item
); void gdl_dock_item_lock (GdlDockItem *item
); void gdl_dock_item_unlock (GdlDockItem *item
); void gdl_dock_item_set_default_position (GdlDockItem *item
,GdlDockObject *reference
); void gdl_dock_item_preferred_size (GdlDockItem *item
,GtkRequisition *req
); GdlDockItemClassPrivate; GdlDockItemPrivate;
GFlags +----GdlDockItemBehavior
GFlags +----GdlDockItemFlags
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GdlDockObject +----GdlDockItem +----GdlDockNotebook +----GdlDockPaned
"behavior" GdlDockItemBehavior : Read / Write "locked" gboolean : Read / Write "orientation" GtkOrientation : Read / Write / Construct "preferred-height" gint : Read / Write "preferred-width" gint : Read / Write "resize" gboolean : Read / Write
"deselected" :Run First
"dock-drag-begin" :Run First
"dock-drag-end" :Run First
"dock-drag-motion" :Run First
"selected" :Run First
typedef enum { GDL_DOCK_ITEM_BEH_NORMAL = 0, GDL_DOCK_ITEM_BEH_NEVER_FLOATING = 1 << 0, GDL_DOCK_ITEM_BEH_NEVER_VERTICAL = 1 << 1, GDL_DOCK_ITEM_BEH_NEVER_HORIZONTAL = 1 << 2, GDL_DOCK_ITEM_BEH_LOCKED = 1 << 3, GDL_DOCK_ITEM_BEH_CANT_DOCK_TOP = 1 << 4, GDL_DOCK_ITEM_BEH_CANT_DOCK_BOTTOM = 1 << 5, GDL_DOCK_ITEM_BEH_CANT_DOCK_LEFT = 1 << 6, GDL_DOCK_ITEM_BEH_CANT_DOCK_RIGHT = 1 << 7, GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER = 1 << 8, GDL_DOCK_ITEM_BEH_CANT_CLOSE = 1 << 9, GDL_DOCK_ITEM_BEH_CANT_ICONIFY = 1 << 10, GDL_DOCK_ITEM_BEH_NO_GRIP = 1 << 11 } GdlDockItemBehavior;
Described the behaviour of a doc item. The item can have multiple flags set.
Normal dock item | |
item cannot be undocked | |
item cannot be docked vertically | |
item cannot be docked horizontally | |
item is locked, it cannot be moved around | |
item cannot be docked at top | |
item cannot be docked at bottom | |
item cannot be docked left | |
item cannot be docked right | |
item cannot be docked at center | |
item cannot be closed | |
item cannot be iconified | |
item doesn't have a grip |
typedef enum { GDL_DOCK_IN_DRAG = 1 << GDL_DOCK_OBJECT_FLAGS_SHIFT, GDL_DOCK_IN_PREDRAG = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 1), GDL_DOCK_ICONIFIED = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 2), GDL_DOCK_USER_ACTION = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 3) } GdlDockItemFlags;
Status flag of a GdlDockItem. Don't use unless you derive a widget from GdlDockItem
struct GdlDockItemClass { GdlDockObjectClass parent_class; GdlDockItemClassPrivate *priv; gboolean has_grip; /* virtuals */ void (* dock_drag_begin) (GdlDockItem *item); void (* dock_drag_motion) (GdlDockItem *item, gint x, gint y); void (* dock_drag_end) (GdlDockItem *item, gboolean cancelled); void (* set_orientation) (GdlDockItem *item, GtkOrientation orientation); };
#define GDL_DOCK_ITEM_NOT_LOCKED(item) !((item)->behavior & GDL_DOCK_ITEM_BEH_LOCKED)
#define GDL_DOCK_ITEM_NO_GRIP(item) ((item)->behavior & GDL_DOCK_ITEM_BEH_NO_GRIP)
GtkWidget * gdl_dock_item_new (const gchar *name
,const gchar *long_name
,GdlDockItemBehavior behavior
);
Creates a new dock item widget.
|
Unique name for identifying the dock object. |
|
Human readable name for the dock object. |
|
General behavior for the dock item (i.e. whether it can float, if it's locked, etc.), as specified by GdlDockItemBehavior flags. |
Returns : |
The newly created dock item grip widget. |
GtkWidget * gdl_dock_item_new_with_stock (const gchar *name
,const gchar *long_name
,const gchar *stock_id
,GdlDockItemBehavior behavior
);
Creates a new dock item grip widget with a given stock id.
|
Unique name for identifying the dock object. |
|
Human readable name for the dock object. |
|
Stock icon for the dock object. |
|
General behavior for the dock item (i.e. whether it can float, if it's locked, etc.), as specified by GdlDockItemBehavior flags. |
Returns : |
The newly created dock item grip widget. |
void gdl_dock_item_dock_to (GdlDockItem *item
,GdlDockItem *target
,GdlDockPlacement position
,gint docking_param
);
Relocates a dock item to a new location relative to another dock item.
|
The dock item that will be relocated to the dock position. |
|
The dock item that will be used as the point of reference. [allow-none] |
|
The position to dock item, relative to target. |
|
This value is unused, and will be ignored. |
void gdl_dock_item_set_orientation (GdlDockItem *item
,GtkOrientation orientation
);
This function sets the layout of the dock item.
|
The dock item which will get it's orientation set. |
|
The orientation to set the item to. If the orientation is set to GTK_ORIENTATION_VERTICAL, the grip widget will be shown along the top of the edge of item (if it is not hidden). If the orientation is set to GTK_ORIENTATION_HORIZONTAL, the grip widget will be shown down the left edge of the item (even if the widget text direction is set to RTL). |
GtkWidget * gdl_dock_item_get_tablabel (GdlDockItem *item
);
Gets the current tab label widget. Note that this label widget is only visible when the "switcher-style" property of the GdlDockMaster is set to GDL_SWITCHER_STYLE_TABS
|
The dock item from which to get the tab label widget. |
Returns : |
Returns the tab label widget. |
void gdl_dock_item_set_tablabel (GdlDockItem *item
,GtkWidget *tablabel
);
Replaces the current tab label widget with another widget. Note that this label widget is only visible when the "switcher-style" property of the GdlDockMaster is set to GDL_SWITCHER_STYLE_TABS
|
The dock item which will get it's tab label widget set. |
|
The widget that will become the tab label. |
GtkWidget * gdl_dock_item_get_grip (GdlDockItem *item
);
This function returns the dock item's grip label widget.
|
The dock item from which to to get the grip of. |
Returns : |
Returns the current label widget. |
void gdl_dock_item_hide_grip (GdlDockItem *item
);
This function hides the dock item's grip widget.
|
The dock item to hide the grip of. |
void gdl_dock_item_show_grip (GdlDockItem *item
);
This function shows the dock item's grip widget.
|
The dock item to show the grip of. |
void gdl_dock_item_notify_selected (GdlDockItem *item
);
This function emits the selected signal. It is to be used by GdlSwitcher to let clients know that this item has been switched to.
|
the dock item to emit a selected signal on. |
void gdl_dock_item_notify_deselected (GdlDockItem *item
);
This function emits the deselected signal. It is used by GdlSwitcher to let clients know that this item has been deselected.
|
the dock item to emit a deselected signal on. |
void gdl_dock_item_bind (GdlDockItem *item
,GtkWidget *dock
);
Binds this dock item to a new dock master.
void gdl_dock_item_unbind (GdlDockItem *item
);
Unbinds this dock item from it's dock master.
|
The item to unbind. |
void gdl_dock_item_hide_item (GdlDockItem *item
);
This function hides the dock item. When dock items are hidden they are completely removed from the layout.
The dock item close button causes the panel to be hidden.
|
The dock item to hide. |
void gdl_dock_item_iconify_item (GdlDockItem *item
);
This function iconifies the dock item. When dock items are iconified they are hidden, and appear only as icons in dock bars.
The dock item iconify button causes the panel to be iconified.
|
The dock item to iconify. |
void gdl_dock_item_show_item (GdlDockItem *item
);
This function shows the dock item. When dock items are shown, they are displayed in their normal layout position.
|
The dock item to show. |
void gdl_dock_item_lock (GdlDockItem *item
);
This function locks the dock item. When locked the dock item cannot be dragged around and it doesn't show a grip.
|
The dock item to lock. |
void gdl_dock_item_unlock (GdlDockItem *item
);
This function unlocks the dock item. When unlocked the dock item can be dragged around and can show a grip.
|
The dock item to unlock. |
void gdl_dock_item_set_default_position (GdlDockItem *item
,GdlDockObject *reference
);
This method has only an effect when you add you dock_item with GDL_DOCK_ITEM_BEH_NEVER_FLOATING. In this case you have to assign it a default position.
|
The dock item |
|
The GdlDockObject which is the default dock for item
|
void gdl_dock_item_preferred_size (GdlDockItem *item
,GtkRequisition *req
);
Gets the preferred size of the dock item in pixels.
|
The dock item to get the preferred size of. |
|
A pointer to a GtkRequisition into which the preferred size will be written. |
"behavior"
property"behavior" GdlDockItemBehavior : Read / Write
General behavior for the dock item (i.e. whether it can float, if it's locked, etc.).
"locked"
property"locked" gboolean : Read / Write
If set, the dock item cannot be dragged around and it doesn't show a grip.
Default value: FALSE
"orientation"
property"orientation" GtkOrientation : Read / Write / Construct
The orientation of the docking item. If the orientation is set to GTK_ORIENTATION_VERTICAL, the grip widget will be shown along the top of the edge of item (if it is not hidden). If the orientation is set to GTK_ORIENTATION_HORIZONTAL, the grip widget will be shown down the left edge of the item (even if the widget text direction is set to RTL).
Default value: GTK_ORIENTATION_VERTICAL
"preferred-height"
property"preferred-height" gint : Read / Write
Preferred height for the dock item.
Allowed values: >= G_MAXULONG
Default value: -1
"preferred-width"
property"preferred-width" gint : Read / Write
Preferred width for the dock item.
Allowed values: >= G_MAXULONG
Default value: -1
"resize"
property"resize" gboolean : Read / Write
If set, the dock item can be resized when docked in a GtkPanel widget.
Default value: TRUE
"deselected"
signalvoid user_function (GdlDockItem *arg0,
gpointer user_data) : Run First
Signals that this dock has been deselected in a switcher.
|
user data set when the signal handler was connected. |
"dock-drag-begin"
signalvoid user_function (GdlDockItem *item,
gpointer user_data) : Run First
Signals that the dock item has begun to be dragged.
|
The dock item which is being dragged. |
|
user data set when the signal handler was connected. |
"dock-drag-end"
signalvoid user_function (GdlDockItem *item,
gboolean cancel,
gpointer user_data) : Run First
Signals that the dock item dragging has ended.
|
The dock item which is no longer being dragged. |
|
This value is set to TRUE if the drag was cancelled by the user. cancel is set to FALSE if the drag was accepted. |
|
user data set when the signal handler was connected. |
"dock-drag-motion"
signalvoid user_function (GdlDockItem *item,
gint x,
gint y,
gpointer user_data) : Run First
Signals that a dock item dragging motion event has occured.
|
The dock item which is being dragged. |
|
The x-position that the dock item has been dragged to. |
|
The y-position that the dock item has been dragged to. |
|
user data set when the signal handler was connected. |
"selected"
signalvoid user_function (GdlDockItem *arg0,
gpointer user_data) : Run First
Signals that this dock has been selected from a switcher.
|
user data set when the signal handler was connected. |