1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtk.SeparatorMenuItem;
26 
27 private import glib.ConstructionException;
28 private import gobject.ObjectG;
29 private import gtk.MenuItem;
30 private import gtk.Widget;
31 private import gtkc.gtk;
32 public  import gtkc.gtktypes;
33 
34 
35 /**
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.
39  * 
40  * # CSS nodes
41  * 
42  * GtkSeparatorMenuItem has a single CSS node with name separator.
43  */
44 public class SeparatorMenuItem : MenuItem
45 {
46 	/** the main Gtk struct */
47 	protected GtkSeparatorMenuItem* gtkSeparatorMenuItem;
48 
49 	/** Get the main Gtk struct */
50 	public GtkSeparatorMenuItem* getSeparatorMenuItemStruct(bool transferOwnership = false)
51 	{
52 		if (transferOwnership)
53 			ownedRef = false;
54 		return gtkSeparatorMenuItem;
55 	}
56 
57 	/** the main Gtk struct as a void* */
58 	protected override void* getStruct()
59 	{
60 		return cast(void*)gtkSeparatorMenuItem;
61 	}
62 
63 	protected override void setStruct(GObject* obj)
64 	{
65 		gtkSeparatorMenuItem = cast(GtkSeparatorMenuItem*)obj;
66 		super.setStruct(obj);
67 	}
68 
69 	/**
70 	 * Sets our main struct and passes it to the parent class.
71 	 */
72 	public this (GtkSeparatorMenuItem* gtkSeparatorMenuItem, bool ownedRef = false)
73 	{
74 		this.gtkSeparatorMenuItem = gtkSeparatorMenuItem;
75 		super(cast(GtkMenuItem*)gtkSeparatorMenuItem, ownedRef);
76 	}
77 
78 
79 	/** */
80 	public static GType getType()
81 	{
82 		return gtk_separator_menu_item_get_type();
83 	}
84 
85 	/**
86 	 * Creates a new #GtkSeparatorMenuItem.
87 	 *
88 	 * Returns: a new #GtkSeparatorMenuItem.
89 	 *
90 	 * Throws: ConstructionException GTK+ fails to create the object.
91 	 */
92 	public this()
93 	{
94 		auto p = gtk_separator_menu_item_new();
95 		
96 		if(p is null)
97 		{
98 			throw new ConstructionException("null returned by new");
99 		}
100 		
101 		this(cast(GtkSeparatorMenuItem*) p);
102 	}
103 }