MateIconList

MateIconList

Synopsis

#include <libmateui/libmateui.h>

enum                MateIconListMode;
struct              MateIconList;
GtkWidget *         mate_icon_list_new                 (guint icon_width,
                                                         GtkAdjustment *adj,
                                                         int flags);
void                mate_icon_list_construct           (MateIconList *gil,
                                                         guint icon_width,
                                                         GtkAdjustment *adj,
                                                         int flags);
void                mate_icon_list_set_hadjustment     (MateIconList *gil,
                                                         GtkAdjustment *hadj);
void                mate_icon_list_set_vadjustment     (MateIconList *gil,
                                                         GtkAdjustment *vadj);
void                mate_icon_list_freeze              (MateIconList *gil);
void                mate_icon_list_thaw                (MateIconList *gil);
void                mate_icon_list_insert              (MateIconList *gil,
                                                         int pos,
                                                         const char *icon_filename,
                                                         const char *text);
void                mate_icon_list_insert_pixbuf       (MateIconList *gil,
                                                         int pos,
                                                         GdkPixbuf *im,
                                                         const char *icon_filename,
                                                         const char *text);
int                 mate_icon_list_append              (MateIconList *gil,
                                                         const char *icon_filename,
                                                         const char *text);
int                 mate_icon_list_append_pixbuf       (MateIconList *gil,
                                                         GdkPixbuf *im,
                                                         const char *icon_filename,
                                                         const char *text);
void                mate_icon_list_clear               (MateIconList *gil);
void                mate_icon_list_remove              (MateIconList *gil,
                                                         int pos);
guint               mate_icon_list_get_num_icons       (MateIconList *gil);
GtkSelectionMode    mate_icon_list_get_selection_mode  (MateIconList *gil);
void                mate_icon_list_set_selection_mode  (MateIconList *gil,
                                                         GtkSelectionMode mode);
void                mate_icon_list_select_icon         (MateIconList *gil,
                                                         int pos);
void                mate_icon_list_select_all          (MateIconList *gil);
void                mate_icon_list_unselect_icon       (MateIconList *gil,
                                                         int pos);
int                 mate_icon_list_unselect_all        (MateIconList *gil);
GList *             mate_icon_list_get_selection       (MateIconList *gil);
void                mate_icon_list_focus_icon          (MateIconList *gil,
                                                         gint idx);
void                mate_icon_list_set_icon_width      (MateIconList *gil,
                                                         int w);
void                mate_icon_list_set_row_spacing     (MateIconList *gil,
                                                         int pixels);
void                mate_icon_list_set_col_spacing     (MateIconList *gil,
                                                         int pixels);
void                mate_icon_list_set_text_spacing    (MateIconList *gil,
                                                         int pixels);
void                mate_icon_list_set_icon_border     (MateIconList *gil,
                                                         int pixels);
void                mate_icon_list_set_separators      (MateIconList *gil,
                                                         const char *sep);
gchar *             mate_icon_list_get_icon_filename   (MateIconList *gil,
                                                         int idx);
int                 mate_icon_list_find_icon_from_filename
                                                        (MateIconList *gil,
                                                         const char *filename);
void                mate_icon_list_set_icon_data       (MateIconList *gil,
                                                         int idx,
                                                         gpointer data);
void                mate_icon_list_set_icon_data_full  (MateIconList *gil,
                                                         int pos,
                                                         gpointer data,
                                                         GDestroyNotify destroy);
int                 mate_icon_list_find_icon_from_data (MateIconList *gil,
                                                         gpointer data);
gpointer            mate_icon_list_get_icon_data       (MateIconList *gil,
                                                         int pos);
void                mate_icon_list_moveto              (MateIconList *gil,
                                                         int pos,
                                                         double yalign);
GtkVisibility       mate_icon_list_icon_is_visible     (MateIconList *gil,
                                                         int pos);
int                 mate_icon_list_get_icon_at         (MateIconList *gil,
                                                         int x,
                                                         int y);
int                 mate_icon_list_get_items_per_line  (MateIconList *gil);
MateIconTextItem * mate_icon_list_get_icon_text_item  (MateIconList *gil,
                                                         int idx);
MateCanvasPixbuf * mate_icon_list_get_icon_pixbuf_item
                                                        (MateIconList *gil,
                                                         int idx);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkLayout
                                 +----MateCanvas
                                       +----MateIconList

Implemented Interfaces

