Gtk.ContainerClass¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
add |
r |
Signal emitted when a widget is added to container. |
|
check_resize |
r |
Signal emitted when a size recalculation is needed. |
|
child_type |
r |
Returns the type of the children supported by the container. |
|
composite_name |
r |
Gets a widget’s composite name. Deprecated: 3.10. |
|
forall |
r |
Invokes callback on each child of container. The callback handler may remove the child. |
|
get_child_property |
r |
Get a property from a child of container. |
|
get_path_for_child |
r |
Get path representing entire widget hierarchy from the toplevel down to and including child. |
|
parent_class |
r |
The parent class. |
|
remove |
r |
Signal emitted when a widget is removed from container. |
|
set_child_property |
r |
Set a property on a child of container. |
|
set_focus_child |
r |
Sets the focused child of container. |
Methods¶
|
|
|
|
|
|
Details¶
- class Gtk.ContainerClass¶
Base class for containers.
- find_child_property(property_name)[source]¶
- Parameters:
property_name (
str
) – the name of the child property to find- Returns:
the
GObject.ParamSpec
of the child property orNone
if class has no child property with that name.- Return type:
Finds a child property of a container class by name.
- handle_border_width()[source]¶
Modifies a subclass of
Gtk.ContainerClass
to automatically add and remove the border-width setting onGtk.Container
. This allows the subclass to ignore the border width in its size request and allocate methods. The intent is for a subclass to invoke this in its class_init function.Gtk.ContainerClass.handle_border_width
() is necessary because it would break API too badly to make this behavior the default. So subclasses must “opt in” to the parent class handling border_width for them.
- install_child_properties(pspecs)[source]¶
- Parameters:
pspecs ([
GObject.ParamSpec
]) – theGObject.ParamSpec
array defining the new child properties
Installs child properties on a container class.
New in version 3.18.
- install_child_property(property_id, pspec)[source]¶
- Parameters:
property_id (
int
) – the id for the propertypspec (
GObject.ParamSpec
) – theGObject.ParamSpec
for the property
Installs a child property on a container class.
- list_child_properties()[source]¶
- Returns:
a newly allocated
None
-terminated array ofGObject.ParamSpec
. The array must be freed withGLib.free
().- Return type:
Returns all child properties of a container class.