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 = AtkEditableText.html
27 * outFile = EditableText
28 * strct = AtkEditableText
50 module atk
.EditableText
;
56 import tango
.io
.Stdout
; // use the tango loging?
60 private import gtkc
.atktypes
;
62 private import gtkc
.atk
;
65 private import glib
.Str
;
72 * AtkEditableText should be implemented by UI components which contain
73 * text which the user can edit, via the AtkObject corresponding to that
74 * component (see AtkObject).
75 * AtkEditableText is a subclass of AtkText, and as such, an object which
76 * implements AtkEditableText is by definition an AtkText implementor as well.
78 public class EditableText
81 /** the main Gtk struct */
82 protected AtkEditableText
* atkEditableText
;
85 public AtkEditableText
* getEditableTextStruct()
87 return atkEditableText
;
91 /** the main Gtk struct as a void* */
92 protected void* getStruct()
94 return cast(void*)atkEditableText
;
98 * Sets our main struct and passes it to the parent class
100 public this (AtkEditableText
* atkEditableText
)
104 if ( atkEditableText
is null )
109 Stdout("struct atkEditableText is null on constructor").newline
;
113 printf("struct atkEditableText is null on constructor");
120 assert(atkEditableText
!is null, "struct atkEditableText is null on constructor");
122 this.atkEditableText
= atkEditableText
;
130 * Sets the attributes for a specified range. See the ATK_ATTRIBUTE
131 * macros (such as ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes
132 * that can be set. Note that other attributes that do not have corresponding
133 * ATK_ATTRIBUTE macros may also be set for certain text widgets.
139 * start of range in which to set attributes
141 * end of range in which to set attributes
143 * TRUE if attributes successfully set for the specified
144 * range, otherwise FALSE
146 public int _SetRunAttributes(AtkAttributeSet
* attribSet
, int startOffset
, int endOffset
)
148 // gboolean atk_editable_text_set_run_attributes (AtkEditableText *text, AtkAttributeSet *attrib_set, gint start_offset, gint end_offset);
149 return atk_editable_text_set_run_attributes(atkEditableText
, attribSet
, startOffset
, endOffset
);
153 * Set text contents of text.
157 * string to set for text contents of text
159 public void _SetTextContents(char[] string
)
161 // void atk_editable_text_set_text_contents (AtkEditableText *text, const gchar *string);
162 atk_editable_text_set_text_contents(atkEditableText
, Str
.toStringz(string
));
166 * Insert text at a given position.
172 * the length of text to insert, in bytes
174 * The caller initializes this to
175 * the position at which to insert the text. After the call it
176 * points at the position after the newly inserted text.
178 public void _InsertText(char[] string
, int length
, int* position
)
180 // void atk_editable_text_insert_text (AtkEditableText *text, const gchar *string, gint length, gint *position);
181 atk_editable_text_insert_text(atkEditableText
, Str
.toStringz(string
), length
, position
);
185 * Copy text from start_pos up to, but not including end_pos
194 public void _CopyText(int startPos
, int endPos
)
196 // void atk_editable_text_copy_text (AtkEditableText *text, gint start_pos, gint end_pos);
197 atk_editable_text_copy_text(atkEditableText
, startPos
, endPos
);
201 * Copy text from start_pos up to, but not including end_pos
202 * to the clipboard and then delete from the widget.
210 public void _CutText(int startPos
, int endPos
)
212 // void atk_editable_text_cut_text (AtkEditableText *text, gint start_pos, gint end_pos);
213 atk_editable_text_cut_text(atkEditableText
, startPos
, endPos
);
217 * Delete text start_pos up to, but not including end_pos.
225 public void _DeleteText(int startPos
, int endPos
)
227 // void atk_editable_text_delete_text (AtkEditableText *text, gint start_pos, gint end_pos);
228 atk_editable_text_delete_text(atkEditableText
, startPos
, endPos
);
232 * Paste text from clipboard to specified position.
240 public void _PasteText(int position
)
242 // void atk_editable_text_paste_text (AtkEditableText *text, gint position);
243 atk_editable_text_paste_text(atkEditableText
, position
);