GdlDock

## GdlDock GdlDock — A docking area widget. |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    struct              GdlDock;
    GtkWidget *         gdl_dock_new                        (void);
    GtkWidget *         gdl_dock_new_from                   (GdlDock *original,
                                                             gboolean floating);
    void                gdl_dock_add_item                   (GdlDock *dock,
                                                             GdlDockItem *item,
                                                             GdlDockPlacement placement);
    void                gdl_dock_add_floating_item          (GdlDock *dock,
                                                             GdlDockItem *item,
                                                             gint x,
                                                             gint y,
                                                             gint width,
                                                             gint height);
    void                gdl_dock_hide_preview               (GdlDock *dock);
    void                gdl_dock_show_preview               (GdlDock *dock,
                                                             GdkRectangle *rect);
    void                gdl_dock_set_skip_taskbar           (GdlDock *dock,
                                                             gboolean skip);
    GdlDockItem *       gdl_dock_get_item_by_name           (GdlDock *dock,
                                                             const gchar *name);
    GList *             gdl_dock_get_named_items            (GdlDock *dock);
    GdlDockPlaceholder * gdl_dock_get_placeholder_by_name   (GdlDock *dock,
                                                             const gchar *name);
    GdlDock *           gdl_dock_object_get_toplevel        (GdlDockObject *object);
    void                gdl_dock_xor_rect                   (GdlDock *dock,
                                                             GdkRectangle *rect);
    void                gdl_dock_xor_rect_hide              (GdlDock *dock);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkWidget
                   +----GtkContainer
                         +----GdlDockObject
                               +----GdlDock

## Implemented Interfaces

GdlDock implements AtkImplementorIface and GtkBuildable.

## Properties

      "default-title"            gchar*                : Read / Write
      "floating"                 gboolean              : Read / Write / Construct Only
      "floatx"                   gint                  : Read / Write / Construct
      "floaty"                   gint                  : Read / Write / Construct
      "height"                   gint                  : Read / Write / Construct
      "skip-taskbar"             gboolean              : Read / Write / Construct
      "width"                    gint                  : Read / Write / Construct

## Signals

      "layout-changed"                                 : Run Last

## Description

A GdlDock is the toplevel widget which in turn hold a tree of GdlDockItem widgets.

Several dock widgets can exchange widgets if they share the same master.

## Details

### struct GdlDock

    struct GdlDock;

### gdl_dock_new ()

    GtkWidget *         gdl_dock_new                        (void);

Create a new dock.

Returns : | A new GdlDock widget. [transfer full]

### gdl_dock_new_from ()

    GtkWidget *         gdl_dock_new_from                   (GdlDock *original,
                                                             gboolean floating);

Create a new dock widget having the same master than `original`.

`original` : | The original GdlDock
`floating` : | `TRUE` to create a floating dock
Returns : | A new GdlDock widget. [transfer full]

### gdl_dock_add_item ()

    void                gdl_dock_add_item                   (GdlDock *dock,
                                                             GdlDockItem *item,
                                                             GdlDockPlacement placement);

Dock in `dock`, the widget `item` at the position defined by `placement`. The function takes care of finding the right parent widget eventually creating it if needed.

`dock` : | A GdlDock widget
`item` : | A GdlDockItem widget
`placement` : | A position for the widget

### gdl_dock_add_floating_item ()

    void                gdl_dock_add_floating_item          (GdlDock *dock,
                                                             GdlDockItem *item,
                                                             gint x,
                                                             gint y,
                                                             gint width,
                                                             gint height);

Dock an item as a floating item. It creates a new window containing a new dock widget sharing the same master where the item is docked.

`dock` : | A GdlDock widget
`item` : | A GdlDockItem widget
`x` : | X coordinate of the floating item
`y` : | Y coordinate of the floating item
`width` : | width of the floating item
`height` : | height of the floating item

### gdl_dock_hide_preview ()

    void                gdl_dock_hide_preview               (GdlDock *dock);

Hide the preview window used to materialize the dock target.

`dock` : | A GdlDock widget

### gdl_dock_show_preview ()

    void                gdl_dock_show_preview               (GdlDock *dock,
                                                             GdkRectangle *rect);

Show a preview window used to materialize the dock target.

`dock` : | A GdlDock widget
`rect` : | The position and the size of the preview window

### gdl_dock_set_skip_taskbar ()

    void                gdl_dock_set_skip_taskbar           (GdlDock *dock,
                                                             gboolean skip);

