Dazzle.BindingGroup¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The source |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Dazzle.BindingGroup(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Dazzle.BindingGroup
manages to simplify the process of binding many properties from aGObject.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:
Creates a new
Dazzle.BindingGroup
.
- bind(source_property, target, target_property, flags)¶
- Parameters:
source_property (
str
) – the property on the source to bindtarget (
GObject.Object
) – the targetGObject.Object
target_property (
str
) – the property on target to bindflags (
GObject.BindingFlags
) – the flags used to create theGObject.Binding
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:
source_property (
str
) – the property on the source to bindtarget (
GObject.Object
) – the targetGObject.Object
target_property (
str
) – the property on target to bindflags (
GObject.BindingFlags
) – the flags used to create theGObject.Binding
transform_to (
GObject.Closure
orNone
) – aGObject.Closure
wrapping the transformation function from the source object to the target, orNone
to use the defaulttransform_from (
GObject.Closure
orNone
) – aGObject.Closure
wrapping the transformation function from the target to the source object, orNone
to use the default
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.
- get_source()¶
- Returns:
the source object.
- Return type:
Gets the source object used for binding properties.
- set_source(source)¶
- Parameters:
source (
GObject.Object
orNone
) – the sourceGObject.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:
- Default Value:
- Flags:
The source object used for binding properties.