Add the Deprecated annotation to the type docblock.
* </data>
* </object>
* ```
+ *
+ * Deprecated: 4.10: Use [class@Gio.ListStore] instead
*/
* GtkTreeDragDest:
*
* Interface for Drag-and-Drop destinations in `GtkTreeView`.
+ *
+ * Deprecated: 4.10: List views use widgets to display their contents.
+ * You can use [class@Gtk.DropTarget] to implement a drop destination
*/
/**
* GtkTreeDragSource:
*
* Interface for Drag-and-Drop destinations in `GtkTreeView`.
+ *
+ * Deprecated: 4.10: List views use widgets to display their contents.
+ * You can use [class@Gtk.DragSource] to implement a drag source
*/
GType
NULL
};
- our_type = g_type_register_static (G_TYPE_INTERFACE,
+ our_type = g_type_register_static (G_TYPE_INTERFACE,
I_("GtkTreeDragSource"),
&our_info, 0);
}
-
+
return our_type;
}
our_type = g_type_register_static (G_TYPE_INTERFACE, I_("GtkTreeDragDest"), &our_info, 0);
}
-
+
return our_type;
}
* gtk_tree_drag_source_row_draggable:
* @drag_source: a `GtkTreeDragSource`
* @path: row on which user is initiating a drag
- *
+ *
* Asks the `GtkTreeDragSource` whether a particular row can be used as
* the source of a DND operation. If the source doesn’t implement
* this interface, the row is assumed draggable.
* gtk_tree_drag_source_drag_data_delete:
* @drag_source: a `GtkTreeDragSource`
* @path: row that was being dragged
- *
+ *
* Asks the `GtkTreeDragSource` to delete the row at @path, because
* it was moved somewhere else via drag-and-drop. Returns %FALSE
* if the deletion fails because @path no longer exists, or for
* some model-specific reason. Should robustly handle a @path no
* longer found in the model!
- *
+ *
* Returns: %TRUE if the row was successfully deleted
*
* Deprecated: 4.10: Use list models instead
* gtk_tree_drag_source_drag_data_get:
* @drag_source: a `GtkTreeDragSource`
* @path: row that was dragged
- *
+ *
* Asks the `GtkTreeDragSource` to return a `GdkContentProvider` representing
* the row at @path. Should robustly handle a @path no
* longer found in the model!
- *
+ *
* Returns: (nullable) (transfer full): a `GdkContentProvider` for the
* given @path
*
* @drag_dest: a `GtkTreeDragDest`
* @dest: row to drop in front of
* @value: data to drop
- *
+ *
* Asks the `GtkTreeDragDest` to insert a row before the path @dest,
* deriving the contents of the row from @value. If @dest is
* outside the tree so that inserting before it is impossible, %FALSE
* will be returned. Also, %FALSE may be returned if the new row is
* not created for some model-specific reason. Should robustly handle
* a @dest no longer found in the model!
- *
+ *
* Returns: whether a new row was created before position @dest
*
* Deprecated: 4.10: Use list models instead
* @drag_dest: a `GtkTreeDragDest`
* @dest_path: destination row
* @value: the data being dropped
- *
+ *
* Determines whether a drop is possible before the given @dest_path,
* at the same depth as @dest_path. i.e., can we drop the data in
* @value at that location. @dest_path does not have to
* exist; the return value will almost certainly be %FALSE if the
* parent of @dest_path doesn’t exist, though.
- *
+ *
* Returns: %TRUE if a drop is possible before @dest_path
*
* Deprecated: 4.10: Use list models instead
* gtk_tree_create_row_drag_content:
* @tree_model: a `GtkTreeModel`
* @path: a row in @tree_model
- *
+ *
* Creates a content provider for dragging @path from @tree_model.
- *
+ *
* Returns: (transfer full): a new `GdkContentProvider`
*
* Deprecated: 4.10: Use list models instead
char *path_str;
int len;
int struct_size;
-
+
g_return_val_if_fail (GTK_IS_TREE_MODEL (tree_model), FALSE);
g_return_val_if_fail (path != NULL, FALSE);
struct_size = sizeof (GtkTreeRowData) + len + 1 -
(sizeof (GtkTreeRowData) - G_STRUCT_OFFSET (GtkTreeRowData, path));
- trd = g_malloc (struct_size);
+ trd = g_malloc (struct_size);
strcpy (trd->path, path_str);
g_free (path_str);
-
+
trd->model = tree_model;
-
+
content = gdk_content_provider_new_typed (GTK_TYPE_TREE_ROW_DATA, trd);
g_free (trd);
-
+
return content;
}
* @value: a `GValue`
* @tree_model: (nullable) (optional) (transfer none) (out): a `GtkTreeModel`
* @path: (nullable) (optional) (out): row in @tree_model
- *
+ *
* Obtains a @tree_model and @path from value of target type
* %GTK_TYPE_TREE_ROW_DATA.
*
* The returned path must be freed with gtk_tree_path_free().
- *
+ *
* Returns: %TRUE if @selection_data had target type %GTK_TYPE_TREE_ROW_DATA
* is otherwise valid
*
GtkTreePath **path)
{
GtkTreeRowData *trd;
-
- g_return_val_if_fail (value != NULL, FALSE);
+
+ g_return_val_if_fail (value != NULL, FALSE);
if (tree_model)
*tree_model = NULL;
if (path)
*path = gtk_tree_path_new_from_string (trd->path);
-
+
return TRUE;
}
* required for levels in which nodes are referenced. For the root level
* however, signals must be emitted at all times (however the root level
* is always referenced when any view is attached).
+ *
+ * Deprecated: 4.10: Use [iface@Gio.ListModel] instead
*/
#define INITIALIZE_TREE_ITER(Iter) \
tree_model_signals[ROW_CHANGED] =
g_signal_new (I_("row-changed"),
GTK_TYPE_TREE_MODEL,
- G_SIGNAL_RUN_LAST,
+ G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkTreeModelIface, row_changed),
NULL, NULL,
_gtk_marshal_VOID__BOXED_BOXED,
*
* A `GtkTreeModelFilter` is a tree model which wraps another tree model,
* and can do the following things:
- *
+ *
* - Filter specific rows, based on data from a “visible column”, a column
* storing booleans indicating whether the row should be filtered or not,
* or based on the return value of a “visible function”, which gets a
* model, iter and user_data and returns a boolean indicating whether the
* row should be filtered or not.
- *
+ *
* - Modify the “appearance” of the model, using a modify function.
* This is extremely powerful and allows for just changing some
* values and also for creating a completely different model based
* because it does not implement reference counting, or for models that
* do implement reference counting, obtain references on these child levels
* yourself.
+ *
+ * Deprecated: 4.10: Use [class@Gtk.FilterListModel] instead.
*/
/* Notes on this implementation of GtkTreeModelFilter
gtk_tree_model_filter_free_level (filter, filter->priv->root, TRUE, TRUE, FALSE);
g_free (filter->priv->modify_types);
-
+
if (filter->priv->modify_destroy)
filter->priv->modify_destroy (filter->priv->modify_data);
* %FALSE otherwise.
*
* If the condition calculated by the function changes over time (e.g.
- * because it depends on some global parameters), you must call
+ * because it depends on some global parameters), you must call
* gtk_tree_model_filter_refilter() to keep the visibility information
* of the model up-to-date.
*
* types for this model (which will be exposed to the parent model/view).
* The @func, @data and @destroy parameters are for specifying the modify
* function. The modify function will get called for each
- * data access, the goal of the modify function is to return the data which
- * should be displayed at the location specified using the parameters of the
+ * data access, the goal of the modify function is to return the data which
+ * should be displayed at the location specified using the parameters of the
* modify function.
*
* Note that gtk_tree_model_filter_set_modify_func()
* g_free (modified_data);
* }
* ]|
+ *
+ * Deprecated: 4.10: Use [class@Gtk.SortListModel] instead
*/
if (priv->sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
{
GtkTreeDataSortHeader *header;
-
+
header = _gtk_tree_data_list_get_header (priv->sort_list,
priv->sort_column_id);
-
+
g_return_if_fail (header != NULL);
g_return_if_fail (header->func != NULL);
-
+
data->sort_func = header->func;
data->sort_data = header->data;
}
iter->stamp = 0;
g_return_val_if_fail (priv->child_model != NULL, FALSE);
- if (parent)
+ if (parent)
g_return_val_if_fail (VALID_ITER (parent, tree_model_sort), FALSE);
if (parent == NULL)
GtkTreeIter child_iter;
g_return_val_if_fail (priv->child_model != NULL, 0);
- if (iter)
+ if (iter)
g_return_val_if_fail (VALID_ITER (iter, tree_model_sort), 0);
if (iter == NULL)
/* We have this for the iter == parent case */
GtkTreeIter children;
- if (parent)
+ if (parent)
g_return_val_if_fail (VALID_ITER (parent, tree_model_sort), FALSE);
/* Use this instead of has_child to force us to build the level, if needed */
gtk_tree_model_sort_iter_parent (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *child)
-{
+{
GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model;
GtkTreeModelSortPrivate *priv = tree_model_sort->priv;
SortLevel *level;
if (priv->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID ||
priv->sort_column_id == GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
return FALSE;
-
+
return TRUE;
}
* @tree_model_sort: The `GtkTreeModelSort`.
* @child_model: (nullable): A `GtkTreeModel`
*
- * Sets the model of @tree_model_sort to be @model. If @model is %NULL,
- * then the old model is unset. The sort function is unset as a result
- * of this call. The model will be in an unsorted state until a sort
+ * Sets the model of @tree_model_sort to be @model. If @model is %NULL,
+ * then the old model is unset. The sort function is unset as a result
+ * of this call. The model will be in an unsorted state until a sort
* function is set.
*
* Deprecated: 4.10
* gtk_tree_model_sort_convert_child_path_to_path:
* @tree_model_sort: A `GtkTreeModelSort`
* @child_path: A `GtkTreePath` to convert
- *
+ *
* Converts @child_path to a path relative to @tree_model_sort. That is,
* @child_path points to a path in the child model. The returned path will
- * point to the same row in the sorted model. If @child_path isn’t a valid
+ * point to the same row in the sorted model. If @child_path isn’t a valid
* path on the child model, then %NULL is returned.
- *
+ *
* Returns: (nullable) (transfer full): A newly allocated `GtkTreePath`
*
* Deprecated: 4.10
* @tree_model_sort: A `GtkTreeModelSort`
* @sort_iter: (out): An uninitialized `GtkTreeIter`
* @child_iter: A valid `GtkTreeIter` pointing to a row on the child model
- *
+ *
* Sets @sort_iter to point to the row in @tree_model_sort that corresponds to
* the row pointed at by @child_iter. If @sort_iter was not set, %FALSE
* is returned. Note: a boolean is only returned since 2.14.
* gtk_tree_model_sort_convert_path_to_child_path:
* @tree_model_sort: A `GtkTreeModelSort`
* @sorted_path: A `GtkTreePath` to convert
- *
- * Converts @sorted_path to a path on the child model of @tree_model_sort.
- * That is, @sorted_path points to a location in @tree_model_sort. The
- * returned path will point to the same location in the model not being
- * sorted. If @sorted_path does not point to a location in the child model,
+ *
+ * Converts @sorted_path to a path on the child model of @tree_model_sort.
+ * That is, @sorted_path points to a location in @tree_model_sort. The
+ * returned path will point to the same location in the model not being
+ * sorted. If @sorted_path does not point to a location in the child model,
* %NULL is returned.
- *
+ *
* Returns: (nullable) (transfer full): A newly allocated `GtkTreePath`
*
* Deprecated: 4.10
gtk_tree_path_append_index (retval, elt->offset);
level = elt->children;
}
-
+
return retval;
}
* @tree_model_sort: A `GtkTreeModelSort`
* @child_iter: (out): An uninitialized `GtkTreeIter`
* @sorted_iter: A valid `GtkTreeIter` pointing to a row on @tree_model_sort.
- *
+ *
* Sets @child_iter to point to the row pointed to by @sorted_iter.
*
* Deprecated: 4.10
/**
* gtk_tree_model_sort_reset_default_sort_func:
* @tree_model_sort: A `GtkTreeModelSort`
- *
+ *
* This resets the default sort function to be in the “unsorted” state. That
* is, it is in the same order as the child model. It will re-sort the model
* to be in the same order as the child model only if the `GtkTreeModelSort`
/**
* gtk_tree_model_sort_clear_cache:
* @tree_model_sort: A `GtkTreeModelSort`
- *
+ *
* This function should almost never be called. It clears the @tree_model_sort
* of any cached iterators that haven’t been reffed with
* gtk_tree_model_ref_node(). This might be useful if the child model being
* Additionally, it may on occasion emit a `GtkTreeSelection`::changed signal
* when nothing has happened (mostly as a result of programmers calling
* select_row on an already selected row).
+ *
+ * Deprecated: 4.10: Use [iface@Gtk.SelectionModel] instead
*/
typedef struct _GtkTreeSelectionClass GtkTreeSelectionClass;
class->changed = NULL;
/* Properties */
-
+
/**
* GtkTreeSelection:mode:
*
/* Install all properties */
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
+
/* Signals */
-
+
/**
* GtkTreeSelection::changed:
* @treeselection: the object which received the signal.
anchor_path,
&tree,
&node);
-
+
if (node && GTK_TREE_RBNODE_FLAG_SET (node, GTK_TREE_RBNODE_IS_SELECTED))
selected = TRUE;
}
}
selection->type = type;
-
+
g_object_notify_by_pspec (G_OBJECT (selection), properties[PROP_MODE]);
}
/**
* gtk_tree_selection_get_tree_view:
* @selection: A `GtkTreeSelection`
- *
+ *
* Returns the tree view associated with @selection.
- *
+ *
* Returns: (transfer none): A `GtkTreeView`
*
* Deprecated: 4.10: Use GtkListView or GtkColumnView
{
gtk_tree_path_free (path);
- goto done;
+ goto done;
}
gtk_tree_path_up (path);
G_CALLBACK (model_changed),
&stop);
changed_id = g_signal_connect_swapped (selection->tree_view, "notify::model",
- G_CALLBACK (model_changed),
+ G_CALLBACK (model_changed),
&stop);
/* find the node internally */
* gtk_tree_selection_path_is_selected:
* @selection: A `GtkTreeSelection`.
* @path: A `GtkTreePath` to check selection on.
- *
+ *
* Returns %TRUE if the row pointed to by @path is currently selected. If @path
* does not point to a valid location, %FALSE is returned
- *
+ *
* Returns: %TRUE if @path is selected.
*
* Deprecated: 4.10: Use GtkListView or GtkColumnView
* gtk_tree_selection_iter_is_selected:
* @selection: A `GtkTreeSelection`
* @iter: A valid `GtkTreeIter`
- *
+ *
* Returns %TRUE if the row at @iter is currently selected.
- *
+ *
* Returns: %TRUE, if @iter is selected
*
* Deprecated: 4.10: Use GtkListView or GtkColumnView
if (_gtk_tree_view_get_rbtree (selection->tree_view) == NULL ||
gtk_tree_view_get_model (selection->tree_view) == NULL)
return;
-
+
if (gtk_tree_selection_real_unselect_all (selection))
g_signal_emit (selection, tree_selection_signals[CHANGED], 0);
}
* @end_path: The final node of the range.
*
* Selects a range of nodes, determined by @start_path and @end_path inclusive.
- * @selection must be set to %GTK_SELECTION_MULTIPLE mode.
+ * @selection must be set to %GTK_SELECTION_MULTIPLE mode.
*
* Deprecated: 4.10: Use GtkListView or GtkColumnView
**/
gtk_tree_path_free (anchor_path);
if (dirty)
- g_signal_emit (selection, tree_selection_signals[CHANGED], 0);
+ g_signal_emit (selection, tree_selection_signals[CHANGED], 0);
}
-void
+void
_gtk_tree_selection_emit_changed (GtkTreeSelection *selection)
{
- g_signal_emit (selection, tree_selection_signals[CHANGED], 0);
+ g_signal_emit (selection, tree_selection_signals[CHANGED], 0);
}
/* NOTE: Any {un,}selection ever done _MUST_ be done through this function!
* `GtkTreeSortable` is an interface to be implemented by tree models which
* support sorting. The `GtkTreeView` uses the methods provided by this interface
* to sort the model.
+ *
+ * Deprecated: 4.10: There is no replacement for this interface. You should
+ * use [class@Gtk.SortListModel] to wrap your list model instead
*/
/**
* gtk_tree_sortable_sort_column_changed:
* @sortable: A `GtkTreeSortable`
- *
+ *
* Emits a `GtkTreeSortable::sort-column-changed` signal on @sortable.
*
* Deprecated: 4.10
* @sortable: A `GtkTreeSortable`
* @sort_column_id: (out): The sort column id to be filled in
* @order: (out): The `GtkSortType` to be filled in
- *
+ *
* Fills in @sort_column_id and @order with the current sort column and the
- * order. It returns %TRUE unless the @sort_column_id is
- * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
+ * order. It returns %TRUE unless the @sort_column_id is
+ * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
* %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
- *
+ *
* Returns: %TRUE if the sort column is not one of the special sort
* column ids.
*
* @sortable: A `GtkTreeSortable`
* @sort_column_id: the sort column id to set
* @order: The sort order of the column
- *
+ *
* Sets the current sort column to be @sort_column_id. The @sortable will
* resort itself to reflect this change, after emitting a
* `GtkTreeSortable::sort-column-changed` signal. @sort_column_id may either be
* a regular column id, or one of the following special values:
- *
+ *
* - %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID: the default sort function
* will be used, if it is set
- *
+ *
* - %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID: no sorting will occur
*
* Deprecated: 4.10
g_return_if_fail (iface != NULL);
g_return_if_fail (iface->set_sort_column_id != NULL);
-
+
(* iface->set_sort_column_id) (sortable, sort_column_id, order);
}
* @sort_func: The comparison function
* @user_data: (closure): User data to pass to @sort_func
* @destroy: (nullable): Destroy notifier of @user_data
- *
+ *
* Sets the comparison function used when sorting to be @sort_func. If the
- * current sort column id of @sortable is the same as @sort_column_id, then
+ * current sort column id of @sortable is the same as @sort_column_id, then
* the model will sort using this function.
*
* Deprecated: 4.10
* @sort_func: The comparison function
* @user_data: (closure): User data to pass to @sort_func
* @destroy: (nullable): Destroy notifier of @user_data
- *
- * Sets the default comparison function used when sorting to be @sort_func.
+ *
+ * Sets the default comparison function used when sorting to be @sort_func.
* If the current sort column id of @sortable is
- * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using
+ * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using
* this function.
*
* If @sort_func is %NULL, then there will be no default comparison function.
* This means that once the model has been sorted, it can’t go back to the
- * default state. In this case, when the current sort column id of @sortable
+ * default state. In this case, when the current sort column id of @sortable
* is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
*
* Deprecated: 4.10
g_return_if_fail (iface != NULL);
g_return_if_fail (iface->set_default_sort_func != NULL);
-
+
(* iface->set_default_sort_func) (sortable, sort_func, user_data, destroy);
}
/**
* gtk_tree_sortable_has_default_sort_func:
* @sortable: A `GtkTreeSortable`
- *
+ *
* Returns %TRUE if the model has a default sort function. This is used
- * primarily by GtkTreeViewColumns in order to determine if a model can
+ * primarily by GtkTreeViewColumns in order to determine if a model can
* go back to the default state, or not.
- *
+ *
* Returns: %TRUE, if the model has a default sort function
*
* Deprecated: 4.10
g_return_val_if_fail (iface != NULL, FALSE);
g_return_val_if_fail (iface->has_default_sort_func != NULL, FALSE);
-
+
return (* iface->has_default_sort_func) (sortable);
}
* </columns>
* </object>
* ```
+ *
+ * Deprecated: 4.10: Use [class@Gtk.TreeListModel] instead
*/
struct _GtkTreeStorePrivate
* for an overview of all the objects and data types related to the tree widget and
* how they work together, and to the [class@Gtk.TreeView] documentation for specifics
* about the CSS node structure for treeviews and their headers.
+ *
+ * Deprecated: 4.10: Use [class@Gtk.ColumnView] and [class@Gtk.ColumnViewColumn]
+ * instead of [class@Gtk.TreeView] to show a tabular list
*/
};
-struct _GtkTreeViewColumnPrivate
+struct _GtkTreeViewColumnPrivate
{
GtkWidget *tree_view;
GtkWidget *button;
*
* The `GtkCellArea` used to layout cell renderers for this column.
*
- * If no area is specified when creating the tree view column with gtk_tree_view_column_new_with_area()
+ * If no area is specified when creating the tree view column with gtk_tree_view_column_new_with_area()
* a horizontally oriented `GtkCellAreaBox` will be used.
*/
tree_column_props[PROP_CELL_AREA] =
GtkTreeViewColumn *tree_column = (GtkTreeViewColumn *) object;
GtkTreeViewColumnPrivate *priv = tree_column->priv;
- /* Remove this column from its treeview,
+ /* Remove this column from its treeview,
* in case this column is destroyed before its treeview.
- */
+ */
if (priv->tree_view)
gtk_tree_view_remove_column (GTK_TREE_VIEW (priv->tree_view), tree_column);
-
+
if (priv->cell_area_context)
- {
+ {
g_signal_handler_disconnect (priv->cell_area_context,
priv->context_changed_signal);
gtk_tree_view_column_set_sort_order (tree_column,
g_value_get_enum (value));
break;
-
+
case PROP_SORT_COLUMN_ID:
gtk_tree_view_column_set_sort_column_id (tree_column,
g_value_get_int (value));
g_value_set_enum (value,
gtk_tree_view_column_get_sort_order (tree_column));
break;
-
+
case PROP_SORT_COLUMN_ID:
g_value_set_int (value,
gtk_tree_view_column_get_sort_column_id (tree_column));
case PROP_CELL_AREA:
g_value_set_object (value, tree_column->priv->cell_area);
break;
-
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
gtk_widget_hide (priv->button);
}
}
-
+
if (priv->reorderable || priv->clickable)
{
gtk_widget_set_focusable (priv->button, TRUE);
gtk_tree_view_column_set_sort_indicator (tree_column, TRUE);
gtk_tree_view_column_set_sort_order (tree_column, real_order);
}
- else
+ else
{
gtk_tree_view_column_set_sort_indicator (tree_column, FALSE);
}
/* Here we want the column re-requested if the underlying context was
* actually reset for any reason, this can happen if the underlying
* area/cell configuration changes (i.e. cell packing properties
- * or cell spacing and the like)
+ * or cell spacing and the like)
*
* Note that we block this handler while requesting for sizes
* so there is no need to check for the new context size being -1,
if (priv->tree_view)
{
path = gtk_tree_path_new_from_string (path_string);
-
+
_gtk_tree_view_add_editable (GTK_TREE_VIEW (priv->tree_view),
column,
path,
edit_widget,
cell_area);
-
+
gtk_tree_path_free (path);
}
}
/**
* gtk_tree_view_column_new:
- *
+ *
* Creates a new `GtkTreeViewColumn`.
- *
+ *
* Returns: A newly created `GtkTreeViewColumn`.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_new_with_area:
* @area: the `GtkCellArea` that the newly created column should use to layout cells.
- *
+ *
* Creates a new `GtkTreeViewColumn` using @area to render its cells.
- *
+ *
* Returns: A newly created `GtkTreeViewColumn`.
*
* Deprecated: 4.10: Use GtkColumnView instead
* {
* GtkTreeViewColumn *column;
* GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
- *
+ *
* column = gtk_tree_view_column_new_with_attributes ("Title",
* renderer,
* "text", TEXT_COLUMN,
* NULL);
* }
* ]|
- *
+ *
* Returns: A newly created `GtkTreeViewColumn`.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_clear:
* @tree_column: A `GtkTreeViewColumn`
- *
+ *
* Unsets all the mappings on all renderers on the @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
* @cell_renderer: the `GtkCellRenderer` to set attributes on
* @attribute: An attribute on the renderer
* @column: The column position on the model to get the attribute from.
- *
+ *
* Adds an attribute mapping to the list in @tree_column.
*
* The @column is the
gtk_cell_layout_clear_attributes (GTK_CELL_LAYOUT (priv->cell_area),
cell_renderer);
-
+
while (attribute != NULL)
{
column = va_arg (args, int);
* gtk_tree_view_column_set_cell_data_func:
* @tree_column: A `GtkTreeViewColumn`
* @cell_renderer: A `GtkCellRenderer`
- * @func: (nullable): The `GtkTreeCellDataFunc` to use.
+ * @func: (nullable): The `GtkTreeCellDataFunc` to use.
* @func_data: (closure): The user data for @func.
* @destroy: The destroy notification for @func_data
- *
+ *
* Sets the `GtkTreeCellDataFunc` to use for the column.
*
* This
* gtk_tree_view_column_set_spacing:
* @tree_column: A `GtkTreeViewColumn`.
* @spacing: distance between cell renderers in pixels.
- *
+ *
* Sets the spacing field of @tree_column, which is the number of pixels to
* place between cell renderers packed into it.
*
/**
* gtk_tree_view_column_get_spacing:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the spacing of @tree_column.
- *
+ *
* Returns: the spacing of @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
* gtk_tree_view_column_set_visible:
* @tree_column: A `GtkTreeViewColumn`.
* @visible: %TRUE if the @tree_column is visible.
- *
+ *
* Sets the visibility of @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_get_visible:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns %TRUE if @tree_column is visible.
- *
+ *
* Returns: whether the column is visible or not. If it is visible, then
* the tree will show the column.
*
* gtk_tree_view_column_set_resizable:
* @tree_column: A `GtkTreeViewColumn`
* @resizable: %TRUE, if the column can be resized
- *
+ *
* If @resizable is %TRUE, then the user can explicitly resize the column by
* grabbing the outer edge of the column button.
*
/**
* gtk_tree_view_column_get_resizable:
* @tree_column: A `GtkTreeViewColumn`
- *
+ *
* Returns %TRUE if the @tree_column can be resized by the end user.
- *
+ *
* Returns: %TRUE, if the @tree_column can be resized.
*
* Deprecated: 4.10: Use GtkColumnView instead
* gtk_tree_view_column_set_sizing:
* @tree_column: A `GtkTreeViewColumn`.
* @type: The `GtkTreeViewColumn`Sizing.
- *
+ *
* Sets the growth behavior of @tree_column to @type.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_get_sizing:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the current type of @tree_column.
- *
+ *
* Returns: The type of @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_get_width:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the current size of @tree_column in pixels.
- *
+ *
* Returns: The current width of @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_get_x_offset:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the current X offset of @tree_column in pixels.
- *
+ *
* Returns: The current X offset of @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
* gtk_tree_view_column_set_min_width:
* @tree_column: A `GtkTreeViewColumn`.
* @min_width: The minimum width of the column in pixels, or -1.
- *
+ *
* Sets the minimum width of the @tree_column. If @min_width is -1, then the
* minimum width is unset.
*
/**
* gtk_tree_view_column_get_min_width:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the minimum width in pixels of the @tree_column, or -1 if no minimum
* width is set.
- *
+ *
* Returns: The minimum width of the @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
* gtk_tree_view_column_set_max_width:
* @tree_column: A `GtkTreeViewColumn`.
* @max_width: The maximum width of the column in pixels, or -1.
- *
+ *
* Sets 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
/**
* gtk_tree_view_column_get_max_width:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the maximum width in pixels of the @tree_column, or -1 if no maximum
* width is set.
- *
+ *
* Returns: The maximum width of the @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_clicked:
* @tree_column: a `GtkTreeViewColumn`
- *
+ *
* Emits the “clicked” signal on the column. This function will only work if
* @tree_column is clickable.
*
* gtk_tree_view_column_set_title:
* @tree_column: A `GtkTreeViewColumn`.
* @title: The title of the @tree_column.
- *
+ *
* Sets the title of the @tree_column. If a custom widget has been set, then
* this value is ignored.
*
/**
* gtk_tree_view_column_get_title:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the title of the widget.
- *
+ *
* Returns: the title of the column. This string should not be
* modified or freed.
*
* gtk_tree_view_column_set_clickable:
* @tree_column: A `GtkTreeViewColumn`.
* @clickable: %TRUE if the header is active.
- *
+ *
* Sets the header to be active if @clickable is %TRUE. When the header is
* active, then it can take keyboard focus, and can be clicked.
*
/**
* gtk_tree_view_column_get_clickable:
* @tree_column: a `GtkTreeViewColumn`
- *
+ *
* Returns %TRUE if the user can click on the header for the column.
- *
+ *
* Returns: %TRUE if user can click the column header.
*
* Deprecated: 4.10: Use GtkColumnView instead
* gtk_tree_view_column_set_alignment:
* @tree_column: A `GtkTreeViewColumn`.
* @xalign: The alignment, which is between [0.0 and 1.0] inclusive.
- *
+ *
* Sets 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.
/**
* gtk_tree_view_column_get_alignment:
* @tree_column: A `GtkTreeViewColumn`.
- *
+ *
* Returns the current x alignment of @tree_column. This value can range
* between 0.0 and 1.0.
- *
+ *
* Returns: The current alignent of @tree_column.
*
* Deprecated: 4.10: Use GtkColumnView instead
* gtk_tree_view_column_set_reorderable:
* @tree_column: A `GtkTreeViewColumn`
* @reorderable: %TRUE, if the column can be reordered.
- *
+ *
* If @reorderable is %TRUE, then the column can be reordered by the end user
* dragging the header.
*
/**
* gtk_tree_view_column_get_reorderable:
* @tree_column: A `GtkTreeViewColumn`
- *
+ *
* Returns %TRUE if the @tree_column can be reordered by the user.
- *
+ *
* Returns: %TRUE if the @tree_column can be reordered by the user.
*
* Deprecated: 4.10: Use GtkColumnView instead
* @tree_column: a `GtkTreeViewColumn`
* @sort_column_id: The @sort_column_id of the model to sort on.
*
- * Sets the logical @sort_column_id that this column sorts on when this column
+ * Sets the logical @sort_column_id that this column sorts on when this column
* is selected for sorting. Doing so makes the column header clickable.
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_get_sort_indicator:
* @tree_column: a `GtkTreeViewColumn`
- *
+ *
* Gets the value set by gtk_tree_view_column_set_sort_indicator().
- *
+ *
* Returns: whether the sort indicator arrow is displayed
*
* Deprecated: 4.10: Use GtkColumnView instead
* @tree_column: a `GtkTreeViewColumn`
* @order: sort order that the sort indicator should indicate
*
- * Changes the appearance of the sort indicator.
- *
+ * Changes 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.
- *
+ * 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
+ * Note that you must have the sort indicator enabled to see anything when
* calling this function; see gtk_tree_view_column_set_sort_indicator().
*
* Deprecated: 4.10: Use GtkColumnView instead
/**
* gtk_tree_view_column_get_sort_order:
* @tree_column: a `GtkTreeViewColumn`
- *
+ *
* Gets the value set by gtk_tree_view_column_set_sort_order().
- *
+ *
* Returns: the sort order the sort indicator is indicating
*
* Deprecated: 4.10: Use GtkColumnView instead
* @iter: The `GtkTreeIter` to get the cell renderer’s attributes from.
* @is_expander: %TRUE, if the row has children
* @is_expanded: %TRUE, if the row has visible children
- *
+ *
* Sets 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
* @y_offset: (out) (optional): location to return y offset of a cell relative to @cell_area
* @width: (out) (optional): location to return width needed to render a cell
* @height: (out) (optional): location to return height needed to render a cell
- *
+ *
* Obtains the width and height needed to render the column. This is used
* primarily by the `GtkTreeView`.
*
priv = tree_column->priv;
- g_signal_handler_block (priv->cell_area_context,
+ g_signal_handler_block (priv->cell_area_context,
priv->context_changed_signal);
gtk_cell_area_get_preferred_width (priv->cell_area,
&min_height,
NULL);
- g_signal_handler_unblock (priv->cell_area_context,
+ g_signal_handler_unblock (priv->cell_area_context,
priv->context_changed_signal);
* @background_area: entire cell area (including tree expanders and maybe padding on the sides)
* @cell_area: area normally rendered by a cell renderer
* @flags: flags that affect rendering
- *
+ *
* Renders the cell contained by #tree_column. This is used primarily by the
* `GtkTreeView`.
*
/**
* gtk_tree_view_column_cell_is_visible:
* @tree_column: A `GtkTreeViewColumn`
- *
+ *
* Returns %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()
- *
+ *
* Returns: %TRUE, if any of the cells packed into the @tree_column are currently visible
*
* Deprecated: 4.10: Use GtkColumnView instead
/* Issue a manual reset on the context to have all
* sizes re-requested for the context.
*/
- g_signal_handler_block (priv->cell_area_context,
+ g_signal_handler_block (priv->cell_area_context,
priv->context_changed_signal);
gtk_cell_area_context_reset (priv->cell_area_context);
- g_signal_handler_unblock (priv->cell_area_context,
+ g_signal_handler_unblock (priv->cell_area_context,
priv->context_changed_signal);
if (priv->tree_view &&