Gnome::Gtk4::T-editable
Table of Contents
Class initialization§
new§
Initialization of a type class is simple and only needed when the standalone functions are used.
method new ( )
Enumerations§
GtkEditableProperties§
The identifiers for /content-docs/api2/reference/Gnome::Gtk4::R-Editable properties.
See .Editable.install-properties().Editable.install-properties() in package Gnome::Gtk4 for details on how to implement the Gnome::Gtk4::R-Editable interface.
- GTK_EDITABLE_PROP_TEXT; the property id for text
- GTK_EDITABLE_PROP_CURSOR_POSITION; the property id for cursor-position
- GTK_EDITABLE_PROP_SELECTION_BOUND; the property id for selection-bound
- GTK_EDITABLE_PROP_EDITABLE; the property id for editable
- GTK_EDITABLE_PROP_WIDTH_CHARS; the property id for width-chars
- GTK_EDITABLE_PROP_MAX_WIDTH_CHARS; the property id for max-width-chars
- GTK_EDITABLE_PROP_XALIGN; the property id for xalign
- GTK_EDITABLE_PROP_ENABLE_UNDO; the property id for enable-undo
- GTK_EDITABLE_NUM_PROPERTIES; the number of properties
Standalone Functions§
editable-delegate-get-property§
Gets a property of the Gnome::Gtk4::R-Editable delegate for $object.
This is helper function that should be called in the get_property function of your Gnome::Gtk4::R-Editable implementation, before handling your own properties.
method editable-delegate-get-property ( N-Object() $object, UInt() $prop-id, N-Object $value, N-Object() $pspec --> Bool )
- $object; a Gnome::GObject::Object.
- $prop-id; a property ID.
- $value; value to set
- $pspec; the Gnome::GObject::ParamSpec for the property.
Return value; True if the property was found.
editable-delegate-set-property§
Sets a property on the Gnome::Gtk4::R-Editable delegate for $object.
This is a helper function that should be called in the set_property function of your Gnome::Gtk4::R-Editable implementation, before handling your own properties.
method editable-delegate-set-property ( N-Object() $object, UInt() $prop-id, N-Object $value, N-Object() $pspec --> Bool )
- $object; a Gnome::GObject::Object.
- $prop-id; a property ID.
- $value; value to set
- $pspec; the Gnome::GObject::ParamSpec for the property.
Return value; True if the property was found.
editable-install-properties§
Overrides the Gnome::Gtk4::R-Editable properties for $class.
This is a helper function that should be called in class_init, after installing your own properties.
Note that your class must have "text", "cursor-position", "selection-bound", "editable", "width-chars", "max-width-chars", "xalign" and "enable-undo" properties for this function to work.
To handle the properties in your set_property and get_property functions, you can either use .Editable.delegate-set-property().Editable.delegate-set-property() in package Gnome::Gtk4 and .Editable.delegate-get-property().Editable.delegate-get-property() in package Gnome::Gtk4 (if you are using a delegate), or remember the $first-prop offset and add it to the values in the enumeration EditableProperties from Gnome::Gtk4::T-editable enumeration to get the property IDs for these properties.
method editable-install-properties ( …, UInt() $first-prop --> UInt )
- object-class; a GObjectClass. Note that each argument must be specified as a type followed by its value!
- $first-prop; property ID to use for the first property.
Return value; the number of properties that were installed.
About my projects, examples and tutorials