Stock Items

Name

Stock Items -- 

Synopsis


#include <gtk/gtk.h>


struct      GtkStockItem;
void        gtk_stock_add                   (const GtkStockItem *items,
                                             guint n_items);
void        gtk_stock_add_static            (const GtkStockItem *items,
                                             guint n_items);
GtkStockItem* gtk_stock_item_copy           (const GtkStockItem *item);
void        gtk_stock_item_free             (GtkStockItem *item);
GSList*     gtk_stock_list_ids              (void);
gboolean    gtk_stock_lookup                (const gchar *stock_id,
                                             GtkStockItem *item);

#define     GTK_STOCK_ADD
#define     GTK_STOCK_APPLY
#define     GTK_STOCK_BOLD
#define     GTK_STOCK_CANCEL
#define     GTK_STOCK_CDROM
#define     GTK_STOCK_CLEAR
#define     GTK_STOCK_CLOSE
#define     GTK_STOCK_CONVERT
#define     GTK_STOCK_COPY
#define     GTK_STOCK_CUT
#define     GTK_STOCK_DELETE
#define     GTK_STOCK_DIALOG_ERROR
#define     GTK_STOCK_DIALOG_INFO
#define     GTK_STOCK_DIALOG_QUESTION
#define     GTK_STOCK_DIALOG_WARNING
#define     GTK_STOCK_DND
#define     GTK_STOCK_DND_MULTIPLE
#define     GTK_STOCK_EXECUTE
#define     GTK_STOCK_FIND
#define     GTK_STOCK_FIND_AND_REPLACE
#define     GTK_STOCK_FLOPPY
#define     GTK_STOCK_GOTO_BOTTOM
#define     GTK_STOCK_GOTO_FIRST
#define     GTK_STOCK_GOTO_LAST
#define     GTK_STOCK_GOTO_TOP
#define     GTK_STOCK_GO_BACK
#define     GTK_STOCK_GO_DOWN
#define     GTK_STOCK_GO_FORWARD
#define     GTK_STOCK_GO_UP
#define     GTK_STOCK_HELP
#define     GTK_STOCK_HOME
#define     GTK_STOCK_INDEX
#define     GTK_STOCK_ITALIC
#define     GTK_STOCK_JUMP_TO
#define     GTK_STOCK_JUSTIFY_CENTER
#define     GTK_STOCK_JUSTIFY_FILL
#define     GTK_STOCK_JUSTIFY_LEFT
#define     GTK_STOCK_JUSTIFY_RIGHT
#define     GTK_STOCK_MISSING_IMAGE
#define     GTK_STOCK_NEW
#define     GTK_STOCK_NO
#define     GTK_STOCK_OK
#define     GTK_STOCK_OPEN
#define     GTK_STOCK_PASTE
#define     GTK_STOCK_PREFERENCES
#define     GTK_STOCK_PRINT
#define     GTK_STOCK_PRINT_PREVIEW
#define     GTK_STOCK_PROPERTIES
#define     GTK_STOCK_QUIT
#define     GTK_STOCK_REDO
#define     GTK_STOCK_REFRESH
#define     GTK_STOCK_REMOVE
#define     GTK_STOCK_REVERT_TO_SAVED
#define     GTK_STOCK_SAVE
#define     GTK_STOCK_SAVE_AS
#define     GTK_STOCK_SELECT_COLOR
#define     GTK_STOCK_SELECT_FONT
#define     GTK_STOCK_SORT_ASCENDING
#define     GTK_STOCK_SORT_DESCENDING
#define     GTK_STOCK_SPELL_CHECK
#define     GTK_STOCK_STOP
#define     GTK_STOCK_STRIKETHROUGH
#define     GTK_STOCK_UNDELETE
#define     GTK_STOCK_UNDERLINE
#define     GTK_STOCK_UNDO
#define     GTK_STOCK_YES
#define     GTK_STOCK_ZOOM_100
#define     GTK_STOCK_ZOOM_FIT
#define     GTK_STOCK_ZOOM_IN
#define     GTK_STOCK_ZOOM_OUT

