TreeView

open class TreeView(pointer: <Error class: unknown class><<Error class: unknown class>>) : Widget, Scrollable

A widget for displaying both trees and lists

Widget that displays any object that implements the iface@Gtk.TreeModel interface.

Please refer to the section-tree-widget.html 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 GtkTreeView 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 method@Gtk.TreeView.convert_widget_to_bin_window_coords (and vice versa), for the latter method@Gtk.TreeView.convert_bin_window_to_tree_coords (and vice versa).

GtkTreeView as GtkBuildable

The GtkTreeView implementation of the GtkBuildable interface accepts class@Gtk.TreeViewColumn objects as <child> elements and exposes the internal class@Gtk.TreeSelection in UI definitions.

An example of a UI definition fragment with GtkTreeView:

<object class="GtkTreeView" id="treeview">
<property name="model">liststore1</property>
<child>
<object class="GtkTreeViewColumn" id="test-column">
<property name="title">Test</property>
<child>
<object class="GtkCellRendererText" id="test-renderer"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child internal-child="selection">
<object class="GtkTreeSelection" id="selection">
<signal name="changed" handler="on_treeview_selection_changed"/>
</object>
</child>
</object>

CSS nodes

treeview.view
├── header
│ ├── button
│ │ ╰── [sort-indicator]
┊ ┊
│ ╰── button
│ ╰── [sort-indicator]

├── [rubberband]
╰── [dndtarget]

GtkTreeView has a main CSS node with name treeview and style class .view. It has a subnode with name header, 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 name sort-indicator, which carries the .ascending or .descending style classes when the column header should show a sort indicator. The CSS is expected to provide a suitable image using the -gtk-icon-source property.

For rubberband selection, a subnode with name rubberband is used.

For the drop target location during DND, a subnode with name dndtarget is used.

Skipped during bindings generation

  • parameter tx: tx: Out parameter is not supported

  • parameter wx: wx: Out parameter is not supported

  • parameter bx: bx: Out parameter is not supported

  • parameter wx: wx: Out parameter is not supported

  • parameter bx: bx: Out parameter is not supported

  • parameter tx: tx: Out parameter is not supported

  • parameter path: path: Out parameter is not supported

  • parameter path: path: Out parameter is not supported

  • parameter path: path: Out parameter is not supported

  • parameter path: path: Out parameter is not supported

  • method get_row_separator_func: Return type TreeViewRowSeparatorFunc is unsupported

  • method get_search_equal_func: Return type TreeViewSearchEqualFunc is unsupported

  • parameter model: model: Out parameter is not supported

  • parameter start_path: start_path: Out parameter is not supported

  • method insert_column_with_attributes: Varargs parameter is not supported

  • parameter path: path: Out parameter is not supported

  • method enable-grid-lines: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor()

Creates a new GtkTreeView widget.

constructor(model: TreeModel)

Creates a new GtkTreeView widget with the model initialized to @model.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The accessible role of the given GtkAccessible implementation.

Link copied to clipboard

The activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.

Link copied to clipboard
open var canFocus: Boolean

Whether the widget or any of its descendents can accept the input focus.

Link copied to clipboard
open var canTarget: Boolean

Whether the widget can receive pointer events.

Link copied to clipboard

A list of css classes applied to this widget.

Link copied to clipboard
open val cssName: String

The name of this widget in the CSS tree.

Link copied to clipboard
open var cursor: <Error class: unknown class>?

The cursor used by @widget.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Setting the ::fixed-height-mode property to true speeds up GtkTreeView 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.

Link copied to clipboard
open var focusable: Boolean

Whether this widget itself will accept the input focus.

Link copied to clipboard

Whether the widget should grab focus when it is clicked with the mouse.

Link copied to clipboard
open override val gtkAccessiblePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkBuildablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkConstraintTargetPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkScrollablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtkTreeViewPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtkWidgetPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Horizontal GtkAdjustment of the scrollable widget.

Link copied to clipboard
open var halign: Align

How to distribute horizontal space if widget gets extra space.

Link copied to clipboard

