Details
GTK_TYPE_TREE_VIEW_COLUMN
#define GTK_TYPE_TREE_VIEW_COLUMN (gtk_tree_view_column_get_type ()) |
struct GtkTreeViewColumn
struct GtkTreeViewColumn
{
GtkObject parent;
GtkWidget *tree_view;
GtkWidget *button;
GtkWidget *child;
GtkWidget *arrow;
GtkWidget *alignment;
GdkWindow *window;
gfloat xalign;
guint model_changed_signal;
gint width;
gint min_width;
gint max_width;
gint displayed_width;
/* dragging columns */
gint drag_x;
gint drag_y;
GtkCellDataFunc func;
gpointer func_data;
GtkDestroyNotify destroy;
gchar *title;
GtkCellRenderer *cell;
GSList *attributes;
GtkTreeViewColumnSizing column_type;
/* Sorting */
guint sort_clicked_signal;
guint sort_column_changed_signal;
gint sort_column_id;
GtkTreeSortOrder sort_order;
guint visible : 1;
guint button_active : 1;
guint dirty : 1;
guint show_sort_indicator : 1;
guint maybe_reordered : 1;
guint reorderable : 1;
}; |
enum GtkTreeViewColumnSizing
typedef enum
{
GTK_TREE_VIEW_COLUMN_RESIZEABLE,
GTK_TREE_VIEW_COLUMN_AUTOSIZE,
GTK_TREE_VIEW_COLUMN_FIXED
} GtkTreeViewColumnSizing; |
gtk_tree_view_column_new_with_attributes ()
Creates a new GtkTreeViewColumn with a number of default values. This is
equivalent to calling gtk_tree_view_column_set_title,
gtk_tree_view_column_set_cell_renderer, and
gtk_tree_view_column_set_attributes on the newly created GtkTreeViewColumn.
gtk_tree_view_column_set_cell_renderer ()
Sets the cell renderer of the tree_column. If there is a cell
renderer already set, then it is removed. If cell is NULL, then
the cell renderer is unset.
gtk_tree_view_column_add_attribute ()
Adds an attribute mapping to the list in tree_column. The column is the
column position on the model to get a value from, and the attribute is the
parameter on the tree_column's cell renderer to set that value to.
gtk_tree_view_column_set_attributes ()
Sets the attributes in the list as the attributes of tree_column.
The attributes should be in attribute/column order, as in
gtk_tree_view_column_add_attribute. All existing attributes
are removed, and replaced with the new attributes.
gtk_tree_view_column_set_cell_data ()
Sets the cell renderer based on the tree_model and tree_node. That is, for
every attribute mapping in tree_column, it will get a value from the set
column on the tree_node, and use that value to set the attribute on the cell
renderer.
gtk_tree_view_column_set_visible ()
Sets the visibility of tree_column.
gtk_tree_view_column_get_visible ()
Returns TRUE if tree_column is visible.
gtk_tree_view_column_set_sizing ()
Sets the growth behavior of tree_column to type.
gtk_tree_view_column_get_sizing ()
Returns the current type of tree_column.
gtk_tree_view_column_set_width ()
Sets the size of the column in pixels, unless the the column type is
GTK_TREE_VIEW_COLUMN_AUTOSIZE. In this case, the value is discarded as the
size of the column is based on the calculated width of the column. The
width is clamped to the min/max width for the column.
gtk_tree_view_column_set_min_width ()
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 ()
Returns the minimum width in pixels of the tree_column, or -1 if no minimum
width is set.
gtk_tree_view_column_set_max_width ()
Sets the maximum width of the tree_column. If max_width is -1, then the
maximum width is unset.
gtk_tree_view_column_get_max_width ()
Returns the maximum width in pixels of the tree_column, or -1 if no maximum
width is set.
gtk_tree_view_column_set_title ()
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 ()
Returns the title of the widget. This value should not be modified.
gtk_tree_view_column_set_clickable ()
Sets the header to be active if active is TRUE. When the header is active,
then it can take keyboard focus, and can be clicked.
gtk_tree_view_column_set_widget ()
Sets 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.
gtk_tree_view_column_get_widget ()
Returns the GtkWidget in the button in the column header. If a custom
widget has not been set, then this will be a GtkAlignment with a GtkLabel
in it.
gtk_tree_view_column_set_alignment ()
Sets the alignment of the title or custom widget inside the column header.
gtk_tree_view_column_get_alignment ()
gtk_tree_view_column_clicked ()
Emits the "clicked" signal on the column.