Description

Details

struct GtkStockItem

struct GtkStockItem
{
  gchar *stock_id;
  gchar *label;
  GdkModifierType modifier;
  guint keyval;
  gchar *translation_domain;
};


gtk_stock_add ()

void        gtk_stock_add                   (const GtkStockItem *items,
                                             guint n_items);

Registers each of the stock items in items. If an item already exists with the same stock ID as one of the items, the old item gets replaced. The stock items are copied, so GTK+ does not hold any pointer into items and items can be freed. Use gtk_stock_add_static() if items is persistent and GTK+ need not copy the array.

items : a GtkStockItem or array of items
n_items : number of GtkStockItem in items


gtk_stock_add_static ()

void        gtk_stock_add_static            (const GtkStockItem *items,
                                             guint n_items);

Same as gtk_stock_add(), but doesn't copy items, so items must persist until application exit.

items : a GtkStockItem or array of GtkStockItem
n_items : number of items


gtk_stock_item_copy ()

GtkStockItem* gtk_stock_item_copy           (const GtkStockItem *item);

Copies a stock item, mostly useful for language bindings and not in applications.

item : a GtkStockItem
Returns : a new GtkStockItem


gtk_stock_item_free ()

void        gtk_stock_item_free             (GtkStockItem *item);

Frees a stock item allocated on the heap, such as one returned by gtk_stock_item_copy(). Also frees the fields inside the stock item, if they are not NULL.

item : a GtkStockItem


gtk_stock_list_ids ()

GSList*     gtk_stock_list_ids              (void);

Retrieves a list of all known stock IDs added to a GtkIconFactory or registered with gtk_stock_add(). The list must be freed with g_slist_free(), and each string in the list must be freed with g_free().

Returns : a list of known stock IDs


gtk_stock_lookup ()

gboolean    gtk_stock_lookup                (const gchar *stock_id,
                                             GtkStockItem *item);

Fills item with the registered values for stock_id, returning TRUE if stock_id was known.

stock_id : a stock item name
item : stock item to initialize with values
Returns : TRUE if item was initialized


GTK_STOCK_ADD

#define GTK_STOCK_ADD              "gtk-add"

The "Add" icon.


GTK_STOCK_APPLY

#define GTK_STOCK_APPLY            "gtk-apply"

The "Apply" icon and text.


GTK_STOCK_BOLD

#define GTK_STOCK_BOLD             "gtk-bold"

The "Bold" icon and text.


GTK_STOCK_CANCEL

#define GTK_STOCK_CANCEL           "gtk-cancel"

The "Cancel" icon and text.


GTK_STOCK_CDROM

#define GTK_STOCK_CDROM            "gtk-cdrom"

The "CD" icon.


GTK_STOCK_CLEAR

#define GTK_STOCK_CLEAR            "gtk-clear"

The "Clear" icon and text.


GTK_STOCK_CLOSE

#define GTK_STOCK_CLOSE            "gtk-close"

The "Close" icon and text.


GTK_STOCK_CONVERT

#define GTK_STOCK_CONVERT          "gtk-convert"

The "Convert" icon.


GTK_STOCK_COPY

#define GTK_STOCK_COPY             "gtk-copy"

The "Copy" icon and text.


GTK_STOCK_CUT

#define GTK_STOCK_CUT              "gtk-cut"

The "Cut" icon and text.


GTK_STOCK_DELETE

#define GTK_STOCK_DELETE           "gtk-delete"

The "Delete" icon and text.


GTK_STOCK_DIALOG_ERROR

#define GTK_STOCK_DIALOG_ERROR     "gtk-dialog-error"

The "Error" icon and text.


GTK_STOCK_DIALOG_INFO

#define GTK_STOCK_DIALOG_INFO      "gtk-dialog-info"

The "Information" icon and text.


GTK_STOCK_DIALOG_QUESTION

#define GTK_STOCK_DIALOG_QUESTION  "gtk-dialog-question"

The "Question" icon and text.


GTK_STOCK_DIALOG_WARNING