MateIconList implements AtkImplementorIface and GtkBuildable.

Signals

  "focus-icon"                                     : Run First
  "move-cursor"                                    : Action
  "select-icon"                                    : Run First
  "text-changed"                                   : Run Last
  "toggle-cursor-selection"                        : Action
  "unselect-icon"                                  : Run First

Description

Details

enum MateIconListMode

typedef enum {
	MATE_ICON_LIST_ICONS,
	MATE_ICON_LIST_TEXT_BELOW,
	MATE_ICON_LIST_TEXT_RIGHT
} MateIconListMode;

Warning

MateIconListMode is deprecated and should not be used in newly-written code.


struct MateIconList

struct MateIconList;

Warning

MateIconList is deprecated and should not be used in newly-written code.


mate_icon_list_new ()

GtkWidget *         mate_icon_list_new                 (guint icon_width,
                                                         GtkAdjustment *adj,
                                                         int flags);

Warning

mate_icon_list_new is deprecated and should not be used in newly-written code.

icon_width :

adj :

flags :

Returns :


mate_icon_list_construct ()

void                mate_icon_list_construct           (MateIconList *gil,
                                                         guint icon_width,
                                                         GtkAdjustment *adj,
                                                         int flags);

Warning

mate_icon_list_construct is deprecated and should not be used in newly-written code.

Constructor for the icon list, to be used by derived classes.

gil :

An icon list.

icon_width :

Width for the icon columns.

flags :

A combination of MATE_ICON_LIST_IS_EDITABLE and MATE_ICON_LIST_STATIC_TEXT.

mate_icon_list_set_hadjustment ()

void                mate_icon_list_set_hadjustment     (MateIconList *gil,
                                                         GtkAdjustment *hadj);

Warning

mate_icon_list_set_hadjustment is deprecated and should not be used in newly-written code.

Sets the adjustment to be used for horizontal scrolling. This is normally not required, as the icon list can be simply inserted in a &GtkScrolledWindow and scrolling will be handled automatically.

gil :

An icon list.

hadj :

Adjustment to be used for horizontal scrolling.

mate_icon_list_set_vadjustment ()

void                mate_icon_list_set_vadjustment     (MateIconList *gil,
                                                         GtkAdjustment *vadj);

Warning

mate_icon_list_set_vadjustment is deprecated and should not be used in newly-written code.

Sets the adjustment to be used for vertical scrolling. This is normally not required, as the icon list can be simply inserted in a &GtkScrolledWindow and scrolling will be handled automatically.

gil :

An icon list.

vadj :

Adjustment to be used for horizontal scrolling.

mate_icon_list_freeze ()

void                mate_icon_list_freeze              (MateIconList *gil);

Warning

mate_icon_list_freeze is deprecated and should not be used in newly-written code.

Freezes an icon list so that any changes made to it will not be reflected on the screen until it is thawed with mate_icon_list_thaw(). It is recommended to freeze the icon list before inserting or deleting many icons, for example, so that the layout process will only be executed once, when the icon list is finally thawed.

You can call this function multiple times, but it must be balanced with the same number of calls to mate_icon_list_thaw() before the changes will take effect.

gil :

An icon list.

mate_icon_list_thaw ()

void                mate_icon_list_thaw                (MateIconList *gil);

Warning

mate_icon_list_thaw is deprecated and should not be used in newly-written code.

Thaws the icon list and performs any pending layout operations. This is to be used in conjunction with mate_icon_list_freeze().

gil :

An icon list.

mate_icon_list_insert ()

void                mate_icon_list_insert              (MateIconList *gil,
                                                         int pos,
                                                         const char *icon_filename,
                                                         const char *text);

Warning

mate_icon_list_insert is deprecated and should not be used in newly-written code.

Inserts an icon in the specified icon list. The icon's image is loaded from the specified file, and it is inserted at the pos index.

gil :

An icon list.

pos :

Position at which the new icon should be inserted.

icon_filename :

Name of the file that holds the icon's image.

text :

Text to be used for the icon's caption.

mate_icon_list_insert_pixbuf ()

void                mate_icon_list_insert_pixbuf       (MateIconList *gil,
                                                         int pos,
                                                         GdkPixbuf *im,
                                                         const char *icon_filename,
                                                         const char *text);

Warning

mate_icon_list_insert_pixbuf is deprecated and should not be used in newly-written code.

