1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #include "gtkseparatormenuitem.h"
29 #include "gtkstylecontext.h"
32 * SECTION:gtkseparatormenuitem
33 * @Short_description: A separator used in menus
34 * @Title: GtkSeparatorMenuItem
36 * The #GtkSeparatorMenuItem is a separator used to group
37 * items within a menu. It displays a horizontal line with a shadow to
38 * make it appear sunken into the interface.
41 G_DEFINE_TYPE (GtkSeparatorMenuItem, gtk_separator_menu_item, GTK_TYPE_MENU_ITEM)
44 gtk_separator_menu_item_class_init (GtkSeparatorMenuItemClass *class)
46 GTK_CONTAINER_CLASS (class)->child_type = NULL;
48 gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (class), ATK_ROLE_SEPARATOR);
52 gtk_separator_menu_item_init (GtkSeparatorMenuItem *item)
54 GtkStyleContext *context;
56 context = gtk_widget_get_style_context (GTK_WIDGET (item));
57 gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
61 * gtk_separator_menu_item_new:
63 * Creates a new #GtkSeparatorMenuItem.
65 * Returns: a new #GtkSeparatorMenuItem.
68 gtk_separator_menu_item_new (void)
70 return g_object_new (GTK_TYPE_SEPARATOR_MENU_ITEM, NULL);