## XAppVisibilityGroup XAppVisibilityGroup — Groups widgets to have their visibility or sensitivity controlled as a group, independent of their positions in any widget hierarchy. |

## Functions

XAppVisibilityGroup * | xapp_visibility_group_new ()
void | xapp_visibility_group_add_widget ()
gboolean | xapp_visibility_group_remove_widget ()
void | xapp_visibility_group_hide ()
void | xapp_visibility_group_show ()
void | xapp_visibility_group_set_visible ()
gboolean | xapp_visibility_group_get_visible ()
void | xapp_visibility_group_set_sensitive ()
gboolean | xapp_visibility_group_get_sensitive ()
GSList * | xapp_visibility_group_get_widgets ()
void | xapp_visibility_group_set_widgets ()

## Types and Values

struct | XAppVisibilityGroup

## Object Hierarchy

        GBoxed
        ╰── XAppVisibilityGroup

## Description

You can use this to hide and show groups of widgets all at once, without having to specify each one. They do not have to have the same parents, or even have the same toplevel window.

If a widget is destroyed before the group is, it will be automatically removed from the visibility group. You only ever need to free the XAppVisibilityGroup itself.

Only the specific members of the group have their visibility and sensitivity set, not their descendants. No effort is made to track or prevent state changes made to individual widgets by outside influence.

## Functions

### xapp_visibility_group_new ()

    XAppVisibilityGroup *
    xapp_visibility_group_new (gboolean visible,
                               gboolean sensitive,
                               GSList *widgets);

Creates a new XAppVisibilityGroup.

If `widgets` is not NULL, adds these widgets to the group with the starting visibility and sensitivity state.

#### Parameters

visible | starting visibility state |
sensitive | starting sensitivity state |
widgets | list of GtkWidgets to add to the group. | [element-type GtkWidget][transfer none][nullable]

#### Returns

a new XAppVisibilityGroup. Use xapp_visibility_group_free when finished.

[transfer full]

Since: 2.2.15

### xapp_visibility_group_add_widget ()

    void
    xapp_visibility_group_add_widget (XAppVisibilityGroup *group,
                                      GtkWidget *widget);

Adds widget to the visibility group.

#### Parameters

group | the visibility group |
widget | the GtkWidget to add to the group |

Since: 2.2.15

### xapp_visibility_group_remove_widget ()

    gboolean
    xapp_visibility_group_remove_widget (XAppVisibilityGroup *group,
                                         GtkWidget *widget);

#### Parameters

group | the visibility group |
widget | the GtkWidget to remove from the group |

#### Returns

TRUE if the widget was found and removed.

Since: 2.2.15

### xapp_visibility_group_hide ()

    void
    xapp_visibility_group_hide (XAppVisibilityGroup *group);

Hide all widgets in the group.

#### Parameters

group | the visibility group |

Since: 2.2.15

### xapp_visibility_group_show ()

    void
    xapp_visibility_group_show (XAppVisibilityGroup *group);

Show all widgets in the group.

#### Parameters

group | the visibility group |

Since: 2.2.15

### xapp_visibility_group_set_visible ()

    void
    xapp_visibility_group_set_visible (XAppVisibilityGroup *group,
                                       gboolean visible);

Set the visibility of all widgets in the group.

#### Parameters

group | the visibility group |
visible | TRUE to make the widgets visible. |

Since: 2.2.15

### xapp_visibility_group_get_visible ()

    gboolean
    xapp_visibility_group_get_visible (XAppVisibilityGroup *group);

Get the visibility of the group.

There is no guarantee that all widgets in the group actually are in the returned state, if they've had their visibility individually modified since the last time the group was set.

#### Parameters

group | the visibility group. |

#### Returns

The visibility state of the group.

Since: 2.2.15

### xapp_visibility_group_set_sensitive ()

    void
    xapp_visibility_group_set_sensitive (XAppVisibilityGroup *group,
                                         gboolean sensitive);

Set the sensitivity of all widgets in group.

#### Parameters

group | the visibility group. |
sensitive | TRUE to make the widgets sensitive. |

Since: 2.2.15

### xapp_visibility_group_get_sensitive ()

    gboolean
    xapp_visibility_group_get_sensitive (XAppVisibilityGroup *group);

Get the sensitivity of the group.

There is no guarantee that all widgets in the group actually are in the returned state, if they've had their sensitivity individually modified since the last time the group was set.

#### Parameters

group | the visibility group. |

#### Returns

The sensitivity state of the group.

Since: 2.2.15

### xapp_visibility_group_get_widgets ()

    GSList *
    xapp_visibility_group_get_widgets (XAppVisibilityGroup *group);

Returns the members of the group or NULL if the group is empty.

#### Parameters

group | the visibility group |

#### Returns

a list of members of the group.

The list is owned by XApp, do not free.

[element-type GtkWidget][transfer none]

Since: 2.2.15

### xapp_visibility_group_set_widgets ()

    void
    xapp_visibility_group_set_widgets (XAppVisibilityGroup *group,
                                       GSList *widgets);

#### Parameters

group | the visibility group |
widgets | The widgets to add to this group, replacing any existing ones. | [nullable][element-type GtkWidget][transfer none]

Since: 2.2.15

## Types and Values

### struct XAppVisibilityGroup

    struct XAppVisibilityGroup {
        GSList *widgets;
        gboolean visible;
        gboolean sensitive;
    };

A group of widgets that can have their visibility and sensitivity controlled together.

#### Members

GSList *`widgets`; | The GtkWidget members of this group. | [element-type Gtk.Widget][transfer none][nullable]
gboolean `visible`; | The current visible state of the group. There is no guarantee that all members are actually in this state. |
gboolean `sensitive`; | The current sensitive state of the group. There is no guarantee that all members are actually in this state. |