Top | ![]() |
![]() |
![]() |
![]() |
XAppVisibilityGroupXAppVisibilityGroup — Groups widgets to have their visibility or sensitivity controlled as a group, independent of their positions in any widget hierarchy. |
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.
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.
visible |
starting visibility state |
|
sensitive |
starting sensitivity state |
|
widgets |
list of GtkWidgets to add to the group. |
[element-type GtkWidget][transfer none][nullable] |
Since: 2.2.15
void xapp_visibility_group_add_widget (XAppVisibilityGroup *group
,GtkWidget *widget
);
Adds widget to the visibility group.
Since: 2.2.15
gboolean xapp_visibility_group_remove_widget (XAppVisibilityGroup *group
,GtkWidget *widget
);
Since: 2.2.15
void
xapp_visibility_group_hide (XAppVisibilityGroup *group
);
Hide all widgets in the group.
Since: 2.2.15
void
xapp_visibility_group_show (XAppVisibilityGroup *group
);
Show all widgets in the group.
Since: 2.2.15
void xapp_visibility_group_set_visible (XAppVisibilityGroup *group
,gboolean visible
);
Set the visibility of all widgets in the group.
Since: 2.2.15
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.
Since: 2.2.15
void xapp_visibility_group_set_sensitive (XAppVisibilityGroup *group
,gboolean sensitive
);
Set the sensitivity of all widgets in group.
Since: 2.2.15
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.
Since: 2.2.15
GSList *
xapp_visibility_group_get_widgets (XAppVisibilityGroup *group
);
Returns the members of the group or NULL if the group is empty.
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
void xapp_visibility_group_set_widgets (XAppVisibilityGroup *group
,GSList *widgets
);
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
struct XAppVisibilityGroup { GSList *widgets; gboolean visible; gboolean sensitive; };
A group of widgets that can have their visibility and sensitivity controlled together.
GSList * |
The GtkWidget members of this group. |
[element-type Gtk.Widget][transfer none][nullable] |
gboolean |
The current visible state of the group. There is no guarantee that all members are actually in this state. |
|
gboolean |
The current sensitive state of the group. There is no guarantee that all members are actually in this state. |