menu-windowlist

menu-windowlist — Option menu of data windows

Synopsis




gboolean    (*GwyDataWindowMenuFilterFunc)  (GwyDataWindow *data_window,
                                             gpointer user_data);
GtkWidget*  gwy_option_menu_data_window     (GCallback callback,
                                             gpointer cbdata,
                                             const gchar *none_label,
                                             GtkWidget *current);
GtkWidget*  gwy_option_menu_data_window_filtered
                                            (GCallback callback,
                                             gpointer cbdata,
                                             const gchar *none_label,
                                             GtkWidget *current,
                                             GwyDataWindowMenuFilterFunc filter,
                                             gpointer user_data);
gboolean    gwy_option_menu_data_window_set_history
                                            (GtkWidget *option_menu,
                                             GtkWidget *current);
GtkWidget*  gwy_option_menu_data_window_get_history
                                            (GtkWidget *option_menu);

Description

Warning

To be removed, reworked, and definitely changed to GtkComboBox or some other widget.

Details

GwyDataWindowMenuFilterFunc ()

gboolean    (*GwyDataWindowMenuFilterFunc)  (GwyDataWindow *data_window,
                                             gpointer user_data);

Warning

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

data_window :
user_data :
Returns :

gwy_option_menu_data_window ()

GtkWidget*  gwy_option_menu_data_window     (GCallback callback,
                                             gpointer cbdata,
                                             const gchar *none_label,
                                             GtkWidget *current);

Warning

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

Creates an option menu of existing data windows, with thumbnails.

See gwy_option_menu_data_window_filtered() for discussion.

callback : A callback called when a menu item is activated (or NULL for no callback).
cbdata : User data passed to the callback.
none_label : Label to use for `none' menu item. If it is NULL, no `none' item is created, if it is empty, a default label is used.
current : Data window to be shown as currently selected.
Returns : The newly created option menu as a GtkWidget.

gwy_option_menu_data_window_filtered ()

GtkWidget*  gwy_option_menu_data_window_filtered
                                            (GCallback callback,
                                             gpointer cbdata,
                                             const gchar *none_label,
                                             GtkWidget *current,
                                             GwyDataWindowMenuFilterFunc filter,
                                             gpointer user_data);

Warning

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

Creates an option menu of existing data windows, with thumbnails.

It sets object data "data-window" to data window pointer for each menu item.

Note the menu is currently only safe to use in modal dialogs only because it is static and does NOT react to creation or closing of data windows. However, it probably will react to it in the future, so make no assupmtions.

callback : A callback called when a menu item is activated (or NULL for no callback).
cbdata : User data passed to the callback.
none_label : Label to use for `none' menu item. If it is NULL, no `none' item is created, if it is empty, a default label is used.
current : Data window to be shown as currently selected.
filter : Function to filter windows with. Only windows for which it returns TRUE are added to the option menu. May be NULL to add all windows.
user_data : Data to pass to filter as second argument.
Returns : The newly created option menu as a GtkWidget.

gwy_option_menu_data_window_set_history ()

gboolean    gwy_option_menu_data_window_set_history
                                            (GtkWidget *option_menu,
                                             GtkWidget *current);

Warning

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

Sets data window option menu history to a specific data window.

option_menu : An option menu created by gwy_option_menu_data_window().
current : Data window to be shown as currently selected.
Returns : TRUE if the history was set, FALSE if current was not found.

gwy_option_menu_data_window_get_history ()

GtkWidget*  gwy_option_menu_data_window_get_history
                                            (GtkWidget *option_menu);

Warning

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

Gets the currently selected data window in a data window option menu.

option_menu : An option menu created by gwy_option_menu_data_window().
Returns : The currently selected data window (may be NULL if `none' is selected).