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 private import glib.Str;
62 
63 
64 private import gsv.SourceGutterRenderer;
65 
66 /**
67  */
68 public class SourceGutterRendererText : SourceGutterRenderer
69 {
70 	
71 	/** the main Gtk struct */
72 	protected GtkSourceGutterRendererText* gtkSourceGutterRendererText;
73 	
74 	
75 	/** Get the main Gtk struct */
76 	public GtkSourceGutterRendererText* getSourceGutterRendererTextStruct()
77 	{
78 		return gtkSourceGutterRendererText;
79 	}
80 	
81 	
82 	/** the main Gtk struct as a void* */
83 	protected override void* getStruct()
84 	{
85 		return cast(void*)gtkSourceGutterRendererText;
86 	}
87 	
88 	/**
89 	 * Sets our main struct and passes it to the parent class
90 	 */
91 	public this (GtkSourceGutterRendererText* gtkSourceGutterRendererText)
92 	{
93 		super(cast(GtkSourceGutterRenderer*)gtkSourceGutterRendererText);
94 		this.gtkSourceGutterRendererText = gtkSourceGutterRendererText;
95 	}
96 	
97 	protected override void setStruct(GObject* obj)
98 	{
99 		super.setStruct(obj);
100 		gtkSourceGutterRendererText = cast(GtkSourceGutterRendererText*)obj;
101 	}
102 	
103 	/**
104 	 */
105 	
106 	/**
107 	 * Create a new GtkSourceGutterRendererText.
108 	 * Throws: ConstructionException GTK+ fails to create the object.
109 	 */
110 	public this ()
111 	{
112 		// GtkSourceGutterRenderer * gtk_source_gutter_renderer_text_new  (void);
113 		auto p = gtk_source_gutter_renderer_text_new();
114 		if(p is null)
115 		{
116 			throw new ConstructionException("null returned by gtk_source_gutter_renderer_text_new()");
117 		}
118 		this(cast(GtkSourceGutterRendererText*) p);
119 	}
120 	
121 	/**
122 	 */
123 	public void setMarkup(string markup, int length)
124 	{
125 		// void gtk_source_gutter_renderer_text_set_markup  (GtkSourceGutterRendererText *renderer,  const gchar *markup,  gint length);
126 		gtk_source_gutter_renderer_text_set_markup(gtkSourceGutterRendererText, Str.toStringz(markup), length);
127 	}
128 	
129 	/**
130 	 */
131 	public void setText(string text, int length)
132 	{
133 		// void gtk_source_gutter_renderer_text_set_text  (GtkSourceGutterRendererText *renderer,  const gchar *text,  gint length);
134 		gtk_source_gutter_renderer_text_set_text(gtkSourceGutterRendererText, Str.toStringz(text), length);
135 	}
136 	
137 	/**
138 	 */
139 	public void measure(string text, int* width, int* height)
140 	{
141 		// void gtk_source_gutter_renderer_text_measure  (GtkSourceGutterRendererText *renderer,  const gchar *text,  gint *width,  gint *height);
142 		gtk_source_gutter_renderer_text_measure(gtkSourceGutterRendererText, Str.toStringz(text), width, height);
143 	}
144 	
145 	/**
146 	 */
147 	public void measureMarkup(string markup, int* width, int* height)
148 	{
149 		// void gtk_source_gutter_renderer_text_measure_markup  (GtkSourceGutterRendererText *renderer,  const gchar *markup,  gint *width,  gint *height);
150 		gtk_source_gutter_renderer_text_measure_markup(gtkSourceGutterRendererText, Str.toStringz(markup), width, height);
151 	}
152 }