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 = GtkSeparatorToolItem.html 27 * outPack = gtk 28 * outFile = SeparatorToolItem 29 * strct = GtkSeparatorToolItem 30 * realStrct= 31 * ctorStrct=GtkToolItem 32 * clss = SeparatorToolItem 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_separator_tool_item_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - gtk.ToolItem 48 * structWrap: 49 * - GtkToolItem* -> ToolItem 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module gtk.SeparatorToolItem; 56 57 public import gtkc.gtktypes; 58 59 private import gtkc.gtk; 60 private import glib.ConstructionException; 61 private import gobject.ObjectG; 62 63 64 private import gtk.ToolItem; 65 66 67 68 private import gtk.ToolItem; 69 70 /** 71 * Description 72 * A GtkSeparatorItem is a GtkToolItem that separates groups of other 73 * GtkToolItems. Depending on the theme, a GtkSeparatorToolItem will 74 * often look like a vertical line on horizontally docked toolbars. 75 * If the property "expand" is TRUE and the property "draw" is FALSE, a 76 * GtkSeparatorToolItem will act as a "spring" that forces other items 77 * to the ends of the toolbar. 78 * Use gtk_separator_tool_item_new() to create a new GtkSeparatorToolItem. 79 */ 80 public class SeparatorToolItem : ToolItem 81 { 82 83 /** the main Gtk struct */ 84 protected GtkSeparatorToolItem* gtkSeparatorToolItem; 85 86 87 public GtkSeparatorToolItem* getSeparatorToolItemStruct() 88 { 89 return gtkSeparatorToolItem; 90 } 91 92 93 /** the main Gtk struct as a void* */ 94 protected override void* getStruct() 95 { 96 return cast(void*)gtkSeparatorToolItem; 97 } 98 99 /** 100 * Sets our main struct and passes it to the parent class 101 */ 102 public this (GtkSeparatorToolItem* gtkSeparatorToolItem) 103 { 104 super(cast(GtkToolItem*)gtkSeparatorToolItem); 105 this.gtkSeparatorToolItem = gtkSeparatorToolItem; 106 } 107 108 protected override void setStruct(GObject* obj) 109 { 110 super.setStruct(obj); 111 gtkSeparatorToolItem = cast(GtkSeparatorToolItem*)obj; 112 } 113 114 /** 115 */ 116 117 /** 118 * Create a new GtkSeparatorToolItem 119 * Since 2.4 120 * Throws: ConstructionException GTK+ fails to create the object. 121 */ 122 public this () 123 { 124 // GtkToolItem * gtk_separator_tool_item_new (void); 125 auto p = gtk_separator_tool_item_new(); 126 if(p is null) 127 { 128 throw new ConstructionException("null returned by gtk_separator_tool_item_new()"); 129 } 130 this(cast(GtkSeparatorToolItem*) p); 131 } 132 133 /** 134 * Whether item is drawn as a vertical line, or just blank. 135 * Setting this to FALSE along with gtk_tool_item_set_expand() is useful 136 * to create an item that forces following items to the end of the toolbar. 137 * Since 2.4 138 * Params: 139 * draw = whether item is drawn as a vertical line 140 */ 141 public void setDraw(int draw) 142 { 143 // void gtk_separator_tool_item_set_draw (GtkSeparatorToolItem *item, gboolean draw); 144 gtk_separator_tool_item_set_draw(gtkSeparatorToolItem, draw); 145 } 146 147 /** 148 * Returns whether item is drawn as a line, or just blank. 149 * See gtk_separator_tool_item_set_draw(). 150 * Since 2.4 151 * Returns: TRUE if item is drawn as a line, or just blank. 152 */ 153 public int getDraw() 154 { 155 // gboolean gtk_separator_tool_item_get_draw (GtkSeparatorToolItem *item); 156 return gtk_separator_tool_item_get_draw(gtkSeparatorToolItem); 157 } 158 }