TextBuffer Class Reference

Inheritance diagram for TextBuffer:

ObjectG List of all members.

Detailed Description

A text buffer to be display and altered in a text view.

See also:
TextView


Public Member Functions

void setText (char[] text)
 Sets the text for this text view.

GtkTextBuffer * gtkO ()
 Gets the GtkTextBuffer.

 this (TextTagTable textTagTable)
 create a new TextBuffer with a TextTagTable

 this ()
 Create a new TextBuffer.

gint getLineCount ()
 getLineCount

gint getCharCount ()
 getCharCount

TextTagTable getTagTable ()
 getTagTable

void insert (TextIter iter, char[] text)
 Insert test at the iter.

void insertAtCursor (char[] text)
 Insert test at the cursor position.

bit insertInteractive (TextIter iter, char[] text, bit defaultEditable)
 Insert test at the iter interactively ???

bit insertInteractiveAtCursor (char[] text, bit defaultEditable)
 insertInteractiveAtCursor

void insertRange (TextIter iter, TextIter start, TextIter end)
 insertRange

bit insertRangeInteractive (TextIter iter, TextIter start, TextIter end, bit defaultEditable)
 insertRangeInteractive

void insertWithTags (TextIter iter, char[] text, TextTag firstTag)
 insertWithTags

void insertWithTagsByName (TextIter iter, char[] text, char[] tagName)
 insertWithTagsByName

void insertWithTagsByName (TextIter iter, char[] text, char[] tagName, char[] tagName2)
 insertWithTagsByName

void insertWithTagsByName (TextIter iter, char[] text, char[] tagName, char[] tagName2, char[] tagName3)
 insertWithTagsByName

void insertWithTagsByName (TextIter iter, char[] text, char[] tagName, char[] tagName2, char[] tagName3, char[] tagName4)
 insertWithTagsByName

void insertWithTagsByName (TextIter iter, char[] text, char[] tagName, char[] tagName2, char[] tagName3, char[] tagName4, char[] tagName5)
 insertWithTagsByName

void deleteText (TextIter start, TextIter end)
 deleteText

bit deleteInteractive (TextIter start, TextIter end, bit defaultEditable)
 deleteInteractive

char[] getText (TextIter start, TextIter end, bit includeHiddenChars)
 Obtain strings from the buffer.

char[] getSlice (TextIter start, TextIter end, bit includeHiddenChars)
 Obtain strings from the buffer.

char[] getText ()
 Obtain the entire text.

void insertPixbuf (TextIter iter, Pixbuf pixbuf)
 Insert a pixbuf.

void insertChildAnchor (TextIter iter, TextChildAnchor anchor)
 Insert a child anchor.

TextChildAnchor createChildAnchor (TextIter iter)
 Convenience, create and insert a child anchor.

TextMark createMark (char[] mark_name, TextIter where, bit left_gravity)
 Creates a mark at position where If mark_name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name using gtk_text_buffer_get_mark().

void moveMark (TextMark mark, TextIter where)
 Moves mark to the new location where.

void deleteMark (TextMark mark)
 Deletes mark, so that it's no longer located anywhere in the buffer.

TextMark getMark (char[] name)
 Returns the mark named name in buffer buffer.

void moveMark (char[] name, TextIter where)
 move the mark by name

void moveMarkByName (char[] name, TextIter where)
 move the mark by name using gtk function name.

void deleteMark (char[] name)
 Deletes mark by name.

void deleteMarkByName (char[] name)
 Deletes mark by name using the GTK functino name.

TextMark getInsert ()
 Returns the mark that represents the cursor (insertion point).

TextMark getSelectionBound ()
 Returns the mark that represents the selection bound.

void placeCursor (TextIter where)
 placeCursor

void applyTag (TextTag tag, TextIter start, TextIter end)
 applyTag

void removeTag (TextTag tag, TextIter start, TextIter end)
 removeTag

void applyTagByName (char[] name, TextIter start, TextIter end)
 applyTagByName

void removeTag (char[] name, TextIter start, TextIter end)
 removeTag

void removeAllTags (TextIter start, TextIter end)
 removeAllTags

TextTag createTag (char[] tagName, char[] propertyName, int propertyValue)
 Create a new tag for this buffer.

TextTag createTag (char[] tagName, char[] propertyName, int propertyValue, char[] propertyName2, int propertyValue2)
 Create a new tag for this buffer.

TextTag createTag (char[] tagName, char[] propertyName, char[] propertyValue)
 Create a new tag for this buffer.

TextTag createTag (char[] tagName, char[] propertyName, Bitmap propertyValue)
 Create a new tag for this buffer.

void getIterAtLineIndex (TextIter iter, gint line_number, gint byte_index)
 getIterAtLineIndex

