Show / Hide Table of Contents

Class TextView

Multi-line text editing view

Inheritance
System.Object
Responder
View
TextView
Inherited Members
View.Add(View)
View.Add(View[])
View.AddRune(Int32, Int32, Rune)
View.Bounds
View.ChildNeedsDisplay()
View.Clear()
View.Clear(Rect)
View.ClearNeedsDisplay()
View.ClipToBounds()
View.ColorScheme
View.DrawFrame(Rect, Int32, Boolean)
View.DrawHotString(ustring, Boolean, ColorScheme)
View.DrawHotString(ustring, Attribute, Attribute)
View.Driver
View.EnsureFocus()
View.Focused
View.FocusFirst()
View.FocusLast()
View.FocusNext()
View.FocusPrev()
View.Frame
View.GetEnumerator()
View.HasFocus
View.Height
View.Id
View.LayoutStyle
View.LayoutSubviews()
View.MostFocused
View.Move(Int32, Int32)
View.ProcessColdKey(KeyEvent)
View.ProcessHotKey(KeyEvent)
View.Remove(View)
View.RemoveAll()
View.ScreenToView(Int32, Int32)
View.SetClip(Rect)
View.SetFocus(View)
View.SetNeedsDisplay()
View.SetNeedsDisplay(Rect)
View.Subviews
View.SuperView
View.ToString()
View.WantMousePositionReports
View.Width
View.X
View.Y
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class TextView : Terminal.Gui.View
Remarks

The text view provides a multi-line text view. Users interact with it with the standard Emacs commands for movement or the arrow keys.

ShortcutAction performed
Left cursor, Control-b Moves the editing point left.
Right cursor, Control-f Moves the editing point right.
Alt-b Moves one word back.
Alt-f Moves one word forward.
Up cursor, Control-p Moves the editing point one line up.
Down cursor, Control-n Moves the editing point one line down
Home key, Control-a Moves the cursor to the beginning of the line.
End key, Control-e Moves the cursor to the end of the line.
Delete, Control-d Deletes the character in front of the cursor.
Backspace Deletes the character behind the cursor.
Control-k Deletes the text until the end of the line and replaces the kill buffer with the deleted text. You can paste this text in a different place by using Control-y.
Control-y Pastes the content of the kill ring into the current position.
Alt-d Deletes the word above the cursor and adds it to the kill ring. You can paste the contents of the kill ring with Control-y.
Control-q Quotes the next input character, to prevent the normal processing of key handling to take place.

Constructors

TextView()

Public constructor, creates a view on the specified area, with dimensions controlled with the X, Y, Width and Height properties.

Declaration
public TextView ();

TextView(Rect)

Public constructor, creates a view on the specified area, with absolute position and size.

Declaration
public TextView (Terminal.Gui.Rect frame);
Parameters
Type Name Description
Rect frame

To be added.

Properties

CanFocus

Declaration
public override bool CanFocus { get; set; }
Property Value
Type Description
System.Boolean

To be added.

CurrentColumn

Gets the cursor column.

Declaration
public int CurrentColumn { get; }
Property Value
Type Description
System.Int32

The cursor column.

CurrentRow

The current cursor row.

Declaration
public int CurrentRow { get; }
Property Value
Type Description
System.Int32

To be added.

Text

Sets or gets the text in the entry.

Declaration
public NStack.ustring Text { get; set; }
Property Value
Type Description
NStack.ustring

To be added.

Methods

LoadFile(String)

Loads the contents of the file into the TextView.

Declaration
public bool LoadFile (string path);
Parameters
Type Name Description
System.String path

Path to the file to load.

Returns
Type Description
System.Boolean

true, if file was loaded, false otherwise.

LoadStream(Stream)

Loads the contents of the stream into the TextView.

Declaration
public void LoadStream (System.IO.Stream stream);
Parameters
Type Name Description
System.IO.Stream stream

Stream to load the contents from.

MouseEvent(MouseEvent)

Declaration
public override bool MouseEvent (Terminal.Gui.MouseEvent ev);
Parameters
Type Name Description
MouseEvent ev

To be added.

Returns
Type Description
System.Boolean

To be added.

PositionCursor()

Positions the cursor on the current row and column

Declaration
public override void PositionCursor ();

ProcessKey(KeyEvent)

Declaration
public override bool ProcessKey (Terminal.Gui.KeyEvent kb);
Parameters
Type Name Description
KeyEvent kb

To be added.

Returns
Type Description
System.Boolean

To be added.

Redraw(Rect)

Redraw the text editor region

Declaration
public override void Redraw (Terminal.Gui.Rect region);
Parameters
Type Name Description
Rect region

The region to redraw.

Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX