![]() |
![]() |
![]() |
GIMP Widgets Library Reference Manual | |
---|---|---|---|---|
GtkWidget* gimp_int_option_menu_new (gboolean menu_only, GCallback menu_item_callback, gpointer menu_item_callback_data, gint initial, ...); void gimp_int_option_menu_set_history (GtkOptionMenu *option_menu, gint item_data); gboolean (*GimpIntOptionMenuSensitivityCallback) (gint item_data, gpointer callback_data); void gimp_int_option_menu_set_sensitive (GtkOptionMenu *option_menu, GimpIntOptionMenuSensitivityCallback callback, gpointer callback_data); GtkWidget* gimp_option_menu_new (gboolean menu_only, ...); GtkWidget* gimp_option_menu_new2 (gboolean menu_only, GCallback menu_item_callback, gpointer menu_item_callback_data, gpointer initial, ...); void gimp_option_menu_set_history (GtkOptionMenu *option_menu, gpointer item_data); gboolean (*GimpOptionMenuSensitivityCallback) (gpointer item_data, gpointer callback_data); void gimp_option_menu_set_sensitive (GtkOptionMenu *option_menu, GimpOptionMenuSensitivityCallback callback, gpointer callback_data); void gimp_menu_item_update (GtkWidget *widget, gpointer data);
GtkWidget* gimp_int_option_menu_new (gboolean menu_only, GCallback menu_item_callback, gpointer menu_item_callback_data, gint initial, ...);
gimp_int_option_menu_new
is deprecated and should not be used in newly-written code.
Convenience function to create a GtkOptionMenu or a GtkMenu. This
function does the same thing as the deprecated function
gimp_option_menu_new2()
, but it takes integers as item_data
instead of pointers, since that is a very common case (mapping an
enum to a menu).
menu_only : |
TRUE if the function should return a GtkMenu only.
|
menu_item_callback : |
The callback each menu item's "activate" signal will be connected with. |
menu_item_callback_data : |
The data which will be passed to g_signal_connect() .
|
initial : |
The item_data of the initially selected menu item.
|
... : |
A NULL -terminated va_list describing the menu items.
|
Returns : | A GtkOptionMenu or a GtkMenu (depending on menu_only ).
|
void gimp_int_option_menu_set_history (GtkOptionMenu *option_menu, gint item_data);
gimp_int_option_menu_set_history
is deprecated and should not be used in newly-written code.
Iterates over all entries in a GtkOptionMenu and selects the one with the
matching item_data
. Probably only makes sense to use with a GtkOptionMenu
that was created using gimp_int_option_menu_new()
. This function does the
same thing as gimp_option_menu_set_history()
, but takes integers as
item_data
instead of pointers.
option_menu : |
A GtkOptionMenu as returned by gimp_int_option_menu_new() .
|
item_data : |
The item_data of the menu item you want to select.
|
gboolean (*GimpIntOptionMenuSensitivityCallback) (gint item_data, gpointer callback_data);
GimpIntOptionMenuSensitivityCallback
is deprecated and should not be used in newly-written code.
item_data : |
|
callback_data : |
|
Returns : |
void gimp_int_option_menu_set_sensitive (GtkOptionMenu *option_menu, GimpIntOptionMenuSensitivityCallback callback, gpointer callback_data);
gimp_int_option_menu_set_sensitive
is deprecated and should not be used in newly-written code.
Calls the given callback
for each item in the menu and passes it the
item_data and the callback_data
. The menu item's sensitivity is set
according to the return value of this function. This function does the
same thing as gimp_option_menu_set_sensitive()
, but takes integers as
item_data
instead of pointers.
option_menu : |
a GtkOptionMenu as returned by gimp_option_menu_new() or
gimp_option_menu_new2() .
|
callback : |
a function called for each item in the menu to determine the the sensitivity state. |
callback_data : |
data to pass to the callback function.
|
GtkWidget* gimp_option_menu_new (gboolean menu_only, ...);
gimp_option_menu_new
is deprecated and should not be used in newly-written code.
Convenience function to create a GtkOptionMenu or a GtkMenu.
menu_only : |
TRUE if the function should return a GtkMenu only.
|
... : |
A NULL -terminated va_list describing the menu items.
|
Returns : | A GtkOptionMenu or a GtkMenu (depending on menu_only ).
|
GtkWidget* gimp_option_menu_new2 (gboolean menu_only, GCallback menu_item_callback, gpointer menu_item_callback_data, gpointer initial, ...);
gimp_option_menu_new2
is deprecated and should not be used in newly-written code.
Convenience function to create a GtkOptionMenu or a GtkMenu.
menu_only : |
TRUE if the function should return a GtkMenu only.
|
menu_item_callback : |
The callback each menu item's "activate" signal will be connected with. |
menu_item_callback_data : |
The data which will be passed to g_signal_connect() .
|
initial : |
The item_data of the initially selected menu item.
|
... : |
A NULL -terminated va_list describing the menu items.
|
Returns : | A GtkOptionMenu or a GtkMenu (depending on menu_only ).
|
void gimp_option_menu_set_history (GtkOptionMenu *option_menu, gpointer item_data);
gimp_option_menu_set_history
is deprecated and should not be used in newly-written code.
Iterates over all entries in a GtkOptionMenu and selects the one
with the matching item_data
. Probably only makes sense to use with
a GtkOptionMenu that was created using gimp_option_menu_new()
or
gimp_option_menu_new2()
.
option_menu : |
A GtkOptionMenu as returned by gimp_option_menu_new() or
gimp_option_menu_new2() .
|
item_data : |
The item_data of the menu item you want to select.
|
gboolean (*GimpOptionMenuSensitivityCallback) (gpointer item_data, gpointer callback_data);
GimpOptionMenuSensitivityCallback
is deprecated and should not be used in newly-written code.
item_data : |
|
callback_data : |
|
Returns : |
void gimp_option_menu_set_sensitive (GtkOptionMenu *option_menu, GimpOptionMenuSensitivityCallback callback, gpointer callback_data);
gimp_option_menu_set_sensitive
is deprecated and should not be used in newly-written code.
Calls the given callback
for each item in the menu and passes it the
item_data and the callback_data
. The menu item's sensitivity is set
according to the return value of this function.
option_menu : |
a GtkOptionMenu as returned by gimp_option_menu_new() or
gimp_option_menu_new2() .
|
callback : |
a function called for each item in the menu to determine the the sensitivity state. |
callback_data : |
data to pass to the callback function.
|
void gimp_menu_item_update (GtkWidget *widget, gpointer data);
gimp_menu_item_update
is deprecated and should not be used in newly-written code.
widget : |
A GtkMenuItem. |
data : |
A pointer to a gint variable which will store the value of
GPOINTER_TO_INT (g_object_get_data (widget , "gimp-item-data")).
|