Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ColumnViewColumnMeta

[471:14] static extends: object

Generated metadata helpers for ColumnViewColumn class surfaces.

Methods

  • properties ()

    Returns property metadata for ColumnViewColumn.

    • @r A list.

class: ColumnViewColumn

[18:7] extends: object

Represents the columns in a GtkColumnView. The main ingredient for a GtkColumnViewColumn is the GtkListItemFactory that tells the columnview how to create cells for this column from items in the model. Columns have a title, and can optionally have a header menu set with [method@Gtk.ColumnViewColumn.set_header_menu]. A sorter can be associated with a column using [method@Gtk.ColumnViewColumn.set_sorter], to let users influence sorting by clicking on the column header.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ColumnViewColumn (title = null, factory = null)

    Creates a new GtkColumnViewColumn that uses the given @factory for mapping items to widgets. You most likely want to call [method@Gtk.ColumnView.append_column] next. The function takes ownership of the argument, so you can write code like: c column = gtk_column_view_column_new (_("Name"), gtk_builder_list_item_factory_new_from_resource ("/name.ui"));

    • @p title is Title to use for this column.
    • @p factory is The factory to populate items with.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setExpand (bool Value)

    Column gets share of extra width allocated to the view.

    • @p Value is the new property value.
    • @r None.
  • setFactory (object Value)

    Factory for populating list items. The factory must be for configuring [class@Gtk.ColumnViewCell] objects.

    • @p Value is the new property value.
    • @r None.
  • setFixedwidth (int Value)

    If not -1, this is the width that the column is allocated, regardless of the size of its content.

    • @p Value is the new property value.
    • @r None.
  • setHeadermenu (object Value)

    Menu model used to create the context menu for the column header.

    • @p Value is the new property value.
    • @r None.
  • setId (string Value)

    An ID for the column. GTK is not currently using the ID for anything, but it can be used by applications when saving column view configurations. It is up to applications to ensure uniqueness of IDs.

    • @p Value is the new property value.
    • @r None.
  • setResizable (bool Value)

    Whether this column is resizable.

    • @p Value is the new property value.
    • @r None.
  • setSorter (object Value)

    Sorter for sorting items according to this column.

    • @p Value is the new property value.
    • @r None.
  • setTitle (string Value)

    Title displayed in the header.

    • @p Value is the new property value.
    • @r None.
  • setVisible (bool Value)

    Whether this column is visible.

    • @p Value is the new property value.
    • @r None.
  • get_column_view ()

    Gets the column view that's currently displaying this column. If @self has not been added to a column view yet, NULL is returned.

  • get_expand ()

    Returns whether this column should expand.

  • get_factory ()

    Gets the factory that's currently used to populate list items for this column.

  • get_fixed_width ()

    Gets the fixed width of the column.

  • get_header_menu ()

    Gets the menu model that is used to create the context menu for the column header.

  • get_id ()

    Returns the ID set with [method@Gtk.ColumnViewColumn.set_id].

  • get_resizable ()

    Returns whether this column is resizable.

  • get_sorter ()

    Returns the sorter that is associated with the column.

  • get_title ()

    Returns the title set with [method@Gtk.ColumnViewColumn.set_title].

  • get_visible ()

    Returns whether this column is visible.

  • set_expand (bool expand)

    Sets the column to take available extra space. The extra space is shared equally amongst all columns that have are set to expand.

    • @p expand is whether this column should expand to fill available space.
    • @r None.
  • set_factory (object factory)

    Sets the GtkListItemFactory to use for populating list items for this column.

    • @p factory is the factory to use.
    • @r None.
  • set_fixed_width (int fixed_width)

    Sets the fixed width of the column. If @fixed_width is -1, the fixed width of the column is unset. Setting a fixed width overrides the automatically calculated width. Interactive resizing also sets the “fixed-width” property.

    • @p fixed_width is the new fixed width, or -1.
    • @r None.
  • set_header_menu (object menu)

    Sets the menu model that is used to create the context menu for the column header.

    • @p menu is a GMenuModel.
    • @r None.
  • set_id (string id)

    Sets the id of this column. GTK makes no use of this, but applications can use it when storing column view configuration. It is up to callers to ensure uniqueness of IDs.

    • @p id is ID to use for this column.
    • @r None.
  • set_resizable (bool resizable)

    Sets whether this column should be resizable by dragging.

    • @p resizable is whether this column should be resizable.
    • @r None.
  • set_sorter (object sorter)

    Associates a sorter with the column. If @sorter is unset, the column will not let users change the sorting by clicking on its header. This sorter can be made active by clicking on the column header, or by calling [method@Gtk.ColumnView.sort_by_column]. See [method@Gtk.ColumnView.get_sorter] for the necessary steps for setting up customizable sorting for [class@Gtk.ColumnView].

    • @p sorter is the GtkSorter to associate with @column.
    • @r None.
  • set_title (string title)

    Sets the title of this column. The title is displayed in the header of a GtkColumnView for this column and is therefore user-facing text that should be translated.

    • @p title is Title to use for this column.
    • @r None.
  • set_visible (bool visible)

    Sets whether this column should be visible in views.

    • @p visible is whether this column should be visible.
    • @r None.