Enables or disables the emission of the ::query-tooltip signal on @widget.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var hexpand: Boolean

Whether to expand horizontally.

Link copied to clipboard

Whether to use the hexpand property.

Link copied to clipboard

Enables or disables the hover expansion mode of @tree_view. Hover expansion makes rows expand or collapse if the pointer moves over them.

Link copied to clipboard

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_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.

Link copied to clipboard

Determines when horizontal scrolling should start.

Link copied to clipboard

The GtkLayoutManager instance to use to compute the preferred size of the widget, and allocate its children.

Link copied to clipboard
open var levelIndentation: <Error class: unknown class>

Extra indentation for each level.

Link copied to clipboard
open var marginBottom: <Error class: unknown class>

Margin on bottom side of widget.

Link copied to clipboard
open var marginEnd: <Error class: unknown class>

Margin on end of widget, horizontally.

Link copied to clipboard
open var marginStart: <Error class: unknown class>

Margin on start of widget, horizontally.

Link copied to clipboard
open var marginTop: <Error class: unknown class>

Margin on top side of widget.

Link copied to clipboard
open var model: TreeModel?
Link copied to clipboard
open var name: String

The name of the widget.

Link copied to clipboard
open var opacity: <Error class: unknown class>

The requested opacity of the widget.

Link copied to clipboard
open var overflow: Overflow

How content outside the widget's content area is treated.

Link copied to clipboard
open val parent: Widget?

The parent widget of this widget.

Link copied to clipboard

Whether the widget will receive the default action when it is focused.

Link copied to clipboard
Link copied to clipboard
open val root: Root?

The GtkRoot widget of the widget tree containing this widget.

Link copied to clipboard
Link copied to clipboard
open val scaleFactor: <Error class: unknown class>

The scale factor of the widget.

Link copied to clipboard
open var searchColumn: <Error class: unknown class>
Link copied to clipboard

true if the view has expanders.

Link copied to clipboard
open var tooltipColumn: <Error class: unknown class>
Link copied to clipboard

Sets the text of tooltip to be the given string, which is marked up with Pango markup.

Link copied to clipboard
open var tooltipText: String?

Sets the text of tooltip to be the given string.

Link copied to clipboard

Vertical GtkAdjustment of the scrollable widget.

Link copied to clipboard
open var valign: Align

How to distribute vertical space if widget gets extra space.

Link copied to clipboard
open var vexpand: Boolean

Whether to expand vertically.

Link copied to clipboard

Whether to use the vexpand property.

Link copied to clipboard

Determines when vertical scrolling should start.

Functions

Link copied to clipboard
open fun actionSetEnabled(actionName: String, enabled: Boolean)

Enable or disable an action installed with gtk_widget_class_install_action().

Link copied to clipboard
open fun activateActionIfExists(name: String, args: <Error class: unknown class>? = null): Boolean

Looks up the action in the action groups associated with

Link copied to clipboard
open fun activateDefault()

Activates the default.activate action from @widget.

Link copied to clipboard

For widgets that can be “activated” (buttons, menu items, etc.), this function activates them.

Link copied to clipboard
open fun addController(controller: EventController)

Adds @controller to @widget so that it will receive events.

Link copied to clipboard
open fun addCssClass(cssClass: String)

Adds a style class to @widget.

Link copied to clipboard
open fun addMnemonicLabel(label: Widget)

Adds a widget to the list of mnemonic labels for this widget.

Link copied to clipboard
open fun addTickCallback(callback: TickCallback): <Error class: unknown class>

Queues an animation frame update and adds a callback to be called before each frame.

Link copied to clipboard
open fun allocate(width: <Error class: unknown class>, height: <Error class: unknown class>, baseline: <Error class: unknown class>, transform: <Error class: unknown class>? = null)

This function is only used by GtkWidget subclasses, to assign a size, position and (optionally) baseline to their child widgets.

Link copied to clipboard
open fun announce(message: String, priority: AccessibleAnnouncementPriority)

Requests the user's screen reader to announce the given message.

