Dazzle.BindingGroup

g Dazzle.BindingGroup Dazzle.BindingGroup GObject.Object GObject.Object GObject.Object->Dazzle.BindingGroup

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

bind (source_property, target, target_property, flags)

bind_full (source_property, target, target_property, flags, transform_to, transform_from)

get_source ()

set_source (source)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

source

GObject.Object

r/w

The source GObject.Object used for binding properties.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Dazzle.BindingGroup(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Dazzle.BindingGroupClass

Dazzle.BindingGroup manages to simplify the process of binding many properties from a GObject.Object as a group. As such there is no API to unbind a property from the group.

In particular, this allows you to change the source instance for the bindings. This automatically causes the unbinding of the properties from the old instance and binding to the new instance.

This should not be confused with #GtkBindingGroup.

classmethod new()
Returns:

a new Dazzle.BindingGroup

Return type:

Dazzle.BindingGroup

Creates a new Dazzle.BindingGroup.

bind(source_property, target, target_property, flags)
Parameters:

Creates a binding between source_property on the source object and target_property on target. Whenever the source_property is changed the target_property is updated using the same value. The binding flags GObject.BindingFlags.SYNC_CREATE is automatically specified.

See: GObject.Object.bind_property().

bind_full(source_property, target, target_property, flags, transform_to, transform_from)
Parameters:

Creates a binding between source_property on the source object and target_property on target, allowing you to set the transformation functions to be used by the binding. The binding flags GObject.BindingFlags.SYNC_CREATE is automatically specified.

This function is the language bindings friendly version of dzl_binding_group_bind_property_full(), using GObject.Closures instead of function pointers.

See: GObject.Object.bind_property_full().

get_source()
Returns:

the source object.

Return type:

GObject.Object or None

Gets the source object used for binding properties.

set_source(source)
Parameters:

source (GObject.Object or None) – the source GObject.Object

Sets source as the source object used for creating property bindings. If there is already a source object all bindings from it will be removed.

Note: All properties that have been bound must exist on source.

Property Details

Dazzle.BindingGroup.props.source
Name:

source

Type:

GObject.Object

Default Value:

None

Flags:

READABLE, WRITABLE

The source object used for binding properties.