Inserts an icon in the specified icon list. The icon is created from the specified Imlib image, and it is inserted at the pos index.

gil :

An icon list.

pos :

Position at which the new icon should be inserted.

im :

Pixbuf image with the icon image.

icon_filename :

Filename of the image file.

text :

Text to be used for the icon's caption.

mate_icon_list_append ()

int                 mate_icon_list_append              (MateIconList *gil,
                                                         const char *icon_filename,
                                                         const char *text);

Warning

mate_icon_list_append is deprecated and should not be used in newly-written code.

Appends an icon to the specified icon list. The icon's image is loaded from the specified file, and it is inserted at the pos index.

gil :

An icon list.

icon_filename :

Name of the file that holds the icon's image.

text :

Text to be used for the icon's caption.

Returns :


mate_icon_list_append_pixbuf ()

int                 mate_icon_list_append_pixbuf       (MateIconList *gil,
                                                         GdkPixbuf *im,
                                                         const char *icon_filename,
                                                         const char *text);

Warning

mate_icon_list_append_pixbuf is deprecated and should not be used in newly-written code.

Appends an icon to the specified icon list. The icon is created from the specified Imlib image.

gil :

An icon list.

im :

Pixbuf image with the icon image.

icon_filename :

Filename of the image file.

text :

Text to be used for the icon's caption.

Returns :


mate_icon_list_clear ()

void                mate_icon_list_clear               (MateIconList *gil);

Warning

mate_icon_list_clear is deprecated and should not be used in newly-written code.

Clears the contents for the icon list by removing all the icons. If destroy handlers were specified for any of the icons, they will be called with the appropriate data.

gil :

An icon list.

mate_icon_list_remove ()

void                mate_icon_list_remove              (MateIconList *gil,
                                                         int pos);

Warning

mate_icon_list_remove is deprecated and should not be used in newly-written code.

Removes the icon at index position pos. If a destroy handler was specified for that icon, it will be called with the appropriate data.

gil :

An icon list.

pos :

Index of the icon that should be removed.

mate_icon_list_get_num_icons ()

guint               mate_icon_list_get_num_icons       (MateIconList *gil);

Warning

mate_icon_list_get_num_icons is deprecated and should not be used in newly-written code.

gil :

An icon list.

Returns :

The number of icons in the icon list.

mate_icon_list_get_selection_mode ()

GtkSelectionMode    mate_icon_list_get_selection_mode  (MateIconList *gil);

Warning

mate_icon_list_get_selection_mode is deprecated and should not be used in newly-written code.

gil :

An icon list.

Returns :

The current selection mode for an icon list.

mate_icon_list_set_selection_mode ()

void                mate_icon_list_set_selection_mode  (MateIconList *gil,
                                                         GtkSelectionMode mode);

Warning

mate_icon_list_set_selection_mode is deprecated and should not be used in newly-written code.

Sets the selection mode for an icon list. The GTK_SELECTION_MULTIPLE and GTK_SELECTION_EXTENDED modes are considered equivalent.

gil :

An icon list.

mode :

New selection mode.

mate_icon_list_select_icon ()

void                mate_icon_list_select_icon         (MateIconList *gil,
                                                         int pos);

Warning

mate_icon_list_select_icon is deprecated and should not be used in newly-written code.

Selects the icon at the index specified by pos.

gil :

An icon list.

pos :

Index of the icon to be selected.

mate_icon_list_select_all ()

void                mate_icon_list_select_all          (MateIconList *gil);

Warning

mate_icon_list_select_all is deprecated and should not be used in newly-written code.

gil :

An icon list.

mate_icon_list_unselect_icon ()

void                mate_icon_list_unselect_icon       (MateIconList *gil,
                                                         int pos);

Warning

mate_icon_list_unselect_icon is deprecated and should not be used in newly-written code.

Unselects the icon at the index specified by pos.

gil :

An icon list.

pos :

Index of the icon to be unselected.

mate_icon_list_unselect_all ()

int                 mate_icon_list_unselect_all        (MateIconList *gil);

Warning

mate_icon_list_unselect_all is deprecated and should not be used in newly-written code.

gil :

An icon list.

Returns :

The number of icons in the icon list

mate_icon_list_get_selection ()

GList *             mate_icon_list_get_selection       (MateIconList *gil);

Warning

mate_icon_list_get_selection is deprecated and should not be used in newly-written code.

gil :

An icon list.

Returns :

A list of integers with the indices of the currently selected icons.

mate_icon_list_focus_icon ()

void                mate_icon_list_focus_icon          (MateIconList *gil,
                                                         gint idx);

Warning

mate_icon_list_focus_icon is deprecated and should not be used in newly-written code.

gil :

idx :


mate_icon_list_set_icon_width ()

void                mate_icon_list_set_icon_width      (MateIconList *gil,
                                                         int w);

Warning

mate_icon_list_set_icon_width is deprecated and should not be used in newly-written code.

Sets the amount of horizontal space allocated to the icons, i.e. the column width of the icon list.

gil :

An icon list.

w :

New width for the icon columns.

mate_icon_list_set_row_spacing ()

void                mate_icon_list_set_row_spacing     (MateIconList *gil,
                                                         int pixels);

Warning

mate_icon_list_set_row_spacing is deprecated and should not be used in newly-written code.

Sets the spacing to be used between rows of icons.

gil :

An icon list.

pixels :

Number of pixels for inter-row spacing.

mate_icon_list_set_col_spacing ()

void                mate_icon_list_set_col_spacing     (MateIconList *gil,
                                                         int pixels);

Warning

mate_icon_list_set_col_spacing is deprecated and should not be used in newly-written code.

Sets the spacing to be used between columns of icons.

gil :

An icon list.

pixels :

Number of pixels for inter-column spacing.

mate_icon_list_set_text_spacing ()

void                mate_icon_list_set_text_spacing    (MateIconList *gil,
                                                         int pixels);

Warning

mate_icon_list_set_text_spacing is deprecated and should not be used in newly-written code.

Sets the spacing to be used between an icon's image and its text caption.

gil :

An icon list.

pixels :

Number of pixels between an icon's image and its caption.

mate_icon_list_set_icon_border ()

void                mate_icon_list_set_icon_border     (MateIconList *gil,
                                                         int pixels);

Warning

mate_icon_list_set_icon_border is deprecated and should not be used in newly-written code.

Sets the width of the border to be displayed around an icon's image. This is currently not implemented.

gil :

An icon list.

pixels :

Number of border pixels to be used around an icon's image.

mate_icon_list_set_separators ()

void                mate_icon_list_set_separators      (MateIconList *gil,
                                                         const char *sep);

Warning

mate_icon_list_set_separators is deprecated and should not be used in newly-written code.

Sets the characters that can be used as word separators when doing word-wrapping in the icon text captions.

gil :

An icon list.

sep :

String with characters to be used as word separators.

mate_icon_list_get_icon_filename ()

gchar *             mate_icon_list_get_icon_filename   (MateIconList *gil,
                                                         int idx);

Warning

mate_icon_list_get_icon_filename is deprecated and should not be used in newly-written code.

gil :

An icon list.

idx :

Index of an icon.

Returns :

The filename of the icon with index idx.

mate_icon_list_find_icon_from_filename ()

int                 mate_icon_list_find_icon_from_filename
                                                        (MateIconList *gil,
                                                         const char *filename);

Warning

mate_icon_list_find_icon_from_filename is deprecated and should not be used in newly-written code.

gil :

An icon list.

filename :

Filename of an icon.

Returns :

The index of the icon whose filename is filename or -1 if there is no icon with this filename.

mate_icon_list_set_icon_data ()

void                mate_icon_list_set_icon_data       (MateIconList *gil,
                                                         int idx,
                                                         gpointer data);

Warning

mate_icon_list_set_icon_data is deprecated and should not be used in newly-written code.

gil :

idx :

data :


mate_icon_list_set_icon_data_full ()

void                mate_icon_list_set_icon_data_full  (MateIconList *gil,
                                                         int pos,
                                                         gpointer data,
                                                         GDestroyNotify destroy);

Warning

mate_icon_list_set_icon_data_full is deprecated and should not be used in newly-written code.

Associates the data pointer to the icon at the index specified by pos. The destroy argument points to a function that will be called when the icon is destroyed, or NULL if no function is to be called when this happens.

gil :

An icon list.

pos :

Index of an icon.

data :

User data to set on the icon.

destroy :

Destroy notification handler for the icon.

mate_icon_list_find_icon_from_data ()

int                 mate_icon_list_find_icon_from_data (MateIconList *gil,
                                                         gpointer data);

Warning

mate_icon_list_find_icon_from_data is deprecated and should not be used in newly-written code.

gil :

An icon list.

data :

Data pointer associated to an icon.

Returns :

The index of the icon whose user data has been set to data, or -1 if no icon has this data associated to it.

mate_icon_list_get_icon_data ()

gpointer            mate_icon_list_get_icon_data       (MateIconList *gil,
                                                         int pos);

Warning

mate_icon_list_get_icon_data is deprecated and should not be used in newly-written code.

gil :

An icon list.

pos :

Index of an icon.

Returns :

The user data pointer associated to the icon at the index specified by pos.

mate_icon_list_moveto ()

void                mate_icon_list_moveto              (MateIconList *gil,
                                                         int pos,
                                                         double yalign);

Warning

mate_icon_list_moveto is deprecated and should not be used in newly-written code.

Makes the icon whose index is pos be visible on the screen. The icon list gets scrolled so that the icon is visible. An alignment of 0.0 represents the top of the visible part of the icon list, and 1.0 represents the bottom. An icon can be centered on the icon list.

gil :

An icon list.

pos :

Index of an icon.

yalign :

Vertical alignment of the icon.

mate_icon_list_icon_is_visible ()

GtkVisibility       mate_icon_list_icon_is_visible     (MateIconList *gil,
                                                         int pos);

Warning

mate_icon_list_icon_is_visible is deprecated and should not be used in newly-written code.

gil :

An icon list.

pos :

Index of an icon.

Returns :

Whether the icon at the index specified by pos is visible. This will be GTK_VISIBILITY_NONE if the icon is not visible at all, GTK_VISIBILITY_PARTIAL if the icon is at least partially shown, and GTK_VISIBILITY_FULL if the icon is fully visible.

mate_icon_list_get_icon_at ()

int                 mate_icon_list_get_icon_at         (MateIconList *gil,
                                                         int x,
                                                         int y);

Warning

mate_icon_list_get_icon_at is deprecated and should not be used in newly-written code.

gil :

An icon list.

x :

X position in the icon list window.

y :

Y position in the icon list window.

Returns :

The index of the icon that is under the specified coordinates, which are relative to the icon list's window. If there is no icon in that position, -1 is returned.

mate_icon_list_get_items_per_line ()

int                 mate_icon_list_get_items_per_line  (MateIconList *gil);

Warning

mate_icon_list_get_items_per_line is deprecated and should not be used in newly-written code.

gil :

An icon list.

Returns :

The number of icons that fit in a line or row.

mate_icon_list_get_icon_text_item ()

MateIconTextItem * mate_icon_list_get_icon_text_item  (MateIconList *gil,
                                                         int idx);

Warning

mate_icon_list_get_icon_text_item is deprecated and should not be used in newly-written code.

gil :

idx :

Returns :


mate_icon_list_get_icon_pixbuf_item ()

MateCanvasPixbuf * mate_icon_list_get_icon_pixbuf_item
                                                        (MateIconList *gil,
                                                         int idx);

Warning

mate_icon_list_get_icon_pixbuf_item is deprecated and should not be used in newly-written code.

gil :

idx :

Returns :

Signal Details

The "focus-icon" signal

void                user_function                      (MateIconList *iconlist,
                                                        gint           arg1,
                                                        gpointer       user_data)      : Run First

iconlist :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "move-cursor" signal

void                user_function                      (MateIconList   *iconlist,
                                                        GtkDirectionType arg1,
                                                        gboolean         arg2,
                                                        gpointer         user_data)      : Action

iconlist :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "select-icon" signal

void                user_function                      (MateIconList *iconlist,
                                                        gint           arg1,
                                                        GdkEvent      *event,
                                                        gpointer       user_data)      : Run First

iconlist :

the object which received the signal.

arg1 :

event :

user_data :

user data set when the signal handler was connected.

The "text-changed" signal

gboolean            user_function                      (MateIconList *iconlist,
                                                        gint           arg1,
                                                        gchar         *arg2,
                                                        gpointer       user_data)      : Run Last

iconlist :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

Returns :


The "toggle-cursor-selection" signal

void                user_function                      (MateIconList *iconlist,
                                                        gpointer       user_data)      : Action

iconlist :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "unselect-icon" signal

void                user_function                      (MateIconList *iconlist,
                                                        gint           arg1,
                                                        GdkEvent      *event,
                                                        gpointer       user_data)      : Run First

iconlist :

the object which received the signal.

arg1 :

event :

user_data :

user data set when the signal handler was connected.