Link copied to clipboard
open fun appendColumn(column: TreeViewColumn): <Error class: unknown class>

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.

Link copied to clipboard
open fun childFocus(direction: DirectionType): Boolean

Called by widgets as the user moves around the window using keyboard shortcuts.

Link copied to clipboard
open fun collapseAll()

Recursively collapses all visible, expanded nodes in @tree_view.

Link copied to clipboard
open fun collapseRow(path: TreePath): Boolean

Collapses a row (hides its child rows, if they exist).

Link copied to clipboard
open fun columnsAutosize()

Resizes all columns to their optimal width. Only works after the treeview has been realized.

Link copied to clipboard
open fun computeBounds(target: Widget, outBounds: <Error class: unknown class>): Boolean

Computes the bounds for @widget in the coordinate space of @target.

Link copied to clipboard
open fun computeExpand(orientation: Orientation): Boolean

Computes whether a container should give this widget extra space when possible.

Link copied to clipboard
open fun computePoint(target: Widget, point: <Error class: unknown class>, outPoint: <Error class: unknown class>): Boolean

Translates the given @point in @widget's coordinates to coordinates relative to @target’s coordinate system.

Link copied to clipboard
open fun computeTransform(target: Widget, outTransform: <Error class: unknown class>): Boolean

Computes a matrix suitable to describe a transformation from

Link copied to clipboard
fun connectColumnsChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

The number of columns of the treeview has changed.

Link copied to clipboard
fun connectCursorChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

The position of the cursor (focused cell) has changed.

Link copied to clipboard
fun connectDestroy(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Signals that all holders of a reference to the widget should release the reference that they hold.

Link copied to clipboard
fun connectDirectionChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (previousDirection: TextDirection) -> Unit): <Error class: unknown class>

Emitted when the text direction of a widget changes.

