eb0536 | 2005-11-05 | Henrik Grubbström (Grubba) | | /* -*- C -*- */
|
1a0554 | 2005-07-28 | Martin Nilsson | | class GTK2.ImageMenuItem;
inherit GTK2.MenuItem;
//! Properties:
//! GTK2.Widget image
|
3d7663 | 2005-11-03 | Lance Dillon | | void create(string|mapping(string:mixed)|void label)
|
1a0554 | 2005-07-28 | Martin Nilsson | | //! Create a new ImageMenuItem.
{
pgtk_verify_not_inited();
pgtk_verify_setup();
if (args) {
|
3d7663 | 2005-11-03 | Lance Dillon | | if (Pike_sp[-args].type==PIKE_T_STRING) {
char *s1;
GtkStockItem item;
GtkWidget *gi;
int t;
get_all_args("create",args,"%s",&s1);
t=gtk_stock_lookup(s1,&item);
if (t)
gi=gtk_image_menu_item_new_from_stock(s1,NULL);
else
gi=gtk_image_menu_item_new_with_label(s1);
THIS->obj=G_OBJECT(gi);
} else {
INIT_WITH_PROPS(GTK_TYPE_IMAGE_MENU_ITEM);
}
my_pop_n_elems(args);
|
1a0554 | 2005-07-28 | Martin Nilsson | | } else {
|
3d7663 | 2005-11-03 | Lance Dillon | | GtkWidget *gi;
gi=gtk_image_menu_item_new();
THIS->obj=G_OBJECT(gi);
|
1a0554 | 2005-07-28 | Martin Nilsson | | }
pgtk__init_this_object();
}
GTK2.Widget get_image();
//! Gets the widget that is currently set as the image.
void set_image(GTK2.Widget image);
//! Sets the image of the image menu item.
|