|
'select-icon' void user_function (GnomeIconList *iconlist, |
The GNOME icon list widget can hold a number of icons with captions. You can make the icon captions in the icon list be editable (this is configured at the widget creation time).
You can control the type of selection mode you desire by using the gnome_icon_list_set_selection_mode() function.
typedef enum { GNOME_ICON_LIST_ICONS, GNOME_ICON_LIST_TEXT_BELOW, GNOME_ICON_LIST_TEXT_RIGHT } GnomeIconListMode; |
|
|
Creates a new GnomeIconList widget. Icons will be assumed to be at most ICON_WIDTH pixels of width. Any text displayed for those icons will be wrapped at this width as well.
The adjustment is used to pass an existing adjustment to be used to control the icon list display. If ADJ is NULL, then a new adjustment will be created.
Applications can use this adjustment stored inside the GnomeIconList structure to construct scrollbars if they so desire.
if flags has the GNOME_ICON_LIST_IS_EDITABLE flag set, then the text on the icons will be permited to be edited. If the name changes the "text_changed" signal will be emitted.
if flags has the GNOME_ICON_LIST_STATIC_TEXT flags set, then the text
Please note that the GnomeIconList starts life in Frozen state. You are supposed to fall gnome_icon_list_thaw on it as soon as possible. */ GtkWidget * gnome_icon_list_new_flags (guint icon_width, GtkAdjustment *adj, int flags) { Gil *gil;
gtk_widget_push_visual (
return GTK_WIDGET (gil); }
GtkWidget * gnome_icon_list_new (guint icon_width, GtkAdjustment *adj, int flags) { return gnome_icon_list_new_flags (icon_width, adj, flags & GNOME_ICON_LIST_IS_EDITABLE); }
/** gnome_icon_list_freeze: gil: The GnomeIconList
Freezes any changes made to the GnomeIconList. This is useful to avoid expensive computations to be performed if you are making many changes to an existing icon list. For example, call this routine before inserting a bunch of icons.
You can call this routine multiple times, you will have to call gnome_icon_list_thaw an equivalent number of times to make any changes done to the icon list to take place.
void gnome_icon_list_construct (GnomeIconList *gil, |
void gnome_icon_list_set_hadjustment (GnomeIconList *gil, |
void gnome_icon_list_set_vadjustment (GnomeIconList *gil, |
void gnome_icon_list_thaw (GnomeIconList *gil); |
If the freeze count reaches zero it will relayout any pending layout changes that might have been delayed due to the icon list be frozen by a call to gnome_icon_list_freeze.
void gnome_icon_list_insert (GnomeIconList *gil, int pos, const char *icon_filename, const char *text); |
Inserts the at the POS index in the GIL icon list an icon which is contained on the file icon_filename and with the TEXT string as its label.
void gnome_icon_list_insert_imlib (GnomeIconList *gil, int pos, |
Inserts the at the POS index in the GIL icon list an icon which is on the IM imlib imageand with the TEXT string as its label.
int gnome_icon_list_append (GnomeIconList *gil, const char *icon_filename, const char *text); |
Appends to the GIL icon list an icon which is contained on the file icon_filename and with the TEXT string as its label.
int gnome_icon_list_append_imlib (GnomeIconList *gil, |
void gnome_icon_list_clear (GnomeIconList *gil); |
Clears the contents for the icon list.
void gnome_icon_list_remove (GnomeIconList *gil, int pos); |
Removes the icon at index position POS.
void gnome_icon_list_set_selection_mode (GnomeIconList *gil, |
Sets the GnomeIconList selection mode, it can be any of the modes defined in the GtkSelectionMode enumeration.
void gnome_icon_list_select_icon (GnomeIconList *gil, int idx); |
Selects the icon at index position POS.
void gnome_icon_list_unselect_icon (GnomeIconList *gil, int pos); |
Removes the selection from the icon at the index position POS
int gnome_icon_list_unselect_all (GnomeIconList *gil, |
Unselects all of the icons in the GIL icon list. EVENT is the event that triggered the unselect action (or NULL if the event is not available).
The keep parameter is only used internally in the Icon LIst code, it can be NULL.
void gnome_icon_list_set_icon_width (GnomeIconList *gil, int w); |
Use this routine to change the icon width
void gnome_icon_list_set_row_spacing (GnomeIconList *gil, int pixels); |
Sets the number of pixels for the inter-row spacing.
void gnome_icon_list_set_col_spacing (GnomeIconList *gil, int pixels); |
Sets the number of pixels for the inter-column spacing.
void gnome_icon_list_set_text_spacing (GnomeIconList *gil, int pixels); |
Sets the number of pixels for the text spacing.
void gnome_icon_list_set_icon_border (GnomeIconList *gil, int pixels); |
Sets the number of pixels for the icon borders
void gnome_icon_list_set_separators (GnomeIconList *gil, const char *sep); |
Sets the separator characters used to optimally split this string. See gnome-icon-text.h
void gnome_icon_list_set_icon_data (GnomeIconList *gil, int pos, |
void gnome_icon_list_set_icon_data_full (GnomeIconList *gil, int pos, |
int gnome_icon_list_find_icon_from_data (GnomeIconList *gil, |
|
void gnome_icon_list_moveto (GnomeIconList *gil, int pos, |
Makes the icon whose index is POS visible on the screen, the YALIGN double controls the alignment of the icon inside the GnomeIconList 0.0 represents the top, while 1.0 represents the bottom.
|
int gnome_icon_list_get_icon_at (GnomeIconList *gil, int x, int y); |
int gnome_icon_list_get_items_per_line (GnomeIconList *gil); |
void user_function (GnomeIconList *iconlist, |
This signal is emited when an icon becomes selected. If the event argument point to NULL the icon was selected programatically with the gnome_icon_list_select_icon() function. Otherwise it points to the GdkEvent that made this icon selected.
void user_function (GnomeIconList *iconlist, |
This signal is emited when an icon becomes unselected (this signal is only emited if the icon had been previously selected). If the event argument point to NULL the icon was selected programatically with the gnome_icon_list_unselect_icon() function. Otherwise it points to the GdkEvent that made this icon selected.
|
The text_changed signal is emited on editable icon list widgets if the user has changed the caption of an icon
The return value indicates whether the name change is accepted (for example, if renaming a file succeeds or not). If the change is not accepted, the text is reset to its previous value.