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 = GtkSourceGutterRendererText.html 27 * outPack = gsv 28 * outFile = SourceGutterRendererText 29 * strct = GtkSourceGutterRendererText 30 * realStrct= 31 * ctorStrct=GtkSourceGutterRenderer 32 * clss = SourceGutterRendererText 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = GtkSourceGutterRenderer 38 * implements: 39 * prefixes: 40 * - gtk_source_gutter_renderer_text_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - glib.Str 47 * structWrap: 48 * module aliases: 49 * local aliases: 50 * overrides: 51 */ 52 53 module gsv.SourceGutterRendererText; 54 55 public import gsvc.gsvtypes; 56 57 private import gsvc.gsv; 58 private import glib.ConstructionException; 59 private import gobject.ObjectG; 60 61 62 private import glib.Str; 63 64 65 66 private import gsv.SourceGutterRenderer; 67 68 /** 69 */ 70 public class SourceGutterRendererText : SourceGutterRenderer 71 { 72 73 /** the main Gtk struct */ 74 protected GtkSourceGutterRendererText* gtkSourceGutterRendererText; 75 76 77 public GtkSourceGutterRendererText* getSourceGutterRendererTextStruct() 78 { 79 return gtkSourceGutterRendererText; 80 } 81 82 83 /** the main Gtk struct as a void* */ 84 protected override void* getStruct() 85 { 86 return cast(void*)gtkSourceGutterRendererText; 87 } 88 89 /** 90 * Sets our main struct and passes it to the parent class 91 */ 92 public this (GtkSourceGutterRendererText* gtkSourceGutterRendererText) 93 { 94 super(cast(GtkSourceGutterRenderer*)gtkSourceGutterRendererText); 95 this.gtkSourceGutterRendererText = gtkSourceGutterRendererText; 96 } 97 98 protected override void setStruct(GObject* obj) 99 { 100 super.setStruct(obj); 101 gtkSourceGutterRendererText = cast(GtkSourceGutterRendererText*)obj; 102 } 103 104 /** 105 */ 106 107 /** 108 * Create a new GtkSourceGutterRendererText. 109 * Throws: ConstructionException GTK+ fails to create the object. 110 */ 111 public this () 112 { 113 // GtkSourceGutterRenderer * gtk_source_gutter_renderer_text_new (void); 114 auto p = gtk_source_gutter_renderer_text_new(); 115 if(p is null) 116 { 117 throw new ConstructionException("null returned by gtk_source_gutter_renderer_text_new()"); 118 } 119 this(cast(GtkSourceGutterRendererText*) p); 120 } 121 122 /** 123 */ 124 public void setMarkup(string markup, int length) 125 { 126 // void gtk_source_gutter_renderer_text_set_markup (GtkSourceGutterRendererText *renderer, const gchar *markup, gint length); 127 gtk_source_gutter_renderer_text_set_markup(gtkSourceGutterRendererText, Str.toStringz(markup), length); 128 } 129 130 /** 131 */ 132 public void setText(string text, int length) 133 { 134 // void gtk_source_gutter_renderer_text_set_text (GtkSourceGutterRendererText *renderer, const gchar *text, gint length); 135 gtk_source_gutter_renderer_text_set_text(gtkSourceGutterRendererText, Str.toStringz(text), length); 136 } 137 138 /** 139 */ 140 public void measure(string text, int* width, int* height) 141 { 142 // void gtk_source_gutter_renderer_text_measure (GtkSourceGutterRendererText *renderer, const gchar *text, gint *width, gint *height); 143 gtk_source_gutter_renderer_text_measure(gtkSourceGutterRendererText, Str.toStringz(text), width, height); 144 } 145 146 /** 147 */ 148 public void measureMarkup(string markup, int* width, int* height) 149 { 150 // void gtk_source_gutter_renderer_text_measure_markup (GtkSourceGutterRendererText *renderer, const gchar *markup, gint *width, gint *height); 151 gtk_source_gutter_renderer_text_measure_markup(gtkSourceGutterRendererText, Str.toStringz(markup), width, height); 152 } 153 }