gtk-sharp 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.Container Widget that displays a `using System; using Gtk; class TextViewSample { static void Main () { new TextViewSample (); } TextViewSample () { Application.Init (); Window win = new Window ("TextViewSample"); win.DeleteEvent += new DeleteEventHandler (OnWinDelete); win.SetDefaultSize (600,400); Gtk.TextView view; Gtk.TextBuffer buffer; view = new Gtk.TextView (); buffer = view.Buffer; buffer.Text = "Hello, this is some text"; win.Add (view); win.ShowAll (); Application.Run (); } void OnWinDelete (object obj, DeleteEventArgs args) { Application.Quit (); } }`

Now you might put the view in a container and display it on the screen; when the user edits the text, events on the buffer will be emitted, such as , , and so on.

- Constructor
  2.12.0.0
  Creates a new TextView

  If you don't set the before using the text view, an empty default buffer will be created for you. If you want to specify your own buffer, use .

- Constructor
  2.12.0.0
  System.Obsolete
  a
  Protected Constructor.
  Chain to this constructor if you have manually registered a native value for your subclass.
- Constructor
  2.12.0.0
  the buffer to be displayed
  Creates a new TextView displaying a specified buffer.

  Creates a new widget displaying the buffer. One buffer can be shared among many widgets.

- Constructor
  2.12.0.0
  Pointer to the C object.
  Internal constructor

  This is an internal constructor, and should not be used by user code.

- Property
  2.12.0.0
  GLib.Property("accepts-tab")
  System.Boolean Whether Tab will result in a tab character being entered. a Defaults to true.
- Method
  2.12.0.0
  System.Void `` `` any a in the current Adds a child widget in the text buffer, at the given anchor
- Method
  2.12.0.0
  System.Void `` `` `` `` a a a a Adds a child at fixed coordinates in one of the text widget's windows. The window must have non-zero size (see ). Note that the child coordinates are given relative to the in question, and that these coordinates have no sane relationship to scrolling. When placing a child in GTK_TEXT_WINDOW_WIDGET, scrolling is irrelevant, the child floats above all scrollable areas. But when placing a child in one of the scrollable windows (border windows or text window), you will need to compute the child's correct position in buffer coordinates any time scrolling occurs or buffer changes occur, and then call to update the child's position. Unfortunately there is no good way to detect that scrolling has occurred, using the current API; a possible hack would be to update all child positions when the scroll adjustments change or the text buffer changes. See bug 64518 on bugzilla.gnome.org for status of fixing this issue.
- Event
  2.12.0.0
  GLib.Signal("backspace")
  System.EventHandler To be added To be added
- Method
  2.12.0.0
  System.Boolean `` the given Moves the given iter backward by one display (wrapped) line if was moved and is not on the end iterator

  Moves the given iter backward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the .

- Method
  2.12.0.0
  System.Boolean `` the given Moves the given backward to the next display line start if was moved and is not on the end iterator

  A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the .

- Property
  2.12.0.0
  GLib.Property("buffer")
  Gtk.TextBuffer The displayed by the text view the current buffer that is displayed
- Method
  2.12.0.0
  System.Void `` `` `` `` `` a , except for x coordinate of the buffer y coordinate of the buffer return location for the window's x coordinate return location for the window's y coordinate Converts specified buffer coordinates to coordinates for window

  Note that you can't convert coordinates for a nonexisting window (see .

- Event
  2.12.0.0
  GLib.Signal("copy_clipboard")
  System.EventHandler Raised when text is copied to the clipboard.
- Property
  2.12.0.0
  GLib.Property("cursor-visible")
  System.Boolean Whether the insertion point is displayed whether the insertion point is visible Defaults to true.
- Event
  2.12.0.0
  GLib.Signal("cut_clipboard")
  System.EventHandler Raised whenever a selection is cut to the clipboard.
- Property
  2.12.0.0
  Gtk.TextAttributes The default text attributes a s

  Obtains a copy of the default text attributes. These are the attributes used for text unless a tag overrides them. You'd typically pass the default attributes in to in order to get the attributes in effect at a given text position.

  The return valuea is a copy owned by the caller of this function, and should be freed.

- Event
  2.12.0.0
  GLib.Signal("delete_from_cursor")
  Gtk.DeleteFromCursorHandler Raised when text is deleted from the cursor (usually by hitting Backspace or Delete).
- Property
  2.12.0.0
  GLib.Property("editable")
  System.Boolean Whether the text can be modified by the user Whether or not the text can be edited by the user. Defaults to true.
- Method
  2.12.0.0
  System.Boolean `` the given Moves the given forward by one display (wrapped) line if was moved and is not on the end iterator

  A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the .

