|
"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; |
|
icon_width : | |
adj : | |
is_editable : | |
Returns : |
|
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.
icon_width : | Icon width. |
adj : | Scrolling adjustment. |
flags : | flags that control the icon list creation |
Returns : |
void gnome_icon_list_construct (GnomeIconList *gil, |
gil : | |
icon_width : | |
adj : | |
flags : |
void gnome_icon_list_set_hadjustment (GnomeIconList *gil, |
gil : | |
hadj : |
void gnome_icon_list_set_vadjustment (GnomeIconList *gil, |
gil : | |
vadj : |
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.
gil : | The GnomeIconList |
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.
gil : | the icon list. |
pos : | index where the icon should be inserted |
icon_filename : | filename containing the graphic image for the icon. |
text : | text to display for the icon |
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.
gil : | the icon list. |
pos : | index where the icon should be inserted |
im : | Imlib image containing the icons |
text : | text to display for the icon |
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.
gil : | the icon list. |
icon_filename : | filename containing the graphic image for the icon. |
text : | text to display for the icon |
int gnome_icon_list_append_imlib (GnomeIconList *gil, |
gil : | |
im : | |
text : |
void gnome_icon_list_clear (GnomeIconList *gil); |
Clears the contents for the icon list.
gil : | the icon list to clear |
void gnome_icon_list_remove (GnomeIconList *gil, int pos); |
Removes the icon at index position POS.
gil : | the icon list |
pos : | the index of the icon to remove |
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.
gil : | The GnomeIconList |
mode : | Selection mode |
void gnome_icon_list_select_icon (GnomeIconList *gil, int idx); |
Selects the icon at index position POS.
gil : | The icon list. |
idx : |
void gnome_icon_list_unselect_icon (GnomeIconList *gil, int pos); |
Removes the selection from the icon at the index position POS
gil : | The icon list. |
pos : | The index of the icon to unselect |
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.
gil : | the icon list |
event : | event which triggered this action (might be NULL) |
keep : | pointer to an icon to keep (might be NULL). |
void gnome_icon_list_set_icon_width (GnomeIconList *gil, int w); |
Use this routine to change the icon width
gil : | The icon list |
w : | the new width for the icons |
void gnome_icon_list_set_row_spacing (GnomeIconList *gil, int pixels); |
Sets the number of pixels for the inter-row spacing.
gil : | The GnomeIconList |
pixels : | 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.
gil : | The GnomeIconList |
pixels : | 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.
gil : | The GnomeIconList |
pixels : | 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
gil : | The GnomeIconList |
pixels : | number of pixels for the border. |
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
gil : | The GnomeIconList |
sep : | A list of characters used to split the string |
void gnome_icon_list_set_icon_data (GnomeIconList *gil, int pos, |
gil : | |
pos : | |
data : |
void gnome_icon_list_set_icon_data_full (GnomeIconList *gil, int pos, |
gil : | |
pos : | |
data : | |
destroy : |
int gnome_icon_list_find_icon_from_data (GnomeIconList *gil, |
gil : | The GnomeIconList |
data : | data pointer. |
Returns : | the index of the icon whose per-icon data has been set to DATA. |
|
gil : | The GnomeIconList |
pos : | icon index. |
Returns : | the per-icon data associated with the icon at index position POS |
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.
gil : | The GnomeIconList |
pos : | Icon index |
yalign : | Desired alignement. |
|
gil : | |
pos : |
int gnome_icon_list_get_icon_at (GnomeIconList *gil, int x, int y); |
gil : | the icon list |
x : | screen x position. |
y : | screen y position. |
Returns : | the icon index which is at x, y coordinates on the screen. If there is no icon at that location it will return -1. |
int gnome_icon_list_get_items_per_line (GnomeIconList *gil); |
gil : | the icon list |
Returns : | the number of icons that fit in a line |
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.
iconlist : | the object which received the signal. |
arg1 : | |
event : | |
user_data : | user data set when the signal handler was connected. |
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.
iconlist : | the object which received the signal. |
arg1 : | |
event : | |
user_data : | user data set when the signal handler was connected. |
|
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.
iconlist : | the object which received the signal. |
arg1 : | |
arg2 : | The text entered by the user. |
user_data : | user data set when the signal handler was connected. |
Returns : | Whether the change is accepted or not. |