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 module atk.EditableTextIF; 26 27 private import glib.Str; 28 private import gtkc.atk; 29 public import gtkc.atktypes; 30 31 32 /** 33 * #AtkEditableText should be implemented by UI components which 34 * contain text which the user can edit, via the #AtkObject 35 * corresponding to that component (see #AtkObject). 36 * 37 * #AtkEditableText is a subclass of #AtkText, and as such, an object 38 * which implements #AtkEditableText is by definition an #AtkText 39 * implementor as well. 40 * 41 * See also: #AtkText 42 */ 43 public interface EditableTextIF{ 44 /** Get the main Gtk struct */ 45 public AtkEditableText* getEditableTextStruct(); 46 47 /** the main Gtk struct as a void* */ 48 protected void* getStruct(); 49 50 /** 51 */ 52 53 /** 54 * Copy text from @start_pos up to, but not including @end_pos 55 * to the clipboard. 56 * 57 * Params: 58 * startPos = start position 59 * endPos = end position 60 */ 61 public void copyText(int startPos, int endPos); 62 63 /** 64 * Copy text from @start_pos up to, but not including @end_pos 65 * to the clipboard and then delete from the widget. 66 * 67 * Params: 68 * startPos = start position 69 * endPos = end position 70 */ 71 public void cutText(int startPos, int endPos); 72 73 /** 74 * Delete text @start_pos up to, but not including @end_pos. 75 * 76 * Params: 77 * startPos = start position 78 * endPos = end position 79 */ 80 public void deleteText(int startPos, int endPos); 81 82 /** 83 * Insert text at a given position. 84 * 85 * Params: 86 * str = the text to insert 87 * length = the length of text to insert, in bytes 88 * position = The caller initializes this to 89 * the position at which to insert the text. After the call it 90 * points at the position after the newly inserted text. 91 */ 92 public void insertText(string str, int length, int* position); 93 94 /** 95 * Paste text from clipboard to specified @position. 96 * 97 * Params: 98 * position = position to paste 99 */ 100 public void pasteText(int position); 101 102 /** 103 * Sets the attributes for a specified range. See the ATK_ATTRIBUTE 104 * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes 105 * that can be set. Note that other attributes that do not have corresponding 106 * ATK_ATTRIBUTE macros may also be set for certain text widgets. 107 * 108 * Params: 109 * attribSet = an #AtkAttributeSet 110 * startOffset = start of range in which to set attributes 111 * endOffset = end of range in which to set attributes 112 * 113 * Return: %TRUE if attributes successfully set for the specified 114 * range, otherwise %FALSE 115 */ 116 public bool setRunAttributes(AtkAttributeSet* attribSet, int startOffset, int endOffset); 117 118 /** 119 * Set text contents of @text. 120 * 121 * Params: 122 * str = string to set for text contents of @text 123 */ 124 public void setTextContents(string str); 125 }