void getIterAtOffset (TextIter iter, gint char_offset)
 getIterAtOffset

void getIterAtLine (TextIter iter, gint line_number)
 getIterAtLine

void getStartIter (TextIter iter)
 getStartIter

void getEndIter (TextIter iter)
 getEndIter

void getBounds (TextIter start, TextIter end)
 getBounds

void getIterAtMark (TextIter iter, TextMark mark)
 Sets an iter to the mark.

void getIterAtChildAnchor (TextIter iter, TextChildAnchor anchor)
 Set an iter to the child anchor.

bit getModified ()
 Indicates whether the buffer has been modified since the last call to gtk_text_buffer_set_modified() set the modification flag to false.

void setModified (bit setting)
 Used to keep track of whether the buffer has been modified since the last time it was saved.

void addSelectionClipboard (Clipboard clipboard)
 addSelectionClipboard

void removeSelectionClipboard (Clipboard clipboard)
 removeSelectionClipboard

void cutClipboard (Clipboard clipboard, bit default_editable)
 cutClipboard

void copyClipboard (Clipboard clipboard)
 copyClipboard

void pastClipboard (Clipboard clipboard, TextIter override_location, bit default_editable)
 pastClipboard

bit getSelectionBounds (TextIter start, TextIter end)
 getSelectionBounds

bit deleteSelection (bit interactive, bit defaultEditable)
 deleteSelection

void beginUserAction ()
 beginUserAction

void endUserAction ()
 endUserAction


Protected Member Functions

 this (GObject *gObject)
 Creates a new text buffer from a gdkTextBuffer.

 this (GtkTextBuffer *gtkTextBuffer)
 Creates a new text buffer from a gdkTextBuffer.


Member Function Documentation

void TextBuffer.addSelectionClipboard Clipboard  clipboard  ) 
 

addSelectionClipboard

Parameters:
clipboard 

void TextBuffer.applyTag TextTag  tag,
TextIter  start,
TextIter  end
 

applyTag

Parameters:
tag 
start 
end 

void TextBuffer.applyTagByName char[]  name,
TextIter  start,
TextIter  end
 

applyTagByName

Parameters:
name 
start 
end 

void TextBuffer.beginUserAction  ) 
 

beginUserAction

void TextBuffer.copyClipboard Clipboard  clipboard  ) 
 

copyClipboard

Parameters:
clipboard 

TextChildAnchor TextBuffer.createChildAnchor TextIter  iter  ) 
 

Convenience, create and insert a child anchor.

Parameters:
iter 

TextMark TextBuffer.createMark char[]  mark_name,
TextIter  where,
bit  left_gravity
 

Creates a mark at position where If mark_name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name using gtk_text_buffer_get_mark().

If a mark has left gravity, and text is inserted at the mark's current location, the mark will be moved to the left of the newly-inserted text. If the mark has right gravity (left_gravity = FALSE), the mark will end up on the right of newly-inserted text. The standard left-to-right cursor is a mark with right gravity (when you type, the cursor stays on the right side of the text you're typing).

Parameters:
mark_name name for mark, or null
where 
left_gravity 

TextTag TextBuffer.createTag char[]  tagName,
char[]  propertyName,
Bitmap  propertyValue
 

Create a new tag for this buffer.

Parameters:
tagName can be null for no name
propertyName 
propertyValue 
Returns:

TextTag TextBuffer.createTag char[]  tagName,
char[]  propertyName,
char[]  propertyValue
 

Create a new tag for this buffer.

Parameters:
tagName can be null for no name
propertyName 
propertyValue 

TextTag TextBuffer.createTag char[]  tagName,
char[]  propertyName,
int  propertyValue,
char[]  propertyName2,
int  propertyValue2
 

Create a new tag for this buffer.

Parameters:
tagName can be null for no name
propertyName 
propertyValue 
propertyName2 
propertyValue2 

TextTag TextBuffer.createTag char[]  tagName,
char[]  propertyName,
int  propertyValue
 

Create a new tag for this buffer.

Parameters:
tagName can be null for no name
propertyName 
propertyValue 

void TextBuffer.cutClipboard Clipboard  clipboard,
bit  default_editable
 

cutClipboard

Parameters:
clipboard 
default_editable 

bit TextBuffer.deleteInteractive TextIter  start,
TextIter  end,
bit  defaultEditable
 

deleteInteractive

Parameters:
start 
end 
defaultEditable 
Returns:

void TextBuffer.deleteMark char[]  name  ) 
 

Deletes mark by name.

Parameters:
name the mar name

void TextBuffer.deleteMark TextMark  mark  ) 
 

Deletes mark, so that it's no longer located anywhere in the buffer.

