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: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – TheGObject.Object
- action_path (str) – The action identifier in the action tree
 - This delegate function is used to catch actions from the core. 
- adaptor (
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – TheGObject.Object
- action_path (str) – The action identifier in the action tree
 - Returns: - Return type: - Gtk.Widgetor- None- This delegate function is used to create dynamically customized submenus. Called only for actions that don’t have children. 
- adaptor (
- 
Gladeui.AddChildFunc(adaptor, container, child)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
- child (GObject.Object) – TheGObject.Objectchild
 - Called to add child to container. 
- adaptor (
- 
Gladeui.AddChildVerifyFunc(adaptor, container, child, user_feedback)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – AGObject.Objectcontainer
- child (GObject.Object) – AGObject.Objectchild
- user_feedback (bool) – whether a notification dialog should be presented in the case that the child cannot not be added.
 - Returns: - whether child can be added to parent. - Return type: - Checks whether child can be added to container. - If user_feedback is - Trueand child cannot be added then this shows a notification dialog to the user explaining why.
- adaptor (
- 
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: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
- object (GObject.Object) – TheGObject.Object
- action_path (str) – The action identifier in the action tree
 - This delegate function is used to catch packing actions from the core. 
- adaptor (
- 
Gladeui.ChildGetPropertyFunc(adaptor, container, child, property_name, value)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
- child (GObject.Object) – TheGObject.Objectchild
- property_name (str) – The id of the property
- value (GObject.Value) – The GValue
 - Called to get the packing property property_name on the child object of container into value. 
- adaptor (
- 
Gladeui.ChildSetPropertyFunc(adaptor, container, child, property_name, value)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
- child (GObject.Object) – TheGObject.Objectchild
- property_name (str) – The id of the property
- value (GObject.Value) – The GValue
 - Called to set the packing property property_name to value on the child object of container. 
- adaptor (
- 
Gladeui.ChildVerifyPropertyFunc(adaptor, container, child, property_name, value)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
- child (GObject.Object) – TheGObject.Objectchild
- property_name (str) – The id of the property
- value (GObject.Value) – The GValue
 - Returns: - whether or not its OK to set value on object, this function will silently return - Trueif the class did not provide a verify function.- Return type: - 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. 
- adaptor (
- 
Gladeui.ConstructObjectFunc(adaptor, n_parameters, parameters)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- n_parameters (int) – amount of construct parameters
- parameters (GObject.Parameter) – array of constructGObject.Parameterargs to create the new object with.
 - Returns: - A newly created - GObject.Object- Return type: - This function is called to construct a - GObject.Objectinstance. (for language bindings that may need to construct a wrapper object).
- adaptor (
- 
Gladeui.CreateEPropFunc(adaptor, def_, use_command)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- def (Gladeui.PropertyDef) – TheGladeui.PropertyDefto be edited
- use_command (bool) – whether to use theGladeui.Commandinterface to commit property changes
 - Returns: - A newly created - Gladeui.EditorProperty- Return type: - Creates a - Gladeui.EditorPropertyto edit klass
- adaptor (
- 
Gladeui.CreateEditableFunc(adaptor, type)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- type (Gladeui.EditorPageType) – TheGladeui.EditorPageType
 - Returns: - A new - Gladeui.Editablewidget- Return type: - 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). 
- adaptor (
- 
Gladeui.DependsFunc(adaptor, widget, another)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- widget (Gladeui.Widget) – AGladeui.Widgetof the adaptor
- another (Gladeui.Widget) – anotherGladeui.Widget
 - Returns: - whether widget depends on another being parsed first in the resulting glade file. - Return type: - Checks whether widget depends on another to be placed earlier in the glade file. 
- adaptor (
- 
Gladeui.DestroyObjectFunc(adaptor, object)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – The object to destroy
 - This function is called to break any additional references to a - GObject.Objectinstance. Note that this function is not responsible for calling- GObject.Object.unref() on object, the reference count of object belongs to it’s- Gladeui.Widgetwrapper.- The - Gtk.Widgetadaptor will call- Gtk.Widget.destroy() before chaining up in this function.- If your adaptor adds any references in any way at - Gladeui.PostCreateFunctime or- Gladeui.ConstructObjectFunctime, then this function must be implemented to also remove that reference.
- adaptor (
- 
Gladeui.GetChildrenFunc(adaptor, container)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
 - Returns: - A - GLib.Listof children- Return type: - A function called to get containers children. 
- adaptor (
- 
Gladeui.GetInternalFunc(adaptor, object, internal_name)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – TheGObject.Object
- internal_name (str) – The string identifier of the internal object
 - Returns: - The internal - GObject.Object- Return type: - Called to lookup child in composite object parent by internal_name. 
- adaptor (
- 
Gladeui.GetPropertyFunc(adaptor, object, property_name, value)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – TheGObject.Object
- property_name (str) – The property identifier
- value (GObject.Value) – TheGObject.Value
 - Gets value on object for a given - Gladeui.PropertyDef
- adaptor (
- 
Gladeui.PostCreateFunc(adaptor, object, reason)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – TheGObject.Object
- reason (Gladeui.CreateReason) – TheGladeui.CreateReasonthat object was created for
 - This function is called exactly once for any project object instance and can be for any - Gladeui.CreateReason.
- adaptor (
- 
Gladeui.ReadWidgetFunc(adaptor, widget, node)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- widget (Gladeui.Widget) – TheGladeui.Widget
- node (Gladeui.XmlNode) – TheGladeui.XmlNode
 - This function is called to update widget from node. 
- adaptor (
- 
Gladeui.RemoveChildFunc(adaptor, container, child)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
- child (GObject.Object) – TheGObject.Objectchild
 - Called to remove child from container. 
- adaptor (
- 
Gladeui.ReplaceChildFunc(adaptor, container, old_obj, new_obj)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- container (GObject.Object) – TheGObject.Objectcontainer
- old_obj (GObject.Object) – The oldGObject.Objectchild
- new_obj (GObject.Object) – The newGObject.Objectchild
 - Called to swap placeholders with project objects in containers. 
- adaptor (
- 
Gladeui.SetPropertyFunc(adaptor, object, property_name, value)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – TheGObject.Object
- property_name (str) – The property identifier
- value (GObject.Value) – TheGObject.Value
 - This delegate function is used to apply the property value on the runtime object. - Sets value on object for a given - Gladeui.PropertyDef
- adaptor (
- 
Gladeui.StringFromValueFunc(adaptor, def_, value)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- def (Gladeui.PropertyDef) – TheGladeui.PropertyDef
- value (GObject.Value) – TheGObject.Valueto convert to a string
 - Returns: - A newly allocated string representation of value - Return type: - 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. 
- adaptor (
- 
Gladeui.VerifyPropertyFunc(adaptor, object, property_name, value)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- object (GObject.Object) – TheGObject.Object
- property_name (str) – The property identifier
- value (GObject.Value) – TheGObject.Value
 - Returns: - whether or not its OK to set value on object, this function will silently return - Trueif the class did not provide a verify function.- Return type: - 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. 
- adaptor (
- 
Gladeui.WriteWidgetFunc(adaptor, widget, context, node)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- widget (Gladeui.Widget) – TheGladeui.Widget
- context (Gladeui.XmlContext) – TheGladeui.XmlContext
- node (Gladeui.XmlNode) – TheGladeui.XmlNode
 - This function is called to fill in node from widget. 
- adaptor (