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 * Conversion parameters: 26 * inFile = GtkTearoffMenuItem.html 27 * outPack = gtk 28 * outFile = TearoffMenuItem 29 * strct = GtkTearoffMenuItem 30 * realStrct= 31 * ctorStrct= 32 * clss = TearoffMenuItem 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_tearoff_menu_item_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * structWrap: 48 * module aliases: 49 * local aliases: 50 * overrides: 51 */ 52 53 module gtk.TearoffMenuItem; 54 55 public import gtkc.gtktypes; 56 57 private import gtkc.gtk; 58 private import glib.ConstructionException; 59 private import gobject.ObjectG; 60 61 62 63 64 65 private import gtk.MenuItem; 66 67 /** 68 * Description 69 * A GtkTearoffMenuItem is a special GtkMenuItem which is used to 70 * tear off and reattach its menu. 71 * When its menu is shown normally, the GtkTearoffMenuItem is drawn as a 72 * dotted line indicating that the menu can be torn off. Activating it 73 * causes its menu to be torn off and displayed in its own window 74 * as a tearoff menu. 75 * When its menu is shown as a tearoff menu, the GtkTearoffMenuItem is drawn 76 * as a dotted line which has a left pointing arrow graphic indicating that 77 * the tearoff menu can be reattached. Activating it will erase the tearoff 78 * menu window. 79 */ 80 public class TearoffMenuItem : MenuItem 81 { 82 83 /** the main Gtk struct */ 84 protected GtkTearoffMenuItem* gtkTearoffMenuItem; 85 86 87 public GtkTearoffMenuItem* getTearoffMenuItemStruct() 88 { 89 return gtkTearoffMenuItem; 90 } 91 92 93 /** the main Gtk struct as a void* */ 94 protected override void* getStruct() 95 { 96 return cast(void*)gtkTearoffMenuItem; 97 } 98 99 /** 100 * Sets our main struct and passes it to the parent class 101 */ 102 public this (GtkTearoffMenuItem* gtkTearoffMenuItem) 103 { 104 super(cast(GtkMenuItem*)gtkTearoffMenuItem); 105 this.gtkTearoffMenuItem = gtkTearoffMenuItem; 106 } 107 108 protected override void setStruct(GObject* obj) 109 { 110 super.setStruct(obj); 111 gtkTearoffMenuItem = cast(GtkTearoffMenuItem*)obj; 112 } 113 114 /** 115 */ 116 117 /** 118 * Creates a new GtkTearoffMenuItem. 119 * Throws: ConstructionException GTK+ fails to create the object. 120 */ 121 public this () 122 { 123 // GtkWidget * gtk_tearoff_menu_item_new (void); 124 auto p = gtk_tearoff_menu_item_new(); 125 if(p is null) 126 { 127 throw new ConstructionException("null returned by gtk_tearoff_menu_item_new()"); 128 } 129 this(cast(GtkTearoffMenuItem*) p); 130 } 131 }