📄 gtkclist.h
字号:
guint8 spacing; GdkPixmap *pixmap; GdkBitmap *mask;};struct _GtkCellWidget{ GtkCellType type; gint16 vertical; gint16 horizontal; GtkStyle *style; GtkWidget *widget;};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;};GtkType gtk_clist_get_type (void) G_GNUC_CONST;/* create a new GtkCList */GtkWidget* gtk_clist_new (gint columns);GtkWidget* gtk_clist_new_with_titles (gint columns, gchar *titles[]);/* set adjustments of clist */void gtk_clist_set_hadjustment (GtkCList *clist, GtkAdjustment *adjustment);void gtk_clist_set_vadjustment (GtkCList *clist, GtkAdjustment *adjustment);/* get adjustments of clist */GtkAdjustment* gtk_clist_get_hadjustment (GtkCList *clist);GtkAdjustment* gtk_clist_get_vadjustment (GtkCList *clist);/* set the border style of the clist */void gtk_clist_set_shadow_type (GtkCList *clist, GtkShadowType type);/* set the clist's selection mode */void gtk_clist_set_selection_mode (GtkCList *clist, GtkSelectionMode mode);/* enable clists reorder ability */void gtk_clist_set_reorderable (GtkCList *clist, gboolean reorderable);void gtk_clist_set_use_drag_icons (GtkCList *clist, gboolean use_icons);void gtk_clist_set_button_actions (GtkCList *clist, guint button, guint8 button_actions);/* freeze all visual updates of the list, and then thaw the list after * you have made a number of changes and the updates wil occure in a * more efficent mannor than if you made them on a unfrozen list */void gtk_clist_freeze (GtkCList *clist);void gtk_clist_thaw (GtkCList *clist);/* show and hide the column title buttons */void gtk_clist_column_titles_show (GtkCList *clist);void gtk_clist_column_titles_hide (GtkCList *clist);/* set the column title to be a active title (responds to button presses, * prelights, and grabs keyboard focus), or passive where it acts as just * a title */void gtk_clist_column_title_active (GtkCList *clist, gint column);void gtk_clist_column_title_passive (GtkCList *clist, gint column);void gtk_clist_column_titles_active (GtkCList *clist);void gtk_clist_column_titles_passive (GtkCList *clist);/* set the title in the column title button */void gtk_clist_set_column_title (GtkCList *clist, gint column, const gchar *title);/* returns the title of column. Returns NULL if title is not set */gchar * gtk_clist_get_column_title (GtkCList *clist, gint column);/* set a widget instead of a title for the column title button */void gtk_clist_set_column_widget (GtkCList *clist, gint column, GtkWidget *widget);/* returns the column widget */GtkWidget * gtk_clist_get_column_widget (GtkCList *clist, gint column);/* set the justification on a column */void gtk_clist_set_column_justification (GtkCList *clist, gint column, GtkJustification justification);/* set visibility of a column */void gtk_clist_set_column_visibility (GtkCList *clist, gint column, gboolean visible);/* enable/disable column resize operations by mouse */void gtk_clist_set_column_resizeable (GtkCList *clist, gint column, gboolean resizeable);/* resize column automatically to its optimal width */void gtk_clist_set_column_auto_resize (GtkCList *clist, gint column, gboolean auto_resize);gint gtk_clist_columns_autosize (GtkCList *clist);/* return the optimal column width, i.e. maximum of all cell widths */gint gtk_clist_optimal_column_width (GtkCList *clist, gint column);/* set the pixel width of a column; this is a necessary step in * creating a CList because otherwise the column width is chozen from * the width of the column title, which will never be right */void gtk_clist_set_column_width (GtkCList *clist, gint column, gint width);/* set column minimum/maximum width. min/max_width < 0 => no restriction */void gtk_clist_set_column_min_width (GtkCList *clist, gint column, gint min_width);void gtk_clist_set_column_max_width (GtkCList *clist, gint column, gint max_width);/* change the height of the rows, the default (height=0) is * the hight of the current font. */void gtk_clist_set_row_height (GtkCList *clist, guint height);/* scroll the viewing area of the list to the given column and row; * row_align and col_align are between 0-1 representing the location the * row should appear on the screnn, 0.0 being top or left, 1.0 being * bottom or right; if row or column is -1 then then there is no change */void gtk_clist_moveto (GtkCList *clist, gint row, gint column, gfloat row_align, gfloat col_align);/* returns whether the row is visible */GtkVisibility gtk_clist_row_is_visible (GtkCList *clist, gint row);/* returns the cell type */GtkCellType gtk_clist_get_cell_type (GtkCList *clist, gint row, gint column);/* sets a given cell's text, replacing its current contents */void gtk_clist_set_text (GtkCList *clist, gint row, gint column, const gchar *text);/* for the "get" functions, any of the return pointer can be * NULL if you are not interested */gint gtk_clist_get_text (GtkCList *clist, gint row, gint column, gchar **text);/* sets a given cell's pixmap, replacing its current contents */void gtk_clist_set_pixmap (GtkCList *clist, gint row, gint column, GdkPixmap *pixmap, GdkBitmap *mask);gint gtk_clist_get_pixmap (GtkCList *clist, gint row, gint column, GdkPixmap **pixmap, GdkBitmap **mask);/* sets a given cell's pixmap and text, replacing its current contents */void gtk_clist_set_pixtext (GtkCList *clist, gint row, gint column, const gchar *text, guint8 spacing, GdkPixmap *pixmap, GdkBitmap *mask);gint gtk_clist_get_pixtext (GtkCList *clist, gint row, gint column, gchar **text, guint8 *spacing, GdkPixmap **pixmap, GdkBitmap **mask);/* sets the foreground color of a row, the color must already * be allocated */void gtk_clist_set_foreground (GtkCList *clist, gint row, const GdkColor *color);/* sets the background color of a row, the color must already * be allocated */void gtk_clist_set_background (GtkCList *clist, gint row, const GdkColor *color);/* set / get cell styles */void gtk_clist_set_cell_style (GtkCList *clist, gint row, gint column, GtkStyle *style);GtkStyle *gtk_clist_get_cell_style (GtkCList *clist, gint row, gint column);void gtk_clist_set_row_style (GtkCList *clist, gint row, GtkStyle *style);GtkStyle *gtk_clist_get_row_style (GtkCList *clist, gint row);/* this sets a horizontal and vertical shift for drawing * the contents of a cell; it can be positive or negitive; * this is particulary useful for indenting items in a column */void gtk_clist_set_shift (GtkCList *clist, gint row, gint column, gint vertical, gint horizontal);/* set/get selectable flag of a single row */void gtk_clist_set_selectable (GtkCList *clist, gint row, gboolean selectable);gboolean gtk_clist_get_selectable (GtkCList *clist, gint row);/* prepend/append returns the index of the row you just added, * making it easier to append and modify a row */gint gtk_clist_prepend (GtkCList *clist, gchar *text[]);gint gtk_clist_append (GtkCList *clist, gchar *text[]);/* inserts a row at index row and returns the row where it was * actually inserted (may be different from "row" in auto_sort mode) */gint gtk_clist_insert (GtkCList *clist, gint row, gchar *text[]);/* removes row at index row */void gtk_clist_remove (GtkCList *clist, gint row);/* sets a arbitrary data pointer for a given row */void gtk_clist_set_row_data (GtkCList *clist, gint row, gpointer data);/* sets a data pointer for a given row with destroy notification */void gtk_clist_set_row_data_full (GtkCList *clist, gint row, gpointer data, GDestroyNotify destroy);/* returns the data set for a row */gpointer gtk_clist_get_row_data (GtkCList *clist, gint row);/* givin a data pointer, find the first (and hopefully only!) * row that points to that data, or -1 if none do */gint gtk_clist_find_row_from_data (GtkCList *clist, gpointer data);/* force selection of a row */void gtk_clist_select_row (GtkCList *clist, gint row, gint column);/* force unselection of a row */void gtk_clist_unselect_row (GtkCList *clist, gint row, gint column);/* undo the last select/unselect operation */void gtk_clist_undo_selection (GtkCList *clist);/* clear the entire list -- this is much faster than removing * each item with gtk_clist_remove */void gtk_clist_clear (GtkCList *clist);/* return the row column corresponding to the x and y coordinates, * the returned values are only valid if the x and y coordinates * are respectively to a window == clist->clist_window */gint gtk_clist_get_selection_info (GtkCList *clist, gint x, gint y, gint *row, gint *column);/* in multiple or extended mode, select all rows */void gtk_clist_select_all (GtkCList *clist);/* in all modes except browse mode, deselect all rows */void gtk_clist_unselect_all (GtkCList *clist);/* swap the position of two rows */void gtk_clist_swap_rows (GtkCList *clist, gint row1, gint row2);/* move row from source_row position to dest_row position */void gtk_clist_row_move (GtkCList *clist, gint source_row, gint dest_row);/* sets a compare function different to the default */void gtk_clist_set_compare_func (GtkCList *clist, GtkCListCompareFunc cmp_func);/* the column to sort by */void gtk_clist_set_sort_column (GtkCList *clist, gint column);/* how to sort : ascending or descending */void gtk_clist_set_sort_type (GtkCList *clist, GtkSortType sort_type);/* sort the list with the current compare function */void gtk_clist_sort (GtkCList *clist);/* Automatically sort upon insertion */void gtk_clist_set_auto_sort (GtkCList *clist, gboolean auto_sort);/* Private function for clist, ctree */PangoLayout *_gtk_clist_create_cell_layout (GtkCList *clist, GtkCListRow *clist_row, gint column);G_END_DECLS#endif /* __GTK_CLIST_H__ */#endif /* GTK_DISABLE_DEPRECATED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -