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 = GtkSeparator.html 27 * outPack = gtk 28 * outFile = Separator 29 * strct = GtkSeparator 30 * realStrct= 31 * ctorStrct= 32 * clss = Separator 33 * interf = 34 * class Code: Yes 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * - OrientableIF 40 * prefixes: 41 * - gtk_separator_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - gtk.OrientableIF 48 * - gtk.OrientableT 49 * structWrap: 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module gtk.Separator; 56 57 public import gtkc.gtktypes; 58 59 private import gtkc.gtk; 60 private import glib.ConstructionException; 61 private import gobject.ObjectG; 62 63 private import gtk.OrientableIF; 64 private import gtk.OrientableT; 65 66 67 private import gtk.Widget; 68 69 /** 70 * GtkSeparator is a horizontal or vertical separator widget, depending on the 71 * value of the "orientation" property, used to group the widgets within a 72 * window. It displays a line with a shadow to make it appear sunken into the 73 * interface. 74 */ 75 public class Separator : Widget, OrientableIF 76 { 77 78 /** the main Gtk struct */ 79 protected GtkSeparator* gtkSeparator; 80 81 82 /** Get the main Gtk struct */ 83 public GtkSeparator* getSeparatorStruct() 84 { 85 return gtkSeparator; 86 } 87 88 89 /** the main Gtk struct as a void* */ 90 protected override void* getStruct() 91 { 92 return cast(void*)gtkSeparator; 93 } 94 95 /** 96 * Sets our main struct and passes it to the parent class 97 */ 98 public this (GtkSeparator* gtkSeparator) 99 { 100 super(cast(GtkWidget*)gtkSeparator); 101 this.gtkSeparator = gtkSeparator; 102 } 103 104 protected override void setStruct(GObject* obj) 105 { 106 super.setStruct(obj); 107 gtkSeparator = cast(GtkSeparator*)obj; 108 } 109 110 // add the Orientable capabilities 111 mixin OrientableT!(GtkSeparator); 112 113 /** 114 */ 115 116 /** 117 * Creates a new GtkSeparator with the given orientation. 118 * Params: 119 * orientation = the separator's orientation. 120 * Throws: ConstructionException GTK+ fails to create the object. 121 */ 122 public this (GtkOrientation orientation) 123 { 124 // GtkWidget * gtk_separator_new (GtkOrientation orientation); 125 auto p = gtk_separator_new(orientation); 126 if(p is null) 127 { 128 throw new ConstructionException("null returned by gtk_separator_new(orientation)"); 129 } 130 this(cast(GtkSeparator*) p); 131 } 132 }