alternative to assert
[gtkD.git] / gtkD / src / gtk / TearoffMenuItem.d
blobcebc4feee5ca05f529955260e77098b3b5422cd2
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD 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
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkTearoffMenuItem.html
26 * outPack = gtk
27 * outFile = TearoffMenuItem
28 * strct = GtkTearoffMenuItem
29 * realStrct=
30 * ctorStrct=
31 * clss = TearoffMenuItem
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_tearoff_menu_item_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * structWrap:
46 * module aliases:
47 * local aliases:
50 module gtk.TearoffMenuItem;
52 version(noAssert)
54 version(Tango)
56 import tango.io.Stdout; // use the tango loging?
60 private import gtkc.gtktypes;
62 private import gtkc.gtk;
69 /**
70 * Description
71 * A GtkTearoffMenuItem is a special GtkMenuItem which is used to
72 * tear off and reattach its menu.
73 * When its menu is shown normally, the GtkTearoffMenuItem is drawn as a
74 * dotted line indicating that the menu can be torn off. Activating it
75 * causes its menu to be torn off and displayed in its own window
76 * as a tearoff menu.
77 * When its menu is shown as a tearoff menu, the GtkTearoffMenuItem is drawn
78 * as a dotted line which has a left pointing arrow graphic indicating that
79 * the tearoff menu can be reattached. Activating it will erase the tearoff
80 * menu window.
82 private import gtk.MenuItem;
83 public class TearoffMenuItem : MenuItem
86 /** the main Gtk struct */
87 protected GtkTearoffMenuItem* gtkTearoffMenuItem;
90 public GtkTearoffMenuItem* getTearoffMenuItemStruct()
92 return gtkTearoffMenuItem;
96 /** the main Gtk struct as a void* */
97 protected void* getStruct()
99 return cast(void*)gtkTearoffMenuItem;
103 * Sets our main struct and passes it to the parent class
105 public this (GtkTearoffMenuItem* gtkTearoffMenuItem)
107 version(noAssert)
109 if ( gtkTearoffMenuItem is null )
111 int zero = 0;
112 version(Tango)
114 Stdout("struct gtkTearoffMenuItem is null on constructor").newline;
116 else
118 printf("struct gtkTearoffMenuItem is null on constructor");
120 zero = zero / zero;
123 else
125 assert(gtkTearoffMenuItem !is null, "struct gtkTearoffMenuItem is null on constructor");
127 super(cast(GtkMenuItem*)gtkTearoffMenuItem);
128 this.gtkTearoffMenuItem = gtkTearoffMenuItem;
136 * Creates a new GtkTearoffMenuItem.
137 * Returns:
138 * a new GtkTearoffMenuItem.
139 * See Also
140 * GtkMenu
141 * for further discussion of menus in GTK.
143 public this ()
145 // GtkWidget* gtk_tearoff_menu_item_new (void);
146 this(cast(GtkTearoffMenuItem*)gtk_tearoff_menu_item_new() );