Callbacks

ActionActivateFunc (adaptor, object, action_path)

ActionSubmenuFunc (adaptor, object, action_path)

AddChildFunc (adaptor, container, child)

AddChildVerifyFunc (adaptor, container, child, user_feedback)

CatalogInitFunc (name)

ChildActionActivateFunc (adaptor, container, object, action_path)

ChildGetPropertyFunc (adaptor, container, child, property_name, value)

ChildSetPropertyFunc (adaptor, container, child, property_name, value)

ChildVerifyPropertyFunc (adaptor, container, child, property_name, value)

ConstructObjectFunc (adaptor, n_parameters, parameters)

CreateEPropFunc (adaptor, def_, use_command)

CreateEditableFunc (adaptor, type)

DependsFunc (adaptor, widget, another)

DestroyObjectFunc (adaptor, object)

GetChildrenFunc (adaptor, container)

GetInternalFunc (adaptor, object, internal_name)

GetPropertyFunc (adaptor, object, property_name, value)

PostCreateFunc (adaptor, object, reason)

ReadWidgetFunc (adaptor, widget, node)

RemoveChildFunc (adaptor, container, child)

ReplaceChildFunc (adaptor, container, old_obj, new_obj)

SetPropertyFunc (adaptor, object, property_name, value)

StringFromValueFunc (adaptor, def_, value)

VerifyPropertyFunc (adaptor, object, property_name, value)

WriteWidgetFunc (adaptor, widget, context, node)

Details

Gladeui.ActionActivateFunc(adaptor, object, action_path)
Parameters:

This delegate function is used to catch actions from the core.

Gladeui.ActionSubmenuFunc(adaptor, object, action_path)
Parameters:
Returns:

A newly created Gtk.Menu or None

Return type:

Gtk.Widget or None

This delegate function is used to create dynamically customized submenus. Called only for actions that don’t have children.

Gladeui.AddChildFunc(adaptor, container, child)
Parameters:

Called to add child to container.

Gladeui.AddChildVerifyFunc(adaptor, container, child, user_feedback)
Parameters:
Returns:

whether child can be added to parent.

Return type:

bool

Checks whether child can be added to container.

If user_feedback is True and child cannot be added then this shows a notification dialog to the user explaining why.

Gladeui.CatalogInitFunc(name)
Parameters:

name (str) – The name of the catalog

Called once at glade startup time for every catalog, catalogs are initialized in order of dependencies.

Gladeui.ChildActionActivateFunc(adaptor, container, object, action_path)
Parameters:

This delegate function is used to catch packing actions from the core.

Gladeui.ChildGetPropertyFunc(adaptor, container, child, property_name, value)
Parameters:

Called to get the packing property property_name on the child object of container into value.

Gladeui.ChildSetPropertyFunc(adaptor, container, child, property_name, value)
Parameters:

Called to set the packing property property_name to value on the child object of container.

Gladeui.ChildVerifyPropertyFunc(adaptor, container, child, property_name, value)
Parameters:
Returns:

whether or not its OK to set value on object, this function will silently return True if the class did not provide a verify function.

Return type:

bool

This delegate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basically the two places where we recreate a hierarchy that we already know “works”) its basically an optional backend provided boundary checker for properties.

Gladeui.ConstructObjectFunc(adaptor, n_parameters, parameters)
Parameters:
Returns:

A newly created GObject.Object

Return type:

GObject.Object

This function is called to construct a GObject.Object instance. (for language bindings that may need to construct a wrapper object).

Gladeui.CreateEPropFunc(adaptor, def_, use_command)
Parameters:
Returns:

A newly created Gladeui.EditorProperty

Return type:

Gladeui.EditorProperty

Creates a Gladeui.EditorProperty to edit klass

Gladeui.CreateEditableFunc(adaptor, type)
Parameters:
Returns:

A new Gladeui.Editable widget

Return type:

Gladeui.Editable

This is used to allow the backend to override the way an editor page is layed out (note that editor widgets are created on demand and not at startup).

Gladeui.DependsFunc(adaptor, widget, another)
Parameters:
Returns:

whether widget depends on another being parsed first in the resulting glade file.

Return type:

bool

Checks whether widget depends on another to be placed earlier in the glade file.

Gladeui.DestroyObjectFunc(adaptor, object)
Parameters:

This function is called to break any additional references to a GObject.Object instance. Note that this function is not responsible for calling GObject.Object.unref() on object, the reference count of object belongs to it’s Gladeui.Widget wrapper.

The Gtk.Widget adaptor will call Gtk.Widget.destroy() before chaining up in this function.

If your adaptor adds any references in any way at Gladeui.PostCreateFunc time or Gladeui.ConstructObjectFunc time, then this function must be implemented to also remove that reference.

Gladeui.GetChildrenFunc(adaptor, container)
Parameters:
Returns:

A GLib.List of children

Return type:

[GObject.Object]

A function called to get containers children.

Gladeui.GetInternalFunc(adaptor, object, internal_name)
Parameters:
Returns:

The internal GObject.Object

Return type:

GObject.Object or None

Called to lookup child in composite object parent by internal_name.

Gladeui.GetPropertyFunc(adaptor, object, property_name, value)
Parameters:

Gets value on object for a given Gladeui.PropertyDef

Gladeui.PostCreateFunc(adaptor, object, reason)
Parameters:

This function is called exactly once for any project object instance and can be for any Gladeui.CreateReason.

Gladeui.ReadWidgetFunc(adaptor, widget, node)
Parameters:

This function is called to update widget from node.

Gladeui.RemoveChildFunc(adaptor, container, child)
Parameters:

Called to remove child from container.

Gladeui.ReplaceChildFunc(adaptor, container, old_obj, new_obj)
Parameters:

Called to swap placeholders with project objects in containers.

Gladeui.SetPropertyFunc(adaptor, object, property_name, value)
Parameters:

This delegate function is used to apply the property value on the runtime object.

Sets value on object for a given Gladeui.PropertyDef

Gladeui.StringFromValueFunc(adaptor, def_, value)
Parameters:
Returns:

A newly allocated string representation of value

Return type:

str

For normal properties this is used to serialize property values, for custom properties (only when new pspecs are introduced) its needed for value comparisons in boxed pspecs and also to update the UI for undo/redo items etc.

Gladeui.VerifyPropertyFunc(adaptor, object, property_name, value)
Parameters:
Returns:

whether or not its OK to set value on object, this function will silently return True if the class did not provide a verify function.

Return type:

bool

This delegate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basically the two places where we recreate a hierarchy that we already know “works”) its basically an optional backend provided boundary checker for properties.

Gladeui.WriteWidgetFunc(adaptor, widget, context, node)
Parameters:

This function is called to fill in node from widget.