Link copied to clipboard
fun connectExpandCollapseCursorRow(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (object: Boolean, p0: Boolean, p1: Boolean) -> Boolean): <Error class: unknown class>
Link copied to clipboard
fun connectHide(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when @widget is hidden.

Link copied to clipboard
fun connectKeynavFailed(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (direction: DirectionType) -> Boolean): <Error class: unknown class>

Emitted if keyboard navigation fails.

Link copied to clipboard
fun connectMap(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when @widget is going to be mapped.

Link copied to clipboard
fun connectMnemonicActivate(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (groupCycling: Boolean) -> Boolean): <Error class: unknown class>

Emitted when a widget is activated via a mnemonic.

Link copied to clipboard
fun connectMoveCursor(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (step: MovementStep, <Error class: unknown class>, extend: Boolean, modify: Boolean) -> Boolean): <Error class: unknown class>

The GtkTreeView::move-cursor signal is a class@Gtk.SignalAction which gets emitted when the user presses one of the cursor keys.

Link copied to clipboard
fun connectMoveFocus(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (direction: DirectionType) -> Unit): <Error class: unknown class>

Emitted when the focus is moved.

Link copied to clipboard
fun connectQueryTooltip(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, <Error class: unknown class>, keyboardMode: Boolean, tooltip: Tooltip) -> Boolean): <Error class: unknown class>

Emitted when the widget’s tooltip is about to be shown.

Link copied to clipboard
fun connectRealize(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when @widget is associated with a GdkSurface.

Link copied to clipboard
fun connectRowActivated(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (path: TreePath, column: TreeViewColumn?) -> Unit): <Error class: unknown class>

The "row-activated" signal is emitted when the method method@Gtk.TreeView.row_activated is called.

Link copied to clipboard
fun connectRowCollapsed(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (iter: TreeIter, path: TreePath) -> Unit): <Error class: unknown class>

The given row has been collapsed (child nodes are hidden).

Link copied to clipboard
fun connectRowExpanded(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (iter: TreeIter, path: TreePath) -> Unit): <Error class: unknown class>

The given row has been expanded (child nodes are shown).

Link copied to clipboard
fun connectSelectAll(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Boolean): <Error class: unknown class>
Link copied to clipboard
fun connectSelectCursorParent(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Boolean): <Error class: unknown class>
Link copied to clipboard
fun connectSelectCursorRow(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (object: Boolean) -> Boolean): <Error class: unknown class>
Link copied to clipboard
fun connectShow(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when @widget is shown.

Link copied to clipboard
fun connectStartInteractiveSearch(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Boolean): <Error class: unknown class>
Link copied to clipboard
fun connectStateFlagsChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (flags: StateFlags) -> Unit): <Error class: unknown class>

Emitted when the widget state changes.

Link copied to clipboard
fun connectTestCollapseRow(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (iter: TreeIter, path: TreePath) -> Boolean): <Error class: unknown class>

The given row is about to be collapsed (hide its children nodes). Use this signal if you need to control the collapsibility of individual rows.

Link copied to clipboard
fun connectTestExpandRow(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (iter: TreeIter, path: TreePath) -> Boolean): <Error class: unknown class>

The given row is about to be expanded (show its children nodes). Use this signal if you need to control the expandability of individual rows.

Link copied to clipboard
fun connectToggleCursorRow(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Boolean): <Error class: unknown class>
Link copied to clipboard
fun connectUnmap(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when @widget is going to be unmapped.

Link copied to clipboard
fun connectUnrealize(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the GdkSurface associated with @widget is destroyed.

Link copied to clipboard
fun connectUnselectAll(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Boolean): <Error class: unknown class>
Link copied to clipboard
open fun contains(x: <Error class: unknown class>, y: <Error class: unknown class>): Boolean

Tests if the point at (@x, @y) is contained in @widget.

Link copied to clipboard
open fun createPangoContext(): <Error class: unknown class>

Creates a new PangoContext with the appropriate font map, font options, font description, and base direction for drawing text for this widget.

Link copied to clipboard
open fun createPangoLayout(text: String? = null): <Error class: unknown class>

Creates a new PangoLayout with the appropriate font map, font description, and base direction for drawing text for this widget.

Link copied to clipboard
open fun createRowDragIcon(path: TreePath): <Error class: unknown class>?

Creates a cairo_surface_t representation of the row at @path. This image is used for a drag icon.

Link copied to clipboard
open fun disposeTemplate(widgetType: <Error class: unknown class>)

Clears the template children for the given widget.

Link copied to clipboard
open fun dragCheckThreshold(startX: <Error class: unknown class>, startY: <Error class: unknown class>, currentX: <Error class: unknown class>, currentY: <Error class: unknown class>): Boolean

Checks to see if a drag movement has passed the GTK drag threshold.

Link copied to clipboard
open fun enableModelDragDest(formats: <Error class: unknown class>, actions: <Error class: unknown class>)

Turns @tree_view into a drop destination for automatic DND. Calling this method sets GtkTreeView:reorderable to false.

Link copied to clipboard
open fun enableModelDragSource(startButtonMask: <Error class: unknown class>, formats: <Error class: unknown class>, actions: <Error class: unknown class>)

Turns @tree_view into a drag source for automatic DND. Calling this method sets GtkTreeView:reorderable to false.

Link copied to clipboard
open fun errorBell()

Notifies the user about an input-related error on this widget.

Link copied to clipboard
open fun expandAll()

Recursively expands all nodes in the @tree_view.

Link copied to clipboard
open fun expandRow(path: TreePath, openAll: Boolean): Boolean

Opens the row so its children are visible.

Link copied to clipboard
open fun expandToPath(path: TreePath)

Expands the row at @path. This will also expand all parent rows of

Link copied to clipboard

Retrieves the accessible parent for an accessible object.

Link copied to clipboard

Retrieves the accessible role of an accessible object.

Link copied to clipboard
open fun getAllocatedBaseline(): <Error class: unknown class>

Returns the baseline that has currently been allocated to @widget.

Link copied to clipboard
open fun getAllocatedHeight(): <Error class: unknown class>

Returns the height that has currently been allocated to @widget.

Link copied to clipboard
open fun getAllocatedWidth(): <Error class: unknown class>

Returns the width that has currently been allocated to @widget.

Link copied to clipboard
open fun getAncestor(widgetType: <Error class: unknown class>): Widget?

Gets the first ancestor of @widget with type @widget_type.

Link copied to clipboard

Retrieves the accessible implementation for the given GtkAccessible.

Link copied to clipboard
open fun getBackgroundArea(path: TreePath? = null, column: TreeViewColumn? = null, rect: <Error class: unknown class>)

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

Link copied to clipboard
open fun getBaseline(): <Error class: unknown class>

Returns the baseline that has currently been allocated to @widget.

Link copied to clipboard
open fun getBorder(border: Border): Boolean

Returns the size of a non-scrolling border around the outside of the scrollable.

Link copied to clipboard
open fun getBuildableId(): String?

Gets the ID of the @buildable object.

Link copied to clipboard
open fun getCellArea(path: TreePath? = null, column: TreeViewColumn? = null, rect: <Error class: unknown class>)

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.

Link copied to clipboard

Gets the value set with gtk_widget_set_child_visible().

Link copied to clipboard
open fun getClipboard(): <Error class: unknown class>

Gets the clipboard object for @widget.

Link copied to clipboard
open fun getColor(color: <Error class: unknown class>)

Gets the current foreground color for the widget’s CSS style.

Link copied to clipboard
open fun getColumn(n: <Error class: unknown class>): TreeViewColumn?

Gets the GtkTreeViewColumn at the given position in the #tree_view.

Link copied to clipboard
open fun getColumns(): <Error class: unknown class>

Returns a GList of all the GtkTreeViewColumns currently in @tree_view. The returned list must be freed with g_list_free ().

Link copied to clipboard

Gets the reading direction for a particular widget.

Link copied to clipboard
open fun getDisplay(): <Error class: unknown class>

Get the GdkDisplay for the toplevel window associated with this widget.

Link copied to clipboard

Retrieves the first accessible child of an accessible object.

Link copied to clipboard
open fun getFirstChild(): Widget?

Returns the widget’s first child.

Link copied to clipboard
open fun getFocusChild(): Widget?

Returns the current focus child of @widget.

Link copied to clipboard
open fun getFontMap(): <Error class: unknown class>?

Gets the font map of @widget.

Link copied to clipboard
open fun getFrameClock(): <Error class: unknown class>?

Obtains the frame clock for a widget.

Link copied to clipboard

Returns which grid lines are enabled in @tree_view.

Link copied to clipboard

Retrieves the GtkAdjustment used for horizontal scrolling.

Link copied to clipboard
open fun getHeight(): <Error class: unknown class>

Returns the content height of the widget.

Link copied to clipboard

Gets the horizontal GtkScrollablePolicy.

Link copied to clipboard
open fun getLastChild(): Widget?

Returns the widget’s last child.

Link copied to clipboard
open fun getMapped(): Boolean

Whether the widget is mapped.

Link copied to clipboard
open fun getNative(): Native?

Returns the nearest GtkNative ancestor of @widget.

Link copied to clipboard
open fun getNColumns(): <Error class: unknown class>

Queries the number of columns in the given @tree_view.

Link copied to clipboard

Retrieves the next accessible sibling of an accessible object

Link copied to clipboard
open fun getNextSibling(): Widget?

Returns the widget’s next sibling.

Link copied to clipboard
open fun getPangoContext(): <Error class: unknown class>

Gets a PangoContext with the appropriate font map, font description, and base direction for this widget.

Link copied to clipboard

Query a platform state, such as focus.

Link copied to clipboard
open fun getPreferredSize(minimumSize: Requisition?, naturalSize: Requisition?)

Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management.

Link copied to clipboard
open fun getPrevSibling(): Widget?

Returns the widget’s previous sibling.

Link copied to clipboard
open fun getPrimaryClipboard(): <Error class: unknown class>

Gets the primary clipboard of @widget.

Link copied to clipboard
open fun getRealized(): Boolean

Determines whether @widget is realized.

Link copied to clipboard

Gets whether the widget prefers a height-for-width layout or a width-for-height layout.

Link copied to clipboard

Returns the GtkEntry which is currently in use as interactive search entry for @tree_view. In case the built-in entry is being used, null will be returned.

Link copied to clipboard

Gets the GtkTreeSelection associated with @tree_view.

Link copied to clipboard
open fun getSensitive(): Boolean

Returns the widget’s sensitivity.

Link copied to clipboard
open fun getSettings(): Settings

Gets the settings object holding the settings used for this widget.

Link copied to clipboard
open fun getSize(orientation: Orientation): <Error class: unknown class>

Returns the content width or height of the widget.

Link copied to clipboard

Returns the widget state as a flag set.

Link copied to clipboard

Returns the style context associated to @widget.

Link copied to clipboard
open fun getTemplateChild(widgetType: <Error class: unknown class>, name: String): <Error class: unknown class>

Fetch an object build from the template XML for @widget_type in this @widget instance.

Link copied to clipboard

Retrieves the GtkAdjustment used for vertical scrolling.

Link copied to clipboard
open fun getVisible(): Boolean

Determines whether the widget is visible.

Link copied to clipboard
open fun getVisibleRect(visibleRect: <Error class: unknown class>)

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.

Link copied to clipboard

Gets the vertical GtkScrollablePolicy.

Link copied to clipboard
open fun getWidth(): <Error class: unknown class>

Returns the content width of the widget.

Link copied to clipboard
open fun grabFocus(): Boolean

Causes @widget to have the keyboard focus for the GtkWindow it's inside.

Link copied to clipboard
open fun hasCssClass(cssClass: String): Boolean

Returns whether @css_class is currently applied to @widget.

Link copied to clipboard
open fun hasDefault(): Boolean

Determines whether @widget is the current default widget within its toplevel.

Link copied to clipboard
open fun hasFocus(): Boolean

Determines if the widget has the global input focus.

Link copied to clipboard

Determines if the widget should show a visible indication that it has the global input focus.

Link copied to clipboard
open fun hide()

Reverses the effects of gtk_widget_show().

Link copied to clipboard

Returns whether the widget is currently being destroyed.

Link copied to clipboard
open fun initTemplate()

Creates and initializes child widgets defined in templates.

Link copied to clipboard
open fun insertActionGroup(name: String, group: <Error class: unknown class>? = null)

Inserts @group into @widget.

Link copied to clipboard
open fun insertAfter(parent: Widget, previousSibling: Widget? = null)

Inserts @widget into the child widget list of @parent.

Link copied to clipboard
open fun insertBefore(parent: Widget, nextSibling: Widget? = null)

Inserts @widget into the child widget list of @parent.

Link copied to clipboard
open fun insertColumn(column: TreeViewColumn, position: <Error class: unknown class>): <Error class: unknown class>

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.

Link copied to clipboard
open fun insertColumnWithDataFunc(position: <Error class: unknown class>, title: String, cell: CellRenderer, func: TreeCellDataFunc): <Error class: unknown class>

Convenience function that inserts a new column into the GtkTreeView with the given cell renderer and a GtkTreeCellDataFunc 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.

Link copied to clipboard
open fun isAncestor(ancestor: Widget): Boolean

Determines whether @widget is somewhere inside @ancestor, possibly with intermediate containers.

Link copied to clipboard
open fun isDrawable(): Boolean

Determines whether @widget can be drawn to.

Link copied to clipboard
open fun isFocus(): Boolean

Determines if the widget is the focus widget within its toplevel.

Link copied to clipboard

Returns whether a rubber banding operation is currently being done in @tree_view.

Link copied to clipboard
open fun isSensitive(): Boolean

Returns the widget’s effective sensitivity.

Link copied to clipboard
open fun isVisible(): Boolean

Determines whether the widget and all its parents are marked as visible.

Link copied to clipboard
open fun keynavFailed(direction: DirectionType): Boolean

Emits the ::keynav-failed signal on the widget.

Link copied to clipboard
open fun listMnemonicLabels(): <Error class: unknown class>

Returns the widgets for which this widget is the target of a mnemonic.

Link copied to clipboard
open fun map()

Causes a widget to be mapped if it isn’t already.

Link copied to clipboard

Calls @func on all expanded rows.

Link copied to clipboard
open fun mnemonicActivate(groupCycling: Boolean): Boolean

Emits the ::mnemonic-activate signal.

Link copied to clipboard
open fun moveColumnAfter(column: TreeViewColumn, baseColumn: TreeViewColumn? = null)

Moves @column to be after to @base_column. If @base_column is null, then

Link copied to clipboard
open fun observeChildren(): <Error class: unknown class>

Returns a GListModel to track the children of @widget.

Link copied to clipboard
open fun observeControllers(): <Error class: unknown class>

Returns a GListModel to track the class@Gtk.EventControllers of @widget.

Link copied to clipboard
open fun pick(x: <Error class: unknown class>, y: <Error class: unknown class>, flags: PickFlags): Widget?

Finds the descendant of @widget closest to the point (@x, @y).

Link copied to clipboard
open fun queueAllocate()

Flags the widget for a rerun of the vfunc@Gtk.Widget.size_allocate function.

Link copied to clipboard
open fun queueDraw()

Schedules this widget to be redrawn in the paint phase of the current or the next frame.

Link copied to clipboard
open fun queueResize()

Flags a widget to have its size renegotiated.

Link copied to clipboard
open fun realize()

Creates the GDK resources associated with a widget.

Link copied to clipboard
open fun removeColumn(column: TreeViewColumn): <Error class: unknown class>

Removes @column from @tree_view.

Link copied to clipboard
open fun removeController(controller: EventController)

Removes @controller from @widget, so that it doesn't process events anymore.

Link copied to clipboard
open fun removeCssClass(cssClass: String)

Removes a style from @widget.

Link copied to clipboard
open fun removeMnemonicLabel(label: Widget)

Removes a widget from the list of mnemonic labels for this widget.

Link copied to clipboard
open fun removeTickCallback(id: <Error class: unknown class>)

Removes a tick callback previously registered with gtk_widget_add_tick_callback().

Link copied to clipboard
open fun resetProperty(property: AccessibleProperty)

Resets the accessible @property to its default value.

Link copied to clipboard
open fun resetRelation(relation: AccessibleRelation)

Resets the accessible @relation to its default value.

Link copied to clipboard
open fun resetState(state: AccessibleState)

Resets the accessible @state to its default value.

Link copied to clipboard
open fun rowActivated(path: TreePath, column: TreeViewColumn? = null)

Activates the cell determined by @path and @column.

Link copied to clipboard
open fun rowExpanded(path: TreePath): Boolean

Returns true if the node pointed to by @path is expanded in @tree_view.

Link copied to clipboard
open fun scrollToCell(path: TreePath? = null, column: TreeViewColumn? = null, useAlign: Boolean, rowAlign: <Error class: unknown class>, colAlign: <Error class: unknown class>)

Moves the alignments of @tree_view to the position specified by @column and

Link copied to clipboard
open fun scrollToPoint(treeX: <Error class: unknown class>, treeY: <Error class: unknown class>)

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().

Link copied to clipboard
open fun setAccessibleParent(parent: Accessible? = null, nextSibling: Accessible? = null)

Sets the parent and sibling of an accessible object.

Link copied to clipboard
open fun setChildVisible(childVisible: Boolean)

Sets whether @widget should be mapped along with its parent.

Link copied to clipboard

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 GtkTreeViewColumn being dragged, the two GtkTreeViewColumns determining the drop spot, and

Link copied to clipboard
open fun setCursor(path: TreePath, focusColumn: TreeViewColumn? = null, startEditing: Boolean)

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

Link copied to clipboard
open fun setCursorFromName(name: String? = null)

Sets a named cursor to be shown when pointer devices point towards @widget.

Link copied to clipboard
open fun setCursorOnCell(path: TreePath, focusColumn: TreeViewColumn? = null, focusCell: CellRenderer? = null, startEditing: Boolean)

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

Link copied to clipboard

Sets the reading direction on a particular widget.

Link copied to clipboard
open fun setDragDestRow(path: TreePath? = null, pos: TreeViewDropPosition)

Sets the row that is highlighted for feedback. If @path is null, an existing highlight is removed.

Link copied to clipboard
open fun setFocusChild(child: Widget? = null)

Set @child as the current focus child of @widget.

Link copied to clipboard
open fun setFontMap(fontMap: <Error class: unknown class>? = null)

Sets the font map to use for Pango rendering.

Link copied to clipboard
open fun setGridLines(gridLines: TreeViewGridLines)

Sets which grid lines to draw in @tree_view.

Link copied to clipboard
open fun setHadjustment(hadjustment: Adjustment? = null)

Sets the horizontal adjustment of the GtkScrollable.

Link copied to clipboard

Sets the GtkScrollablePolicy.

Link copied to clipboard

Set all margins to the same value.

fun Widget.setMargins(horizontal: Int = 0, vertical: Int = 0)

Set start and end margin to horizontal and top and bottom margin to vertical

fun Widget.setMargins(start: Int = 0, top: Int = 0, end: Int = 0, bottom: Int = 0)

Set margins.

Link copied to clipboard
open fun setParent(parent: Widget)

Sets @parent as the parent widget of @widget.

Link copied to clipboard

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.

Link copied to clipboard
open fun setSearchEntry(entry: Editable? = null)

Sets the entry which the interactive search code will use for this

Link copied to clipboard
open fun setSearchEqualFunc(searchEqualFunc: TreeViewSearchEqualFunc)

Sets the compare function for the interactive search capabilities; note that somewhat like strcmp() returning 0 for equality GtkTreeViewSearchEqualFunc returns false on matches.

Link copied to clipboard
open fun setSensitive(sensitive: Boolean)

Sets the sensitivity of a widget.

Link copied to clipboard
open fun setSizeRequest(width: <Error class: unknown class>, height: <Error class: unknown class>)

Sets the minimum size of a widget.

Link copied to clipboard
open fun setStateFlags(flags: StateFlags, clear: Boolean)

Turns on flag values in the current widget state.

Link copied to clipboard
open fun setTooltipCell(tooltip: Tooltip, path: TreePath? = null, column: TreeViewColumn? = null, cell: CellRenderer? = null)

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().

Link copied to clipboard
open fun setTooltipRow(tooltip: Tooltip, path: TreePath)

Sets the tip area of @tooltip to be the area covered by the row at @path. See also gtk_tree_view_set_tooltip_column() for a simpler alternative. See also gtk_tooltip_set_tip_area().

Link copied to clipboard
open fun setVadjustment(vadjustment: Adjustment? = null)

Sets the vertical adjustment of the GtkScrollable.

Link copied to clipboard
open fun setVisible(visible: Boolean)

Sets the visibility state of @widget.

Link copied to clipboard

Sets the GtkScrollablePolicy.

Link copied to clipboard
open fun shouldLayout(): Boolean

Returns whether @widget should contribute to the measuring and allocation of its parent.

Link copied to clipboard
open fun show()

Flags a widget to be displayed.

Link copied to clipboard

Triggers a tooltip query on the display where the toplevel of @widget is located.

Link copied to clipboard
open fun unmap()

Causes a widget to be unmapped if it’s currently mapped.

Link copied to clipboard
open fun unparent()

Dissociate @widget from its parent.

Link copied to clipboard
open fun unrealize()

Causes a widget to be unrealized (frees all GDK resources associated with the widget).

Link copied to clipboard

Undoes the effect of gtk_tree_view_enable_model_drag_dest(). Calling this method sets GtkTreeView:reorderable to false.

Link copied to clipboard

Undoes the effect of gtk_tree_view_enable_model_drag_source(). Calling this method sets GtkTreeView:reorderable to false.

Link copied to clipboard
open fun unsetStateFlags(flags: StateFlags)

Turns off flag values for the current widget state.

Link copied to clipboard
open fun updateNextAccessibleSibling(newSibling: Accessible? = null)

Updates the next accessible sibling of @self.