- Method
  2.12.0.0
  System.Boolean `` a Moves forward to the next display line end if was moved and is not on the end iterator

  Moves the given iter forward to the next display line end. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the .

- Method
  2.12.0.0
  System.Int32 `` a window to return size from Gets the width of the specified border window. the width of the window
- Method
  2.12.0.0
  Gtk.TextIter `` `` x position, in buffer coordinates y position, in buffer coordinates Retrieves the iterator at buffer coordinates and . a Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with .
- Method
  2.12.0.0
  System.Int32 `` `` `` a a a To be added a To be added
- Method
  2.12.0.0
  Gdk.Rectangle `` a Gets a rectangle which roughly contains the character at iter. a , which is the bounds of the character at The rectangle position is in buffer coordinates; use to convert these coordinates to coordinates for one of the windows in the text view.
- Method
  2.12.0.0
  System.Void `` `` `` a a y coordinate return location for top coordinate of the line This method should be fixed Gets the at the start of the line containing the coordinate . is in buffer coordinates, convert from window coordinates with . If non-, will be filled with the coordinate of the top edge of the line.
- Method
  2.12.0.0
  System.Void `` `` `` the given return location for the y coordinate return location for the height Gets the y coordinate of the top of the line containing , and the height of the line Gets the y coordinate of the top of the line containing iter, and the height of the line. The coordinate is a buffer coordinate; convert to window coordinates with .
- Method
  2.12.0.0
  Gdk.Window `` window to get Retrieves the corresponding to an area of the text view a , or

  Retrieves the corresponding to an area of the text view; possible windows include the overall widget window, child windows on the left, right, top, bottom, and the window that displays the text buffer. Windows are and nonexistent if their width or height is 0, and are nonexistent before the widget has been realized.

- Method
  2.12.0.0
  Gtk.TextWindowType `` a window type Used for finding out which window an event corresponds to the window type
- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Property
  2.12.0.0
  GLib.Property("indent")
  System.Int32 The default indentation for paragraphs The number of pixels of indentation.

  Tags in the may override the default.

- Event
  2.12.0.0
  GLib.Signal("insert_at_cursor")
  Gtk.InsertAtCursorHandler Raised whenever text is inserted at the cursor.
- Property
  2.12.0.0
  GLib.Property("justification")
  Gtk.Justification The default justification The default justification of paragraphs

  Tags in the may override the defaults.

- Property
  2.12.0.0
  GLib.Property("left-margin")
  System.Int32 The default left margin The left margin.
- Method
  2.12.0.0
  System.Void `` `` `` child widget already added to the text view new X position in window coordinates new Y position in window coordinates Updates the position of a child
- Event
  2.12.0.0
  GLib.Signal("move_cursor")
  Gtk.MoveCursorHandler Raised whenever the cursor is moved.
- Event
  2.12.0.0
  GLib.Signal("move_focus")
  System.Obsolete("Replaced by keybinding signal on Gtk.Widget")
  Gtk.MoveFocusHandler Raised when the keyboard focus changes.
- Method
  2.12.0.0
  System.Boolean `` a Moves within the buffer so that it's located within the currently-visible text area if the mark moved (wasn't already onscreen)
- Method
  2.12.0.0
  System.Boolean `` `` the given the number of characters to move (negative moves left, positive moves right) Move the iterator a given number of characters visually, treating it as the strong cursor position if iter moved and is not on the end iterator

  Move the iterator a given number of characters visually, treating it as the strong cursor position. If count is positive, then the new strong cursor position will be count positions to the right of the old cursor position. If count is negative then the new strong cursor position will be count positions to the left of the old cursor position.

  In the presence of bidirection text, the correspondence between logical and visual order will depend on the direction of the current run, and there may be jumps when the cursor is moved off of the end of a run.

- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideBackspace", Type=typeof(Gtk.TextView))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideCopyClipboard", Type=typeof(Gtk.TextView))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideCutClipboard", Type=typeof(Gtk.TextView))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideDeleteFromCursor", Type=typeof(Gtk.TextView))
  System.Void `` `` a a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideInsertAtCursor", Type=typeof(Gtk.TextView))
  System.Void `` a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideMoveCursor", Type=typeof(Gtk.TextView))
  System.Void `` `` `` a a a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideMoveFocus", Type=typeof(Gtk.TextView))
  System.Obsolete("Replaced by keybinding signal on Gtk.Widget")
  System.Void `` a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverridePageHorizontally", Type=typeof(Gtk.TextView))
  System.Void `` `` a a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverridePasteClipboard", Type=typeof(Gtk.TextView))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverridePopulatePopup", Type=typeof(Gtk.TextView))
  System.Void `` a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideScrollAdjustmentsSet", Type=typeof(Gtk.TextView))
  System.Void `` `` a a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideSetAnchor", Type=typeof(Gtk.TextView))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideToggleOverwrite", Type=typeof(Gtk.TextView))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Property
  2.12.0.0
  GLib.Property("overwrite")
  System.Boolean Whether entered text overwrites existing contents. a Defaults to false.
