DeprecatedconstructorOptionalDeprecatedproperties: Partial<Gtk.TreeView.ConstructorProps>Deprecated...args: any[]InternalDeprecated$signalsCompile-time signal type information.
This instance property is generated only for TypeScript type checking. It is not defined at runtime and should not be accessed in JS code.
StaticDeprecated$gtypeDeprecated[iterator]Gtk.Widget is an iterable of its children.
Deprecatedactivate_The activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.
Deprecatedval: booleanDeprecatedactivateThe activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.
Deprecatedval: booleanDeprecatedenable_Deprecatedval: Gtk.TreeViewGridLinesDeprecatedenable_Deprecatedval: booleanDeprecatedenable_Deprecatedval: booleanDeprecatedenableDeprecatedval: Gtk.TreeViewGridLinesDeprecatedenableDeprecatedval: booleanDeprecatedenableDeprecatedval: booleanDeprecatedexpander_Deprecatedval: Gtk.TreeViewColumnDeprecatedexpanderDeprecatedval: Gtk.TreeViewColumnDeprecatedfixed_Setting the ::fixed-height-mode property to true speeds up
Gtk.TreeView by assuming that all rows have the same height.
Only enable this option if all rows are the same height.
Please see gtk_tree_view_set_fixed_height_mode() for more
information on this option.
Deprecatedval: booleanDeprecatedfixedSetting the ::fixed-height-mode property to true speeds up
Gtk.TreeView by assuming that all rows have the same height.
Only enable this option if all rows are the same height.
Please see gtk_tree_view_set_fixed_height_mode() for more
information on this option.
Deprecatedval: booleanDeprecatedheaders_Deprecatedval: booleanDeprecatedheaders_Deprecatedval: booleanDeprecatedheadersDeprecatedval: booleanDeprecatedheadersDeprecatedval: booleanDeprecatedhover_Enables or disables the hover expansion mode of tree_view.
Hover expansion makes rows expand or collapse if the pointer moves
over them.
This mode is primarily intended for treeviews in popups, e.g. in Gtk.ComboBox or Gtk.EntryCompletion.
Deprecatedval: booleanDeprecatedhover_Enables or disables the hover selection mode of tree_view.
Hover selection makes the selected row follow the pointer.
Currently, this works only for the selection modes
Gtk.SelectionMode.SINGLE and Gtk.SelectionMode.BROWSE.
This mode is primarily intended for treeviews in popups, e.g. in Gtk.ComboBox or Gtk.EntryCompletion.
Deprecatedval: booleanDeprecatedhoverEnables or disables the hover expansion mode of tree_view.
Hover expansion makes rows expand or collapse if the pointer moves
over them.
This mode is primarily intended for treeviews in popups, e.g. in Gtk.ComboBox or Gtk.EntryCompletion.
Deprecatedval: booleanDeprecatedhoverEnables or disables the hover selection mode of tree_view.
Hover selection makes the selected row follow the pointer.
Currently, this works only for the selection modes
Gtk.SelectionMode.SINGLE and Gtk.SelectionMode.BROWSE.
This mode is primarily intended for treeviews in popups, e.g. in Gtk.ComboBox or Gtk.EntryCompletion.
Deprecatedval: booleanDeprecatedlevel_Extra indentation for each level.
Deprecatedval: numberDeprecatedlevelExtra indentation for each level.
Deprecatedval: numberDeprecatedmodelDeprecatedreorderableDeprecatedval: booleanDeprecatedrubber_Deprecatedval: booleanDeprecatedrubberDeprecatedval: booleanDeprecatedsearch_Deprecatedval: numberDeprecatedsearchDeprecatedval: numberDeprecatedshow_true if the view has expanders.
Deprecatedval: booleanDeprecatedshowtrue if the view has expanders.
Deprecatedval: booleanDeprecatedtooltip_Deprecatedval: numberDeprecatedtooltipDeprecatedval: numberDeprecatedaccessible_The accessible role of the given Gtk.Accessible implementation.
The accessible role cannot be changed once set.
The accessible role of the given Gtk.Accessible implementation.
The accessible role cannot be changed once set.
Deprecatedval: Gtk.AccessibleRoleDeprecatedaccessibleThe accessible role of the given Gtk.Accessible implementation.
The accessible role cannot be changed once set.
The accessible role of the given Gtk.Accessible implementation.
The accessible role cannot be changed once set.
Deprecatedval: Gtk.AccessibleRoleDeprecatedhadjustmentHorizontal Gtk.Adjustment of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.
Horizontal Gtk.Adjustment of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.
Deprecatedval: Gtk.AdjustmentDeprecatedhscroll_Determines when horizontal scrolling should start.
Determines when horizontal scrolling should start.
Deprecatedval: Gtk.ScrollablePolicyDeprecatedhscrollDetermines when horizontal scrolling should start.
Determines when horizontal scrolling should start.
Deprecatedval: Gtk.ScrollablePolicyDeprecatedvadjustmentVertical Gtk.Adjustment of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.
Vertical Gtk.Adjustment of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.
Deprecatedval: Gtk.AdjustmentDeprecatedvscroll_Determines when vertical scrolling should start.
Determines when vertical scrolling should start.
Deprecatedval: Gtk.ScrollablePolicyDeprecatedvscrollDetermines when vertical scrolling should start.
Determines when vertical scrolling should start.
Deprecatedval: Gtk.ScrollablePolicyDeprecatedcan_Whether the widget or any of its descendents can accept the input focus.
This property is meant to be set by widget implementations, typically in their instance init function.
Deprecatedval: booleanDeprecatedcan_Whether the widget can receive pointer events.
Deprecatedval: booleanDeprecatedcanWhether the widget or any of its descendents can accept the input focus.
This property is meant to be set by widget implementations, typically in their instance init function.
Deprecatedval: booleanDeprecatedcanWhether the widget can receive pointer events.
Deprecatedval: booleanDeprecatedcss_A list of css classes applied to this widget.
Deprecatedval: string[]Deprecatedcss_The name of this widget in the CSS tree.
This property is meant to be set by widget implementations, typically in their instance init function.
DeprecatedcssA list of css classes applied to this widget.
Deprecatedval: string[]DeprecatedcssThe name of this widget in the CSS tree.
This property is meant to be set by widget implementations, typically in their instance init function.
DeprecatedcursorDeprecatedfocus_Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
Deprecatedval: booleanDeprecatedfocusableWhether this widget itself will accept the input focus.
Deprecatedval: booleanDeprecatedfocusWhether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
Deprecatedval: booleanDeprecatedhalignDeprecatedhas_Whether the widget is the default widget.
Deprecatedhas_Whether the widget has the input focus.
Deprecatedhas_Enables or disables the emission of the Gtk.Widget::query-tooltip
signal on widget.
A true value indicates that widget can have a tooltip, in this case
the widget will be queried using Gtk.Widget::query-tooltip to
determine whether it will provide a tooltip or not.
Deprecatedval: booleanDeprecatedhasWhether the widget is the default widget.
DeprecatedhasWhether the widget has the input focus.
DeprecatedhasEnables or disables the emission of the Gtk.Widget::query-tooltip
signal on widget.
A true value indicates that widget can have a tooltip, in this case
the widget will be queried using Gtk.Widget::query-tooltip to
determine whether it will provide a tooltip or not.
Deprecatedval: booleanDeprecatedheight_Overrides for height request of the widget.
If this is -1, the natural request will be used.
Deprecatedval: numberDeprecatedheightOverrides for height request of the widget.
If this is -1, the natural request will be used.
Deprecatedval: numberDeprecatedhexpandWhether to expand horizontally.
Deprecatedval: booleanDeprecatedhexpand_Whether to use the hexpand property.
Deprecatedval: booleanDeprecatedhexpandWhether to use the hexpand property.
Deprecatedval: booleanDeprecatedlayout_The Gtk.LayoutManager instance to use to compute the preferred size of the widget, and allocate its children.
This property is meant to be set by widget implementations, typically in their instance init function.
Deprecatedval: Gtk.LayoutManagerDeprecatedlayoutThe Gtk.LayoutManager instance to use to compute the preferred size of the widget, and allocate its children.
This property is meant to be set by widget implementations, typically in their instance init function.
Deprecatedval: Gtk.LayoutManagerDeprecatedlimit_Makes this widget act like a modal dialog, with respect to event delivery.
Global event controllers will not handle events with targets inside the widget, unless they are set up to ignore propagation limits. See Gtk.EventController.set_propagation_limit.
Deprecatedval: booleanDeprecatedlimitMakes this widget act like a modal dialog, with respect to event delivery.
Global event controllers will not handle events with targets inside the widget, unless they are set up to ignore propagation limits. See Gtk.EventController.set_propagation_limit.
Deprecatedval: booleanDeprecatedmargin_Margin on bottom side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatedmargin_Margin on end of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatedmargin_Margin on start of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatedmargin_Margin on top side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatedmarginMargin on bottom side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatedmarginMargin on end of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatedmarginMargin on start of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatedmarginMargin on top side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Gtk.Widget.set_size_request for example.
Deprecatedval: numberDeprecatednameThe name of the widget.
Deprecatedval: stringDeprecatedopacityThe requested opacity of the widget.
Deprecatedval: numberDeprecatedoverflowDeprecatedparentDeprecatedreceives_Whether the widget will receive the default action when it is focused.
Deprecatedval: booleanDeprecatedreceivesWhether the widget will receive the default action when it is focused.
Deprecatedval: booleanDeprecatedrootDeprecatedscale_The scale factor of the widget.
DeprecatedscaleThe scale factor of the widget.
DeprecatedsensitiveWhether the widget responds to input.
Deprecatedval: booleanDeprecatedtooltip_Sets the text of tooltip to be the given string, which is marked up with Pango markup.
Also see Gtk.Tooltip.set_markup.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
Gtk.Widget.has_tooltip will automatically be set to true
and there will be taken care of Gtk.Widget::query-tooltip in
the default signal handler.
Note that if both Gtk.Widget.tooltip_text and Gtk.Widget.tooltip_markup are set, the last one wins.
Deprecatedval: stringDeprecatedtooltip_Sets the text of tooltip to be the given string.
Also see Gtk.Tooltip.set_text.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
Gtk.Widget.has_tooltip will automatically be set to true
and there will be taken care of Gtk.Widget::query-tooltip in
the default signal handler.
Note that if both Gtk.Widget.tooltip_text and Gtk.Widget.tooltip_markup are set, the last one wins.
Deprecatedval: stringDeprecatedtooltipSets the text of tooltip to be the given string, which is marked up with Pango markup.
Also see Gtk.Tooltip.set_markup.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
Gtk.Widget.has_tooltip will automatically be set to true
and there will be taken care of Gtk.Widget::query-tooltip in
the default signal handler.
Note that if both Gtk.Widget.tooltip_text and Gtk.Widget.tooltip_markup are set, the last one wins.
Deprecatedval: stringDeprecatedtooltipSets the text of tooltip to be the given string.
Also see Gtk.Tooltip.set_text.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
Gtk.Widget.has_tooltip will automatically be set to true
and there will be taken care of Gtk.Widget::query-tooltip in
the default signal handler.
Note that if both Gtk.Widget.tooltip_text and Gtk.Widget.tooltip_markup are set, the last one wins.
Deprecatedval: stringDeprecatedvalignDeprecatedvexpandWhether to expand vertically.
Deprecatedval: booleanDeprecatedvexpand_Whether to use the vexpand property.
Deprecatedval: booleanDeprecatedvexpandWhether to use the vexpand property.
Deprecatedval: booleanDeprecatedvisibleWhether the widget is visible.
Deprecatedval: booleanDeprecatedwidth_Overrides for width request of the widget.
If this is -1, the natural request will be used.
Deprecatedval: numberDeprecatedwidthOverrides for width request of the widget.
If this is -1, the natural request will be used.
Deprecatedval: numberDeprecated_Deprecated...args: any[]DeprecatedannounceRequests the user's screen reader to announce the given message.
This kind of notification is useful for messages that either have only a visual representation or that are not exposed visually at all, e.g. a notification about a successful operation.
Also, by using this API, you can ensure that the message does not interrupts the user's current screen reader output.
Deprecatedmessage: stringthe string to announce
Deprecatedpriority: Gtk.AccessibleAnnouncementPrioritythe priority of the announcement
Deprecatedappend_Appends column to the list of columns. If tree_view has “fixed_height”
mode enabled, then column must have its “sizing” property set to be
GTK_TREE_VIEW_COLUMN_FIXED.
Deprecatedcolumn: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to add.
The number of columns in tree_view after appending.
Deprecatedbind_Creates a binding between source_property on source and target_property
on target.
Whenever the source_property is changed the target_property is
updated using the same value. For instance:
g_object_bind_property (action, "active", widget, "sensitive", 0);
Will result in the "sensitive" property of the widget GObject.Object instance to be updated with the same value of the "active" property of the action GObject.Object instance.
If flags contains GObject.BindingFlags.BIDIRECTIONAL then the binding will be mutual:
if target_property on target changes then the source_property on source
will be updated as well.
The binding will automatically be removed when either the source or the
target instances are finalized. To remove the binding without affecting the
source and the target you can just call g_object_unref() on the returned
GObject.Binding instance.
Removing the binding by calling g_object_unref() on it must only be done if
the binding, source and target are only used from a single thread and it
is clear that both source and target outlive the binding. Especially it
is not safe to rely on this if the binding, source or target can be
finalized from different threads. Keep another reference to the binding and
use g_binding_unbind() instead to be on the safe side.
A GObject.Object can have multiple bindings.
Deprecatedsource_property: stringthe property on source to bind
Deprecatedtarget: GObject.Objectthe target GObject.Object
Deprecatedtarget_property: stringthe property on target to bind
Deprecatedflags: GObject.BindingFlagsflags to pass to GObject.Binding
the GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
Deprecatedbind_Complete version of g_object_bind_property().
Creates a binding between source_property on source and target_property
on target, allowing you to set the transformation functions to be used by
the binding.
If flags contains GObject.BindingFlags.BIDIRECTIONAL then the binding will be mutual:
if target_property on target changes then the source_property on source
will be updated as well. The transform_from function is only used in case
of bidirectional bindings, otherwise it will be ignored
The binding will automatically be removed when either the source or the
target instances are finalized. This will release the reference that is
being held on the GObject.Binding instance; if you want to hold on to the
GObject.Binding instance, you will need to hold a reference to it.
To remove the binding, call g_binding_unbind().
A GObject.Object can have multiple bindings.
The same user_data parameter will be used for both transform_to
and transform_from transformation functions; the notify function will
be called once, when the binding is removed. If you need different data
for each transformation function, please use
g_object_bind_property_with_closures() instead.
Deprecatedsource_property: stringthe property on source to bind
Deprecatedtarget: GObject.Objectthe target GObject.Object
Deprecatedtarget_property: stringthe property on target to bind
Deprecatedflags: GObject.BindingFlagsflags to pass to GObject.Binding
OptionalDeprecatedtransform_to: BindingTransformFuncthe transformation function from the source to the target, or null to use the default
OptionalDeprecatedtransform_from: BindingTransformFuncthe transformation function from the target to the source, or null to use the default
OptionalDeprecatednotify: DestroyNotifya function to call when disposing the binding, to free resources used by the transformation functions, or null if not required
the GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
Creates a binding between source_property on source and target_property
on target, allowing you to set the transformation functions to be used by
the binding.
This function is the language bindings friendly version of
g_object_bind_property_full(), using GClosures instead of
function pointers.
Deprecated...args: never[]the property on source to bind
the GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
Deprecatedblock_Blocks a handler of an instance so it will not be called during any signal emissions
Deprecatedid: numberHandler ID of the handler to be blocked
Deprecatedcollapse_Recursively collapses all visible, expanded nodes in tree_view.
Deprecatedcollapse_Deprecatedcolumns_Resizes all columns to their optimal width. Only works after the treeview has been realized.
SignalDeprecatedconnectDeprecatedsignal: KDeprecatedcallback: SignalCallback<Gtk.TreeView, Gtk.TreeView.SignalSignatures[K]>Deprecatedsignal: stringDeprecatedcallback: (...args: any[]) => anySignalDeprecatedconnect_Deprecatedsignal: KDeprecatedcallback: SignalCallback<Gtk.TreeView, Gtk.TreeView.SignalSignatures[K]>Deprecatedsignal: stringDeprecatedcallback: (...args: any[]) => anyDeprecatedconvert_Converts bin_window coordinates to coordinates for the tree (the full scrollable area of the tree).
Deprecatedbx: numberX coordinate relative to bin_window
Deprecatedby: numberY coordinate relative to bin_window
Deprecatedconvert_Converts bin_window coordinates to widget relative coordinates.
Deprecatedbx: numberbin_window X coordinate
Deprecatedby: numberbin_window Y coordinate
Deprecatedconvert_Converts tree coordinates (coordinates in full scrollable area of the tree) to bin_window coordinates.
Deprecatedtx: numbertree X coordinate
Deprecatedty: numbertree Y coordinate
Deprecatedconvert_Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
Deprecatedtx: numberX coordinate relative to the tree
Deprecatedty: numberY coordinate relative to the tree
Deprecatedconvert_Converts widget coordinates to coordinates for the bin_window.
Deprecatedwx: numberX coordinate relative to the widget
Deprecatedwy: numberY coordinate relative to the widget
Deprecatedconvert_Converts widget coordinates to coordinates for the tree (the full scrollable area of the tree).
Deprecatedwx: numberX coordinate relative to the widget
Deprecatedwy: numberY coordinate relative to the widget
Deprecatedcreate_Creates a cairo_surface_t representation of the row at path.
This image is used for a drag icon.
Deprecatedpath: Gtk.TreePatha Gtk.TreePath in tree_view
a newly-allocated surface of the drag icon.
DeprecateddisconnectDisconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
Deprecatedid: numberHandler ID of the handler to be disconnected
SignalDeprecatedemitDeprecatedsignal: KDeprecated...args: GjsParameters<Gtk.TreeView.SignalSignatures[K]> extends [any, ...Q[]]Deprecatedsignal: stringDeprecated...args: any[]Deprecatedenable_Turns tree_view into a drop destination for automatic DND. Calling
this method sets Gtk.TreeView:reorderable to false.
Deprecatedformats: ContentFormatsthe target formats that the drag will support
Deprecatedactions: Gdk.DragActionthe bitmask of possible actions for a drag from this widget
Deprecatedenable_Turns tree_view into a drag source for automatic DND. Calling this
method sets Gtk.TreeView:reorderable to false.
Deprecatedstart_button_mask: Gdk.ModifierTypeMask of allowed buttons to start drag
Deprecatedformats: ContentFormatsthe target formats that the drag will support
Deprecatedactions: Gdk.DragActionthe bitmask of possible actions for a drag from this widget
Deprecatedexpand_Recursively expands all nodes in the tree_view.
Deprecatedexpand_Deprecatedexpand_Deprecatedforce_This function is intended for GObject.Object implementations to re-enforce
a floating object reference. Doing this is seldom
required: all GInitiallyUnowneds are created with a floating reference
which usually just needs to be sunken by calling g_object_ref_sink().
Deprecatedfreeze_Increases the freeze count on object. If the freeze count is
non-zero, the emission of "notify" signals on object is
stopped. The signals are queued until the freeze count is decreased
to zero. Duplicate notifications are squashed so that at most one
GObject.Object::notify signal is emitted for each property modified while the
object is frozen.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Deprecatedget_Retrieves the accessible identifier for the accessible object.
This functionality can be overridden by Gtk.Accessible implementations.
It is left to the accessible implementation to define the scope and uniqueness of the identifier.
the accessible identifier
Deprecatedget_Retrieves the accessible parent for an accessible object.
This function returns NULL for top level widgets.
the accessible parent
Deprecatedget_Retrieves the accessible role of an accessible object.
the accessible role
Deprecatedget_Gets the setting set by gtk_tree_view_set_activate_on_single_click().
true if row-activated will be emitted on a single click
Deprecatedget_Deprecatedget_Fills the bounding rectangle in bin_window coordinates for the cell at the
row specified by path and the column specified by column. If path is
null, or points to a node not found in the tree, the y and height fields of
the rectangle will be filled with 0. If column is null, the x and width
fields will be filled with 0. The returned rectangle is equivalent to the
background_area passed to gtk_cell_renderer_render(). These background
areas tile to cover the entire bin window. Contrast with the cell_area,
returned by gtk_tree_view_get_cell_area(), which returns only the cell
itself, excluding surrounding borders and the tree expander area.
Deprecatedpath: Gtk.TreePatha Gtk.TreePath for the row, or null to get only horizontal coordinates
Deprecatedcolumn: Gtk.TreeViewColumna Gtk.TreeViewColumn for the column, or null to get only vertical coordinates
Deprecatedget_Deprecatedget_Queries the coordinates and dimensions of this accessible
This functionality can be overridden by Gtk.Accessible implementations, e.g. to get the bounds from an ignored child widget.
true if the bounds are valid, and false otherwise
Deprecatedget_Gets the ID of the buildable object.
Gtk.Builder sets the name based on the ID attribute
of the <object> tag used to construct the buildable.
the ID of the buildable object
Deprecatedget_Fills the bounding rectangle in bin_window coordinates for the cell at the
row specified by path and the column specified by column. If path is
null, or points to a path not currently displayed, the y and height fields
of the rectangle will be filled with 0. If column is null, the x and width
fields will be filled with 0. The sum of all cell rects does not cover the
entire tree; there are extra pixels in between rows, for example. The
returned rectangle is equivalent to the cell_area passed to
gtk_cell_renderer_render(). This function is only valid if tree_view is
realized.
Deprecatedpath: Gtk.TreePatha Gtk.TreePath for the row, or null to get only horizontal coordinates
Deprecatedcolumn: Gtk.TreeViewColumna Gtk.TreeViewColumn for the column, or null to get only vertical coordinates
Deprecatedget_Gets the Gtk.TreeViewColumn at the given position in the tree_view.
Deprecatedn: numberThe position of the column, counting from 0.
The Gtk.TreeViewColumn, or null if the position is outside the range of columns.
Deprecatedget_Returns a GLib.List of all the Gtk.TreeViewColumns currently in tree_view.
The returned list must be freed with g_list_free ().
A list of Gtk.TreeViewColumns
Deprecatedget_Fills in path and focus_column with the current path and focus column. If
the cursor isn’t currently set, then *path will be null. If no column
currently has focus, then *focus_column will be null.
The returned Gtk.TreePath must be freed with gtk_tree_path_free() when
you are done with it.
Deprecated...args: never[]Deprecatedget_Gets a named field from the objects table of associations (see g_object_set_data()).
Deprecatedkey: stringname of the key for that association
the data if found, or null if no such data exists.
Deprecatedget_Determines the destination row for a given position. drag_x and
drag_y are expected to be in widget coordinates. This function is only
meaningful if tree_view is realized. Therefore this function will always
return false if tree_view is not realized or does not have a model.
Deprecateddrag_x: numberthe position to determine the destination row for
Deprecateddrag_y: numberthe position to determine the destination row for
whether there is a row at the given position, true if this is indeed the case.
Deprecatedget_Gets information about the row that is highlighted for feedback.
Deprecatedget_Returns whether or not the tree allows to start interactive searching by typing in text.
whether or not to let the user search interactively
Deprecatedget_Returns whether or not tree lines are drawn in tree_view.
true if tree lines are drawn in tree_view, false otherwise.
Deprecatedget_Returns the column that is the current expander column,
or null if none has been set.
This column has the expander arrow drawn next to it.
The expander column.
Deprecatedget_Retrieves the first accessible child of an accessible object.
the first accessible child
Deprecatedget_Returns whether fixed height mode is turned on for tree_view.
true if tree_view is in fixed height mode
Deprecatedget_Returns which grid lines are enabled in tree_view.
a Gtk.TreeViewGridLines value indicating which grid lines are enabled.
Deprecatedget_Retrieves the Gtk.Adjustment used for horizontal scrolling.
horizontal Gtk.Adjustment.
Deprecatedget_Returns whether all header columns are clickable.
true if all header columns are clickable, otherwise false
Deprecatedget_Returns true if the headers on the tree_view are visible.
Whether the headers are visible or not.
Deprecatedget_Returns whether hover expansion mode is turned on for tree_view.
true if tree_view is in hover expansion mode
Deprecatedget_Returns whether hover selection mode is turned on for tree_view.
true if tree_view is in hover selection mode
Deprecatedget_Gets the horizontal Gtk.ScrollablePolicy.
The horizontal Gtk.ScrollablePolicy.
Deprecatedget_Returns the amount, in pixels, of extra indentation for child levels
in tree_view.
the amount of extra indentation for child levels in tree_view. A return value of 0 means that this feature is disabled.
Deprecatedget_Returns the model the Gtk.TreeView is based on. Returns null if the
model is unset.
Deprecatedget_Queries the number of columns in the given tree_view.
The number of columns in the tree_view
Deprecatedget_Retrieves the next accessible sibling of an accessible object
the next accessible sibling
Deprecatedget_Finds the path at the point (x, y), relative to bin_window coordinates.
That is, x and y are relative to an events coordinates. Widget-relative
coordinates must be converted using
gtk_tree_view_convert_widget_to_bin_window_coords(). It is primarily for
things like popup menus. If path is non-null, then it will be filled
with the Gtk.TreePath at that point. This path should be freed with
gtk_tree_path_free(). If column is non-null, then it will be filled
with the column at that point. cell_x and cell_y return the coordinates
relative to the cell background (i.e. the background_area passed to
gtk_cell_renderer_render()). This function is only meaningful if
tree_view is realized. Therefore this function will always return false
if tree_view is not realized or does not have a model.
For converting widget coordinates (eg. the ones you get from
GtkWidget::query-tooltip), please see
gtk_tree_view_convert_widget_to_bin_window_coords().
Deprecatedx: numberThe x position to be identified (relative to bin_window).
Deprecatedy: numberThe y position to be identified (relative to bin_window).
true if a row exists at that coordinate.
Deprecatedget_Queries a platform state, such as focus.
This functionality can be overridden by Gtk.Accessible implementations, e.g. to get platform state from an ignored child widget, as is the case for Gtk.Text wrappers.
Deprecatedstate: Gtk.AccessiblePlatformStateplatform state to query
the value of state for the accessible
Deprecatedget_Gets a property of an object.
The value can be:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
Deprecatedproperty_name: stringThe name of the property to get
Deprecatedvalue: anyReturn location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
Deprecatedget_This function gets back user data pointers stored via
g_object_set_qdata().
Deprecatedquark: numberA GLib.Quark, naming the user data pointer
The user data pointer set, or null
Deprecatedget_Retrieves whether the user can reorder the tree via drag-and-drop. See
gtk_tree_view_set_reorderable().
true if the tree can be reordered.
Deprecatedget_Returns whether rubber banding is turned on for tree_view. If the
selection mode is Gtk.SelectionMode.MULTIPLE, rubber banding will allow the
user to select multiple rows by dragging the mouse.
true if rubber banding in tree_view is enabled.
Deprecatedget_Gets the column searched on by the interactive search code.
the column the interactive search code searches in.
Deprecatedget_Deprecatedget_Gets the Gtk.TreeSelection associated with tree_view.
A Gtk.TreeSelection object.
Deprecatedget_Returns whether or not expanders are drawn in tree_view.
true if expanders are drawn in tree_view, false otherwise.
Deprecatedget_Returns the column of tree_view’s model which is being used for
displaying tooltips on tree_view’s rows.
the index of the tooltip column that is currently being used, or -1 if this is disabled.
Deprecatedget_This function is supposed to be used in a ::query-tooltip
signal handler for Gtk.TreeView. The x, y and keyboard_tip values
which are received in the signal handler, should be passed to this
function without modification.
The return value indicates whether there is a tree view row at the given
coordinates (true) or not (false) for mouse tooltips. For keyboard
tooltips the row returned will be the cursor row. When true, then any of
model, path and iter which have been provided will be set to point to
that row and the corresponding model. x and y will always be converted
to be relative to tree_view’s bin_window if keyboard_tooltip is false.
Deprecatedx: numberthe x coordinate (relative to widget coordinates)
Deprecatedy: numberthe y coordinate (relative to widget coordinates)
Deprecatedkeyboard_tip: booleanwhether this is a keyboard tooltip or not
whether or not the given tooltip context points to a row
Deprecatedget_Retrieves the Gtk.Adjustment used for vertical scrolling.
vertical Gtk.Adjustment.
Deprecatedget_Deprecatedget_Fills visible_rect with the currently-visible region of the
buffer, in tree coordinates. Convert to bin_window coordinates with
gtk_tree_view_convert_tree_to_bin_window_coords().
Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
scrollable area of the tree.
Deprecatedget_Gets the vertical Gtk.ScrollablePolicy.
The vertical Gtk.ScrollablePolicy.
DeprecatedgetvGets n_properties properties for an object.
Obtained properties will be set to values. All properties must be valid.
Warnings will be emitted and undefined behaviour may result if invalid
properties are passed in.
Deprecatednames: string[]the names of each property to get
Deprecatedvalues: any[]the values of each property to get
Deprecatedinsert_This inserts the column into the tree_view at position. If position is
-1, then the column is inserted at the end. If tree_view has
“fixed_height” mode enabled, then column must have its “sizing” property
set to be GTK_TREE_VIEW_COLUMN_FIXED.
Deprecatedcolumn: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to be inserted.
Deprecatedposition: numberThe position to insert column in.
The number of columns in tree_view after insertion.
Deprecatedinsert_Convenience function that inserts a new column into the Gtk.TreeView
with the given cell renderer and a Gtk.TreeCellDataFunc to set cell renderer
attributes (normally using data from the model). See also
gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
If tree_view has “fixed_height” mode enabled, then the new column will have its
“sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
Deprecatedposition: numberPosition to insert, -1 for append
Deprecatedtitle: stringcolumn title
Deprecatedcell: Gtk.CellRenderercell renderer for column
Deprecatedfunc: Gtk.TreeCellDataFuncfunction to set attributes of cell renderer
number of columns in the tree view post-insert
Deprecatedis_Determine whether the point (x, y) in tree_view is blank, that is no
cell content nor an expander arrow is drawn at the location. If so, the
location can be considered as the background. You might wish to take
special action on clicks on the background, such as clearing a current
selection, having a custom context menu or starting rubber banding.
The x and y coordinate that are provided must be relative to bin_window
coordinates. Widget-relative coordinates must be converted using
gtk_tree_view_convert_widget_to_bin_window_coords().
For converting widget coordinates (eg. the ones you get from
GtkWidget::query-tooltip), please see
gtk_tree_view_convert_widget_to_bin_window_coords().
The path, column, cell_x and cell_y arguments will be filled in
likewise as for gtk_tree_view_get_path_at_pos(). Please see
gtk_tree_view_get_path_at_pos() for more information.
Deprecatedx: numberThe x position to be identified (relative to bin_window)
Deprecatedy: numberThe y position to be identified (relative to bin_window)
true if the area at the given coordinates is blank, false otherwise.
Deprecatedis_Checks whether object has a floating reference.
true if object has a floating reference
Deprecatedis_Returns whether a rubber banding operation is currently being done
in tree_view.
true if a rubber banding operation is currently being done in tree_view.
Deprecatedmap_Calls func on all expanded rows.
Deprecatedfunc: Gtk.TreeViewMappingFuncA function to be called
Deprecatedmove_Moves column to be after to base_column. If base_column is null, then
column is placed in the first position.
Deprecatedcolumn: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to be moved.
OptionalDeprecatedbase_column: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to be moved relative to
DeprecatednotifyEmits a "notify" signal for the property property_name on object.
When possible, eg. when signaling a property change from within the class
that registered the property, you should use g_object_notify_by_pspec()
instead.
Note that emission of the notify signal may be blocked with
g_object_freeze_notify(). In this case, the signal emissions are queued
and will be emitted (in reverse order) when g_object_thaw_notify() is
called.
Deprecatedproperty_name: stringthe name of a property installed on the class of object.
Deprecatednotify_Emits a "notify" signal for the property specified by pspec on object.
This function omits the property name lookup, hence it is faster than
g_object_notify().
One way to avoid using g_object_notify() from within the
class that registered the properties, and using g_object_notify_by_pspec()
instead, is to store the GParamSpec used with
g_object_class_install_property() inside a static array, e.g.:
typedef enum
{
PROP_FOO = 1,
PROP_LAST
} MyObjectProperty;
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
0, 100,
50,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class,
PROP_FOO,
properties[PROP_FOO]);
}
and then notify a change on the "foo" property with:
g_object_notify_by_pspec (self, properties[PROP_FOO]);
Deprecatedpspec: GObject.ParamSpecthe GObject.ParamSpec of a property installed on the class of object.
DeprecatedrefIncreases the reference count of object.
Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type
of object will be propagated to the return type (using the GCC typeof()
extension), so any casting the caller needs to do on the return type must be
explicit.
the same object
Deprecatedref_Increase the reference count of object, and possibly remove the
floating reference, if object has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
Since GLib 2.56, the type of object will be propagated to the return type
under the same conditions as for g_object_ref().
object
Deprecatedremove_Removes column from tree_view.
Deprecatedcolumn: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to remove.
The number of columns in tree_view after removing.
Deprecatedreset_Resets the accessible property to its default value.
Deprecatedproperty: Gtk.AccessiblePropertythe accessible property
Deprecatedreset_Resets the accessible relation to its default value.
Deprecatedrelation: Gtk.AccessibleRelationthe accessible relation
Deprecatedreset_Resets the accessible state to its default value.
Deprecatedstate: Gtk.AccessibleStatethe accessible state
Deprecatedrow_Activates the cell determined by path and column.
Deprecatedpath: Gtk.TreePathThe Gtk.TreePath to be activated.
OptionalDeprecatedcolumn: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to be activated.
Deprecatedrow_Returns true if the node pointed to by path is expanded in tree_view.
Deprecatedpath: Gtk.TreePathA Gtk.TreePath to test expansion state.
true if #path is expanded.
Deprecatedrun_Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Deprecatedscroll_Moves the alignments of tree_view to the position specified by column and
path. If column is null, then no horizontal scrolling occurs. Likewise,
if path is null no vertical scrolling occurs. At a minimum, one of column
or path need to be non-null. row_align determines where the row is
placed, and col_align determines where column is placed. Both are expected
to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
right/bottom alignment, 0.5 means center.
If use_align is false, then the alignment arguments are ignored, and the
tree does the minimum amount of work to scroll the cell onto the screen.
This means that the cell will be scrolled to the edge closest to its current
position. If the cell is currently visible on the screen, nothing is done.
This function only works if the model is set, and path is a valid row on the
model. If the model changes before the tree_view is realized, the centered
path will be modified to reflect this change.
Deprecatedpath: Gtk.TreePathThe path of the row to move to
Deprecatedcolumn: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to move horizontally to
Deprecateduse_align: booleanwhether to use alignment arguments, or false.
Deprecatedrow_align: numberThe vertical alignment of the row specified by path.
Deprecatedcol_align: numberThe horizontal alignment of the column specified by column.
Deprecatedscroll_Scrolls the tree view such that the top-left corner of the visible
area is tree_x, tree_y, where tree_x and tree_y are specified
in tree coordinates. The tree_view must be realized before
this function is called. If it isn't, you probably want to be
using gtk_tree_view_scroll_to_cell().
If either tree_x or tree_y are -1, then that direction isn’t scrolled.
Deprecatedtree_x: numberX coordinate of new top-left pixel of visible area, or -1
Deprecatedtree_y: numberY coordinate of new top-left pixel of visible area, or -1
DeprecatedsetSets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
Deprecatedproperties: { [key: string]: any }Object containing the properties to set
Deprecatedset_Sets the parent and sibling of an accessible object.
This function is meant to be used by accessible implementations that are not part of the widget hierarchy, and but act as a logical bridge between widgets. For instance, if a widget creates an object that holds metadata for each child, and you want that object to implement the Gtk.Accessible interface, you will use this function to ensure that the parent of each child widget is the metadata object, and the parent of each metadata object is the container widget.
OptionalDeprecatedparent: Gtk.Accessiblethe parent accessible object
OptionalDeprecatednext_sibling: Gtk.Accessiblethe sibling accessible object
Deprecatedset_Cause the Gtk.TreeView::row-activated signal to be emitted on a single click instead of a double click.
Deprecatedsingle: booleantrue to emit row-activated on a single click
Deprecatedset_Sets a user function for determining where a column may be dropped when
dragged. This function is called on every column pair in turn at the
beginning of a column drag to determine where a drop can take place. The
arguments passed to func are: the tree_view, the Gtk.TreeViewColumn being
dragged, the two Gtk.TreeViewColumns determining the drop spot, and
user_data. If either of the Gtk.TreeViewColumn arguments for the drop spot
are null, then they indicate an edge. If func is set to be null, then
tree_view reverts to the default behavior of allowing all columns to be
dropped everywhere.
OptionalDeprecatedfunc: Gtk.TreeViewColumnDropFuncA function to determine which columns are reorderable
OptionalDeprecateddestroy: DestroyNotifyDestroy notifier for user_data
Deprecatedset_Sets the current keyboard focus to be at path, and selects it. This is
useful when you want to focus the user’s attention on a particular row. If
focus_column is not null, then focus is given to the column specified by
it. Additionally, if focus_column is specified, and start_editing is
true, then editing should be started in the specified cell.
This function is often followed by gtk_widget_grab_focus (tree_view)
in order to give keyboard focus to the widget. Please note that editing
can only happen when the widget is realized.
If path is invalid for model, the current cursor (if any) will be unset
and the function will return without failing.
Deprecatedpath: Gtk.TreePathDeprecatedfocus_column: Gtk.TreeViewColumnDeprecatedstart_editing: booleantrue if the specified cell should start being edited.
Deprecated...args: never[]Deprecatedset_Sets the current keyboard focus to be at path, and selects it. This is
useful when you want to focus the user’s attention on a particular row. If
focus_column is not null, then focus is given to the column specified by
it. If focus_column and focus_cell are not null, and focus_column
contains 2 or more editable or activatable cells, then focus is given to
the cell specified by focus_cell. Additionally, if focus_column is
specified, and start_editing is true, then editing should be started in
the specified cell. This function is often followed by
gtk_widget_grab_focus (tree_view) in order to give keyboard focus to the
widget. Please note that editing can only happen when the widget is
realized.
If path is invalid for model, the current cursor (if any) will be unset
and the function will return without failing.
Deprecatedpath: Gtk.TreePathDeprecatedfocus_column: Gtk.TreeViewColumnDeprecatedfocus_cell: Gtk.CellRendererDeprecatedstart_editing: booleantrue if the specified cell should start being edited.
Deprecatedset_Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key is converted to a GLib.Quark using g_quark_from_string().
This means a copy of key is kept permanently (even after object has been
finalized) — so it is recommended to only use a small, bounded set of values
for key in your program, to avoid the GLib.Quark storage growing unbounded.
Deprecatedkey: stringname of the key
OptionalDeprecateddata: anydata to associate with that key
Deprecatedset_Sets the row that is highlighted for feedback.
If path is null, an existing highlight is removed.
Deprecatedpath: Gtk.TreePathThe path of the row to highlight
Deprecatedpos: Gtk.TreeViewDropPositionSpecifies whether to drop before, after or into the row
Deprecatedset_If enable_search is set, then the user can type in text to search through
the tree interactively (this is sometimes called "typeahead find").
Note that even if this is false, the user can still initiate a search
using the “start-interactive-search” key binding.
Deprecatedenable_search: booleantrue, if the user can search interactively
Deprecatedset_Sets whether to draw lines interconnecting the expanders in tree_view.
This does not have any visible effects for lists.
Deprecatedenabled: booleantrue to enable tree line drawing, false otherwise.
Deprecatedset_Sets the column to draw the expander arrow at. It must be in tree_view.
If column is null, then the expander arrow is always at the first
visible column.
If you do not want expander arrow to appear in your tree, set the expander column to a hidden column.
OptionalDeprecatedcolumn: Gtk.TreeViewColumnnull, or the column to draw the expander arrow at.
Deprecatedset_Enables or disables the fixed height mode of tree_view.
Fixed height mode speeds up Gtk.TreeView by assuming that all
rows have the same height.
Only enable this option if all rows are the same height and all
columns are of type Gtk.TreeViewColumnSizing.FIXED.
Deprecatedenable: booleantrue to enable fixed height mode
Deprecatedset_Sets which grid lines to draw in tree_view.
Deprecatedgrid_lines: Gtk.TreeViewGridLinesa Gtk.TreeViewGridLines value indicating which grid lines to enable.
Deprecatedset_Sets the horizontal adjustment of the Gtk.Scrollable.
OptionalDeprecatedhadjustment: Gtk.AdjustmentDeprecatedset_Allow the column title buttons to be clicked.
Deprecatedsetting: booleantrue if the columns are clickable.
Deprecatedset_Sets the visibility state of the headers.
Deprecatedheaders_visible: booleantrue if the headers are visible
Deprecatedset_Enables or disables the hover expansion mode of tree_view.
Hover expansion makes rows expand or collapse if the pointer
moves over them.
Deprecatedexpand: booleantrue to enable hover selection mode
Deprecatedset_Enables or disables the hover selection mode of tree_view.
Hover selection makes the selected row follow the pointer.
Currently, this works only for the selection modes
Gtk.SelectionMode.SINGLE and Gtk.SelectionMode.BROWSE.
Deprecatedhover: booleantrue to enable hover selection mode
Deprecatedset_Sets the Gtk.ScrollablePolicy.
The policy determines whether horizontal scrolling should start below the minimum width or below the natural width.
Deprecatedpolicy: Gtk.ScrollablePolicythe horizontal Gtk.ScrollablePolicy
Deprecatedset_Sets the amount of extra indentation for child levels to use in tree_view
in addition to the default indentation. The value should be specified in
pixels, a value of 0 disables this feature and in this case only the default
indentation will be used.
This does not have any visible effects for lists.
Deprecatedindentation: numberthe amount, in pixels, of extra indentation in tree_view.
Deprecatedset_Sets the model for a Gtk.TreeView. If the tree_view already has a model
set, it will remove it before setting the new model. If model is null,
then it will unset the old model.
Deprecatedset_Sets a property on an object.
Deprecatedproperty_name: stringThe name of the property to set
Deprecatedvalue: anyThe value to set the property to
Deprecatedset_This function is a convenience function to allow you to reorder
models that support the Gtk.TreeDragSourceIface and the
Gtk.TreeDragDestIface. Both Gtk.TreeStore and Gtk.ListStore support
these. If reorderable is true, then the user can reorder the
model by dragging and dropping rows. The developer can listen to
these changes by connecting to the model’s Gtk.TreeModel::row-inserted
and Gtk.TreeModel::row-deleted signals. The reordering is implemented
by setting up the tree view as a drag source and destination.
Therefore, drag and drop can not be used in a reorderable view for any
other purpose.
This function does not give you any degree of control over the order -- any reordering is allowed. If more control is needed, you should probably handle drag and drop manually.
Deprecatedreorderable: booleantrue, if the tree can be reordered.
Deprecatedset_Sets the row separator function, which is used to determine
whether a row should be drawn as a separator. If the row separator
function is null, no separators are drawn. This is the default value.
OptionalDeprecatedfunc: Gtk.TreeViewRowSeparatorFunca Gtk.TreeViewRowSeparatorFunc
OptionalDeprecateddestroy: DestroyNotifydestroy notifier for data
Deprecatedset_Enables or disables rubber banding in tree_view. If the selection mode
is Gtk.SelectionMode.MULTIPLE, rubber banding will allow the user to select
multiple rows by dragging the mouse.
Deprecatedenable: booleantrue to enable rubber banding
Deprecatedset_Sets column as the column where the interactive search code should
search in for the current model.
If the search column is set, users can use the “start-interactive-search” key binding to bring up search popup. The enable-search property controls whether simply typing text will also start an interactive search.
Note that column refers to a column of the current model. The search
column is reset to -1 when the model is changed.
Deprecatedcolumn: numberthe column of the model to search in, or -1 to disable searching
Deprecatedset_Sets the entry which the interactive search code will use for this
tree_view. This is useful when you want to provide a search entry
in our interface at all time at a fixed position. Passing null for
entry will make the interactive search code use the built-in popup
entry again.
Deprecatedset_Sets the compare function for the interactive search capabilities; note
that somewhat like strcmp() returning 0 for equality
Gtk.TreeViewSearchEqualFunc returns false on matches.
Deprecatedsearch_equal_func: Gtk.TreeViewSearchEqualFuncthe compare function to use during the search
OptionalDeprecatedsearch_destroy: DestroyNotifyDestroy notifier for search_user_data
Deprecatedset_Sets whether to draw and enable expanders and indent child rows in
tree_view. When disabled there will be no expanders visible in trees
and there will be no way to expand and collapse rows by default. Also
note that hiding the expanders will disable the default indentation. You
can set a custom indentation in this case using
gtk_tree_view_set_level_indentation().
This does not have any visible effects for lists.
Deprecatedenabled: booleantrue to enable expander drawing, false otherwise.
Deprecatedset_Sets the tip area of tooltip to the area path, column and cell have
in common. For example if path is null and column is set, the tip
area will be set to the full area covered by column. See also
gtk_tooltip_set_tip_area().
Note that if path is not specified and cell is set and part of a column
containing the expander, the tooltip might not show and hide at the correct
position. In such cases path must be set to the current node under the
mouse cursor for this function to operate correctly.
See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
Deprecatedtooltip: Gtk.TooltipOptionalDeprecatedpath: Gtk.TreePathOptionalDeprecatedcolumn: Gtk.TreeViewColumnOptionalDeprecatedcell: Gtk.CellRendererDeprecatedset_If you only plan to have simple (text-only) tooltips on full rows, you
can use this function to have Gtk.TreeView handle these automatically
for you. column should be set to the column in tree_view’s model
containing the tooltip texts, or -1 to disable this feature.
When enabled, Gtk.Widget.has_tooltip will be set to true and
tree_view will connect a Gtk.Widget::query-tooltip signal handler.
Note that the signal handler sets the text with gtk_tooltip_set_markup(),
so &, <, etc have to be escaped in the text.
Deprecatedcolumn: numberan integer, which is a valid column number for tree_view’s model
Deprecatedset_Deprecatedset_Sets the vertical adjustment of the Gtk.Scrollable.
OptionalDeprecatedvadjustment: Gtk.AdjustmentDeprecatedset_Sets the Gtk.ScrollablePolicy.
The policy determines whether vertical scrolling should start below the minimum height or below the natural height.
Deprecatedpolicy: Gtk.ScrollablePolicythe vertical Gtk.ScrollablePolicy
Deprecatedsteal_Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
Deprecatedkey: stringname of the key
the data if found, or null if no such data exists.
Deprecatedsteal_This function gets back user data pointers stored via
g_object_set_qdata() and removes the data from object
without invoking its destroy() function (if any was
set).
Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example:
void
object_add_to_user_list (GObject *object,
const gchar *new_string)
{
// the quark, naming the object data
GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
// retrieve the old string list
GList *list = g_object_steal_qdata (object, quark_string_list);
// prepend new string
list = g_list_prepend (list, g_strdup (new_string));
// this changed 'list', so we need to set it again
g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
GList *node, *list = data;
for (node = list; node; node = node->next)
g_free (node->data);
g_list_free (list);
}
Using g_object_get_qdata() in the above example, instead of
g_object_steal_qdata() would have left the destroy function set,
and thus the partial string list would have been freed upon
g_object_set_qdata_full().
Deprecatedquark: numberA GLib.Quark, naming the user data pointer
The user data pointer set, or null
Deprecatedstop_Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
DeprecateddetailedName: stringName of the signal to stop emission of
Deprecatedthaw_Reverts the effect of a previous call to
g_object_freeze_notify(). The freeze count is decreased on object
and when it reaches zero, queued "notify" signals are emitted.
Duplicate notifications for each property are squashed so that at most one GObject.Object::notify signal is emitted for each property, in the reverse order in which they have been queued.
It is an error to call this function when the freeze count is zero.
Deprecatedunblock_Unblocks a handler so it will be called again during any signal emissions
Deprecatedid: numberHandler ID of the handler to be unblocked
DeprecatedunrefDecreases the reference count of object. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
If the pointer to the GObject.Object may be reused in future (for example, if it is
an instance variable of another object), it is recommended to clear the
pointer to null rather than retain a dangling pointer to a potentially
invalid GObject.Object instance. Use g_clear_object() for this.
Deprecatedunset_Undoes the effect of
gtk_tree_view_enable_model_drag_dest(). Calling this method sets
Gtk.TreeView:reorderable to false.
Deprecatedunset_Undoes the effect of
gtk_tree_view_enable_model_drag_source(). Calling this method sets
Gtk.TreeView:reorderable to false.
Deprecatedupdate_Updates the next accessible sibling.
That might be useful when a new child of a custom accessible is created, and it needs to be linked to a previous child.
OptionalDeprecatednew_sibling: Gtk.Accessiblethe new next accessible sibling to set
Deprecatedupdate_Informs ATs that the platform state has changed.
This function should be used by Gtk.Accessible implementations that have a platform state but are not widgets. Widgets handle platform states automatically.
Deprecatedstate: Gtk.AccessiblePlatformStatethe platform state to update
Deprecatedupdate_Updates an array of accessible properties.
This function should be called by Gtk.Widget types whenever an accessible property change must be communicated to assistive technologies.
This function is meant to be used by language bindings.
Deprecatedproperties: Gtk.AccessibleProperty[]an array of accessible properties
Deprecatedvalues: any[]an array of GValues, one for each property
Deprecatedupdate_Updates an array of accessible relations.
This function should be called by Gtk.Widget types whenever an accessible relation change must be communicated to assistive technologies.
This function is meant to be used by language bindings.
Deprecatedrelations: Gtk.AccessibleRelation[]an array of accessible relations
Deprecatedvalues: any[]an array of GValues, one for each relation
Deprecatedupdate_Updates an array of accessible states.
This function should be called by Gtk.Widget types whenever an accessible state change must be communicated to assistive technologies.
This function is meant to be used by language bindings.
Deprecatedstates: Gtk.AccessibleState[]an array of accessible states
Deprecatedvalues: any[]an array of GValues, one for each state
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_the constructed function is called by g_object_new() as the
final step of the object creation process. At the point of the call, all
construction properties have been set on the object. The purpose of this
call is to allow for object initialisation steps that can only be performed
after construction properties have been set. constructed implementors
should chain up to the constructed call of their parent class to allow it
to complete its initialisation.
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Called at the end of each custom element handled by the buildable.
Deprecatedbuilder: Gtk.BuilderGtk.Builder used to construct this object
Deprecatedchild: GObject.Objectchild object or null for non-child tags
Deprecatedtagname: stringname of tag
OptionalDeprecateddata: anyuser data that will be passed in to parser functions
VirtualDeprecatedvfunc_Called for each unknown element under <child>.
Deprecatedbuilder: Gtk.Buildera Gtk.Builder used to construct this object
Deprecatedchild: GObject.Objectchild object or null for non-child tags
Deprecatedtagname: stringname of tag
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_the dispose function is supposed to drop all references to other
objects, but keep the instance otherwise intact, so that client method
invocations still work. It may be run multiple times (due to reference
loops). Before returning, dispose should chain up to the dispose method
of the parent class.
VirtualDeprecatedvfunc_Deprecatedlogical: booleanDeprecatedexpand: booleanDeprecatedopen_all: booleanVirtualDeprecatedvfunc_instance finalization function, should finish the finalization of
the instance begun in dispose and chain up to the finalize method of the
parent class.
VirtualDeprecatedvfunc_Retrieves the accessible identifier for the accessible object.
This functionality can be overridden by Gtk.Accessible implementations.
It is left to the accessible implementation to define the scope and uniqueness of the identifier.
VirtualDeprecatedvfunc_Retrieves the accessible parent for an accessible object.
This function returns NULL for top level widgets.
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Queries the coordinates and dimensions of this accessible
This functionality can be overridden by Gtk.Accessible implementations, e.g. to get the bounds from an ignored child widget.
VirtualDeprecatedvfunc_Retrieves the first accessible child of an accessible object.
VirtualDeprecatedvfunc_The getter corresponding to set_id. Implement this
if you implement set_id.
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Retrieves the next accessible sibling of an accessible object
VirtualDeprecatedvfunc_Queries a platform state, such as focus.
This functionality can be overridden by Gtk.Accessible implementations, e.g. to get platform state from an ignored child widget, as is the case for Gtk.Text wrappers.
Deprecatedstate: Gtk.AccessiblePlatformStateplatform state to query
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Deprecatedstep: Gtk.MovementStepDeprecatedcount: numberDeprecatedextend: booleanDeprecatedmodify: booleanVirtualDeprecatedvfunc_Emits a "notify" signal for the property property_name on object.
When possible, eg. when signaling a property change from within the class
that registered the property, you should use g_object_notify_by_pspec()
instead.
Note that emission of the notify signal may be blocked with
g_object_freeze_notify(). In this case, the signal emissions are queued
and will be emitted (in reverse order) when g_object_thaw_notify() is
called.
VirtualDeprecatedvfunc_Called when a builder finishes the parsing of a UI definition. It is normally not necessary to implement this, unless you need to perform special cleanup actions. Gtk.Window sets the Gtk.Widget.visible property here.
VirtualDeprecatedvfunc_Activates the cell determined by path and column.
Deprecatedpath: Gtk.TreePathThe Gtk.TreePath to be activated.
OptionalDeprecatedcolumn: Gtk.TreeViewColumnThe Gtk.TreeViewColumn to be activated.
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Deprecatedstart_editing: booleanVirtualDeprecatedvfunc_Sets a property of a buildable object.
It is normally not necessary to implement this, g_object_set_property()
is used by default. Gtk.Window implements this to delay showing itself
(i.e. setting the Gtk.Widget.visible property) until the whole
interface is created.
VirtualDeprecatedvfunc_Stores the id attribute given in the Gtk.Builder UI definition. Gtk.Widget stores the name as object data. Implement this method if your object has some notion of “ID” and it makes sense to map the XML id attribute to it.
Deprecatedid: stringVirtualDeprecatedvfunc_the generic setter for all properties of this type. Should be
overridden for every type with properties. If implementations of
set_property don't emit property change notification explicitly, this will
be done implicitly by the type system. However, if the notify signal is
emitted explicitly, the type system will not emit it a second time.
VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Deprecatedwatch_This function essentially limits the life time of the closure to
the life time of the object. That is, when the object is finalized,
the closure is invalidated by calling g_closure_invalidate() on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, g_object_ref() and g_object_unref() are
added as marshal guards to the closure, to ensure that an extra
reference count is held on object during invocation of the
closure. Usually, this function will be called on closures that
use this object as closure data.
Deprecatedclosure: ClosureGObject.Closure to watch
StaticDeprecatednewStaticDeprecatednew_Deprecatedaction_Enables or disables an action installed with Gtk.WidgetClass.install_action.
Deprecatedaction_name: stringaction name, such as "clipboard.paste"
Deprecatedenabled: booleanwhether the action is now enabled
DeprecatedactivateActivates the widget.
The activation will emit the signal set using Gtk.WidgetClass.set_activate_signal during class initialization.
Activation is what happens when you press Enter on a widget.
If you wish to handle the activation keybinding yourself, it is recommended to use Gtk.WidgetClass.add_shortcut with an action created with Gtk.SignalAction.new.
If widget is not activatable, the function returns false.
true if the widget was activated
Deprecatedactivate_Activates an action for the widget.
The action is looked up in the action groups associated with
widget and its ancestors.
If the action is in an action group added with
Gtk.Widget.insert_action_group, the name is expected
to be prefixed with the prefix that was used when the group was
inserted.
The arguments must match the actions expected parameter type, as returned by Gio.Action.get_parameter_type.
true if the action was activated
Deprecatedactivate_Activates the default.activate action for the widget.
The action is looked up in the same was as for Gtk.Widget.activate_action.
Deprecatedadd_Adds an event controller to the widget.
The event controllers of a widget handle the events that are propagated to the widget.
You will usually want to call this function right after creating any kind of Gtk.EventController.
Deprecatedcontroller: Gtk.EventControlleran event controller that hasn't been added to a widget yet
Deprecatedadd_Adds a style class to the widget.
After calling this function, the widget’s style will match
for css_class, according to CSS matching rules.
Use Gtk.Widget.remove_css_class to remove the style again.
Deprecatedcss_class: stringstyle class to add to widget, without the leading period
Deprecatedadd_Adds a widget to the list of mnemonic labels for this widget.
See Gtk.Widget.list_mnemonic_labels.
Note that the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well.
Deprecatedadd_Queues an animation frame update and adds a callback to be called before each frame.
Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames.
The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren’t changing widget properties that would trigger that (for example, changing the text of a label), then you will have to call Gtk.Widget.queue_resize or Gtk.Widget.queue_draw yourself.
Gdk.FrameClock.get_frame_time should generally be used for timing continuous animations and Gdk.FrameTimings.get_predicted_presentation_time should be used if you are trying to display isolated frames at particular times.
This is a more convenient alternative to connecting directly to the
Gdk.FrameClock::update signal of the frame clock, since you
don't have to worry about when a frame clock is assigned to a widget.
To remove a tick callback, pass the ID that is returned by this function to Gtk.Widget.remove_tick_callback.
Deprecatedcallback: Gtk.TickCallbackfunction to call for updating animations
an ID for this callback
DeprecatedallocateAssigns size, position, (optionally) a baseline and transform to a child widget.
In this function, the allocation and baseline may be adjusted. The given allocation will be forced to be bigger than the widget's minimum size, as well as at least 0×0 in size.
This function is only used by widget implementations.
For a version that does not take a transform, see Gtk.Widget.size_allocate.
Deprecatedwidth: numbernew width
Deprecatedheight: numbernew height
Deprecatedbaseline: numbernew baseline, or -1
OptionalDeprecatedtransform: Transformtransformation to be applied
Deprecatedchild_Called by widgets as the user moves around the window using keyboard shortcuts.
The direction argument indicates what kind of motion is taking
place (up, down, left, right, tab forward, tab backward).
This function calls the Gtk.Widget.focus virtual function; widgets can override the virtual function in order to implement appropriate focus behavior.
The default focus() virtual function for a widget should return
true if moving in direction left the focus on a focusable location
inside that widget, and false if moving in direction moved the focus
outside the widget. When returning true, widgets normally call
Gtk.Widget.grab_focus to place the focus accordingly;
when returning false, they don’t modify the current focus location.
This function is used by custom widget implementations; if you're writing an app, you’d use Gtk.Widget.grab_focus to move the focus to a particular widget.
Deprecateddirection: Gtk.DirectionTypedirection of focus movement
true if focus ended up inside widget
Deprecatedcompute_Computes the bounds for widget in the coordinate space of target.
The bounds of widget are (the bounding box of) the region that it is expected to draw in. See the coordinate system overview to learn more.
If the operation is successful, true is returned. If widget has no
bounds or the bounds cannot be expressed in target's coordinate space
(for example if both widgets are in different windows), false is
returned and bounds is set to the zero rectangle.
It is valid for widget and target to be the same widget.
true if the bounds could be computed
Deprecatedcompute_Computes whether a parent widget should give this widget extra space when possible.
Widgets with children should check this, rather than looking at Gtk.Widget.get_hexpand or Gtk.Widget.get_vexpand.
This function already checks whether the widget is visible, so visibility does not need to be checked separately. Non-visible widgets are not expanded.
The computed expand value uses either the expand setting explicitly set on the widget itself, or, if none has been explicitly set, the widget may expand if some of its children do.
Deprecatedorientation: Gtk.Orientationexpand direction
whether widget tree rooted here should be expanded
Deprecatedcompute_Translates the given point in widget's coordinates to coordinates
in target’s coordinate system.
In order to perform this operation, both widgets must share a
a common ancestor. If that is not the case, out_point is set
to (0, 0) and false is returned.
true if src_widget and dest_widget have a common ancestor, false otherwise
Deprecatedcompute_Computes a matrix suitable to describe a transformation from
widget's coordinate system into target's coordinate system.
The transform can not be computed in certain cases, for example
when widget and target do not share a common ancestor. In that
case out_transform gets set to the identity matrix.
To learn more about widget coordinate systems, see the coordinate system overview.
true if the transform could be computed
DeprecatedcontainsTests if a given point is contained in the widget.
The coordinates for (x, y) must be in widget coordinates, so
(0, 0) is assumed to be the top left of widget's content area.
Deprecatedx: numberX coordinate to test, relative to widget's origin
Deprecatedy: numberY coordinate to test, relative to widget's origin
true if widget contains the point (x, y)
Deprecatedcreate_Creates a new Pango.Context that is configured for the widget.
The Pango.Context will have the appropriate font map, font options, font description, and base direction set.
See also Gtk.Widget.get_pango_context.
the new Pango.Context
Deprecatedcreate_Creates a new Pango.Layout that is configured for the widget.
The Pango.Layout will have the appropriate font map, font description, and base direction set.
If you keep a Pango.Layout created in this way around, you need to re-create it when the widgets Pango.Context is replaced. This can be tracked by listening to changes of the Gtk.Widget.root property on the widget.
OptionalDeprecatedtext: stringtext to set on the layout
the new Pango.Layout
Deprecateddispose_Clears the template children for the widget.
This function is the opposite of Gtk.Widget.init_template,
and it is used to clear all the template children from a widget
instance. If you bound a template child to a field in the instance
structure, or in the instance private data structure, the field will
be set to NULL after this function returns.
You should call this function inside the GObject.Object.dispose implementation of any widget that called Gtk.Widget.init_template. Typically, you will want to call this function last, right before chaining up to the parent type's dispose implementation, e.g.
static void
some_widget_dispose (GObject *gobject)
{
SomeWidget *self = SOME_WIDGET (gobject);
// Clear the template data for SomeWidget
gtk_widget_dispose_template (GTK_WIDGET (self), SOME_TYPE_WIDGET);
G_OBJECT_CLASS (some_widget_parent_class)->dispose (gobject);
}
Deprecatedwidget_type: GTypethe type of the widget to finalize the template for
Deprecateddrag_Checks to see if a drag movement has passed the GTK drag threshold.
Deprecatedstart_x: numberX coordinate of start of drag
Deprecatedstart_y: numberY coordinate of start of drag
Deprecatedcurrent_x: numbercurrent X coordinate
Deprecatedcurrent_y: numbercurrent Y coordinate
true if the drag threshold has been passed
Deprecatederror_Notifies the user about an input-related error on the widget.
If the Gtk.Settings.gtk_error_bell setting is true, it calls Gdk.Surface.beep, otherwise it does nothing.
Note that the effect of Gdk.Surface.beep can be configured in many ways, depending on the windowing backend and the desktop environment or window manager that is used.
Deprecatedget_Returns the baseline that has currently been allocated to the widget.
This function is intended to be used when implementing handlers for the Gtk.Widget.snapshot function, and when allocating child widgets in Gtk.Widget.size_allocate.
the baseline of the widget, or -1 if none
Deprecatedget_Returns the height that has currently been allocated to the widget.
To learn more about widget sizes, see the coordinate system overview.
the height of the widget
Deprecatedget_Returns the width that has currently been allocated to the widget.
To learn more about widget sizes, see the coordinate system overview.
the width of the widget
Deprecatedget_Retrieves the widget’s allocation.
Note, when implementing a layout widget: a widget’s allocation will be its “adjusted” allocation, that is, the widget’s parent typically calls Gtk.Widget.size_allocate with an allocation, and that allocation is then adjusted (to handle margin and alignment for example) before assignment to the widget. Gtk.Widget.get_allocation returns the adjusted allocation that was actually assigned to the widget. The adjusted allocation is guaranteed to be completely contained within the Gtk.Widget.size_allocate allocation, however.
So a layout widget is guaranteed that its children stay inside the assigned bounds, but not that they have exactly the bounds the widget assigned.
Deprecatedget_Gets the first ancestor of the widget with type widget_type.
For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)
gets the first Gtk.Box that’s an ancestor of widget. No
reference will be added to the returned widget; it should
not be unreferenced.
Note that unlike Gtk.Widget.is_ancestor, this function
considers widget to be an ancestor of itself.
Deprecatedwidget_type: GTypeancestor type
the ancestor widget
Deprecatedget_Returns the baseline that has currently been allocated to the widget.
This function is intended to be used when implementing handlers for the Gtk.Widget.snapshot function, and when allocating child widgets in Gtk.Widget.size_allocate.
the baseline of the widget, or -1 if none
Deprecatedget_Determines whether the input focus can enter the widget or any of its children.
true if the input focus can enter widget
Deprecatedget_Queries whether the widget can be the target of pointer events.
true if widget can receive pointer events
Deprecatedget_Gets the value set with Gtk.Widget.set_child_visible.
If you feel a need to use this function, your code probably needs reorganization.
This function is only useful for widget implementations and should never be called by an application.
true if the widget is mapped with the parent
Deprecatedget_Deprecatedget_Deprecatedget_Returns the list of style classes applied to the widget.
a NULL-terminated list of css classes currently applied to widget
Deprecatedget_Returns the CSS name of the widget.
the CSS name
Deprecatedget_Gets the reading direction for the widget.
the reading direction for the widget
Deprecatedget_Get the display for the window that the widget belongs to.
This function can only be called after the widget has been added to a widget hierarchy with a Gtk.Root at the top.
In general, you should only create display-specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
the display for this widget
Deprecatedget_Deprecatedget_Deprecatedget_Returns whether the widget should grab focus when it is clicked with the mouse.
true if the widget should grab focus when it is clicked with the mouse
Deprecatedget_Determines whether the widget can own the input focus.
true if widget can own the input focus
Deprecatedget_Deprecatedget_Returns the cairo_font_options_t of the widget.
the cairo_font_options_t of widget
Deprecatedget_Obtains the frame clock for a widget.
The frame clock is a global “ticker” that can be used to drive animations and repaints. The most common reason to get the frame clock is to call Gdk.FrameClock.get_frame_time, in order to get a time to use for animating. For example you might record the start of the animation with an initial value from Gdk.FrameClock.get_frame_time, and then update the animation by calling Gdk.FrameClock.get_frame_time again during each repaint.
Gdk.FrameClock.request_phase will result in a new frame on the clock, but won’t necessarily repaint any widgets. To repaint a widget, you have to use Gtk.Widget.queue_draw which invalidates the widget (thus scheduling it to receive a draw on the next frame). Gtk.Widget.queue_draw will also end up requesting a frame on the appropriate frame clock.
A widget’s frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget’s frame clock.
Unrealized widgets do not have a frame clock.
the frame clock
Deprecatedget_Gets the horizontal alignment of the widget.
For backwards compatibility reasons this method will never return one of the baseline alignments, but instead it will convert it to Gtk.Align.FILL or Gtk.Align.CENTER.
Baselines are not supported for horizontal alignment.
the horizontal alignment of widget
Deprecatedget_Returns the current value of the has-tooltip property.
current value of has-tooltip on widget
Deprecatedget_Returns the content height of the widget.
This function returns the height passed to its size-allocate implementation, which is the height you should be using in Gtk.Widget.snapshot.
For pointer events, see Gtk.Widget.contains.
To learn more about widget sizes, see the coordinate system overview.
The height of widget
Deprecatedget_Gets whether the widget would like any available extra horizontal space.
When a user resizes a window, widgets with expand set to true generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.
Widgets with children should use Gtk.Widget.compute_expand rather than this function, to see whether any of its children, has the expand flag set. If any child of a widget wants to expand, the parent may ask to expand also.
This function only looks at the widget’s own hexpand flag, rather than computing whether the entire widget tree rooted at this widget wants to expand.
whether hexpand flag is set
Deprecatedget_Gets whether the hexpand flag has been explicitly set.
If Gtk.Widget.hexpand property is set, then it
overrides any computed expand value based on child widgets.
If hexpand is not set, then the expand value depends on
whether any children of the widget would like to expand.
There are few reasons to use this function, but it’s here for completeness and consistency.
whether hexpand has been explicitly set
Deprecatedget_Deprecatedget_Deprecatedget_Gets the value of the Gtk.Widget.limit_events property.
Deprecatedget_Returns whether the widget is mapped.
true if the widget is mapped
Deprecatedget_Gets the bottom margin of the widget.
The bottom margin of widget
Deprecatedget_Gets the end margin of the widget.
The end margin of widget
Deprecatedget_Gets the start margin of the widget.
The start margin of widget
Deprecatedget_Gets the top margin of the widget.
The top margin of widget
Deprecatedget_Retrieves the name of a widget.
See Gtk.Widget.set_name for the significance of widget names.
name of the widget
Deprecatedget_Returns the nearest Gtk.Native ancestor of the widget.
This function will return NULL if the widget is not
contained inside a widget tree with a native ancestor.
Gtk.Native widgets will return themselves here.
the Gtk.Native ancestor of widget
Deprecatedget_Deprecatedget_Fetches the requested opacity for the widget.
the requested opacity for this widget
Deprecatedget_Deprecatedget_Gets a Pango.Context that is configured for the widget.
The Pango.Context will have the appropriate font map, font description, and base direction set.
Unlike the context returned by Gtk.Widget.create_pango_context, this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget’s attributes. This can be tracked by listening to changes of the Gtk.Widget.root property on the widget.
the Pango.Context for the widget
Deprecatedget_Deprecatedget_Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management.
This is used to retrieve a suitable size by container widgets which do not impose any restrictions on the child placement. It can be used to deduce toplevel window and menu sizes as well as child widgets in free-form containers such as Gtk.Fixed.
Handle with care. Note that the natural height of a height-for-width widget will generally be a smaller size than the minimum height, since the required height for the natural width is generally smaller than the required height for the minimum width.
Use Gtk.Widget.measure if you want to support baseline alignment.
Deprecatedget_Deprecatedget_Deprecatedget_Determines whether the widget is realized.
true if widget is realized
Deprecatedget_Determines whether the widget is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default.
true if widget acts as the default widget when focused
Deprecatedget_Gets whether the widget prefers a height-for-width layout or a width-for-height layout.
Single-child widgets generally propagate the preference of their child, more complex widgets need to request something either in context of their children or in context of their allocation capabilities.
The Gtk.SizeRequestMode preferred by widget.
Deprecatedget_Deprecatedget_Retrieves the internal scale factor that maps from window coordinates to the actual device pixels.
On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2).
See Gdk.Surface.get_scale_factor.
Note that modern systems may support fractional scaling, where the scale factor is not an integer. On such systems, this function will return the next higher integer value, but you probably want to use Gdk.Surface.get_scale to get the fractional scale value.
the scale factor for widget
Deprecatedget_Returns the widget’s sensitivity.
This function returns the value that has been set using Gtk.Widget.set_sensitive).
The effective sensitivity of a widget is however determined by both its own and its parent widget’s sensitivity. See Gtk.Widget.is_sensitive.
true if the widget is sensitive
Deprecatedget_Gets the settings object holding the settings used for the widget.
Note that this function can only be called when the Gtk.Widget
is attached to a toplevel, since the settings object is specific
to a particular display. If you want to monitor the widget for
changes in its settings, connect to the notify::display signal.
the relevant settings object
Deprecatedget_Returns the content width or height of the widget.
Which dimension is returned depends on orientation.
This is equivalent to calling Gtk.Widget.get_width for Gtk.Orientation.HORIZONTAL or Gtk.Widget.get_height for Gtk.Orientation.VERTICAL, but can be used when writing orientation-independent code, such as when implementing Gtk.Orientable widgets.
To learn more about widget sizes, see the coordinate system overview.
Deprecatedorientation: Gtk.Orientationthe orientation to query
the size of widget in orientation
Deprecatedget_Gets the size request that was explicitly set for the widget.
A value of -1 stored in width or height indicates that that
dimension has not been set explicitly and the natural requisition
of the widget will be used instead.
See Gtk.Widget.set_size_request.
To get the size a widget will actually request, call Gtk.Widget.measure instead of this function.
Deprecatedget_Returns the widget state as a flag set.
It is worth mentioning that the effective Gtk.StateFlags.INSENSITIVE
state will be returned, that is, also based on parent insensitivity,
even if widget itself is sensitive.
Also note that if you are looking for a way to obtain the Gtk.StateFlags to pass to a Gtk.StyleContext method, you should look at Gtk.StyleContext.get_state.
the state flags of widget
Deprecatedget_Returns the style context associated to the widget.
The returned object is guaranteed to be the same
for the lifetime of widget.
the widgets style context
Deprecatedget_Fetches an object build from the template XML for widget_type in
the widget.
This will only report children which were previously declared with Gtk.WidgetClass.bind_template_child_full or one of its variants.
This function is only meant to be called for code which is private
to the widget_type which declared the child and is meant for language
bindings which cannot easily make use of the GObject structure offsets.
Deprecatedwidget_type: GTypeThe type of the widget class that defines the child in the template
Deprecatedname: stringID of the child defined in the template XML
the object built in the template XML with the id name
Deprecatedget_Gets the contents of the tooltip for the widget.
If the tooltip has not been set using
Gtk.Widget.set_tooltip_markup, this
function returns NULL.
the tooltip text
Deprecatedget_Gets the contents of the tooltip for the widget.
If the widget's tooltip was set using
Gtk.Widget.set_tooltip_markup,
this function will return the escaped text.
the tooltip text
Deprecatedget_Deprecatedget_Gets whether the widget would like any available extra vertical space.
See Gtk.Widget.get_hexpand for more detail.
whether vexpand flag is set
Deprecatedget_Gets whether the vexpand flag has been explicitly set.
See Gtk.Widget.get_hexpand_set for more detail.
whether vexpand has been explicitly set
Deprecatedget_Determines whether the widget is visible.
If you want to take into account whether the widget’s parent is also marked as visible, use Gtk.Widget.is_visible instead.
This function does not check if the widget is obscured in any way.
true if the widget is visible
Deprecatedget_Returns the content width of the widget.
This function returns the width passed to its size-allocate implementation, which is the width you should be using in Gtk.Widget.snapshot.
For pointer events, see Gtk.Widget.contains.
To learn more about widget sizes, see the coordinate system overview.
The width of widget
Deprecatedgrab_Causes widget to have the keyboard focus for the window
that it belongs to.
If widget is not focusable, or its Gtk.Widget.grab_focus
implementation cannot transfer the focus to a descendant of widget
that is focusable, it will not take focus and false will be returned.
Calling Gtk.Widget.grab_focus on an already focused widget is allowed, should not have an effect, and return true.
true if focus is now inside widget
Deprecatedhas_Returns whether a style class is currently applied to the widget.
Deprecatedcss_class: stringstyle class, without the leading period
true if css_class is currently applied to widget
Deprecatedhas_Determines if the widget should show a visible indication that it has the global input focus.
This is a convenience function that takes into account whether
focus indication should currently be shown in the toplevel window
of widget. See Gtk.Window.get_focus_visible for more
information about focus indication.
To find out if the widget has the global input focus, use Gtk.Widget.has_focus.
true if the widget should display a “focus rectangle”
DeprecatedhideReverses the effects of [method.Gtk.Widget.show].
This is causing the widget to be hidden (invisible to the user).
Deprecatedin_Returns whether the widget is currently being destroyed.
This information can sometimes be used to avoid doing unnecessary work.
true if widget is being destroyed
Deprecatedinit_Creates and initializes child widgets defined in templates.
This function must be called in the instance initializer for any class which assigned itself a template using Gtk.WidgetClass.set_template.
It is important to call this function in the instance initializer
of a widget subclass and not in GObject.constructed() or
GObject.constructor() for two reasons:
g_object_new() on a widget with composite templates,
it’s important to build the composite widgets before the construct
properties are set. Properties passed to g_object_new() should
take precedence over properties set in the private template XMLA good rule of thumb is to call this function as the first thing in an instance initialization function.
Deprecatedinsert_Inserts an action group into the widget's actions.
Children of widget that implement Gtk.Actionable can
then be associated with actions in group by setting their
“action-name” to prefix.action-name.
Note that inheritance is defined for individual actions. I.e.
even if you insert a group with prefix prefix, actions with
the same prefix will still be inherited from the parent, unless
the group contains an action with the same name.
If group is NULL, a previously inserted group for name is
removed from widget.
Deprecatedname: stringthe prefix for actions in group
OptionalDeprecatedgroup: Gio.ActionGroupan action group
Deprecatedinsert_Sets the parent widget of the widget.
In contrast to Gtk.Widget.set_parent, this function
inserts widget at a specific position into the list of children
of the parent widget.
It will be placed after previous_sibling, or at the beginning if
previous_sibling is NULL.
After calling this function, gtk_widget_get_prev_sibling (widget)
will return previous_sibling.
If parent is already set as the parent widget of widget, this
function can also be used to reorder widget in the child widget
list of parent.
This function is primarily meant for widget implementations; if you are just using a widget, you must use its own API for adding children.
Deprecatedinsert_Sets the parent widget of the widget.
In contrast to Gtk.Widget.set_parent, this function
inserts widget at a specific position into the list of children
of the parent widget.
It will be placed before next_sibling, or at the end if
next_sibling is NULL.
After calling this function, gtk_widget_get_next_sibling (widget)
will return next_sibling.
If parent is already set as the parent widget of widget, this function
can also be used to reorder widget in the child widget list of parent.
This function is primarily meant for widget implementations; if you are just using a widget, you must use its own API for adding children.
Deprecatedis_Determines whether the widget is a descendent of ancestor.
Deprecatedancestor: Gtk.Widgetanother Gtk.Widget
true if ancestor contains widget as a child, grandchild, great grandchild, etc
Deprecatedis_Determines whether the widget can be drawn to.
A widget can be drawn if it is mapped and visible.
true if widget is drawable
Deprecatedis_Determines if the widget is the focus widget within its toplevel.
This does not mean that the Gtk.Widget.has_focus property is necessarily set; Gtk.Widget.has_focus will only be set if the toplevel widget additionally has the global input focus.
true if the widget is the focus widget
Deprecatedis_Returns the widget’s effective sensitivity.
This means it is sensitive itself and also its parent widget is sensitive.
true if the widget is effectively sensitive
Deprecatedis_Determines whether the widget and all its parents are marked as visible.
This function does not check if the widget is obscured in any way.
See also Gtk.Widget.get_visible and Gtk.Widget.set_visible.
true if the widget and all its parents are visible
Deprecatedkeynav_Emits the Gtk.Widget::keynav-failed signal on the widget.
This function should be called whenever keyboard navigation within a single widget hits a boundary.
The return value of this function should be interpreted in a way similar to the return value of Gtk.Widget.child_focus. When true is returned, stay in the widget, the failed keyboard navigation is ok and/or there is nowhere we can/should move the focus to. When false is returned, the caller should continue with keyboard navigation outside the widget, e.g. by calling Gtk.Widget.child_focus on the widget’s toplevel.
The default Gtk.Widget::keynav-failed handler returns
false for Gtk.DirectionType.TAB-FORWARD and
Gtk.DirectionType.TAB-BACKWARD. For the other values
of Gtk.DirectionType it returns true.
Whenever the default handler returns true, it also calls Gtk.Widget.error_bell to notify the user of the failed keyboard navigation.
A use case for providing an own implementation of ::keynav-failed
(either by connecting to it or by overriding it) would be a row of
Gtk.Entry widgets where the user should be able to navigate
the entire row with the cursor keys, as e.g. known from user
interfaces that require entering license keys.
Deprecateddirection: Gtk.DirectionTypedirection of focus movement
true if stopping keyboard navigation is fine, false if the emitting widget should try to handle the keyboard navigation attempt in its parent widget
Deprecatedlist_Returns the widgets for which this widget is the target of a mnemonic.
Typically, these widgets will be labels. See, for example, Gtk.Label.set_mnemonic_widget.
The widgets in the list are not individually referenced.
If you want to iterate through the list and perform actions
involving callbacks that might destroy the widgets, you
must call g_list_foreach (result, (GFunc)g_object_ref, NULL)
first, and then unref all the widgets afterwards.
the list of mnemonic labels
DeprecatedmapCauses a widget to be mapped if it isn’t already.
This function is only for use in widget implementations.
DeprecatedmeasureMeasures widget in the orientation orientation and for the given for_size.
As an example, if orientation is Gtk.Orientation.HORIZONTAL and for_size
is 300, this functions will compute the minimum and natural width of widget
if it is allocated at a height of 300 pixels.
See GtkWidget’s geometry management section for a more details on implementing Gtk.Widget.measure.
Deprecatedorientation: Gtk.Orientationthe orientation to measure
Deprecatedfor_size: numberSize for the opposite of orientation, i.e. if orientation is Gtk.Orientation.HORIZONTAL, this is the height the widget should be measured with. The Gtk.Orientation.VERTICAL case is analogous. This way, both height-for-width and width-for-height requests can be implemented. If no size is known, -1 can be passed.
Deprecatedmnemonic_Emits the Gtk.Widget::mnemonic-activate signal.
Deprecatedgroup_cycling: booleantrue if there are other widgets with the same mnemonic
true if the signal has been handled
Deprecatedobserve_Returns a list model to track the children of the widget.
Calling this function will enable extra internal bookkeeping to track children and emit signals on the returned listmodel. It may slow down operations a lot.
Applications should try hard to avoid calling this function because of the slowdowns.
a list model tracking widget's children
Deprecatedobserve_Returns a list model to track the event controllers of the widget.
Calling this function will enable extra internal bookkeeping to track controllers and emit signals on the returned listmodel. It may slow down operations a lot.
Applications should try hard to avoid calling this function because of the slowdowns.
a list model tracking widget's controllers
DeprecatedpickFinds the descendant of the widget closest to a point.
The point (x, y) must be given in widget coordinates, so (0, 0)
is assumed to be the top left of widget's content area.
Usually widgets will return NULL if the given coordinate is not
contained in widget checked via Gtk.Widget.contains.
Otherwise they will recursively try to find a child that does
not return NULL. Widgets are however free to customize their
picking algorithm.
This function is used on the toplevel to determine the widget below the mouse cursor for purposes of hover highlighting and delivering events.
the widget's descendant at (x, y)
Deprecatedqueue_Flags the widget for a rerun of the Gtk.Widget.size_allocate function.
Use this function instead of Gtk.Widget.queue_resize
when the widget's size request didn't change but it wants to
reposition its contents.
An example user of this function is Gtk.Widget.set_halign.
This function is only for use in widget implementations.
Deprecatedqueue_Schedules this widget to be redrawn.
The redraw will happen in the paint phase of the current or the next frame.
This means widget's Gtk.Widget.snapshot
implementation will be called.
Deprecatedqueue_Flags a widget to have its size renegotiated.
This should be called when a widget for some reason has a new size request. For example, when you change the text in a Gtk.Label, the label queues a resize to ensure there’s enough space for the new text.
Note that you cannot call gtk_widget_queue_resize() on a widget
from inside its implementation of the Gtk.Widget.size_allocate
virtual method. Calls to gtk_widget_queue_resize() from inside
Gtk.Widget.size_allocate will be silently ignored.
This function is only for use in widget implementations.
DeprecatedrealizeCreates the GDK resources associated with a widget.
Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically.
Realizing a widget requires all the widget’s parent widgets to be
realized; calling this function realizes the widget’s parents
in addition to widget itself. If a widget is not yet inside a
toplevel window when you realize it, bad things will happen.
This function is primarily used in widget implementations, and
isn’t very useful otherwise. Many times when you think you might
need it, a better approach is to connect to a signal that will be
called after the widget is realized automatically, such as
Gtk.Widget::realize.
Deprecatedremove_Removes an event controller from the widget.
The removed event controller will not receive any more events, and should not be used again.
Widgets will remove all event controllers automatically when they are destroyed, there is normally no need to call this function.
Deprecatedcontroller: Gtk.EventControlleran event controller
Deprecatedremove_Removes a style from the widget.
After this, the style of widget will stop matching for css_class.
Deprecatedcss_class: stringstyle class to remove from widget, without the leading period
Deprecatedremove_Removes a widget from the list of mnemonic labels for this widget.
See Gtk.Widget.list_mnemonic_labels.
The widget must have previously been added to the list with Gtk.Widget.add_mnemonic_label.
Deprecatedremove_Removes a tick callback previously registered with Gtk.Widget.add_tick_callback.
Deprecatedid: numberan ID returned by Gtk.Widget.add_tick_callback
Deprecatedset_Sets whether the input focus can enter the widget or any of its children.
Applications should set can_focus to false to mark a
widget as for pointer/touch use only.
Note that having can_focus be true is only one of the
necessary conditions for being focusable. A widget must
also be sensitive and focusable and not have an ancestor
that is marked as not can-focus in order to receive input
focus.
See Gtk.Widget.grab_focus for actually setting the input focus on a widget.
Deprecatedcan_focus: booleanwhether the input focus can enter the widget or any of its children
Deprecatedset_Sets whether the widget can be the target of pointer events.
Deprecatedcan_target: booleanwhether this widget should be able to receive pointer events
Deprecatedset_Sets whether the widget should be mapped along with its parent.
The child visibility can be set for widget before it is added to a container with Gtk.Widget.set_parent, to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of true when the widget is removed from a container.
Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself.
This function is only useful for widget implementations and should never be called by an application.
Deprecatedchild_visible: booleanwhether widget should be mapped along with its parent
Deprecatedset_Replaces the current style classes of the widget with classes.
Deprecatedclasses: string[]NULL-terminated list of style classes
Deprecatedset_Sets the cursor to be shown when the pointer hovers over the widget.
This is a utility function that creates a cursor via
Gdk.Cursor.new_from_name and then sets it on widget
with Gtk.Widget.set_cursor. See those functions for
details.
On top of that, this function allows name to be NULL, which
will do the same as calling Gtk.Widget.set_cursor
with a NULL cursor.
OptionalDeprecatedname: stringthe name of the cursor
Deprecatedset_Sets the reading direction on the widget.
This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done.
Generally, applications will let the default reading direction prevail, except for widgets where the children are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification).
If the direction is set to Gtk.TextDirection.NONE, then the value set by Gtk.Widget.set_default_direction will be used.
Deprecateddir: Gtk.TextDirectionthe new direction
Deprecatedset_Set the focus child of the widget.
This function is only suitable for widget implementations. If you want a certain widget to get the input focus, call Gtk.Widget.grab_focus on it.
Deprecatedset_Sets whether the widget should grab focus when it is clicked with the mouse.
Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.
Deprecatedfocus_on_click: booleanwhether the widget should grab focus when clicked with the mouse
Deprecatedset_Sets whether the widget can own the input focus.
Widget implementations should set focusable to true in
their init() function if they want to receive keyboard input.
Note that having focusable be true is only one of the
necessary conditions for being focusable. A widget must
also be sensitive and can-focus and not have an ancestor
that is marked as not can-focus in order to receive input
focus.
See Gtk.Widget.grab_focus for actually setting the input focus on a widget.
Deprecatedfocusable: booleanwhether or not widget can own the input focus
Deprecatedset_Sets the font map to use for text rendering in the widget.
The font map is the object that is used to look up fonts. Setting a custom font map can be useful in special situations, e.g. when you need to add application-specific fonts to the set of available fonts.
When not set, the widget will inherit the font map from its parent.
Deprecatedset_Sets the cairo_font_options_t used for text rendering
in the widget.
When not set, the default font options for the Gdk.Display will be used.
OptionalDeprecatedoptions: default.FontOptionsa cairo_font_options_t struct to unset any previously set default font options
Deprecatedset_Deprecatedset_Sets the has-tooltip property on the widget.
Deprecatedhas_tooltip: booleanwhether or not widget has a tooltip
Deprecatedset_Sets whether the widget would like any available extra horizontal space.
When a user resizes a window, widgets with expand set to true generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.
Call this function to set the expand flag if you would like your widget to become larger horizontally when the window has extra room.
By default, widgets automatically expand if any of their children
want to expand. (To see if a widget will automatically expand given
its current children and state, call Gtk.Widget.compute_expand.
A widget can decide how the expandability of children affects its
own expansion by overriding the compute_expand virtual method on
Gtk.Widget.).
Setting hexpand explicitly with this function will override the automatic expand behavior.
This function forces the widget to expand or not to expand, regardless of children. The override occurs because Gtk.Widget.set_hexpand sets the hexpand-set property (see Gtk.Widget.set_hexpand_set) which causes the widget’s hexpand value to be used, rather than looking at children and widget state.
Deprecatedexpand: booleanwhether to expand
Deprecatedset_Sets whether the hexpand flag will be used.
The Gtk.Widget.hexpand_set property will be set automatically when you call Gtk.Widget.set_hexpand to set hexpand, so the most likely reason to use this function would be to unset an explicit expand flag.
If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand.
There are few reasons to use this function, but it’s here for completeness and consistency.
Deprecatedset: booleanvalue for hexpand-set property
Deprecatedset_Sets the layout manager to use for measuring and allocating children of the widget.
OptionalDeprecatedlayout_manager: Gtk.LayoutManagera layout manager
Deprecatedset_Sets whether the widget acts like a modal dialog, with respect to event delivery.
Deprecatedlimit_events: booleanwhether to limit events
Deprecatedset_Sets the bottom margin of the widget.
Deprecatedmargin: numberthe bottom margin
Deprecatedset_Sets the end margin of the widget.
Deprecatedmargin: numberthe end margin
Deprecatedset_Sets the start margin of the widget.
Deprecatedmargin: numberthe start margin
Deprecatedset_Sets the top margin of the widget.
Deprecatedmargin: numberthe top margin
Deprecatedset_Sets a widgets name.
Setting a name allows you to refer to the widget from a CSS file. You can apply a style to widgets with a particular name in the CSS file. See the documentation for the CSS syntax (on the same page as the docs for Gtk.StyleContext.
Note that the CSS syntax has certain special characters to delimit and represent elements in a selector (period, #, >, *...), so using these will make your widget impossible to match by name. Any combination of alphanumeric symbols, dashes and underscores will suffice.
Deprecatedname: stringname for the widget
Deprecatedset_Requests the widget to be rendered partially transparent.
An opacity of 0 is fully transparent and an opacity of 1 is fully opaque.
Opacity works on both toplevel widgets and child widgets, although there are some limitations: For toplevel widgets, applying opacity depends on the capabilities of the windowing system. On X11, this has any effect only on X displays with a compositing manager, see Gdk.Display.is_composited. On Windows and Wayland it will always work, although setting a window’s opacity after the window has been shown may cause some flicker.
Note that the opacity is inherited through inclusion — if you set a toplevel to be partially translucent, all of its content will appear translucent, since it is ultimatively rendered on that toplevel. The opacity value itself is not inherited by child widgets (since that would make widgets deeper in the hierarchy progressively more translucent). As a consequence, Gtk.Popover instances and other Gtk.Native widgets with their own surface will use their own opacity value, and thus by default appear non-translucent, even if they are attached to a toplevel that is translucent.
Deprecatedopacity: numberdesired opacity, between 0 and 1
Deprecatedset_Sets how the widget treats content that is drawn outside the it's content area.
See the definition of Gtk.Overflow for details.
This setting is provided for widget implementations and should not be used by application code.
The default value is Gtk.Overflow.VISIBLE.
Deprecatedset_Sets the parent widget of the widget.
This takes care of details such as updating the state and style of the child to reflect its new location and resizing the parent. The opposite function is Gtk.Widget.unparent.
This function is useful only when implementing subclasses of Gtk.Widget.
Deprecatedset_Sets whether the widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default.
Deprecatedreceives_default: booleanwhether or not widget can be a default widget
Deprecatedset_Sets the sensitivity of the widget.
A widget is sensitive if the user can interact with it. Insensitive widgets are “grayed out” and the user can’t interact with them. Insensitive widgets are known as “inactive”, “disabled”, or “ghosted” in some other toolkits.
Deprecatedsensitive: booleantrue to make the widget sensitive
Deprecatedset_Sets the minimum size of the widget.
That is, the widget’s size request will be at least width
by height. You can use this function to force a widget to
be larger than it normally would be.
In most cases, Gtk.Window.set_default_size is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request.
Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it is basically impossible to hardcode a size that will always work.
The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested.
If the size request in a given direction is -1 (unset), then the “natural” size request of the widget will be used instead.
The size request set here does not include any margin from the properties Gtk.Widget.margin_start, Gtk.Widget.margin_end, Gtk.Widget.margin_top, and Gtk.Widget.margin_bottom, but it does include pretty much all other padding or border properties set by any subclass of Gtk.Widget.
Deprecatedwidth: numberwidth widget should request, or -1 to unset
Deprecatedheight: numberheight widget should request, or -1 to unset
Deprecatedset_Turns on flag values in the current widget state.
Typical widget states are insensitive, prelighted, etc.
This function accepts the values Gtk.StateFlags.DIR-LTR and Gtk.StateFlags.DIR-RTL but ignores them. If you want to set the widget's direction, use Gtk.Widget.set_direction.
This function is for use in widget implementations.
Deprecatedflags: Gtk.StateFlagsstate flags to turn on
Deprecatedclear: booleanwhether to clear state before turning on flags
Deprecatedset_Sets the contents of the tooltip for widget.
markup must contain Pango markup.
This function will take care of setting the
Gtk.Widget.has_tooltip as a side effect, and of the
default handler for the Gtk.Widget::query-tooltip signal.
See also Gtk.Tooltip.set_markup.
OptionalDeprecatedmarkup: stringthe contents of the tooltip for widget
Deprecatedset_Sets the contents of the tooltip for the widget.
If text contains any markup, it will be escaped.
This function will take care of setting
Gtk.Widget.has_tooltip as a side effect,
and of the default handler for the
Gtk.Widget::query-tooltip signal.
See also Gtk.Tooltip.set_text.
OptionalDeprecatedtext: stringthe contents of the tooltip for widget
Deprecatedset_Deprecatedset_Sets whether the widget would like any available extra vertical space.
See Gtk.Widget.set_hexpand for more detail.
Deprecatedexpand: booleanwhether to expand
Deprecatedset_Sets whether the vexpand flag will be used.
See Gtk.Widget.set_hexpand_set for more detail.
Deprecatedset: booleanvalue for vexpand-set property
Deprecatedset_Sets the visibility state of widget.
Note that setting this to true doesn’t mean the widget is actually viewable, see Gtk.Widget.get_visible.
Deprecatedvisible: booleanwhether the widget should be shown or not
Deprecatedshould_Returns whether the widget should contribute to the measuring and allocation of its parent.
This is false for invisible children, but also for children that have their own surface, such as Gtk.Popover instances.
true if child should be included in measuring and allocating
DeprecatedshowFlags a widget to be displayed.
Any widget that isn’t shown will not appear on the screen.
Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen.
When a toplevel widget is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel widget is realized and mapped.
Deprecatedsize_Allocates widget with a transformation that translates
the origin to the position in allocation.
This is a simple form of Gtk.Widget.allocate.
Deprecatedsnapshot_Snapshots a child of the widget.
When a widget receives a call to the snapshot function,
it must send synthetic Gtk.Widget.snapshot calls
to all children. This function provides a convenient way
of doing this. A widget, when it receives a call to its
Gtk.Widget.snapshot function, calls
gtk_widget_snapshot_child() once for each child, passing in
the snapshot the widget received.
This function takes care of translating the origin of snapshot,
and deciding whether the child needs to be snapshot.
It does nothing for children that implement Gtk.Native.
Deprecatedchild: Gtk.Widgeta child of widget
Deprecatedsnapshot: Gtk.Snapshotsnapshot as passed to the widget. In particular, no calls to Gtk.Snapshot.translate or other transform calls should have been made
Deprecatedtranslate_Translates coordinates relative to src_widget’s allocation
to coordinates relative to dest_widget’s allocations.
In order to perform this operation, both widget must share
a common ancestor. If that is not the case, dest_x and dest_y
are set to 0 and false is returned.
true if src_widget and dest_widget have a common ancestor, false otherwise
Deprecatedtrigger_Triggers a tooltip query on the display of the widget.
DeprecatedunmapCauses a widget to be unmapped if it’s currently mapped.
This function is only for use in widget implementations.
DeprecatedunparentRemoves widget from its parent.
This function is only for use in widget implementations, typically in dispose.
DeprecatedunrealizeCauses a widget to be unrealized.
This frees all GDK resources associated with the widget.
This function is only useful in widget implementations.
Deprecatedunset_Turns off flag values for the current widget state.
See Gtk.Widget.set_state_flags.
This function is for use in widget implementations.
Deprecatedflags: Gtk.StateFlagsstate flags to turn off
VirtualDeprecatedvfunc_Computes whether a container should give this widget extra space when possible.
Deprecatedhexpand_p: booleanDeprecatedvexpand_p: booleanVirtualDeprecatedvfunc_Tests if a given point is contained in the widget.
The coordinates for (x, y) must be in widget coordinates, so
(0, 0) is assumed to be the top left of widget's content area.
Deprecatedx: numberX coordinate to test, relative to widget's origin
Deprecatedy: numberY coordinate to test, relative to widget's origin
VirtualDeprecatedvfunc_Vfunc called when the CSS used by widget was changed. Widgets should then discard their caches that depend on CSS and queue resizes or redraws accordingly. The default implementation will take care of this for all the default CSS properties, so implementations must chain up.
Deprecatedchange: CssStyleChangeVirtualDeprecatedvfunc_Signal emitted when the text direction of a widget changes.
Deprecatedprevious_direction: Gtk.TextDirectionVirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Gets whether the widget prefers a height-for-width layout or a width-for-height layout.
Single-child widgets generally propagate the preference of their child, more complex widgets need to request something either in context of their children or in context of their allocation capabilities.
VirtualDeprecatedvfunc_Causes widget to have the keyboard focus for the window
that it belongs to.
If widget is not focusable, or its Gtk.Widget.grab_focus
implementation cannot transfer the focus to a descendant of widget
that is focusable, it will not take focus and false will be returned.
Calling Gtk.Widget.grab_focus on an already focused widget is allowed, should not have an effect, and return true.
VirtualDeprecatedvfunc_Reverses the effects of [method.Gtk.Widget.show].
This is causing the widget to be hidden (invisible to the user).
VirtualDeprecatedvfunc_Emits the Gtk.Widget::keynav-failed signal on the widget.
This function should be called whenever keyboard navigation within a single widget hits a boundary.
The return value of this function should be interpreted in a way similar to the return value of Gtk.Widget.child_focus. When true is returned, stay in the widget, the failed keyboard navigation is ok and/or there is nowhere we can/should move the focus to. When false is returned, the caller should continue with keyboard navigation outside the widget, e.g. by calling Gtk.Widget.child_focus on the widget’s toplevel.
The default Gtk.Widget::keynav-failed handler returns
false for Gtk.DirectionType.TAB-FORWARD and
Gtk.DirectionType.TAB-BACKWARD. For the other values
of Gtk.DirectionType it returns true.
Whenever the default handler returns true, it also calls Gtk.Widget.error_bell to notify the user of the failed keyboard navigation.
A use case for providing an own implementation of ::keynav-failed
(either by connecting to it or by overriding it) would be a row of
Gtk.Entry widgets where the user should be able to navigate
the entire row with the cursor keys, as e.g. known from user
interfaces that require entering license keys.
Deprecateddirection: Gtk.DirectionTypedirection of focus movement
VirtualDeprecatedvfunc_Causes a widget to be mapped if it isn’t already.
This function is only for use in widget implementations.
VirtualDeprecatedvfunc_Measures widget in the orientation orientation and for the given for_size.
As an example, if orientation is Gtk.Orientation.HORIZONTAL and for_size
is 300, this functions will compute the minimum and natural width of widget
if it is allocated at a height of 300 pixels.
See GtkWidget’s geometry management section for a more details on implementing Gtk.Widget.measure.
Deprecatedorientation: Gtk.Orientationthe orientation to measure
Deprecatedfor_size: numberSize for the opposite of orientation, i.e. if orientation is Gtk.Orientation.HORIZONTAL, this is the height the widget should be measured with. The Gtk.Orientation.VERTICAL case is analogous. This way, both height-for-width and width-for-height requests can be implemented. If no size is known, -1 can be passed.
VirtualDeprecatedvfunc_Emits the Gtk.Widget::mnemonic-activate signal.
Deprecatedgroup_cycling: booleantrue if there are other widgets with the same mnemonic
VirtualDeprecatedvfunc_Signal emitted when a change of focus is requested
Deprecateddirection: Gtk.DirectionTypeVirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Creates the GDK resources associated with a widget.
Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically.
Realizing a widget requires all the widget’s parent widgets to be
realized; calling this function realizes the widget’s parents
in addition to widget itself. If a widget is not yet inside a
toplevel window when you realize it, bad things will happen.
This function is primarily used in widget implementations, and
isn’t very useful otherwise. Many times when you think you might
need it, a better approach is to connect to a signal that will be
called after the widget is realized automatically, such as
Gtk.Widget::realize.
VirtualDeprecatedvfunc_Called when the widget gets added to a Gtk.Root widget. Must chain up
VirtualDeprecatedvfunc_Set the focus child of the widget.
This function is only suitable for widget implementations. If you want a certain widget to get the input focus, call Gtk.Widget.grab_focus on it.
VirtualDeprecatedvfunc_Flags a widget to be displayed.
Any widget that isn’t shown will not appear on the screen.
Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen.
When a toplevel widget is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel widget is realized and mapped.
VirtualDeprecatedvfunc_Called to set the allocation, if the widget does not have a layout manager.
Deprecatedwidth: numberDeprecatedheight: numberDeprecatedbaseline: numberVirtualDeprecatedvfunc_VirtualDeprecatedvfunc_Signal emitted when the widget state changes,
see gtk_widget_get_state_flags().
Deprecatedprevious_state_flags: Gtk.StateFlagsVirtualDeprecatedvfunc_Emitted when a system setting was changed. Must chain up.
Deprecatedsettings: Gtk.SystemSettingVirtualDeprecatedvfunc_Causes a widget to be unmapped if it’s currently mapped.
This function is only for use in widget implementations.
VirtualDeprecatedvfunc_Causes a widget to be unrealized.
This frees all GDK resources associated with the widget.
This function is only useful in widget implementations.
VirtualDeprecatedvfunc_Called when the widget is about to be removed from its Gtk.Root widget. Must chain up
StaticDeprecated_Deprecatedklass: anyStaticDeprecatedadd_StaticDeprecatedbind_StaticDeprecatedbind_Deprecatedname: stringID of the child defined in the template XML
Deprecatedinternal_child: booleanwhether the child should be accessible as an “internal-child” when this class is used in GtkBuilder XML
Deprecatedstruct_offset: numberThe offset into the composite widget’s instance public or private structure where the automated child pointer should be set, or 0 to not assign the pointer
StaticDeprecatedcompat_Deprecatedwhat: numberOptionalDeprecateddata: anyStaticDeprecatedfind_StaticDeprecatedget_StaticDeprecatedget_StaticDeprecatedget_StaticDeprecatedget_Obtains the default reading direction.
StaticDeprecatedget_StaticDeprecatedinstall_Deprecatedaction_name: stringa prefixed action name, such as "clipboard.paste"
Deprecatedparameter_type: stringthe parameter type
Deprecatedactivate: WidgetActionActivateFunccallback to use when the action is activated
StaticDeprecatedinstall_StaticDeprecatedinstall_Deprecatedproperty_id: numberthe id for the new property
Deprecatedpspec: GObject.ParamSpecthe GObject.ParamSpec for the new property
StaticDeprecatedinstall_Deprecatedaction_name: stringname of the action
Deprecatedproperty_name: stringname of a property in instances of widget_class or any parent class
StaticDeprecatedinterface_Find the GObject.ParamSpec with the given name for an
interface. Generally, the interface vtable passed in as g_iface
will be the default vtable from g_type_default_interface_ref(), or,
if you know the interface has already been loaded,
g_type_default_interface_peek().
Deprecatedg_iface: TypeInterfaceany interface vtable for the interface, or the default vtable for the interface
Deprecatedproperty_name: stringname of a property to look up.
StaticDeprecatedinterface_Add a property to an interface; this is only useful for interfaces
that are added to GObject-derived types. Adding a property to an
interface forces all objects classes with that interface to have a
compatible property. The compatible property could be a newly
created GObject.ParamSpec, but normally
g_object_class_override_property() will be used so that the object
class only needs to provide an implementation and inherits the
property description, default value, bounds, and so forth from the
interface property.
This function is meant to be called from the interface's default
vtable initialization function (the class_init member of
GObject.TypeInfo.) It must not be called after after class_init has
been called for any object types implementing this interface.
If pspec is a floating reference, it will be consumed.
Deprecatedg_iface: TypeInterfaceany interface vtable for the interface, or the default vtable for the interface.
Deprecatedpspec: GObject.ParamSpecthe GObject.ParamSpec for the new property
StaticDeprecatedinterface_Lists the properties of an interface.Generally, the interface
vtable passed in as g_iface will be the default vtable from
g_type_default_interface_ref(), or, if you know the interface has
already been loaded, g_type_default_interface_peek().
Deprecatedg_iface: TypeInterfaceany interface vtable for the interface, or the default vtable for the interface
StaticDeprecatedlist_StaticDeprecatednewvStaticDeprecatedoverride_Deprecatedproperty_id: numberthe new property ID
Deprecatedname: stringthe name of a property registered in a parent class or in an interface of this class.
StaticDeprecatedquery_Deprecatedindex_: numberposition of the action to query
StaticDeprecatedset_Deprecatedaccessible_role: Gtk.AccessibleRolethe accessible role to use
StaticDeprecatedset_Deprecatedsignal_id: numberthe id for the activate signal
StaticDeprecatedset_Deprecatedsignal_name: stringthe name of the activate signal of widget_type
StaticDeprecatedset_Deprecatedname: stringname to use
StaticDeprecatedset_Sets the default reading direction for widgets.
Deprecateddir: Gtk.TextDirectionthe new default direction, either Gtk.TextDirection.LTR or Gtk.TextDirection.RTL
StaticDeprecatedset_Deprecatedtype: GTypethe object type that implements the Gtk.LayoutManager for widget_class
StaticDeprecatedset_Deprecatedtemplate_bytes: GLib.Bytes | Uint8Array<ArrayBufferLike>GLib.Bytes holding the Gtk.Builder XML
StaticDeprecatedset_Deprecatedresource_name: stringresource path to load the template from
StaticDeprecatedset_Deprecatedscope: Gtk.BuilderScopeGtk.BuilderScope to use when loading the class template
A widget for displaying both trees and lists
Widget that displays any object that implements the Gtk.TreeModel interface.
Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.
Coordinate systems in GtkTreeView API
Several different coordinate systems are exposed in the Gtk.TreeView API. These are:
Widget coordinates: Coordinates relative to the widget (usually
widget->window).Bin window coordinates: Coordinates relative to the window that GtkTreeView renders to.
Tree coordinates: Coordinates relative to the entire scrollable area of GtkTreeView. These coordinates start at (0, 0) for row 0 of the tree.
Several functions are available for converting between the different coordinate systems. The most common translations are between widget and bin window coordinates and between bin window and tree coordinates. For the former you can use Gtk.TreeView.convert_widget_to_bin_window_coords (and vice versa), for the latter Gtk.TreeView.convert_bin_window_to_tree_coords (and vice versa).
Gtk.TreeView as Gtk.Buildable
The Gtk.TreeView implementation of the Gtk.Buildable interface accepts Gtk.TreeViewColumn objects as
<child>elements and exposes the internal Gtk.TreeSelection in UI definitions.An example of a UI definition fragment with Gtk.TreeView:
CSS nodes
Gtk.TreeView has a main CSS node with name
treeviewand style class.view. It has a subnode with nameheader, which is the parent for all the column header widgets' CSS nodes.Each column header consists of a
button, which among other content, has a child with namesort-indicator, which carries the.ascendingor.descendingstyle classes when the column header should show a sort indicator. The CSS is expected to provide a suitable image using the-gtk-icon-sourceproperty.For rubberband selection, a subnode with name
rubberbandis used.For the drop target location during DND, a subnode with name
dndtargetis used.Deprecated
since 4.10: Use Gtk.ListView for lists, and Gtk.ColumnView for tabular lists