Gtk.ContainerClass

Fields

Name Type Access Description
add object r  
check_resize object r  
child_type object r  
composite_name object r  
forall object r  
get_child_property object r  
get_path_for_child object r  
parent_class Gtk.WidgetClass r The parent class.
remove object r  
set_child_property object r  
set_focus_child object r  

Methods

  find_child_property (property_name)
  handle_border_width ()
  install_child_properties (pspecs)
  install_child_property (property_id, pspec)
  list_child_properties ()

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 or None if class has no child property with that name.
Return type:GObject.ParamSpec or None

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 on Gtk.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]) – the GObject.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:

Installs a child property on a container class.

list_child_properties()[source]
Returns:a newly allocated None-terminated array of GObject.ParamSpec. The array must be freed with GLib.free().
Return type:[GObject.ParamSpec]

Returns all child properties of a container class.