- Event
  2.12.0.0
  GLib.Signal("page_horizontally")
  Gtk.PageHorizontallyHandler Raised when the user scrolls horizontally in this widget.
- Event
  2.12.0.0
  GLib.Signal("paste_clipboard")
  System.EventHandler Raised whenever text is pasted from the clipboard.
- Property
  2.12.0.0
  GLib.Property("pixels-above-lines")
  System.Int32 The default number of blank pixels above paragraphs the number of pixels above paragraphs

  Tags in the may override the defaults.

- Property
  2.12.0.0
  GLib.Property("pixels-below-lines")
  System.Int32 The default number of pixels of blank space to put below paragraphs the blank space below paragraphs in pixels

  Tags in the may override this default.

- Property
  2.12.0.0
  GLib.Property("pixels-inside-wrap")
  System.Int32 The default number of pixels of blank space to leave between display/wrapped lines within a paragraph default number of pixels of blank space between wrapped lines

  Tags in the may override this default.

- Method
  2.12.0.0
  System.Boolean Moves the cursor to the currently visible region of the buffer if it isn't there already. if the cursor had to be moved
- Event
  2.12.0.0
  GLib.Signal("populate_popup")
  Gtk.PopulatePopupHandler Raised when the popup dialog on this object needs to be filled with data.
- Property
  2.12.0.0
  GLib.Property("right-margin")
  System.Int32 The default right margin the right margin
- Event
  2.12.0.0
  GLib.Signal("set_scroll_adjustments")
  Gtk.ScrollAdjustmentsSetHandler Raised whenever the adjustment values for the scrollbars are set.
- Method
  2.12.0.0
  System.Void `` a mark in the current Scrolls the text view the minimum distance such that is contained within the visible area of the widget
- Method
  2.12.0.0
  System.Boolean `` `` `` `` `` the given margin of screen size, the valid range is 0.0 to 0.5 whether to use alignment arguments (if , just get the mark onscreen) horizontal alignment of mark within visible area vertical alignment of mark within visible area Scrolls the text view so that is on the screen in the position indicated by and if scrolling occurred

  Scrolls the text view so that is on the screen in the position indicated by and . An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If is , the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size within_margin.

  NOTE: This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid oddness, consider using which saves a point to be scrolled to after line validation.

- Method
  2.12.0.0
  System.Void `` `` `` `` `` a given margin of screen size, the valid range is 0.0 to 0.5 whether to use alignment arguments (if , just get the mark onscreen) horizontal alignment of mark within visible area vertical alignment of mark within visible area Scrolls the view so that is on the screen in the position indicated by and

  An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If is , the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size .

- Event
  2.12.0.0
  GLib.Signal("set_anchor")
  System.EventHandler Raised whenever an anchor (e.g. ) is set within the TextView.
- Method
  2.12.0.0
  System.Void `` `` the window to affect the width or height of the window Sets the width of or , or the height of or .

  Automatically destroys the corresponding window if the size is set to 0, and creates the window if the size is set to non-zero. This function can only be used for the "border windows," it doesn't work with , , or .

- Method
  2.12.0.0
  System.Boolean `` the given Determines whether iter is at the start of a display line if begins a wrapped line

  Determines whether iter is at the start of a display line. See for an explanation of display lines vs. paragraphs.

- Property
  2.12.0.0
  GLib.Property("tabs")
  Pango.TabArray Custom tabs for this text custom tabes for this text
- Event
  2.12.0.0
  GLib.Signal("toggle_overwrite")
  System.EventHandler Raised whenever the insert/overwrite flag is toggled.
- Property
  2.12.0.0
  Gdk.Rectangle Returns the currently-visible region of the buffer, in buffer coordinates. a You can convert to window coordinates with .
- Method
  2.12.0.0
  System.Void `` `` `` `` `` a except x coordinate of the window y coordinate of the window return location for the buffer's x coordinate return location for the buffer's y coordinate Converts coordinates on the window to buffer coordinates

  Note that you can't convert coordinates for a nonexisting window (see .

- Property
  2.12.0.0
  GLib.Property("wrap-mode")
  Gtk.WrapMode Whether to wrap lines never, at word boundaries, or at character boundaries. the of the text view