- GtkTypeInfo pixmap_menu_item_info =
- {
- (char *)"GtkPixmapMenuItem",
- sizeof (GtkPixmapMenuItem),
- sizeof (GtkPixmapMenuItemClass),
- (GtkClassInitFunc) gtk_pixmap_menu_item_class_init,
- (GtkObjectInitFunc) gtk_pixmap_menu_item_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- pixmap_menu_item_type = gtk_type_unique (gtk_menu_item_get_type (),
- &pixmap_menu_item_info);
- }
-
- return pixmap_menu_item_type;
-}
-
-/**
- * gtk_pixmap_menu_item_new
- *
- * Creates a new pixmap menu item. Use gtk_pixmap_menu_item_set_pixmap()
- * to set the pixmap wich is displayed at the left side.
- *
- * Returns:
- * &GtkWidget pointer to new menu item
- **/
-
-GtkWidget*
-gtk_pixmap_menu_item_new (void)
-{
- return GTK_WIDGET (gtk_type_new (gtk_pixmap_menu_item_get_type ()));
-}
-
-static void
-gtk_pixmap_menu_item_class_init (GtkPixmapMenuItemClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkMenuItemClass *menu_item_class;
- GtkContainerClass *container_class;
-
- object_class = (GtkObjectClass*) klass;
- widget_class = (GtkWidgetClass*) klass;
- menu_item_class = (GtkMenuItemClass*) klass;
- container_class = (GtkContainerClass*) klass;
-
- parent_class = (GtkMenuItemClass*) gtk_type_class (gtk_menu_item_get_type ());
-
- widget_class->draw = gtk_pixmap_menu_item_draw;
- widget_class->expose_event = gtk_pixmap_menu_item_expose;
- widget_class->map = gtk_pixmap_menu_item_map;
- widget_class->size_allocate = gtk_pixmap_menu_item_size_allocate;
- widget_class->size_request = gtk_pixmap_menu_item_size_request;
-
- container_class->forall = gtk_pixmap_menu_item_forall;
- container_class->remove = gtk_pixmap_menu_item_remove;
-
- klass->orig_toggle_size = menu_item_class->toggle_size;
- klass->have_pixmap_count = 0;
-}
-
-static void
-gtk_pixmap_menu_item_init (GtkPixmapMenuItem *menu_item)
-{
- GtkMenuItem *mi;
-
- mi = GTK_MENU_ITEM (menu_item);
-
- menu_item->pixmap = NULL;
-}
-
-static void
-gtk_pixmap_menu_item_draw (GtkWidget *widget,
- GdkRectangle *area)
-{
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget));
- g_return_if_fail (area != NULL);
-
- if (GTK_WIDGET_CLASS (parent_class)->draw)
- (* GTK_WIDGET_CLASS (parent_class)->draw) (widget, area);