GdlDock: GNOME Docking Library Reference Manual

## GdlDock GdlDock — A docking area widget. |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GtkWidget * | gdl_dock_new ()
GtkWidget * | gdl_dock_new_from ()
void | gdl_dock_add_item ()
void | gdl_dock_add_floating_item ()
void | gdl_dock_hide_preview ()
void | gdl_dock_show_preview ()
void | gdl_dock_set_skip_taskbar ()
GdlDockItem * | gdl_dock_get_item_by_name ()
GList * | gdl_dock_get_named_items ()
GdlDockPlaceholder * | gdl_dock_get_placeholder_by_name ()
GdlDock * | gdl_dock_object_get_toplevel ()
void | gdl_dock_xor_rect ()
void | gdl_dock_xor_rect_hide ()

## Properties

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

## Signals

void | layout-changed | Run Last

## Types and Values

struct | GdlDock

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GdlDockObject
                        ╰── GdlDock

## Implemented Interfaces

GdlDock implements AtkImplementorIface and GtkBuildable.

## 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.

## Functions

### 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` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

`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.

#### Parameters

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.

#### Parameters

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

`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.

#### Parameters

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

`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.

#### Parameters

dock | A GdlDock widget |

## Types and Values

### struct GdlDock

    struct GdlDock;

## Property Details

### The `“default-title”` property

      “default-title”            gchar *

Default title for the newly created floating docks.

Owner: GdlDock

Flags: Read / Write

Default value: NULL

### The `“floating”` property

      “floating”                 gboolean

Whether the dock is floating in its own window.

Owner: GdlDock

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“floatx”` property

      “floatx”                   gint

X coordinate for a floating dock.

Owner: GdlDock

Flags: Read / Write / Construct

Default value: 0

### The `“floaty”` property

      “floaty”                   gint

Y coordinate for a floating dock.

Owner: GdlDock

Flags: Read / Write / Construct

Default value: 0

### The `“height”` property

      “height”                   gint

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

Owner: GdlDock

Flags: Read / Write / Construct

Allowed values: >= -1

Default value: -1

### The `“skip-taskbar”` property

      “skip-taskbar”             gboolean

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.

Owner: GdlDock

Flags: Read / Write / Construct

Default value: TRUE

Since: 3.6

### The `“width”` property

      “width”                    gint

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

Owner: GdlDock

Flags: Read / Write / Construct

Allowed values: >= -1

Default value: -1

## Signal Details

### The `“layout-changed”` signal

    void
    user_function (GdlDock *gdldock,
                   gpointer user_data)

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

#### Parameters

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

Flags: Run Last

## See Also

GdlDockItem, GdlDockMaster