#define GTK_STOCK_DIALOG_WARNING   "gtk-dialog-warning"

The "Warning" icon and text.


GTK_STOCK_DND

#define GTK_STOCK_DND              "gtk-dnd"

The "Drag-And-Drop" icon.


GTK_STOCK_DND_MULTIPLE

#define GTK_STOCK_DND_MULTIPLE     "gtk-dnd-multiple"

The "Drag-And-Drop multiple" icon.


GTK_STOCK_EXECUTE

#define GTK_STOCK_EXECUTE          "gtk-execute"

The "Execute" icon.


GTK_STOCK_FIND

#define GTK_STOCK_FIND             "gtk-find"

The "Find" icon and text.


GTK_STOCK_FIND_AND_REPLACE

#define GTK_STOCK_FIND_AND_REPLACE "gtk-find-and-replace"

The "Find and Replace" icon and text.


GTK_STOCK_FLOPPY

#define GTK_STOCK_FLOPPY           "gtk-floppy"

The "Floppy" icon.


GTK_STOCK_GOTO_BOTTOM

#define GTK_STOCK_GOTO_BOTTOM      "gtk-goto-bottom"

The "Goto Bottom" icon.


GTK_STOCK_GOTO_FIRST

#define GTK_STOCK_GOTO_FIRST       "gtk-goto-first"

The "First" icon.


GTK_STOCK_GOTO_LAST

#define GTK_STOCK_GOTO_LAST        "gtk-goto-last"

The "Last" icon.


GTK_STOCK_GOTO_TOP

#define GTK_STOCK_GOTO_TOP         "gtk-goto-top"

The "Top" icon.


GTK_STOCK_GO_BACK

#define GTK_STOCK_GO_BACK          "gtk-go-back"

The "Back" icon and text.


GTK_STOCK_GO_DOWN

#define GTK_STOCK_GO_DOWN          "gtk-go-down"

The "Down" icon.


GTK_STOCK_GO_FORWARD

#define GTK_STOCK_GO_FORWARD       "gtk-go-forward"

The "Forward" icon and text.


GTK_STOCK_GO_UP

#define GTK_STOCK_GO_UP            "gtk-go-up"

The "Up" icon.


GTK_STOCK_HELP

#define GTK_STOCK_HELP             "gtk-help"

The "Help" icon and text.


GTK_STOCK_HOME

#define GTK_STOCK_HOME             "gtk-home"

The "Home" icon and text.


GTK_STOCK_INDEX

#define GTK_STOCK_INDEX            "gtk-index"

The "Index" icon.


GTK_STOCK_ITALIC

#define GTK_STOCK_ITALIC           "gtk-italic"

The "Italic" icon.


GTK_STOCK_JUMP_TO

#define GTK_STOCK_JUMP_TO          "gtk-jump-to"

The "Jump" icon.


GTK_STOCK_JUSTIFY_CENTER

#define GTK_STOCK_JUSTIFY_CENTER   "gtk-justify-center"

The "Center" icon and text.


GTK_STOCK_JUSTIFY_FILL

#define GTK_STOCK_JUSTIFY_FILL     "gtk-justify-fill"

The "Fill" icon and text.


GTK_STOCK_JUSTIFY_LEFT

#define GTK_STOCK_JUSTIFY_LEFT     "gtk-justify-left"

The "Left" icon and text.


GTK_STOCK_JUSTIFY_RIGHT

#define GTK_STOCK_JUSTIFY_RIGHT    "gtk-justify-right"

The "Right" icon and text.


GTK_STOCK_MISSING_IMAGE

#define GTK_STOCK_MISSING_IMAGE    "gtk-missing-image"

The "Missing" icon.


GTK_STOCK_NEW

#define GTK_STOCK_NEW              "gtk-new"

The "New" icon and text.


GTK_STOCK_NO

#define GTK_STOCK_NO               "gtk-no"

The "No" icon and text.


GTK_STOCK_OK

#define GTK_STOCK_OK               "gtk-ok"

The "OK" icon and text.


GTK_STOCK_OPEN

