Gtk.Widget.compute_expand

### Method

# Gtk Widgetcompute_expand

#### Declaration [src]

    gboolean
    gtk_widget_compute_expand (
      GtkWidget* widget,
      GtkOrientation orientation
    )

#### Description [src]

Computes whether a parent widget should give this widget extra space when possible.

Widgets with children should check this, rather than looking at `gtk_widget_get_hexpand()` or `gtk_widget_get_vexpand()`.

This function already checks whether the widget is visible, so visibility does not need to be checked separately. Non-visible widgets are not expanded.

The computed expand value uses either the expand setting explicitly set on the widget itself, or, if none has been explicitly set, the widget may expand if some of its children do.

#### Parameters

`orientation`

  Type: `GtkOrientation`

  Expand direction.

#### Return value

Type: `gboolean`

Whether widget tree rooted here should be expanded.