package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Tree_view_column/index.html
Module Wrappers.Tree_view_column
type t = [ `tree_view_column | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new TreeViewColumn
val new_with_area :
[ `cell_area | `initially_unowned | `object_ ] Gobject.obj ->
tCreate a new TreeViewColumn
val set_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the widget in the header to be @widget. If widget is %NULL, then the header button is set with a `GtkLabel` set to the title of @tree_column.
val set_visible : t -> bool -> unitSets the visibility of @tree_column.
val set_title : t -> string -> unitSets the title of the @tree_column. If a custom widget has been set, then this value is ignored.
val set_spacing : t -> int -> unitSets the spacing field of @tree_column, which is the number of pixels to place between cell renderers packed into it.
val set_sort_order : t -> Gtk_enums.sorttype -> unitChanges the appearance of the sort indicator.
This does not actually sort the model. Use gtk_tree_view_column_set_sort_column_id() if you want automatic sorting support. This function is primarily for custom sorting behavior, and should be used in conjunction with gtk_tree_sortable_set_sort_column_id() to do that. For custom models, the mechanism will vary.
The sort indicator changes direction to indicate normal sort or reverse sort. Note that you must have the sort indicator enabled to see anything when calling this function; see gtk_tree_view_column_set_sort_indicator().
val set_sort_indicator : t -> bool -> unitCall this function with a @setting of %TRUE to display an arrow in the header button indicating the column is sorted. Call gtk_tree_view_column_set_sort_order() to change the direction of the arrow.
val set_sort_column_id : t -> int -> unitSets the logical @sort_column_id that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable.
val set_sizing : t -> Gtk_enums.treeviewcolumnsizing -> unitSets the growth behavior of @tree_column to @type.
val set_resizable : t -> bool -> unitIf @resizable is %TRUE, then the user can explicitly resize the column by grabbing the outer edge of the column button.
If resizable is %TRUE and sizing mode of the column is %GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing mode is changed to %GTK_TREE_VIEW_COLUMN_GROW_ONLY.
val set_reorderable : t -> bool -> unitIf @reorderable is %TRUE, then the column can be reordered by the end user dragging the header.
val set_min_width : t -> int -> unitSets the minimum width of the @tree_column. If @min_width is -1, then the minimum width is unset.
val set_max_width : t -> int -> unitSets the maximum width of the @tree_column. If @max_width is -1, then the maximum width is unset. Note, the column can actually be wider than max width if it’s the last column in a view. In this case, the column expands to fill any extra space.
val set_fixed_width : t -> int -> unitIf @fixed_width is not -1, sets the fixed width of @tree_column; otherwise unsets it. The effective value of @fixed_width is clamped between the minimum and maximum width of the column; however, the value stored in the “fixed-width” property is not clamped. If the column sizing is %GTK_TREE_VIEW_COLUMN_GROW_ONLY or %GTK_TREE_VIEW_COLUMN_AUTOSIZE, setting a fixed width overrides the automatically calculated width. Note that @fixed_width is only a hint to GTK; the width actually allocated to the column may be greater or less than requested.
Along with “expand”, the “fixed-width” property changes when the column is resized by the user.
val set_expand : t -> bool -> unitSets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to %TRUE. If no column has this option set, then the last column gets all extra space. By default, every column is created with this %FALSE.
Along with “fixed-width”, the “expand” property changes when the column is resized by the user.
val set_clickable : t -> bool -> unitSets the header to be active if @clickable is %TRUE. When the header is active, then it can take keyboard focus, and can be clicked.
val set_alignment : t -> float -> unitSets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -- 0.0 for left, 0.5 for center, 1.0 for right.
val queue_resize : t -> unitFlags the column, and the cell renderers added to this column, to have their sizes renegotiated.
val pack_start :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
bool ->
unitPacks the @cell into the beginning of the column. If @expand is %FALSE, then the @cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which @expand is %TRUE.
val pack_end :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
bool ->
unitAdds the @cell to end of the column. If @expand is %FALSE, then the @cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which @expand is %TRUE.
val get_x_offset : t -> intReturns the current X offset of @tree_column in pixels.
val get_width : t -> intReturns the current size of @tree_column in pixels.
val get_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionReturns the `GtkWidget` in the button on the column header.
If a custom widget has not been set then %NULL is returned.
val get_visible : t -> boolReturns %TRUE if @tree_column is visible.
val get_tree_view :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionReturns the `GtkTreeView` wherein @tree_column has been inserted. If @column is currently not inserted in any tree view, %NULL is returned.
val get_title : t -> stringReturns the title of the widget.
val get_spacing : t -> intReturns the spacing of @tree_column.
val get_sort_order : t -> Gtk_enums.sorttypeGets the value set by gtk_tree_view_column_set_sort_order().
val get_sort_indicator : t -> boolGets the value set by gtk_tree_view_column_set_sort_indicator().
val get_sort_column_id : t -> intGets the logical @sort_column_id that the model sorts on when this column is selected for sorting.
See method@Gtk.TreeViewColumn.set_sort_column_id.
val get_sizing : t -> Gtk_enums.treeviewcolumnsizingReturns the current type of @tree_column.
val get_resizable : t -> boolReturns %TRUE if the @tree_column can be resized by the end user.
val get_reorderable : t -> boolReturns %TRUE if the @tree_column can be reordered by the user.
val get_min_width : t -> intReturns the minimum width in pixels of the @tree_column, or -1 if no minimum width is set.
val get_max_width : t -> intReturns the maximum width in pixels of the @tree_column, or -1 if no maximum width is set.
val get_fixed_width : t -> intGets the fixed width of the column. This may not be the actual displayed width of the column; for that, use gtk_tree_view_column_get_width().
val get_expand : t -> boolReturns %TRUE if the column expands to fill available space.
val get_clickable : t -> boolReturns %TRUE if the user can click on the header for the column.
val get_button : t -> [ `widget | `initially_unowned | `object_ ] Gobject.objReturns the button used in the treeview column header
val get_alignment : t -> floatReturns the current x alignment of @tree_column. This value can range between 0.0 and 1.0.
val focus_cell :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
unitSets the current keyboard focus to be at @cell, if the column contains 2 or more editable and activatable cells.
val clicked : t -> unitEmits the “clicked” signal on the column. This function will only work if @tree_column is clickable.
val clear_attributes :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
unitClears all existing attributes previously set with gtk_tree_view_column_set_attributes().
val clear : t -> unitUnsets all the mappings on all renderers on the @tree_column.
val cell_set_cell_data :
t ->
[ `tree_model ] Gobject.obj ->
[ `tree_iter ] Gobject.obj ->
bool ->
bool ->
unitSets the cell renderer based on the @tree_model and @iter. That is, for every attribute mapping in @tree_column, it will get a value from the set column on the @iter, and use that value to set the attribute on the cell renderer. This is used primarily by the `GtkTreeView`.
val cell_is_visible : t -> boolReturns %TRUE if any of the cells packed into the @tree_column are visible. For this to be meaningful, you must first initialize the cells with gtk_tree_view_column_cell_set_cell_data()
val cell_get_size : t -> int * int * int * intObtains the width and height needed to render the column. This is used primarily by the `GtkTreeView`.
val cell_get_position :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
bool * int * intObtains the horizontal position and size of a cell in a column.
If the cell is not found in the column, @start_pos and @width are not changed and %FALSE is returned.
val add_attribute :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
string ->
int ->
unitAdds an attribute mapping to the list in @tree_column.
The @column is the column of the model to get a value from, and the @attribute is the parameter on @cell_renderer to be set from the value. So for example if column 2 of the model contains strings, you could have the “text” attribute of a `GtkCellRendererText` get its values from column 2.
val get_cell_area :
t ->
[ `cell_area | `initially_unowned | `object_ ] Gobject.objGet property: cell-area
val on_clicked :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id