![]() |
![]() |
![]() |
GtkExtra Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
#include <gtkextra.h> GtkIconList; enum GtkIconListMode; GtkIconListItem; GtkWidget* gtk_icon_list_new (guint icon_width, GtkIconListMode mode); void gtk_icon_list_construct (GtkIconList *iconlist, guint icon_width, GtkIconListMode mode); void gtk_icon_list_set_mode (GtkIconList *iconlist, GtkIconListMode mode); GtkIconListMode gtk_icon_list_get_mode (GtkIconList *iconlist); void gtk_icon_list_set_editable (GtkIconList *iconlist, gboolean editable); gboolean gtk_icon_list_is_editable (GtkIconList *iconlist); void gtk_icon_list_set_row_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_row_spacing (GtkIconList *iconlist); void gtk_icon_list_set_col_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_col_spacing (GtkIconList *iconlist); void gtk_icon_list_set_text_space (GtkIconList *iconlist, guint text_space); guint gtk_icon_list_get_text_space (GtkIconList *iconlist); void gtk_icon_list_set_icon_border (GtkIconList *iconlist, guint border); guint gtk_icon_list_get_icon_border (GtkIconList *iconlist); void gtk_icon_list_set_icon_width (GtkIconList *iconlist, guint width); guint gtk_icon_list_get_icon_width (GtkIconList *iconlist); void gtk_icon_list_freeze (GtkIconList *iconlist); void gtk_icon_list_thaw (GtkIconList *iconlist); void gtk_icon_list_set_background (GtkIconList *iconlist, GdkColor *color); GtkIconListItem * gtk_icon_list_add_from_pixmap (GtkIconList *icon_list, GdkPixmap *pixmap, GdkBitmap *bitmap_mask, const gchar *label, gpointer link); GtkIconListItem * gtk_icon_list_add_from_data (GtkIconList *iconlist, gchar **data, const gchar *label, gpointer link); GtkIconListItem * gtk_icon_list_add (GtkIconList *iconlist, const gchar *pixmap_file, const gchar *label, gpointer link); GtkIconListItem * gtk_icon_list_get_nth (GtkIconList *iconlist, guint n); gint gtk_icon_list_get_index (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_remove (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_set_active_icon (GtkIconList *iconlist, GtkIconListItem *icon); void gtk_icon_list_remove_nth (GtkIconList *iconlist, guint n); void gtk_icon_list_update (GtkIconList *iconlist); void gtk_icon_list_clear (GtkIconList *iconlist); void gtk_icon_list_link (GtkIconListItem *item, gpointer data); gpointer gtk_icon_list_get_link (GtkIconListItem *item); GtkIconListItem * gtk_icon_list_get_icon_from_link (GtkIconList *iconlist, gpointer data); GtkIconListItem * gtk_icon_list_get_icon_at (GtkIconList *iconlist, gint x, gint y); GtkIconListItem * gtk_icon_list_get_active_icon (GtkIconList *iconlist); GtkWidget * gtk_icon_list_get_entry (GtkIconListItem *item); GtkWidget * gtk_icon_list_get_pixmap (GtkIconListItem *item); void gtk_icon_list_set_pixmap (GtkIconListItem *item, GdkPixmap *pixmap, GdkBitmap *bitmap_mask); void gtk_icon_list_set_label (GtkIconList *iconlist, GtkIconListItem *item, const gchar *label); void gtk_icon_list_set_selection_mode (GtkIconList *iconlist, gint mode); void gtk_icon_list_select_icon (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_unselect_icon (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_unselect_all (GtkIconList *iconlist);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkFixed +----GtkIconList +----GtkFileList
"activate-icon" : Run Last "click-event" : Run Last "deactivate-icon" : Run Last "select-icon" : Run Last "text-changed" : Run Last "unselect-icon" : Run First
GtkIconList is a GtkFixed subclass that allows you to display a table of xpm icons with editable labels. It's completely designed from scratch with some ideas borrowed from gnome-icon-list. It contains almost all of its features and more. It can be used for file browsers and as a replacement of gnome-icon-list (without the need of using gnome libraries). Like GtkSheet, it uses the widget GtkItemEntry to edit the text fields.
typedef struct _GtkIconList GtkIconList;
The GtkIconList structure contains only private data. It should only be accessed through the functions described below.
typedef enum { GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW, } GtkIconListMode;
typedef struct { } GtkIconListItem;
The GtkIconListItem structure contains only private data. It should only be accessed through the functions described below.
GtkWidget* gtk_icon_list_new (guint icon_width, GtkIconListMode mode);
Creates a new GtkIconList widget.
|
the width of the icon |
|
GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW |
Returns : |
the newly-created GtkIconList widget. |
void gtk_icon_list_construct (GtkIconList *iconlist, guint icon_width, GtkIconListMode mode);
Initialize iconlist structure.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
the width of the icon |
|
GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW |
void gtk_icon_list_set_mode (GtkIconList *iconlist, GtkIconListMode mode);
Set the icons display mode .
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW |
GtkIconListMode gtk_icon_list_get_mode (GtkIconList *iconlist);
Get the icons display mode .
|
a GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW |
void gtk_icon_list_set_editable (GtkIconList *iconlist, gboolean editable);
Set if the user can edit the text in the editable widget or not.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
TUE or FALSE |
gboolean gtk_icon_list_is_editable (GtkIconList *iconlist);
Get the editable status of icon list.
|
GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
TRUE or FALSE |
void gtk_icon_list_set_row_spacing (GtkIconList *iconlist, guint spacing);
Set the icon spacing between rows.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
spacing between rows in pixels. |
guint gtk_icon_list_get_row_spacing (GtkIconList *iconlist);
Get the spacing between rows.
|
GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
spacing between rows in pixels. |
void gtk_icon_list_set_col_spacing (GtkIconList *iconlist, guint spacing);
Set the icon spacing between columns.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
spacing between columns in pixels. |
guint gtk_icon_list_get_col_spacing (GtkIconList *iconlist);
Get the spacing between columns.
|
GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
spacing between columns in pixels. |
void gtk_icon_list_set_text_space (GtkIconList *iconlist, guint text_space);
Set the text max size in pixels.
|
a GtkIconList widget created with gtk_icon_list_new() .
|
|
distance in pixels. |
guint gtk_icon_list_get_text_space (GtkIconList *iconlist);
Get the text maximum size in pixels.
|
GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
text maximum size distance in pixels. |
void gtk_icon_list_set_icon_border (GtkIconList *iconlist, guint border);
Set the icon border.
|
a GtkIconList widget created with gtk_icon_list_new() .
|
|
icon border in pixels. |
guint gtk_icon_list_get_icon_border (GtkIconList *iconlist);
Get the icon border width.
|
GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
icon border width in pixels. |
void gtk_icon_list_set_icon_width (GtkIconList *iconlist, guint width);
Set the icon width.
|
a GtkIconList widget created with gtk_icon_list_new() .
|
|
icon width in pixels. |
guint gtk_icon_list_get_icon_width (GtkIconList *iconlist);
Get the icon width.
|
GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
icon width in pixels. |
void gtk_icon_list_freeze (GtkIconList *iconlist);
Freeze icon list.
|
GtkIconList widget created with gtk_icon_list_new() .
|
void gtk_icon_list_thaw (GtkIconList *iconlist);
Thaw(unfreeze) icon list.
|
GtkIconList widget created with gtk_icon_list_new() .
|
void gtk_icon_list_set_background (GtkIconList *iconlist, GdkColor *color);
Set the iconlist background color.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
a GdkColor |
GtkIconListItem * gtk_icon_list_add_from_pixmap (GtkIconList *icon_list, GdkPixmap *pixmap, GdkBitmap *bitmap_mask, const gchar *label, gpointer link);
Add a icon to the icon list.
|
a GtkIconList widget created with gtk_icon_list_new() .
|
|
a GdkPixmap |
|
a GdkBitmap |
|
label of the icon |
|
a gpointer link to some data |
Returns : |
the icon pointer |
GtkIconListItem * gtk_icon_list_add_from_data (GtkIconList *iconlist, gchar **data, const gchar *label, gpointer link);
Add a icon to the icon list.
|
a GtkIconList widget created with gtk_icon_list_new() .
|
|
pointer to the xpm data string |
|
label of the icon |
|
a data pointer |
Returns : |
the icon pointer |
GtkIconListItem * gtk_icon_list_add (GtkIconList *iconlist, const gchar *pixmap_file, const gchar *label, gpointer link);
Add a icon to the icon list.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
from #include "file.xpm" |
|
label of the icon |
|
link |
Returns : |
the icon pointer |
GtkIconListItem * gtk_icon_list_get_nth (GtkIconList *iconlist, guint n);
Get nth icon from the icon list.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
icon index number. |
Returns : |
a GtkIconListItem |
gint gtk_icon_list_get_index (GtkIconList *iconlist, GtkIconListItem *item);
Get the index number of the icon specified by its GtkIconListItem pointer.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
a GtkIconListItem |
Returns : |
icon index number |
void gtk_icon_list_remove (GtkIconList *iconlist, GtkIconListItem *item);
Remove the icon from the iconlist.
|
a GtkIconList widget created with gtk_icon_list_new() .
|
|
a GtkIconListItem |
void gtk_icon_list_set_active_icon (GtkIconList *iconlist, GtkIconListItem *icon);
Set an active icon in the icon list.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
a GtkIconListItem |
void gtk_icon_list_remove_nth (GtkIconList *iconlist, guint n);
Remove nth icon from the iconlist.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
icon index number |
void gtk_icon_list_update (GtkIconList *iconlist);
Update the icon list widget..
|
GtkIconList widget created with gtk_icon_list_new() .
|
void gtk_icon_list_clear (GtkIconList *iconlist);
Clear the icon list widget.
|
GtkIconList widget created with gtk_icon_list_new() .
|
void gtk_icon_list_link (GtkIconListItem *item, gpointer data);
Add a gpointer link to a icon from the iconlist.
|
GtkIconListItem |
|
a gpointer to some data |
gpointer gtk_icon_list_get_link (GtkIconListItem *item);
Add a gpointer link to a icon from the iconlist.
|
a GtkIconListItem |
Returns : |
(transfer none) a gpointer to some data sed with
gtk_icon_list_link() .
|
GtkIconListItem * gtk_icon_list_get_icon_from_link (GtkIconList *iconlist, gpointer data);
Gets the icon pointer from the link attached to it.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
a gpointer to some data |
Returns : |
a GtkIconListItem |
GtkIconListItem * gtk_icon_list_get_icon_at (GtkIconList *iconlist, gint x, gint y);
Get the icon situated at x,y coordinates in icon list.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
x coordindate |
|
y coordinate |
Returns : |
the icon pointer |
GtkIconListItem * gtk_icon_list_get_active_icon (GtkIconList *iconlist);
Set the iconlist background color.
|
GtkIconList widget created with gtk_icon_list_new() .
|
Returns : |
the icon pointer |
GtkWidget * gtk_icon_list_get_entry (GtkIconListItem *item);
Get the item->entry.
|
a GtkIconListItem |
Returns : |
(transfer none) a GtkWidget |
GtkWidget * gtk_icon_list_get_pixmap (GtkIconListItem *item);
Get the icon pixmap.
|
a GtkIconListItem |
Returns : |
(transfer none) a GtkWidget |
void gtk_icon_list_set_pixmap (GtkIconListItem *item, GdkPixmap *pixmap, GdkBitmap *bitmap_mask);
Set the icon pixmap.
|
a GtkIconListItem |
|
a GdkPixmap |
|
a GdkBitmap |
void gtk_icon_list_set_label (GtkIconList *iconlist, GtkIconListItem *item, const gchar *label);
Set the icon label.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
a GtkIconListItem |
|
icon label |
void gtk_icon_list_set_selection_mode (GtkIconList *iconlist, gint mode);
Set the icon selection mode.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW |
void gtk_icon_list_select_icon (GtkIconList *iconlist, GtkIconListItem *item);
Select the icon specified by pointer.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
a GtkIconListItem |
void gtk_icon_list_unselect_icon (GtkIconList *iconlist, GtkIconListItem *item);
Unselect the icon specified by pointer.
|
GtkIconList widget created with gtk_icon_list_new() .
|
|
a GtkIconListItem |
void gtk_icon_list_unselect_all (GtkIconList *iconlist);
Unselect all icons.
|
GtkIconList widget created with gtk_icon_list_new() .
|
"activate-icon"
signalgboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
Returns : |
"click-event"
signalvoid user_function (GtkIconList *iconlist, GdkEvent *event, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"deactivate-icon"
signalgboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
Returns : |
"select-icon"
signalgboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, GdkEvent *event, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
|
|
user data set when the signal handler was connected. |
Returns : |
"text-changed"
signalgboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, gchar *arg2, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
|
|
user data set when the signal handler was connected. |
Returns : |
"unselect-icon"
signalvoid user_function (GtkIconList *iconlist, GtkIconListItem *arg1, GdkEvent *event, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
|
|
user data set when the signal handler was connected. |