Callbacks

  ActionActivateFunc (adaptor, object, action_path)
  AddChildFunc (adaptor, parent, child)
  AddChildVerifyFunc (adaptor, parent, 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)
  DependsFunc (adaptor, widget, another)
  DestroyObjectFunc (adaptor, object)
  GetPropertyFunc (adaptor, object, property_name, value)
  PostCreateFunc (adaptor, object, reason)
  ReadWidgetFunc (adaptor, widget, node)
  RemoveChildFunc (adaptor, parent, child)
  ReplaceChildFunc (adaptor, container, old_obj, new_obj)
  SetPropertyFunc (adaptor, object, property_name, value)
  StringFromValueFunc (adaptor, klass, value)
  VerifyPropertyFunc (adaptor, object, property_name, value)
  WriteWidgetFunc (adaptor, widget, context, node)

Details

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

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

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

Called to add child to parent.

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

whether child can be added to parent.

Return type:

bool

Checks whether child can be added to parent.

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 dependancies.

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

This delagate 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 delagate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basicly the two places where we recreate a hierarchy that we already know “works”) its basicly an optional backend provided boundry checker for properties.

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 #GladeConstructObjectFunc time, then this function must be implemented to also remove that reference.

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

Gets value on object for a given Gladeui.PropertyClass

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, parent, child)
Parameters:

Called to remove child from parent.

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 delagate function is used to apply the property value on the runtime object.

Sets value on object for a given Gladeui.PropertyClass

Gladeui.StringFromValueFunc(adaptor, klass, 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 delagate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basicly the two places where we recreate a hierarchy that we already know “works”) its basicly an optional backend provided boundry checker for properties.

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

This function is called to fill in node from widget.