Removes the reference the buffer holds to the mark, so if you haven't called g_object_ref() on the mark, it will be freed. Even if the mark isn't freed, most operations on mark become invalid. There is no way to undelete a mark. gtk_text_mark_get_deleted() will return TRUE after this function has been called on a mark; gtk_text_mark_get_deleted() indicates that a mark no longer belongs to a buffer. The "mark_deleted" signal will be emitted as notification after the mark is deleted.

void TextBuffer.deleteMarkByName char[]  name  ) 
 

Deletes mark by name using the GTK functino name.

Parameters:
name the mar name

bit TextBuffer.deleteSelection bit  interactive,
bit  defaultEditable
 

deleteSelection

Parameters:
interactive 
defaultEditable 

void TextBuffer.deleteText TextIter  start,
TextIter  end
 

deleteText

Parameters:
start 
end 

void TextBuffer.endUserAction  ) 
 

endUserAction

void TextBuffer.getBounds TextIter  start,
TextIter  end
 

getBounds

Parameters:
start 
end 

gint TextBuffer.getCharCount  ) 
 

getCharCount

Returns:

void TextBuffer.getEndIter TextIter  iter  ) 
 

getEndIter

Parameters:
iter 

TextMark TextBuffer.getInsert  ) 
 

Returns the mark that represents the cursor (insertion point).

Equivalent to calling gtk_text_buffer_get_mark() to get the mark named "insert", but very slightly more efficient, and involves less typing.

Returns:
a new Mark for the current insert point

void TextBuffer.getIterAtChildAnchor TextIter  iter,
TextChildAnchor  anchor
 

Set an iter to the child anchor.

Parameters:
iter the iter to set
anchor the child anchor

void TextBuffer.getIterAtLine TextIter  iter,
gint  line_number
 

getIterAtLine

Parameters:
iter 
line_number 

void TextBuffer.getIterAtLineIndex TextIter  iter,
gint  line_number,
gint  byte_index
 

getIterAtLineIndex

Parameters:
iter 
line_number 
byte_index 

void TextBuffer.getIterAtMark TextIter  iter,
TextMark  mark
 

Sets an iter to the mark.

Parameters:
iter the iter to set
mark the mark

void TextBuffer.getIterAtOffset TextIter  iter,
gint  char_offset
 

getIterAtOffset

Parameters:
iter 
char_offset 

gint TextBuffer.getLineCount  ) 
 

getLineCount

Returns:

TextMark TextBuffer.getMark char[]  name  ) 
 

Returns the mark named name in buffer buffer.

Parameters:
name 
Returns:
the mark or null if no such mark exists in the buffer.

bit TextBuffer.getModified  ) 
 

Indicates whether the buffer has been modified since the last call to gtk_text_buffer_set_modified() set the modification flag to false.

Returns:

TextMark TextBuffer.getSelectionBound  ) 
 

Returns the mark that represents the selection bound.

Equivalent to calling gtk_text_buffer_get_mark() to get the mark named "selection_bound", but very slightly more efficient, and involves less typing.

The currently-selected text in buffer is the region between the "selection_bound" and "insert" marks. If "selection_bound" and "insert" are in the same place, then there is no current selection. gtk_text_buffer_get_selection_bounds() is another convenient function for handling the selection, if you just want to know whether there's a selection and what its bounds are.

Returns:
a new Mark

bit TextBuffer.getSelectionBounds TextIter  start,
TextIter  end
 

getSelectionBounds

Parameters:
start 
end 

char [] TextBuffer.getSlice TextIter  start,
TextIter  end,
bit  includeHiddenChars
 

Obtain strings from the buffer.

Parameters:
start the start iter
end the end iter
includeHiddenChars 
Returns:
a string

void TextBuffer.getStartIter TextIter  iter  ) 
 

getStartIter

Parameters:
iter 

TextTagTable TextBuffer.getTagTable  ) 
 

getTagTable

Returns:
a new TestTagTable or a existing one if found

char [] TextBuffer.getText  ) 
 

Obtain the entire text.

Returns:
a string

char [] TextBuffer.getText TextIter  start,
TextIter  end,
bit  includeHiddenChars
 

Obtain strings from the buffer.

Parameters:
start the start iter
end the end iter
includeHiddenChars 
Returns:
a string

GtkTextBuffer* TextBuffer.gtkO  ) 
 

Gets the GtkTextBuffer.

Returns:
the GtkTextBuffer

void TextBuffer.insert TextIter  iter,
char[]  text
 

Insert test at the iter.

Parameters:
iter the TextIter
text the text to insert

void TextBuffer.insertAtCursor char[]  text  ) 
 

Insert test at the cursor position.

Parameters:
text the text to insert

void TextBuffer.insertChildAnchor TextIter  iter,
TextChildAnchor  anchor
 

Insert a child anchor.

Parameters:
iter 
anchor 

