1.2 <GBindingGroup>

Class: <GBindingGroup>

It derives from <GObject>.

<GBindingGroup> can be used to bind multiple properties from an object collectively.

Use the various methods to bind properties from a single source object to multiple destination objects. Properties can be bound bidirectionally and are connected when the source object is set with binding-group:set-source.

Properties

Property: binding-group:source self

The source object used for binding properties.

Its value is a <GObject>, or #f.

Set it with (set! (binding-group:source self) value).

Procedures

Method: binding-group:bind self source-property target target-property flags
Method: bind self source-property target target-property flags

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 flag sync-create is automatically specified.

See object:bind-property for more information.

self

Passed: a <GBindingGroup>.

the <GBindingGroup>

source-property

Passed: a string.

the property on the source to bind

target

Passed: a <GObject>.

the target <GObject>

target-property

Passed: a string.

the property on target to bind

flags

Passed: a <GBindingFlags>, or a list of its symbols, or one of them.

the flags used to create the <GBinding>

Method: binding-group:bind-full self source-property target target-property flags [transform-to] [transform-from]
Method: bind-full self source-property target target-property flags [transform-to] [transform-from]

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 flag sync-create is automatically specified.

See object:bind-property-full for more information.

self

Passed: a <GBindingGroup>.

the <GBindingGroup>

source-property

Passed: a string.

the property on the source to bind

target

Passed: a <GObject>.

the target <GObject>

target-property

Passed: a string.

the property on target to bind

flags

Passed: a <GBindingFlags>, or a list of its symbols, or one of them.

the flags used to create the <GBinding>

transform-to

Passed, or left out: a <GClosure>, or #f.

the transformation function from the source object to the target, or #f to use the default

See GBindingTransformFunc for how it is called.

transform-from

Passed, or left out: a <GClosure>, or #f.

the transformation function from the target to the source object, or #f to use the default

See GBindingTransformFunc for how it is called.

user-data

custom data to be passed to the transformation functions, or #f

user-data-destroy

function to be called when disposing the binding, to free the resources used by the transformation functions

See GDestroyNotify for how it is called.

Method: binding-group:dup-source self ⇒ %return
Method: dup-source self ⇒ %return

Gets the source object used for binding properties.

self

Passed: a <GBindingGroup>.

the <GBindingGroup>

%return

Returned: a <GObject>, or #f.

a <GObject> or #f.

Procedure: binding-group:new ⇒ %return

Creates a new <GBindingGroup>.

%return

Returned: a <GBindingGroup>.

a new <GBindingGroup>

Method: binding-group:set-source self [source]
Method: set-source self [source]

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 that all properties that have been bound must exist on source.

self

Passed: a <GBindingGroup>.

the <GBindingGroup>

source

Passed, or left out: a <GObject>, or #f.

the source <GObject>, or #f to clear it