Details
enum GtkTreeViewColumnSizing
typedef enum
{
GTK_TREE_VIEW_COLUMN_GROW_ONLY,
GTK_TREE_VIEW_COLUMN_AUTOSIZE,
GTK_TREE_VIEW_COLUMN_FIXED
} GtkTreeViewColumnSizing; |
The sizing method the column uses to determine it's width. Please note
that GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views, and
can make columns appear choppy.
GtkTreeCellDataFunc ()
A function to set the properties of a cell instead of just using the
straight mapping between the cell and the model. This is useful for
customizing the cell renderer. For example, a function might get an
integer from the tree_model, and render it to the "text" attribute of
"cell" by converting it to its written equivilent. This is set by
calling gtk_tree_view_column_set_cell_data_func()
struct GtkTreeViewColumn
struct GtkTreeViewColumn; |
gtk_tree_view_column_pack_start ()
Packs the cell into the beginning column. If expand is TRUE, then the
cell is allocated a share of all available space that the tree_column has.
gtk_tree_view_column_pack_end ()
Packs the cell into the column. If expand is TRUE, then the cell is
allocated a share of all available space that the tree_column has.
gtk_tree_view_column_clear ()
Unsets all the mappings on all renderers on the tree_column.
gtk_tree_view_column_get_cell_renderers ()
Returns a newly-allocated GList of all the cell renderers in the column,
in no particular order. The list must be freed with g_list_free().
gtk_tree_view_column_add_attribute ()
Adds 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.
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_func ()
Sets the GtkTreeViewColumnFunc to use for the column. This
function is used instead of the standard attributes mapping for
setting the column value, and should set the value of tree_column's
cell renderer as appropriate. func may be NULL to remove an
older one.
gtk_tree_view_column_set_spacing ()
void gtk_tree_view_column_set_spacing
(GtkTreeViewColumn *tree_column,
gint spacing); |
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 ()
Returns the spacing of tree_column.
gtk_tree_view_column_set_visible ()
void gtk_tree_view_column_set_visible
(GtkTreeViewColumn *tree_column,
gboolean 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_resizable ()
void gtk_tree_view_column_set_resizable
(GtkTreeViewColumn *tree_column,
gboolean resizable); |
If 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.
gtk_tree_view_column_get_resizable ()
Returns TRUE if the tree_column can be resized by the end user.
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_get_width ()
Returns the current size of tree_column in pixels.
gtk_tree_view_column_get_fixed_width ()
Gets the fixed width of the column. This value is only meaning may not be
the actual width of the column on the screen, just what is requested.
gtk_tree_view_column_set_fixed_width ()
void gtk_tree_view_column_set_fixed_width
(GtkTreeViewColumn *tree_column,
gint fixed_width); |
Sets the size of the column in pixels. This is meaningful only if the sizing
type is GTK_TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
the min/max width for the column. Please note that the min/max width of the
column doesn't actually affect the "fixed_width" property of the widget, just
the actual size when displayed.
gtk_tree_view_column_set_min_width ()
void gtk_tree_view_column_set_min_width
(GtkTreeViewColumn *tree_column,
gint 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 ()
void gtk_tree_view_column_set_max_width
(GtkTreeViewColumn *tree_column,
gint max_width); |
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
fill any extra space.
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_clicked ()
Emits the "clicked" signal on the column. This function will only work if
tree_column is clickable.
gtk_tree_view_column_set_title ()
void gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column,
const gchar *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 ()
G_CONST_RETURN gchar* gtk_tree_view_column_get_title
(GtkTreeViewColumn *tree_column); |
Returns the title of the widget. This value should not be modified.
gtk_tree_view_column_set_clickable ()
void gtk_tree_view_column_set_clickable
(GtkTreeViewColumn *tree_column,
gboolean 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_get_clickable ()
Returns TRUE if the user can click on the header for the column.
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 on the column header. If a custom
widget has not been set then NULL is returned.
gtk_tree_view_column_set_alignment ()
void gtk_tree_view_column_set_alignment
(GtkTreeViewColumn *tree_column,
gfloat xalign); |
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 ()
Returns the current x alignment of tree_column. This value can range
between 0.0 and 1.0.
gtk_tree_view_column_set_reorderable ()
void gtk_tree_view_column_set_reorderable
(GtkTreeViewColumn *tree_column,
gboolean reorderable); |
If reorderable is TRUE, then the column can be reordered by the end user
dragging the header.
gtk_tree_view_column_get_reorderable ()
Returns TRUE if the tree_column can be reordered by the user.
gtk_tree_view_column_set_sort_column_id ()
void gtk_tree_view_column_set_sort_column_id
(GtkTreeViewColumn *tree_column,
gint sort_column_id); |
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.
gtk_tree_view_column_set_sort_indicator ()
void gtk_tree_view_column_set_sort_indicator
(GtkTreeViewColumn *tree_column,
gboolean setting); |
Call 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.
gtk_tree_view_column_set_sort_order ()
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() 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().
gtk_tree_view_column_cell_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. This is used primarily by the GtkTreeView.
gtk_tree_view_column_cell_get_size ()
void gtk_tree_view_column_cell_get_size
(GtkTreeViewColumn *tree_column,
GdkRectangle *cell_area,
gint *x_offset,
gint *y_offset,
gint *width,
gint *height); |
Obtains the width and height needed to render the column. This is used
primarily by the GtkTreeView.
gtk_tree_view_column_cell_is_visible ()
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()