bit TextBuffer.insertInteractive TextIter  iter,
char[]  text,
bit  defaultEditable
 

Insert test at the iter interactively ???

Parameters:
iter the TextIter
text the text to insert
defaultEditable ???
Returns:

bit TextBuffer.insertInteractiveAtCursor char[]  text,
bit  defaultEditable
 

insertInteractiveAtCursor

Parameters:
text 
defaultEditable 
Returns:

void TextBuffer.insertPixbuf TextIter  iter,
Pixbuf  pixbuf
 

Insert a pixbuf.

Parameters:
iter 
pixbuf 

void TextBuffer.insertRange TextIter  iter,
TextIter  start,
TextIter  end
 

insertRange

Parameters:
iter 
start 
end 

bit TextBuffer.insertRangeInteractive TextIter  iter,
TextIter  start,
TextIter  end,
bit  defaultEditable
 

insertRangeInteractive

Parameters:
iter 
start 
end 
defaultEditable 
Returns:

void TextBuffer.insertWithTags TextIter  iter,
char[]  text,
TextTag  firstTag
 

insertWithTags

Parameters:
iter 
text 
firstTag 

void TextBuffer.insertWithTagsByName TextIter  iter,
char[]  text,
char[]  tagName,
char[]  tagName2,
char[]  tagName3,
char[]  tagName4,
char[]  tagName5
 

insertWithTagsByName

Parameters:
iter 
text 
tagName 
tagName2 
tagName3 
tagName4 
tagName5 

void TextBuffer.insertWithTagsByName TextIter  iter,
char[]  text,
char[]  tagName,
char[]  tagName2,
char[]  tagName3,
char[]  tagName4
 

insertWithTagsByName

Parameters:
iter 
text 
tagName 
tagName2 
tagName3 
tagName4 

void TextBuffer.insertWithTagsByName TextIter  iter,
char[]  text,
char[]  tagName,
char[]  tagName2,
char[]  tagName3
 

insertWithTagsByName

Parameters:
iter 
text 
tagName 
tagName2 
tagName3 

void TextBuffer.insertWithTagsByName TextIter  iter,
char[]  text,
char[]  tagName,
char[]  tagName2
 

insertWithTagsByName

Parameters:
iter 
text 
tagName 
tagName2 

void TextBuffer.insertWithTagsByName TextIter  iter,
char[]  text,
char[]  tagName
 

insertWithTagsByName

Parameters:
iter 
text 
tagName 

void TextBuffer.moveMark char[]  name,
TextIter  where
 

move the mark by name

Parameters:
name the mark name
where 

void TextBuffer.moveMark TextMark  mark,
TextIter  where
 

Moves mark to the new location where.

Emits the "mark_set" signal as notification of the move.

Parameters:
mark the mark
where the new position

void TextBuffer.moveMarkByName char[]  name,
TextIter  where
 

move the mark by name using gtk function name.

Parameters:
name the mark name
where 

void TextBuffer.pastClipboard Clipboard  clipboard,
TextIter  override_location,
bit  default_editable
 

pastClipboard

Parameters:
clipboard 
override_location 
default_editable 

void TextBuffer.placeCursor TextIter  where  ) 
 

placeCursor

Parameters:
where 

void TextBuffer.removeAllTags TextIter  start,
TextIter  end
 

removeAllTags

Parameters:
start 
end 

void TextBuffer.removeSelectionClipboard Clipboard  clipboard  ) 
 

removeSelectionClipboard

Parameters:
clipboard 

void TextBuffer.removeTag char[]  name,
TextIter  start,
TextIter  end
 

removeTag

Parameters:
name 
start 
end 

void TextBuffer.removeTag TextTag  tag,
TextIter  start,
TextIter  end
 

removeTag

Parameters:
tag 
start 
end 

void TextBuffer.setModified bit  setting  ) 
 

Used to keep track of whether the buffer has been modified since the last time it was saved.

Parameters:
setting 

void TextBuffer.setText char[]  text  ) 
 

Sets the text for this text view.

Parameters:
text 

TextBuffer.this  ) 
 

Create a new TextBuffer.

TextBuffer.this TextTagTable  textTagTable  ) 
 

create a new TextBuffer with a TextTagTable

Parameters:
textTagTable 

TextBuffer.this GtkTextBuffer *  gtkTextBuffer  )  [protected]
 

Creates a new text buffer from a gdkTextBuffer.

Parameters:
gtkTextBuffer the gdkTextBuffer

TextBuffer.this GObject *  gObject  )  [protected]
 

Creates a new text buffer from a gdkTextBuffer.

Parameters:
gObject the gdkTextBuffer

Reimplemented from ObjectG.


Generated on Sun Dec 21 02:47:12 2003 for DUI by doxygen 1.3.4