2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkSourceTag.html
28 * strct = GtkSourceTag
44 * - gsv.SourceTagStyle
47 * - GtkSourceTagStyle* -> SourceTagStyle
58 import tango
.io
.Stdout
; // use the tango loging?
62 private import gsvc
.gsvtypes
;
64 private import gsvc
.gsv
;
67 private import gsv
.SourceTagStyle
;
68 private import glib
.Str
;
76 private import gtk
.TextTag
;
77 public class SourceTag
: TextTag
80 /** the main Gtk struct */
81 protected GtkSourceTag
* gtkSourceTag
;
84 public GtkSourceTag
* getSourceTagStruct()
90 /** the main Gtk struct as a void* */
91 protected void* getStruct()
93 return cast(void*)gtkSourceTag
;
97 * Sets our main struct and passes it to the parent class
99 public this (GtkSourceTag
* gtkSourceTag
)
103 if ( gtkSourceTag
is null )
108 Stdout("struct gtkSourceTag is null on constructor").newline
;
112 printf("struct gtkSourceTag is null on constructor");
119 assert(gtkSourceTag
!is null, "struct gtkSourceTag is null on constructor");
121 super(cast(GtkTextTag
*)gtkSourceTag
);
122 this.gtkSourceTag
= gtkSourceTag
;
135 * Gets the style associated with the given tag.
139 * a GtkSourceTagStyle if found, or NULL if not found.
141 public SourceTagStyle
getStyle()
143 // GtkSourceTagStyle* gtk_source_tag_get_style (GtkSourceTag *tag);
144 return new SourceTagStyle( gtk_source_tag_get_style(gtkSourceTag
) );
148 * Associates a given style with the given tag.
152 * a GtkSourceTagStyle.
154 public void setStyle(SourceTagStyle style
)
156 // void gtk_source_tag_set_style (GtkSourceTag *tag, const GtkSourceTagStyle *style);
157 gtk_source_tag_set_style(gtkSourceTag
, (style
is null) ?
null : style
.getSourceTagStyleStruct());
161 * Creates a new syntax tag object with the provided arguments.
163 * the ID for the tag.
165 * the name of the tag.
167 * the starting pattern.
169 * the ending pattern.
171 * a new syntax tag, as a GtkTextTag.
173 public static GtkTextTag
* gtkSyntaxTagNew(char[] id
, char[] name
, char[] patternStart
, char[] patternEnd
)
175 // GtkTextTag* gtk_syntax_tag_new (const gchar *id, const gchar *name, const gchar *pattern_start, const gchar *pattern_end);
176 return gtk_syntax_tag_new(Str
.toStringz(id
), Str
.toStringz(name
), Str
.toStringz(patternStart
), Str
.toStringz(patternEnd
));
180 * Creates a new pattern tag object with the provided arguments.
182 * the ID for the tag.
184 * the name of the tag.
188 * a new pattern tag, as a GtkTextTag.
190 public static GtkTextTag
* gtkPatternTagNew(char[] id
, char[] name
, char[] pattern
)
192 // GtkTextTag* gtk_pattern_tag_new (const gchar *id, const gchar *name, const gchar *pattern);
193 return gtk_pattern_tag_new(Str
.toStringz(id
), Str
.toStringz(name
), Str
.toStringz(pattern
));
197 * Creates a new keyword list tag object with the provided arguments.
199 * the ID for the tag.
201 * the name of the tag.
203 * a list of keywords.
205 * whether the tag should be case sensitive.
206 * match_empty_string_at_beginning:
207 * whether the tag should match empty
208 * string at the beginning.
209 * match_empty_string_at_end:
210 * whether the tag should match empty
213 * the beginning regular expression.
215 * the ending regular expression.
217 * a new keyword list tag, as a GtkTextTag.
219 public static GtkTextTag
* gtkKeywordListTagNew(char[] id
, char[] name
, GSList
* keywords
, int caseSensitive
, int matchEmptyStringAtBeginning
, int matchEmptyStringAtEnd
, char[] beginningRegex
, char[] endRegex
)
221 // GtkTextTag* gtk_keyword_list_tag_new (const gchar *id, const gchar *name, const GSList *keywords, gboolean case_sensitive, gboolean match_empty_string_at_beginning, gboolean match_empty_string_at_end, const gchar *beginning_regex, const gchar *end_regex);
222 return gtk_keyword_list_tag_new(Str
.toStringz(id
), Str
.toStringz(name
), keywords
, caseSensitive
, matchEmptyStringAtBeginning
, matchEmptyStringAtEnd
, Str
.toStringz(beginningRegex
), Str
.toStringz(endRegex
));
227 * Creates a new line comment tag object with the provided arguments.
229 * the ID for the tag.
231 * the name of the tag.
233 * the starting pattern.
235 * a new line comment tag, as a GtkTextTag.
237 public static GtkTextTag
* gtkLineCommentTagNew(char[] id
, char[] name
, char[] patternStart
)
239 // GtkTextTag* gtk_line_comment_tag_new (const gchar *id, const gchar *name, const gchar *pattern_start);
240 return gtk_line_comment_tag_new(Str
.toStringz(id
), Str
.toStringz(name
), Str
.toStringz(patternStart
));
244 * Creates a new string tag object with the provided arguments.
246 * the ID for the tag.
248 * the name of the tag.
250 * the starting pattern.
252 * the ending pattern.
254 * whether the ending pattern should be suffixed by an end-of-line character.
256 * a new string tag, as a GtkTextTag.
259 * "id" gchararray : Read / Write / Construct Only
260 * ID used to refer to the source tag.
261 * Default value: NULL
263 public static GtkTextTag
* gtkStringTagNew(char[] id
, char[] name
, char[] patternStart
, char[] patternEnd
, int endAtLineEnd
)
265 // GtkTextTag* gtk_string_tag_new (const gchar *id, const gchar *name, const gchar *pattern_start, const gchar *pattern_end, gboolean end_at_line_end);
266 return gtk_string_tag_new(Str
.toStringz(id
), Str
.toStringz(name
), Str
.toStringz(patternStart
), Str
.toStringz(patternEnd
), endAtLineEnd
);