Details
struct GtkCList
This is the embodiment of the GtkCList widget. This structure contains
only private data, and should be accessed only via the CList API.
enum GtkCellType
typedef enum
{
GTK_CELL_EMPTY,
GTK_CELL_TEXT,
GTK_CELL_PIXMAP,
GTK_CELL_PIXTEXT,
GTK_CELL_WIDGET
} GtkCellType; |
Identifies the type of element in the current cell of the CList. Cells can
contain text, pixmaps, or both. Unfortunately support for GTK_CELL_WIDGET
was never completed.
enum GtkButtonAction
typedef enum
{
GTK_BUTTON_IGNORED = 0,
GTK_BUTTON_SELECTS = 1 << 0,
GTK_BUTTON_DRAGS = 1 << 1,
GTK_BUTTON_EXPANDS = 1 << 2
} GtkButtonAction; |
Values for specifying what mouse button events a CList will
react to.
GTK_CLIST_FLAGS()
#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags) |
Reads the current flags of the specified CList.
GTK_CLIST_SET_FLAG()
#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag)) |
A macro to set a particular flag for the specified CList.
GTK_CLIST_UNSET_FLAG()
#define GTK_CLIST_UNSET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) &= ~(GTK_ ## flag)) |
A macro to clear a particular flag for the specified CList.
GTK_CLIST_IN_DRAG()
#define GTK_CLIST_IN_DRAG(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_IN_DRAG) |
A macro to check whether the GtkCList is in "drag mode."
GTK_CLIST_ROW_HEIGHT_SET()
#define GTK_CLIST_ROW_HEIGHT_SET(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ROW_HEIGHT_SET) |
A macro to check whether the GtkCList's row height is set.
GTK_CLIST_SHOW_TITLES()
#define GTK_CLIST_SHOW_TITLES(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_SHOW_TITLES) |
A macro to check whether the flag for showing the
widget's column titles is set.
GTK_CLIST_CHILD_HAS_FOCUS()
#define GTK_CLIST_CHILD_HAS_FOCUS(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_CHILD_HAS_FOCUS) |
A macro to check whether a child widget of the CList
has the focus.
GTK_CLIST_ADD_MODE()
#define GTK_CLIST_ADD_MODE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ADD_MODE) |
A macro to test whether the CList is in "add mode."
GTK_CLIST_AUTO_SORT()
#define GTK_CLIST_AUTO_SORT(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_SORT) |
A macro to test whether the CList has automatic sorting
switched on.
GTK_CLIST_AUTO_RESIZE_BLOCKED()
#define GTK_CLIST_AUTO_RESIZE_BLOCKED(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_RESIZE_BLOCKED) |
A macro to check if automatic resizing of columns is blocked.
GTK_CLIST_REORDERABLE()
#define GTK_CLIST_REORDERABLE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_REORDERABLE) |
A macro to test if the CList's columns are re-orderable
GTK_CLIST_USE_DRAG_ICONS()
#define GTK_CLIST_USE_DRAG_ICONS(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_USE_DRAG_ICONS) |
A macro to check if the USE_DRAG_ICONS property is enabled.
GTK_CLIST_DRAW_DRAG_LINE()
#define GTK_CLIST_DRAW_DRAG_LINE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_DRAW_DRAG_LINE) |
A macro to check if the DRAW_DRAG_LINE property is enabled.
GTK_CLIST_DRAW_DRAG_RECT()
#define GTK_CLIST_DRAW_DRAG_RECT(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_DRAW_DRAG_RECT) |
A macro to check if the DRAW_DRAG_RECT property is enabled.
GTK_CLIST_ROW()
#define GTK_CLIST_ROW(_glist_) ((GtkCListRow *)((_glist_)->data)) |
A macro to cast a GList element to a CListRow pointer.
GTK_CELL_TEXT()
#define GTK_CELL_TEXT(cell) (((GtkCellText *) &(cell))) |
A macro to cast a generic GtkCList cell item to a GtkCellText pointer.
GTK_CELL_PIXMAP()
#define GTK_CELL_PIXMAP(cell) (((GtkCellPixmap *) &(cell))) |
A macro to cast a generic GtkCList cell item to a GtkCellPixmap pointer.
GTK_CELL_PIXTEXT()
#define GTK_CELL_PIXTEXT(cell) (((GtkCellPixText *) &(cell))) |
A macro to cast a generic GtkCList cell item to a GtkCellPixText pointer.
GTK_CELL_WIDGET()
#define GTK_CELL_WIDGET(cell) (((GtkCellWidget *) &(cell))) |
A macro to cast a generic GtkCList cell item to a GtkCellWidget pointer.
GtkCListCompareFunc ()
Function prototype for the compare function callback.
struct GtkCListColumn
struct GtkCListColumn
{
gchar *title;
GdkRectangle area;
GtkWidget *button;
GdkWindow *window;
gint width;
gint min_width;
gint max_width;
GtkJustification justification;
guint visible : 1;
guint width_set : 1;
guint resizeable : 1;
guint auto_resize : 1;
guint button_passive : 1;
}; |
A structure that the GtkCList widget uses to keep track of information
about its columns.
struct GtkCListRow
struct GtkCListRow
{
GtkCell *cell;
GtkStateType state;
GdkColor foreground;
GdkColor background;
GtkStyle *style;
gpointer data;
GtkDestroyNotify destroy;
guint fg_set : 1;
guint bg_set : 1;
guint selectable : 1;
}; |
A structure that the GtkCList widget uses to keep track of information
about its rows.
struct GtkCellText
struct GtkCellText
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
gchar *text;
}; |
A structure that the GtkCList widget uses to keep track of GtkCList cells
that contain text.
struct GtkCellPixmap
struct GtkCellPixmap
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
GdkPixmap *pixmap;
GdkBitmap *mask;
}; |
A structure that the GtkCList widget uses to keep track of GtkCList cells
that contain a GdkPixmap.
struct GtkCellPixText
struct GtkCellPixText
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
gchar *text;
guint8 spacing;
GdkPixmap *pixmap;
GdkBitmap *mask;
}; |
A structure that the GtkCList widget uses to keep track of GtkCList cells
that contain a combination of text and a GdkPixmap.
struct GtkCellWidget
struct GtkCellWidget
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
GtkWidget *widget;
}; |
A structure that the GtkCList widget uses to keep track of GtkCList cells
that contain another widget.
struct GtkCell
struct GtkCell
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
union {
gchar *text;
struct {
GdkPixmap *pixmap;
GdkBitmap *mask;
} pm;
struct {
gchar *text;
guint8 spacing;
GdkPixmap *pixmap;
GdkBitmap *mask;
} pt;
GtkWidget *widget;
} u;
}; |
A generic structure that the GtkCList widget uses to keep track of the
contents of each of its cells.
struct GtkCListCellInfo
struct GtkCListCellInfo
{
gint row;
gint column;
}; |
A simple structure that the GtkCList widget uses to keep track
of the location of a cell.
struct GtkCListDestInfo
struct GtkCListDestInfo
{
GtkCListCellInfo cell;
GtkCListDragPos insert_pos;
}; |
A simple structure that the GtkCList widget uses to track
a cell for a drag operation.
enum GtkCListDragPos
typedef enum
{
GTK_CLIST_DRAG_NONE,
GTK_CLIST_DRAG_BEFORE,
GTK_CLIST_DRAG_INTO,
GTK_CLIST_DRAG_AFTER
} GtkCListDragPos; |
An enumeration for drag operations.
gtk_clist_construct ()
Initializes a previously allocated GtkCList widget for use. This should not
normally be used to create a GtkCList widget. Use gtk_clist_new() instead.
gtk_clist_new ()
Creates a new GtkCList widget for use.
gtk_clist_new_with_titles ()
Creates a new GtkCList widget with column titles for use.
gtk_clist_set_shadow_type ()
Sets the shadow type for the specified CList. Changing this value
will cause the GtkCList to update its visuals.
gtk_clist_set_selection_mode ()
Sets the selection mode for the specified CList. This allows you to
set whether only one or more than one item can be selected at a time
in the widget. Note that setting the widget's selection mode to one
of GTK_SELECTION_BROWSE or GTK_SELECTION_SINGLE will cause all the
items in the GtkCList to become deselected.
gtk_clist_freeze ()
void gtk_clist_freeze (GtkCList *clist); |
Causes the GtkCList to stop updating its visuals until a matching call to
gtk_clist_thaw() is made. This function is useful if a lot of changes
will be made to the widget that may cause a lot of visual updating to
occur. Note that calls to gtk_clist_freeze() can be nested.
gtk_clist_thaw ()
Causes the specified GtkCList to allow visual updates.
gtk_clist_column_titles_show ()
void gtk_clist_column_titles_show (GtkCList *clist); |
This function causes the GtkCList to show its column titles, if
they are not already showing.
gtk_clist_column_titles_hide ()
void gtk_clist_column_titles_hide (GtkCList *clist); |
Causes the GtkCList to hide its column titles, if they are currently
showing.
gtk_clist_column_title_active ()
void gtk_clist_column_title_active (GtkCList *clist,
gint column); |
Sets the specified column in the GtkCList to become selectable. You can
then respond to events from the user clicking on a title button, and take
appropriate action.
gtk_clist_column_title_passive ()
void gtk_clist_column_title_passive (GtkCList *clist,
gint column); |
Causes the specified column title button to become passive, i.e., does
not respond to events, such as the user clicking on it.
gtk_clist_column_titles_active ()
void gtk_clist_column_titles_active (GtkCList *clist); |
Causes all column title buttons to become active. This is the same
as calling gtk_clist_column_title_active() for each column.
gtk_clist_column_titles_passive ()
void gtk_clist_column_titles_passive (GtkCList *clist); |
Causes all column title buttons to become passive. This is the same
as calling gtk_clist_column_title_passive() for each column.
gtk_clist_set_column_title ()
Sets the title for the specified column.
gtk_clist_set_column_widget ()
Sets a widget to be used as the specified column's title. This
can be used to place a pixmap or something else as the column
title, instead of the standard text.
gtk_clist_set_column_justification ()
Sets the justification to be used for all text in the specified
column.
gtk_clist_set_column_visibility ()
Allows you to set whether a specified column in the GtkCList should
be hidden or shown. Note that at least one column must always be
showing, so attempting to hide the last visible column will be
ignored.
gtk_clist_set_column_resizeable ()
Lets you specify whether a specified column should be resizeable
by the user. Note that turning on resizeability for the column will
automatically shut off auto-resizing, but turning off resizeability
will NOT turn on auto-resizing. This must be done manually via a
call to gtk_clist_set_column_auto_resize().
gtk_clist_set_column_auto_resize ()
Lets you specify whether a column should be automatically resized
by the widget when data is added or removed. Enabling auto-resize
on a column explicity disallows user-resizing of the column.
gtk_clist_optimal_column_width ()
Gets the required width in pixels that is needed to show
everything in the specified column.
gtk_clist_set_column_width ()
Causes the column specified for the GtkCList to be set to
a specified width.
gtk_clist_set_column_min_width ()
void gtk_clist_set_column_min_width (GtkCList *clist,
gint column,
gint min_width); |
Causes the column specified to have a minimum width, preventing
the user from resizing it smaller than that specified.
gtk_clist_set_column_max_width ()
void gtk_clist_set_column_max_width (GtkCList *clist,
gint column,
gint max_width); |
Causes the column specified to have a maximum width, preventing
the user from resizing it larger than that specified.
gtk_clist_set_row_height ()
Causes the GtkCList to have a specified height for its
rows. Setting the row height to 0 allows the GtkCList to adjust
automatically to data in the row.
gtk_clist_moveto ()
Tells the CList widget to visually move to the specified
row and column.
gtk_clist_row_is_visible ()
Checks how the specified row is visible.
gtk_clist_get_cell_type ()
Checks the type of cell at the location specified.
gtk_clist_set_text ()
Sets the displayed text in the specified cell.
gtk_clist_get_text ()
Gets the text for the specified cell.
gtk_clist_set_pixmap ()
Sets a pixmap for the specified cell.
gtk_clist_get_pixmap ()
Gets the pixmap and bitmap mask of the specified cell. The returned mask value can be NULL.
gtk_clist_set_pixtext ()
Sets text and a pixmap/bitmap on the specified cell.
gtk_clist_get_pixtext ()
Gets the text, pixmap and bitmap mask for the specified cell.
gtk_clist_set_foreground ()
Sets the foreground color for the specified row.
gtk_clist_set_background ()
Sets the background color for the specified row.
gtk_clist_set_cell_style ()
Sets the style for the specified cell.
gtk_clist_get_cell_style ()
Gets the current style of the specified cell.
gtk_clist_set_row_style ()
Sets the style for all cells in the specified row.
gtk_clist_get_row_style ()
Gets the style set for the specified row.
gtk_clist_set_shift ()
Sets the vertical and horizontal shift of the specified cell.
gtk_clist_set_selectable ()
Sets whether the specified row is selectable or not.
gtk_clist_get_selectable ()
Gets whether the specified row is selectable or not.
gtk_clist_prepend ()
Adds a row to the CList at the top.
gtk_clist_append ()
Adds a row to the CList at the bottom.
gtk_clist_insert ()
Adds a row of text to the CList at the specified position.
gtk_clist_remove ()
Removes the specified row from the CList.
gtk_clist_set_row_data ()
Sets data for the specified row. This is the same as calling gtk_clist_set_row_data_full(clist, row, data, NULL).
gtk_clist_set_row_data_full ()
Sets the data for specified row, with a callback when the row is destroyed.
gtk_clist_get_row_data ()
Gets the currently set data for the specified row.
gtk_clist_find_row_from_data ()
Searches the CList for the row with the specified data.
gtk_clist_select_row ()
Selects the specified row. Causes the "select-row" signal to be emitted for the specified row and column.
gtk_clist_unselect_row ()
Unselects the specified row. Causes the "unselect-row" signal to be emitted for the specified row and column.
gtk_clist_undo_selection ()
void gtk_clist_undo_selection (GtkCList *clist); |
Undoes the last selection for an "extended selection mode" CList.
gtk_clist_clear ()
Removes all the CList's rows.
gtk_clist_get_selection_info ()
Gets the row and column at the specified pixel position in the CList.
gtk_clist_select_all ()
void gtk_clist_select_all (GtkCList *clist); |
Selects all rows in the CList. This function has no affect for a
CList in "single" or "browse" selection mode.
gtk_clist_unselect_all ()
void gtk_clist_unselect_all (GtkCList *clist); |
Unselects all rows in the CList.
gtk_clist_swap_rows ()
Swaps the two specified rows with each other.
gtk_clist_set_compare_func ()
Sets the compare function of the GtkClist to cmp_func. If cmp_func is NULL,
then the default compare function is used. The default compare function sorts
ascending or with the type set by gtk_clist_set_sort_type() by the column set
by gtk_clist_set_sort_column().
gtk_clist_set_sort_column ()
void gtk_clist_set_sort_column (GtkCList *clist,
gint column); |
Sets the sort column of the clist. The sort column is used by the
default compare function to determine which column to sort by.
gtk_clist_set_sort_type ()
Sets the sort type of the GtkClist. This is either GTK_SORT_ASCENDING for
ascening sort or GTK_SORT_DESCENDING for descending sort.
gtk_clist_set_auto_sort ()
Turns on or off auto sort of the GtkCList. If auto sort is on, then the CList will be resorted when a row is inserted into the CList.
gtk_clist_columns_autosize ()
Auto-sizes all columns in the CList and returns the total width of the CList.
gtk_clist_get_column_title ()
Gets the current title of the specified column
gtk_clist_get_column_widget ()
Gets the widget in the column header for the specified column.
gtk_clist_get_hadjustment ()
Gets the GtkAdjustment currently being used for the horizontal
aspect.
gtk_clist_get_vadjustment ()
Gets the GtkAdjustment currently being used for the vertical
aspect.
gtk_clist_row_move ()
Allows you to move a row from one position to another in the
list.
gtk_clist_set_button_actions ()
Sets the action(s) that the specified mouse button will have
on the CList.
gtk_clist_set_hadjustment ()
Allows you to set the GtkAdjustment to be used for the horizontal
aspect of the GtkCList widget.
gtk_clist_set_reorderable ()
Sets whether the CList's rows are re-orderable using drag-and-drop.
gtk_clist_set_use_drag_icons ()
Determines whether the GtkClist should use icons when
doing drag-and-drop operations.
gtk_clist_set_vadjustment ()
Allows you to set the GtkAdjustment to be used for the vertical
aspect of the GtkCList widget.