Synopsis#include <gtk/gtk.h> GtkItemFactory; void (*GtkPrintFunc) (gpointer func_data, const gchar *str); gchar* (*GtkTranslateFunc) (const gchar *path, gpointer func_data); void (*GtkItemFactoryCallback) (); void (*GtkItemFactoryCallback1) (gpointer callback_data, guint callback_action, GtkWidget *widget); void (*GtkItemFactoryCallback2) (GtkWidget *widget, gpointer callback_data, guint callback_action); GtkItemFactoryEntry; GtkItemFactoryItem; GtkItemFactory* gtk_item_factory_new (GType container_type, const gchar *path, GtkAccelGroup *accel_group); void gtk_item_factory_construct (GtkItemFactory *ifactory, GType container_type, const gchar *path, GtkAccelGroup *accel_group); void gtk_item_factory_add_foreign (GtkWidget *accel_widget, const gchar *full_path, GtkAccelGroup *accel_group, guint keyval, GdkModifierType modifiers); GtkItemFactory* gtk_item_factory_from_widget (GtkWidget *widget); const gchar* gtk_item_factory_path_from_widget (GtkWidget *widget); GtkWidget* gtk_item_factory_get_item (GtkItemFactory *ifactory, const gchar *path); GtkWidget* gtk_item_factory_get_widget (GtkItemFactory *ifactory, const gchar *path); GtkWidget* gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory, guint action); GtkWidget* gtk_item_factory_get_item_by_action (GtkItemFactory *ifactory, guint action); void gtk_item_factory_create_item (GtkItemFactory *ifactory, GtkItemFactoryEntry *entry, gpointer callback_data, guint callback_type); void gtk_item_factory_create_items (GtkItemFactory *ifactory, guint n_entries, GtkItemFactoryEntry *entries, gpointer callback_data); void gtk_item_factory_create_items_ac (GtkItemFactory *ifactory, guint n_entries, GtkItemFactoryEntry *entries, gpointer callback_data, guint callback_type); void gtk_item_factory_delete_item (GtkItemFactory *ifactory, const gchar *path); void gtk_item_factory_delete_entry (GtkItemFactory *ifactory, GtkItemFactoryEntry *entry); void gtk_item_factory_delete_entries (GtkItemFactory *ifactory, guint n_entries, GtkItemFactoryEntry *entries); void gtk_item_factory_popup (GtkItemFactory *ifactory, guint x, guint y, guint mouse_button, guint32 time_); void gtk_item_factory_popup_with_data (GtkItemFactory *ifactory, gpointer popup_data, GDestroyNotify destroy, guint x, guint y, guint mouse_button, guint32 time_); gpointer gtk_item_factory_popup_data (GtkItemFactory *ifactory); gpointer gtk_item_factory_popup_data_from_widget (GtkWidget *widget); GtkItemFactory* gtk_item_factory_from_path (const gchar *path); void gtk_item_factory_create_menu_entries (guint n_entries, GtkMenuEntry *entries); void gtk_item_factories_path_delete (const gchar *ifactory_path, const gchar *path); void gtk_item_factory_set_translate_func (GtkItemFactory *ifactory, GtkTranslateFunc func, gpointer data, GDestroyNotify notify); DetailsGtkItemFactorytypedef struct _GtkItemFactory GtkItemFactory; Warning
GtkPrintFunc ()void (*GtkPrintFunc) (gpointer func_data, const gchar *str); Warning
GtkTranslateFunc ()gchar* (*GtkTranslateFunc) (const gchar *path, gpointer func_data); The function used to translate messages in e.g. GtkIconFactory and GtkActionGroup.
GtkItemFactoryCallback ()void (*GtkItemFactoryCallback) (); Warning
GtkItemFactoryCallback1 ()void (*GtkItemFactoryCallback1) (gpointer callback_data, guint callback_action, GtkWidget *widget); Warning
GtkItemFactoryCallback2 ()void (*GtkItemFactoryCallback2) (GtkWidget *widget, gpointer callback_data, guint callback_action); Warning
GtkItemFactoryEntrytypedef struct { gchar *path; gchar *accelerator; GtkItemFactoryCallback callback; guint callback_action; /* possible values: * NULL -> "<Item>" * "" -> "<Item>" * "<Title>" -> create a title item * "<Item>" -> create a simple item * "<ImageItem>" -> create an item holding an image * "<StockItem>" -> create an item holding a stock image * "<CheckItem>" -> create a check item * "<ToggleItem>" -> create a toggle item * "<RadioItem>" -> create a radio item * <path> -> path of a radio item to link against * "<Separator>" -> create a separator * "<Tearoff>" -> create a tearoff separator * "<Branch>" -> create an item to hold sub items * "<LastBranch>" -> create a right justified item to hold sub items */ gchar *item_type; /* Extra data for some item types: * ImageItem -> pointer to inlined pixbuf stream * StockItem -> name of stock item */ gconstpointer extra_data; } GtkItemFactoryEntry; Warning
GtkItemFactoryItemtypedef struct { gchar *path; GSList *widgets; } GtkItemFactoryItem; Warning
gtk_item_factory_new ()GtkItemFactory* gtk_item_factory_new (GType container_type, const gchar *path, GtkAccelGroup *accel_group); Warning
Creates a new GtkItemFactory. Beware that the returned object does not have a floating reference.
gtk_item_factory_construct ()void gtk_item_factory_construct (GtkItemFactory *ifactory, GType container_type, const gchar *path, GtkAccelGroup *accel_group); Warning
Initializes an item factory.
gtk_item_factory_add_foreign ()void gtk_item_factory_add_foreign (GtkWidget *accel_widget, const gchar *full_path, GtkAccelGroup *accel_group, guint keyval, GdkModifierType modifiers); Warning
Installs an accelerator for
This function can be used to make widgets participate in the accel
saving/restoring functionality provided by
gtk_item_factory_from_widget ()GtkItemFactory* gtk_item_factory_from_widget (GtkWidget *widget); Warning
Obtains the item factory from which a widget was created.
gtk_item_factory_path_from_widget ()const gchar* gtk_item_factory_path_from_widget (GtkWidget *widget); Warning
If
gtk_item_factory_get_item ()GtkWidget* gtk_item_factory_get_item (GtkItemFactory *ifactory, const gchar *path); Warning
Obtains the menu item which corresponds to
If the widget corresponding to
gtk_item_factory_get_widget ()GtkWidget* gtk_item_factory_get_widget (GtkItemFactory *ifactory, const gchar *path); Warning
Obtains the widget which corresponds to
If the widget corresponding to
gtk_item_factory_get_widget_by_action ()GtkWidget* gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory, guint action); Warning
Obtains the widget which was constructed from the GtkItemFactoryEntry
with the given If there are multiple items with the same action, the result is undefined.
gtk_item_factory_get_item_by_action ()GtkWidget* gtk_item_factory_get_item_by_action (GtkItemFactory *ifactory, guint action); Warning
Obtains the menu item which was constructed from the first
GtkItemFactoryEntry with the given
gtk_item_factory_create_item ()void gtk_item_factory_create_item (GtkItemFactory *ifactory, GtkItemFactoryEntry *entry, gpointer callback_data, guint callback_type); Warning
Creates an item for
gtk_item_factory_create_items ()void gtk_item_factory_create_items (GtkItemFactory *ifactory, guint n_entries, GtkItemFactoryEntry *entries, gpointer callback_data); Warning
Creates the menu items from the
gtk_item_factory_create_items_ac ()void gtk_item_factory_create_items_ac (GtkItemFactory *ifactory, guint n_entries, GtkItemFactoryEntry *entries, gpointer callback_data, guint callback_type); Warning
Creates the menu items from the
gtk_item_factory_delete_item ()void gtk_item_factory_delete_item (GtkItemFactory *ifactory, const gchar *path); Warning
Deletes the menu item which was created for
gtk_item_factory_delete_entry ()void gtk_item_factory_delete_entry (GtkItemFactory *ifactory, GtkItemFactoryEntry *entry); Warning
Deletes the menu item which was created from
gtk_item_factory_delete_entries ()void gtk_item_factory_delete_entries (GtkItemFactory *ifactory, guint n_entries, GtkItemFactoryEntry *entries); Warning
Deletes the menu items which were created from the
gtk_item_factory_popup ()void gtk_item_factory_popup (GtkItemFactory *ifactory, guint x, guint y, guint mouse_button, guint32 time_); Warning
Pops up the menu constructed from the item factory at (
The
The
The operation of the
gtk_item_factory_popup_with_data ()void gtk_item_factory_popup_with_data (GtkItemFactory *ifactory, gpointer popup_data, GDestroyNotify destroy, guint x, guint y, guint mouse_button, guint32 time_); Warning
Pops up the menu constructed from the item factory at (
The
The
The operation of the
gtk_item_factory_popup_data ()gpointer gtk_item_factory_popup_data (GtkItemFactory *ifactory); Warning
Obtains the
gtk_item_factory_popup_data_from_widget ()gpointer gtk_item_factory_popup_data_from_widget (GtkWidget *widget); Warning
Obtains the
gtk_item_factory_from_path ()GtkItemFactory* gtk_item_factory_from_path (const gchar *path); Warning
Finds an item factory which has been constructed using the
gtk_item_factory_create_menu_entries ()void gtk_item_factory_create_menu_entries (guint n_entries, GtkMenuEntry *entries); Warning
Creates the menu items from the
gtk_item_factories_path_delete ()void gtk_item_factories_path_delete (const gchar *ifactory_path, const gchar *path); Warning
Deletes all widgets constructed from the specified path.
gtk_item_factory_set_translate_func ()void gtk_item_factory_set_translate_func (GtkItemFactory *ifactory, GtkTranslateFunc func, gpointer data, GDestroyNotify notify); Warning
Sets a function to be used for translating the path elements before they are displayed.
|