Sets whether or not a floating dock window should be prevented from appearing in the system taskbar.

`dock` : | The dock whose property should be set.
`skip` : | `TRUE` if floating docks should be prevented from appearing in the taskbar

Since 3.6

### gdl_dock_get_item_by_name ()

    GdlDockItem *       gdl_dock_get_item_by_name           (GdlDock *dock,
                                                             const gchar *name);

Looks for an GdlDockItem widget bound to the master of the dock item. It does not search only in the children of this particular dock widget.

`dock` : | A GdlDock widget
`name` : | An item name
Returns : | A GdlDockItem widget or `NULL`. [transfer none]

### gdl_dock_get_named_items ()

    GList *             gdl_dock_get_named_items            (GdlDock *dock);

Returns a list of all item bound to the master of the dock, not only the children of this particular dock widget.

`dock` : | A GdlDock widget
Returns : | A list of GdlDockItem. The list should be freedwith `g_list_free()`, but the item still belong to the master. [element-type GdlDockObject][transfer container]

### gdl_dock_get_placeholder_by_name ()

    GdlDockPlaceholder * gdl_dock_get_placeholder_by_name   (GdlDock *dock,
                                                             const gchar *name);

### Warning

`gdl_dock_get_placeholder_by_name` has been deprecated since version 3.6 and should not be used in newly-written code. This function is always returning `NULL`.

Looks for an GdlDockPlaceholder object bound to the master of the dock item. It does not search only in the children of this particular dock widget.

`dock` : | A GdlDock widget
`name` : | An item name
Returns : | A GdlDockPlaceholder object or `NULL`. [transfer none]

### gdl_dock_object_get_toplevel ()

    GdlDock *           gdl_dock_object_get_toplevel        (GdlDockObject *object);

Get the top level GdlDock widget of `object` or `NULL` if cannot be found.

`object` : | A GdlDockObject
Returns : | A GdlDock or `NULL`. [allow-none][transfer none]

### gdl_dock_xor_rect ()

    void                gdl_dock_xor_rect                   (GdlDock *dock,
                                                             GdkRectangle *rect);

### Warning

`gdl_dock_xor_rect` has been deprecated since version 3.6 and should not be used in newly-written code. Use gdl_dock_show_preview instead.

Show a preview window used to materialize the dock target.

`dock` : | A GdlDock widget
`rect` : | The position and the size of the preview window

### gdl_dock_xor_rect_hide ()

    void                gdl_dock_xor_rect_hide              (GdlDock *dock);

### Warning

`gdl_dock_xor_rect_hide` has been deprecated since version 3.6 and should not be used in newly-written code. Use gdl_dock_hide_preview instead.

Hide the preview window used to materialize the dock target.

`dock` : | A GdlDock widget

## Property Details

### The `"default-title"` property

      "default-title"            gchar*                : Read / Write

Default title for the newly created floating docks.

Default value: NULL

### The `"floating"` property

      "floating"                 gboolean              : Read / Write / Construct Only

Whether the dock is floating in its own window.

Default value: FALSE

### The `"floatx"` property

      "floatx"                   gint                  : Read / Write / Construct

X coordinate for a floating dock.

Default value: 0

### The `"floaty"` property

      "floaty"                   gint                  : Read / Write / Construct

Y coordinate for a floating dock.

Default value: 0

### The `"height"` property

      "height"                   gint                  : Read / Write / Construct

Height for the dock when it's of floating type.

Allowed values: >= G_MAXULONG

Default value: -1

### The `"skip-taskbar"` property

      "skip-taskbar"             gboolean              : Read / Write / Construct

Whether or not to prevent a floating dock window from appearing in the taskbar. Note that this only affects floating windows that are created after this flag is set; existing windows are not affected. Usually, this property is used when you create the dock.

Default value: TRUE

Since 3.6

### The `"width"` property

      "width"                    gint                  : Read / Write / Construct

Width for the dock when it's of floating type.

Allowed values: >= G_MAXULONG

Default value: -1

## Signal Details

### The `"layout-changed"` signal

    void                user_function                      (GdlDock *arg0,
                                                            gpointer user_data)      : Run Last

Signals that the layout has changed, one or more widgets have been moved, added or removed.

`user_data` : | user data set when the signal handler was connected.

## See Also

GdlDockItem, GdlDockMaster