eb05362005-11-05Henrik Grubbström (Grubba) /* -*- C -*- */
1a05542005-07-28Martin Nilsson class GTK2.ImageMenuItem; inherit GTK2.MenuItem; //! Properties: //! GTK2.Widget image
3d76632005-11-03Lance Dillon void create(string|mapping(string:mixed)|void label)
1a05542005-07-28Martin Nilsson //! Create a new ImageMenuItem. { pgtk_verify_not_inited(); pgtk_verify_setup(); if (args) {
3d76632005-11-03Lance Dillon  if (Pike_sp[-args].type==PIKE_T_STRING) {
535ddd2005-12-18Marcus Comstedt  struct pike_string *s1;
3d76632005-11-03Lance Dillon  GtkStockItem item; GtkWidget *gi;
535ddd2005-12-18Marcus Comstedt  int t=0;
3d76632005-11-03Lance Dillon 
535ddd2005-12-18Marcus Comstedt  get_all_args("create",args,"%t",&s1); if(s1->size_shift==0) t=gtk_stock_lookup(STR0(s1),&item);
3d76632005-11-03Lance Dillon  if (t)
535ddd2005-12-18Marcus Comstedt  gi=gtk_image_menu_item_new_from_stock(STR0(s1),NULL); else { ref_push_string(s1); f_string_to_utf8(1); gi=gtk_image_menu_item_new_with_label(STR0(Pike_sp[-1].u.string)); pop_stack(); }
3d76632005-11-03Lance Dillon  THIS->obj=G_OBJECT(gi); } else { INIT_WITH_PROPS(GTK_TYPE_IMAGE_MENU_ITEM); } my_pop_n_elems(args);
1a05542005-07-28Martin Nilsson  } else {
3d76632005-11-03Lance Dillon  GtkWidget *gi; gi=gtk_image_menu_item_new(); THIS->obj=G_OBJECT(gi);
1a05542005-07-28Martin 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.