### Virtual Method

# Panel DocumentWorkspace add_widget

since: 1.4

#### Declaration [src]

    gboolean
    add_widget (
      PanelDocumentWorkspace* self,
      PanelWidget* widget,
      PanelPosition* position
    )

#### Description [src]

Requests the workspace add `widget` to the dock at `position`.

Available since: 1.4

#### Parameters

`widget`

  Type: `PanelWidget`

  A `PanelWidget`.

  The data is owned by the caller of the function.

`position`

  Type: `PanelPosition`

  A `PanelPosition` or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `gboolean`

`TRUE` if `widget` was added; otherwise `FALSE` and `widget` will have `g_object_ref_sink()` called and unref’d from an idle callback.