Menu Utilities

Menu Utilities — Menu Utility API

Synopsis




GtkWidget*  gf_gtk_menu_item_new            (const gchar *caption,
                                             GtkWidget *image,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);
GtkWidget*  gf_gtk_menu_item_new_from_stock (const gchar *caption,
                                             const gchar *stock_id,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);
GtkWidget*  gf_gtk_menu_add_separator       (GtkWidget *menu);
GtkWidget*  gf_gtk_menu_add_new_item        (GtkWidget *menu,
                                             const gchar *caption,
                                             GtkWidget *image,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);
GtkWidget*  gf_gtk_menu_add_new_item_from_stock
                                            (GtkWidget *menu,
                                             const gchar *caption,
                                             const gchar *stock_id,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);
GtkWidget*  gf_gtk_menu_connections         (GCallback cb);
GtkWidget*  gf_gtk_menu_client_connections  (GCallback cb);
GtkWidget*  gf_gtk_menu_server_connections  (GCallback cb);

Description

This is a collection of helper API for dealing with and building menus.

Details

gf_gtk_menu_item_new ()

GtkWidget*  gf_gtk_menu_item_new            (const gchar *caption,
                                             GtkWidget *image,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);

Creates a new menu item.

caption : The caption.
image : The GtkImage or c NULL.
sg : The GtkSizeGroup or c NULL.
cb : The GCallback to use for the activate signal.
data : The user data to pass to cb.
Returns : The new menu item.

gf_gtk_menu_item_new_from_stock ()

GtkWidget*  gf_gtk_menu_item_new_from_stock (const gchar *caption,
                                             const gchar *stock_id,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);

Creates a new menu item from stock_id.

caption : The caption.
stock_id : The GtkStockItem id to use.
sg : The GtkSizeGroup.
cb : The GCallback function to use for the activate signal.
data : The user data to pass to cb.
Returns : The new menu item from stock_id.

gf_gtk_menu_add_separator ()

GtkWidget*  gf_gtk_menu_add_separator       (GtkWidget *menu);

Adds a separator to menu.

menu : The menu.
Returns : The separator.

gf_gtk_menu_add_new_item ()

GtkWidget*  gf_gtk_menu_add_new_item        (GtkWidget *menu,
                                             const gchar *caption,
                                             GtkWidget *image,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);

Creates a new menu item and adds it to menu.

menu : The menu.
caption : The caption.
image : The GtkImage to use.
sg : The GtkSizeGroup for the menu.
cb : The GCallback for the activate signal.
data : The user data to pass to cb.
Returns : The new menu item.

gf_gtk_menu_add_new_item_from_stock ()

GtkWidget*  gf_gtk_menu_add_new_item_from_stock
                                            (GtkWidget *menu,
                                             const gchar *caption,
                                             const gchar *stock_id,
                                             GtkSizeGroup *sg,
                                             GCallback cb,
                                             gpointer data);

Creates a new menu item from stock_id and adds it to menu.

menu : The menu.
caption : The caption.
stock_id : The GtkStockItem id to use.
sg : The GtkSizeGroup for the menu.
cb : The GCallback for the activate signal.
data : The user data to pass to cb.
Returns : The new menu item.

gf_gtk_menu_connections ()

GtkWidget*  gf_gtk_menu_connections         (GCallback cb);

Creates a GtkMenu of all the registered GfConnection's.

Note: The activate signal will be connected with the GType as the data.

cb : The GCallback to use for the activate signal.
Returns : The menu.

gf_gtk_menu_client_connections ()

GtkWidget*  gf_gtk_menu_client_connections  (GCallback cb);

Creates a GtkMenu of all the registered client connections.

Note: The activate signal will be connected with the GType as the data.

cb : The GCallback to use for the activate signal.
Returns : The menu.

gf_gtk_menu_server_connections ()

GtkWidget*  gf_gtk_menu_server_connections  (GCallback cb);

Creates a GtkMenu of all the registered server connections.

Note: The activate signal will be connected with the GType as the data.

cb : The GCallback to use for the activate signal.
Returns : The menu.