#define GTK_STOCK_OPEN             "gtk-open"

The "Open" icon and text.


GTK_STOCK_PASTE

#define GTK_STOCK_PASTE            "gtk-paste"

The "Past" icon and text.


GTK_STOCK_PREFERENCES

#define GTK_STOCK_PREFERENCES      "gtk-preferences"

The "Preferences" icon and text.


GTK_STOCK_PRINT

#define GTK_STOCK_PRINT            "gtk-print"

The "Print" icon and text.


GTK_STOCK_PRINT_PREVIEW

#define GTK_STOCK_PRINT_PREVIEW    "gtk-print-preview"

The "Print Preview" icon and text.


GTK_STOCK_PROPERTIES

#define GTK_STOCK_PROPERTIES       "gtk-properties"

The "Properties" icon and text.


GTK_STOCK_QUIT

#define GTK_STOCK_QUIT             "gtk-quit"

The "Quit" icon and text.


GTK_STOCK_REDO

#define GTK_STOCK_REDO             "gtk-redo"

The "Redo" icon and text.


GTK_STOCK_REFRESH

#define GTK_STOCK_REFRESH          "gtk-refresh"

The "Refresh" icon.


GTK_STOCK_REMOVE

#define GTK_STOCK_REMOVE           "gtk-remove"

The "Remove" icon.


GTK_STOCK_REVERT_TO_SAVED

#define GTK_STOCK_REVERT_TO_SAVED  "gtk-revert-to-saved"

The "Revert" icon and text.


GTK_STOCK_SAVE

#define GTK_STOCK_SAVE             "gtk-save"

The "Save" icon and text.


GTK_STOCK_SAVE_AS

#define GTK_STOCK_SAVE_AS          "gtk-save-as"

The "Save As" icon and text.


GTK_STOCK_SELECT_COLOR

#define GTK_STOCK_SELECT_COLOR     "gtk-select-color"

The "Select Color" icon.


GTK_STOCK_SELECT_FONT

#define GTK_STOCK_SELECT_FONT      "gtk-select-font"

The "Select Font" icon.


GTK_STOCK_SORT_ASCENDING

#define GTK_STOCK_SORT_ASCENDING   "gtk-sort-ascending"

The "Sort Ascending" icon.


GTK_STOCK_SORT_DESCENDING

#define GTK_STOCK_SORT_DESCENDING  "gtk-sort-descending"

The "Sort Descending" icon.


GTK_STOCK_SPELL_CHECK

#define GTK_STOCK_SPELL_CHECK      "gtk-spell-check"

The "Spell Check" icon and text.


GTK_STOCK_STOP

#define GTK_STOCK_STOP             "gtk-stop"

The "Stop" icon and text.


GTK_STOCK_STRIKETHROUGH

#define GTK_STOCK_STRIKETHROUGH    "gtk-strikethrough"

The "Strikethrough" icon and text.


GTK_STOCK_UNDELETE

#define GTK_STOCK_UNDELETE         "gtk-undelete"

The "Undelete" icon.


GTK_STOCK_UNDERLINE

#define GTK_STOCK_UNDERLINE        "gtk-underline"

The "Underline" icon and text.


GTK_STOCK_UNDO

#define GTK_STOCK_UNDO             "gtk-undo"

The "Undo" icon and text.


GTK_STOCK_YES

#define GTK_STOCK_YES              "gtk-yes"

The "Yes" icon and text.


GTK_STOCK_ZOOM_100

#define GTK_STOCK_ZOOM_100         "gtk-zoom-100"

The "Zoom 100%" icon and text.


GTK_STOCK_ZOOM_FIT

#define GTK_STOCK_ZOOM_FIT         "gtk-zoom-fit"

The "Zoom to Fit" icon and text.


GTK_STOCK_ZOOM_IN

#define GTK_STOCK_ZOOM_IN          "gtk-zoom-in"

The "Zoom In" icon and text.


GTK_STOCK_ZOOM_OUT

#define GTK_STOCK_ZOOM_OUT         "gtk-zoom-out"

The "Zoom Out" icon and text.