XApp.VisibilityGroup

Fields

Name

Type

Access

Description

sensitive

bool

r/w

The current sensitive state of the group. There is no guarantee that all members are actually in this state.

visible

bool

r/w

The current visible state of the group. There is no guarantee that all members are actually in this state.

widgets

[Gtk.Widget]

r/w

The Gtk.Widget members of this group.

Methods

class

new (visible, sensitive, widgets)

add_widget (widget)

get_sensitive ()

get_visible ()

get_widgets ()

hide ()

remove_widget (widget)

set_sensitive (sensitive)

set_visible (visible)

set_widgets (widgets)

show ()

Details

class XApp.VisibilityGroup

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

classmethod new(visible, sensitive, widgets)
Parameters:
  • visible (bool) – starting visibility state

  • sensitive (bool) – starting sensitivity state

  • widgets ([Gtk.Widget] or None) – list of Gtk.Widgets to add to the group.

Returns:

a new XApp.VisibilityGroup. Use xapp_visibility_group_free when finished.

Return type:

XApp.VisibilityGroup

Creates a new XApp.VisibilityGroup.

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

New in version 2.2.15.

add_widget(widget)
Parameters:

widget (Gtk.Widget) – the Gtk.Widget to add to the group

Adds widget to the visibility group.

New in version 2.2.15.

get_sensitive()
Returns:

The sensitivity state of the group.

Return type:

bool

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.

New in version 2.2.15.

get_visible()
Returns:

The visibility state of the group.

Return type:

bool

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.

New in version 2.2.15.

get_widgets()
Returns:

a list of members of the group.

The list is owned by XApp, do not free.

Return type:

[Gtk.Widget]

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

New in version 2.2.15.

hide()

Hide all widgets in the group.

New in version 2.2.15.

remove_widget(widget)
Parameters:

widget (Gtk.Widget) – the Gtk.Widget to remove from the group

Returns:

True if the widget was found and removed.

Return type:

bool

New in version 2.2.15.

set_sensitive(sensitive)
Parameters:

sensitive (bool) – True to make the widgets sensitive.

Set the sensitivity of all widgets in group.

New in version 2.2.15.

set_visible(visible)
Parameters:

visible (bool) – True to make the widgets visible.

Set the visibility of all widgets in the group.

New in version 2.2.15.

set_widgets(widgets)
Parameters:

widgets ([Gtk.Widget] or None) – The widgets to add to this group, replacing any existing ones.

New in version 2.2.15.

show()

Show all widgets in the group.

New in version 2.2.15.