From 7d6cefa5dda9972ed14c3a53f18cfd0cf20781a4 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 3 Jun 2020 18:18:19 -0600 Subject: [PATCH] updated api docs; implemented inheritdoc; may break deploy --- .../Terminal.Gui.Application.html | 1 - .../api/Terminal.Gui/Terminal.Gui.Button.html | 100 +++++++++++++++-- .../Terminal.Gui/Terminal.Gui.CheckBox.html | 54 ++++++++- .../Terminal.Gui/Terminal.Gui.ComboBox.html | 30 ++++- .../Terminal.Gui/Terminal.Gui.DateField.html | 15 ++- .../api/Terminal.Gui/Terminal.Gui.Dialog.html | 33 +++++- .../Terminal.Gui/Terminal.Gui.FileDialog.html | 5 +- .../Terminal.Gui/Terminal.Gui.FrameView.html | 20 +++- .../Terminal.Gui/Terminal.Gui.HexView.html | 66 +++++++++-- docs/api/Terminal.Gui/Terminal.Gui.Label.html | 20 +++- .../Terminal.Gui/Terminal.Gui.ListView.html | 54 ++++++++- .../Terminal.Gui/Terminal.Gui.MenuBar.html | 81 ++++++++++++-- .../Terminal.Gui.ProgressBar.html | 18 ++- .../Terminal.Gui/Terminal.Gui.RadioGroup.html | 77 +++++++++++-- .../Terminal.Gui.ScrollBarView.html | 24 +++- .../Terminal.Gui/Terminal.Gui.ScrollView.html | 52 ++++++++- .../Terminal.Gui/Terminal.Gui.StatusBar.html | 49 ++++++++- .../Terminal.Gui/Terminal.Gui.TextField.html | 54 +++++++-- .../Terminal.Gui/Terminal.Gui.TextView.html | 56 ++++++++-- .../Terminal.Gui/Terminal.Gui.TimeField.html | 15 ++- .../Terminal.Gui/Terminal.Gui.Toplevel.html | 65 +++++++++-- docs/api/Terminal.Gui/Terminal.Gui.View.html | 104 +++++++++++++++--- .../api/Terminal.Gui/Terminal.Gui.Window.html | 47 ++++++-- docs/index.json | 44 ++++---- docs/manifest.json | 46 ++++---- 25 files changed, 964 insertions(+), 166 deletions(-) diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Application.html b/docs/api/Terminal.Gui/Terminal.Gui.Application.html index bdc77a737..15685a6c1 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Application.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Application.html @@ -639,7 +639,6 @@ Runs the application by calling Declaration
public static void Run<T>()
-
     where T : Toplevel, new()
Type Parameters
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Button.html b/docs/api/Terminal.Gui/Terminal.Gui.Button.html index b7ae16770..d8d9ad509 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Button.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Button.html @@ -578,7 +578,9 @@ The text displayed by this
Butto

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -612,7 +614,7 @@ The text displayed by this Butto System.Boolean - + true, if the event was handled, false otherwise. @@ -622,7 +624,9 @@ The text displayed by this Butto

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -634,7 +638,12 @@ The text displayed by this Butto

ProcessColdKey(KeyEvent)

-
+
+This method can be overwritten by views that +want to provide accelerator functionality +(Alt-key for example), but without +interefering with normal ProcessKey behavior. +
Declaration
@@ -674,11 +683,31 @@ The text displayed by this Butto
Overrides
View.ProcessColdKey(KeyEvent)
+
Remarks
+
+

+ After keys are sent to the subviews on the + current view, all the view are + processed and the key is passed to the views + to allow some of them to process the keystroke + as a cold-key.

+

+ This functionality is used, for example, by + default buttons to act on the enter key. + Processing this as a hot-key would prevent + non-default buttons from consuming the enter + keypress when they have the focus. +

+

ProcessHotKey(KeyEvent)

-
+
+This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
Declaration
@@ -718,11 +747,31 @@ The text displayed by this Butto
Overrides
+
Remarks
+
+

+ Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

+

+ For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

+

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -762,11 +811,32 @@ The text displayed by this Butto
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -785,12 +855,26 @@ The text displayed by this Butto Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html index a83d0f863..978c65b75 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html @@ -526,7 +526,9 @@ The text displayed by this Che

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -560,7 +562,7 @@ The text displayed by this Che System.Boolean - + true, if the event was handled, false otherwise. @@ -599,7 +601,9 @@ Called when the

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -611,7 +615,10 @@ Called when the

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -651,11 +658,32 @@ Called when the Overrides +
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -674,12 +702,26 @@ Called when the Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Events

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html index f458e8a29..c75e7ebae 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html @@ -427,7 +427,9 @@ The currently selected list item

OnEnter()

-
+
+Method invoked when a view gets focus. +
Declaration
@@ -444,7 +446,7 @@ The currently selected list item System.Boolean - + true, if the event was handled, false otherwise. @@ -454,7 +456,10 @@ The currently selected list item

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -494,6 +499,25 @@ The currently selected list item
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Events

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html index d360d1f9f..70a474336 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html @@ -525,7 +525,9 @@ Get or set the data format for the widget.

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -559,7 +561,7 @@ Get or set the data format for the widget. System.Boolean - + true, if the event was handled, false otherwise. @@ -569,7 +571,9 @@ Get or set the data format for the widget.

ProcessKey(KeyEvent)

-
+
+Processes key presses for the TextField. +
Declaration
@@ -609,6 +613,11 @@ Get or set the data format for the widget.
Overrides
+
Remarks
+
+The TextField control responds to the following keys: +
KeysFunction
Delete, BackspaceDeletes the character before cursor.
+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html index 76febff17..3c75f11db 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html @@ -504,7 +504,10 @@ Adds a Button to the

LayoutSubviews()

-
+
+Invoked when a view starts executing or when the dimensions of the view have changed, for example in +response to the container view or terminal resizing. +
Declaration
@@ -512,11 +515,18 @@ Adds a Button to the
Overrides
+
Remarks
+
+Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. +

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -556,6 +566,25 @@ Adds a Button to the
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html index f068b12d8..a2f29c019 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html @@ -700,7 +700,10 @@ Gets or sets the prompt label for the

WillPresent()

-
+
+Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after +the views have been laid out, and before the views are drawn for the first time. +
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html index fd679ffa4..5be278b7b 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html @@ -509,7 +509,9 @@ Add the specified View to this

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -528,12 +530,26 @@ Add the specified View to this Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html index 1fdcc9b8c..4f48eebab 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html @@ -477,7 +477,9 @@ Each Key indicates an offset where an edit was made and the Value is the changed

Frame

-
+
+Gets or sets the frame for the view. The frame is relative to the view's container (SuperView). +
Declaration
@@ -494,12 +496,22 @@ Each Key indicates an offset where an edit was made and the Value is the changed Rect - + The frame.
Overrides
+
Remarks
+
+

+ Change the Frame when using the Absolute layout style to move or resize views. +

+

+ Altering the Frame of a view will trigger the redrawing of the + view as well as the redrawing of the affected regions of the SuperView. +

+
@@ -546,7 +558,9 @@ contents of the

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -558,7 +572,10 @@ contents of the

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -577,7 +594,7 @@ contents of the KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -598,11 +615,32 @@ contents of the Overrides +
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -621,12 +659,26 @@ contents of the Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Label.html b/docs/api/Terminal.Gui/Terminal.Gui.Label.html index 22a4c8451..11bf479bf 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Label.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Label.html @@ -640,7 +640,9 @@ Computes the number of lines needed to render the specified text by the

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -659,12 +661,26 @@ Computes the number of lines needed to render the specified text by the Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html index 816ff9e56..40f559be8 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html @@ -714,7 +714,9 @@ Marks an unmarked row.

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -748,7 +750,7 @@ Marks an unmarked row. System.Boolean - + true, if the event was handled, false otherwise. @@ -920,7 +922,9 @@ Invokes the SelectedChanged event if it is defined.

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -932,7 +936,10 @@ Invokes the SelectedChanged event if it is defined.

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -972,11 +979,32 @@ Invokes the SelectedChanged event if it is defined.
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -995,12 +1023,26 @@ Invokes the SelectedChanged event if it is defined. Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html index 29507fde7..ceb036343 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html @@ -494,7 +494,9 @@ Closes the current Menu programatically, if open.

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -528,7 +530,7 @@ Closes the current Menu programatically, if open. System.Boolean - + true, if the event was handled, false otherwise. @@ -557,7 +559,7 @@ Closes the current Menu programatically, if open. KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -601,7 +603,7 @@ Closes the current Menu programatically, if open. KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -638,7 +640,9 @@ Opens the current Menu programatically.

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -650,7 +654,11 @@ Opens the current Menu programatically.

ProcessHotKey(KeyEvent)

-
+
+This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
Declaration
@@ -690,11 +698,31 @@ Opens the current Menu programatically.
Overrides
+
Remarks
+
+

+ Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

+

+ For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

+

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -734,11 +762,32 @@ Opens the current Menu programatically.
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -757,12 +806,26 @@ Opens the current Menu programatically. Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Events

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html index 4f86b1d9a..b6c7c0298 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html @@ -450,7 +450,9 @@ mode. If is in activity mode, the marker is moved.

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -475,6 +477,20 @@ mode. If is in activity mode, the marker is moved.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html index b63eb053d..5360d9252 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html @@ -573,7 +573,9 @@ The currently selected item from the list of radio labels

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -607,7 +609,7 @@ The currently selected item from the list of radio labels System.Boolean - + true, if the event was handled, false otherwise. @@ -617,7 +619,9 @@ The currently selected item from the list of radio labels

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -629,7 +633,12 @@ The currently selected item from the list of radio labels

ProcessColdKey(KeyEvent)

-
+
+This method can be overwritten by views that +want to provide accelerator functionality +(Alt-key for example), but without +interefering with normal ProcessKey behavior. +
Declaration
@@ -669,11 +678,30 @@ The currently selected item from the list of radio labels
Overrides
+
Remarks
+
+

+ After keys are sent to the subviews on the + current view, all the view are + processed and the key is passed to the views + to allow some of them to process the keystroke + as a cold-key.

+

+ This functionality is used, for example, by + default buttons to act on the enter key. + Processing this as a hot-key would prevent + non-default buttons from consuming the enter + keypress when they have the focus. +

+

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -713,11 +741,32 @@ The currently selected item from the list of radio labels
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -736,12 +785,26 @@ The currently selected item from the list of radio labels Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html index a07a29d88..4ee8dda9a 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html @@ -570,7 +570,9 @@ part of a ScrollView the

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -604,7 +606,7 @@ part of a ScrollView the System.Boolean - + true, if the event was handled, false otherwise. @@ -614,7 +616,9 @@ part of a ScrollView the

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -639,6 +643,20 @@ part of a ScrollView the
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Events

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html index 77c84d48c..6815ce4a1 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html @@ -530,7 +530,9 @@ Adds the view to the scrollview.

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -564,7 +566,7 @@ Adds the view to the scrollview. System.Boolean - + true, if the event was handled, false otherwise. @@ -574,7 +576,9 @@ Adds the view to the scrollview.

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -586,7 +590,10 @@ Adds the view to the scrollview.

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -626,11 +633,32 @@ Adds the view to the scrollview.
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -655,6 +683,20 @@ Adds the view to the scrollview.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html index 5cfa8e59d..f72a1a63f 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html @@ -435,7 +435,9 @@ The parent view of the Status

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -469,7 +471,7 @@ The parent view of the Status System.Boolean - + true, if the event was handled, false otherwise. @@ -479,7 +481,11 @@ The parent view of the Status

ProcessHotKey(KeyEvent)

-
+
+This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
Declaration
@@ -519,11 +525,30 @@ The parent view of the Status
Overrides
+
Remarks
+
+

+ Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

+

+ For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -542,12 +567,26 @@ The parent view of the Status Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html index cffc0208e..582e47afc 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html @@ -442,7 +442,9 @@ Public constructor that creates a text field, with layout controlled with X, Y,

CanFocus

-
+
+Gets or sets a value indicating whether this Responder can focus. +
Declaration
@@ -459,7 +461,7 @@ Public constructor that creates a text field, with layout controlled with X, Y, System.Boolean - + true if can focus; otherwise, false. @@ -496,7 +498,9 @@ Sets or gets the current cursor position.

Frame

-
+
+Gets or sets the frame for the view. The frame is relative to the view's container (SuperView). +
Declaration
@@ -513,12 +517,22 @@ Sets or gets the current cursor position. Rect - + The frame.
Overrides
+
Remarks
+
+

+ Change the Frame when using the Absolute layout style to move or resize views. +

+

+ Altering the Frame of a view will trigger the redrawing of the + view as well as the redrawing of the affected regions of the SuperView. +

+
@@ -757,7 +771,9 @@ Cut the selected text to the clipboard.

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -791,7 +807,7 @@ Cut the selected text to the clipboard. System.Boolean - + true, if the event was handled, false otherwise. @@ -801,7 +817,9 @@ Cut the selected text to the clipboard.

OnLeave()

-
+
+Method invoked when a view loses focus. +
Declaration
@@ -818,7 +836,7 @@ Cut the selected text to the clipboard. System.Boolean - + true, if the event was handled, false otherwise. @@ -905,7 +923,9 @@ The TextField control res

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -924,12 +944,26 @@ The TextField control res Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Events

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html index 8125598df..0930e4745 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html @@ -426,7 +426,9 @@ Initalizes a TextView on t

CanFocus

-
+
+Gets or sets a value indicating whether this Responder can focus. +
Declaration
@@ -443,7 +445,7 @@ Initalizes a TextView on t System.Boolean - + true if can focus; otherwise, false. @@ -666,7 +668,9 @@ Loads the contents of the stream into the

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -700,7 +704,7 @@ Loads the contents of the stream into the System.Boolean - + true, if the event was handled, false otherwise. @@ -724,7 +728,10 @@ Positions the cursor on the current row and column

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -764,11 +771,32 @@ Positions the cursor on the current row and column
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -787,12 +815,26 @@ Positions the cursor on the current row and column Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html index 4078bccc9..eb63ac94c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html @@ -525,7 +525,9 @@ Gets or sets the time of the

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -559,7 +561,7 @@ Gets or sets the time of the System.Boolean - + true, if the event was handled, false otherwise. @@ -569,7 +571,9 @@ Gets or sets the time of the

ProcessKey(KeyEvent)

-
+
+Processes key presses for the TextField. +
Declaration
@@ -609,6 +613,11 @@ Gets or sets the time of the
Overrides
+
Remarks
+
+The TextField control responds to the following keys: +
KeysFunction
Delete, BackspaceDeletes the character before cursor.
+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html index 7c9354a2a..745890f17 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html @@ -551,7 +551,9 @@ Gets or sets the status bar for this Toplevel

Add(View)

-
+
+Adds a subview (child) to this view. +
Declaration
@@ -576,6 +578,10 @@ Gets or sets the status bar for this Toplevel
Overrides
+
Remarks
+
+The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() +
@@ -607,7 +613,10 @@ Convenience factory method that creates a new Toplevel with the current terminal

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -626,7 +635,7 @@ Convenience factory method that creates a new Toplevel with the current terminal KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -647,11 +656,32 @@ Convenience factory method that creates a new Toplevel with the current terminal
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -670,17 +700,33 @@ Convenience factory method that creates a new Toplevel with the current terminal Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Remove(View)

-
+
+Removes a subview added via Add(View) or Add(View[]) from this View. +
Declaration
@@ -705,11 +751,16 @@ Convenience factory method that creates a new Toplevel with the current terminal
Overrides
+
Remarks
+
+

RemoveAll()

-
+
+Removes all subviews (children) added via Add(View) or Add(View[]) from this View. +
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.html b/docs/api/Terminal.Gui/Terminal.Gui.View.html index 73c0b09a6..4e0721c65 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.View.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.html @@ -437,7 +437,9 @@ Gets or sets the frame for the view. The frame is relative to the view's co

HasFocus

-
+
+Gets or sets a value indicating whether this Responder has focus. +
Declaration
@@ -454,7 +456,7 @@ Gets or sets the frame for the view. The frame is relative to the view's co System.Boolean - + true if has focus; otherwise, false. @@ -1403,7 +1405,9 @@ This method will be called before any subviews added with

OnEnter()

-
+
+Method invoked when a view gets focus. +
Declaration
@@ -1420,7 +1424,7 @@ This method will be called before any subviews added with System.Boolean - + true, if the event was handled, false otherwise. @@ -1518,7 +1522,9 @@ This method will be called before any subviews added with

OnLeave()

-
+
+Method invoked when a view loses focus. +
Declaration
@@ -1535,7 +1541,7 @@ This method will be called before any subviews added with System.Boolean - + true, if the event was handled, false otherwise. @@ -1545,7 +1551,9 @@ This method will be called before any subviews added with

OnMouseEnter(MouseEvent)

-
+
+Method invoked when a mouse event is generated for the first time. +
Declaration
@@ -1579,7 +1587,7 @@ This method will be called before any subviews added with System.Boolean - + true, if the event was handled, false otherwise. @@ -1633,7 +1641,9 @@ Method invoked when a mouse event is generated

OnMouseLeave(MouseEvent)

-
+
+Method invoked when a mouse event is generated for the last time. +
Declaration
@@ -1667,7 +1677,7 @@ Method invoked when a mouse event is generated System.Boolean - + true, if the event was handled, false otherwise. @@ -1689,7 +1699,12 @@ Positions the cursor in the right position based on the currently focused view i

ProcessColdKey(KeyEvent)

-
+
+This method can be overwritten by views that +want to provide accelerator functionality +(Alt-key for example), but without +interefering with normal ProcessKey behavior. +
Declaration
@@ -1708,7 +1723,7 @@ Positions the cursor in the right position based on the currently focused view i KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -1729,11 +1744,31 @@ Positions the cursor in the right position based on the currently focused view i
Overrides
+
Remarks
+
+

+ After keys are sent to the subviews on the + current view, all the view are + processed and the key is passed to the views + to allow some of them to process the keystroke + as a cold-key.

+

+ This functionality is used, for example, by + default buttons to act on the enter key. + Processing this as a hot-key would prevent + non-default buttons from consuming the enter + keypress when they have the focus. +

+

ProcessHotKey(KeyEvent)

-
+
+This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
Declaration
@@ -1773,11 +1808,31 @@ Positions the cursor in the right position based on the currently focused view i
Overrides
+
Remarks
+
+

+ Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

+

+ For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

+

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -1796,7 +1851,7 @@ Positions the cursor in the right position based on the currently focused view i KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -1817,6 +1872,25 @@ Positions the cursor in the right position based on the currently focused view i
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Window.html b/docs/api/Terminal.Gui/Terminal.Gui.Window.html index a02d94bf1..6443992a5 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Window.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Window.html @@ -552,7 +552,9 @@ The title to be displayed for this window.

Add(View)

-
+
+Adds a subview (child) to this view. +
Declaration
@@ -577,6 +579,10 @@ The title to be displayed for this window.
Overrides
+
Remarks
+
+The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() +
@@ -608,7 +614,9 @@ Enumerates the various Views i

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -627,7 +635,7 @@ Enumerates the various Views i MouseEvent mouseEvent - + Contains the details about the mouse event. @@ -642,7 +650,7 @@ Enumerates the various Views i System.Boolean - + true, if the event was handled, false otherwise. @@ -652,7 +660,9 @@ Enumerates the various Views i

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -671,17 +681,33 @@ Enumerates the various Views i Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ Views should set the color that they want to use on entry, as otherwise this will inherit + the last color that was set globaly on the driver. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Remove(View)

-
+
+Removes a subview added via Add(View) or Add(View[]) from this View. +
Declaration
@@ -706,11 +732,16 @@ Enumerates the various Views i
Overrides
+
Remarks
+
+

RemoveAll()

-
+
+Removes all subviews (children) added via Add(View) or Add(View[]) from this View. +
Declaration
diff --git a/docs/index.json b/docs/index.json index fe7c5d0dd..971413a33 100644 --- a/docs/index.json +++ b/docs/index.json @@ -22,12 +22,12 @@ "api/Terminal.Gui/Terminal.Gui.Button.html": { "href": "api/Terminal.Gui/Terminal.Gui.Button.html", "title": "Class Button", - "keywords": "Class Button Button is a View that provides an item that invokes an System.Action when activated by the user. Inheritance System.Object Responder View Button Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Button : View, IEnumerable Remarks Provides a button showing text invokes an System.Action when clicked on with a mouse or when the user presses SPACE, ENTER, or hotkey. The hotkey is specified by the first uppercase letter in the button. When the button is configured as the default ( IsDefault ) and the user presses the ENTER key, if no other View processes the KeyEvent , the Button 's System.Action will be invoked. Constructors Button(ustring, Boolean) Initializes a new instance of Button using Computed layout. Declaration public Button(ustring text, bool is_default = false) Parameters Type Name Description NStack.ustring text The button's text System.Boolean is_default If true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring) Initializes a new instance of Button using Absolute layout, based on the given text Declaration public Button(int x, int y, ustring text) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text Remarks The width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button using Absolute layout, based on the given text. Declaration public Button(int x, int y, ustring text, bool is_default) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text System.Boolean is_default If true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. Fields Clicked Clicked System.Action , raised when the button is clicked. Declaration public Action Clicked Field Value Type Description System.Action Remarks Client code can hook up to this event, it is raised when the button is activated either with the mouse or the keyboard. Properties IsDefault Gets or sets whether the Button is the default action to activate in a dialog. Declaration public bool IsDefault { get; set; } Property Value Type Description System.Boolean true if is default; otherwise, false . Text The text displayed by this Button . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class Button Button is a View that provides an item that invokes an System.Action when activated by the user. Inheritance System.Object Responder View Button Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Button : View, IEnumerable Remarks Provides a button showing text invokes an System.Action when clicked on with a mouse or when the user presses SPACE, ENTER, or hotkey. The hotkey is specified by the first uppercase letter in the button. When the button is configured as the default ( IsDefault ) and the user presses the ENTER key, if no other View processes the KeyEvent , the Button 's System.Action will be invoked. Constructors Button(ustring, Boolean) Initializes a new instance of Button using Computed layout. Declaration public Button(ustring text, bool is_default = false) Parameters Type Name Description NStack.ustring text The button's text System.Boolean is_default If true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring) Initializes a new instance of Button using Absolute layout, based on the given text Declaration public Button(int x, int y, ustring text) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text Remarks The width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button using Absolute layout, based on the given text. Declaration public Button(int x, int y, ustring text, bool is_default) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text System.Boolean is_default If true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. Fields Clicked Clicked System.Action , raised when the button is clicked. Declaration public Action Clicked Field Value Type Description System.Action Remarks Client code can hook up to this event, it is raised when the button is activated either with the mouse or the keyboard. Properties IsDefault Gets or sets whether the Button is the default action to activate in a dialog. Declaration public bool IsDefault { get; set; } Property Value Type Description System.Boolean true if is default; otherwise, false . Text The text displayed by this Button . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.CheckBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.CheckBox.html", "title": "Class CheckBox", - "keywords": "Class CheckBox The CheckBox View shows an on/off toggle that the user can set Inheritance System.Object Responder View CheckBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class CheckBox : View, IEnumerable Constructors CheckBox(ustring, Boolean) Initializes a new instance of CheckBox based on the given text, uses Computed layout and sets the height and width. Declaration public CheckBox(ustring s, bool is_checked = false) Parameters Type Name Description NStack.ustring s S. System.Boolean is_checked If set to true is checked. CheckBox(Int32, Int32, ustring) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s Remarks The size of CheckBox is computed based on the text length. This CheckBox is not toggled. CheckBox(Int32, Int32, ustring, Boolean) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s, bool is_checked) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s System.Boolean is_checked Remarks The size of CheckBox is computed based on the text length. Properties Checked The state of the CheckBox Declaration public bool Checked { get; set; } Property Value Type Description System.Boolean Text The text displayed by this CheckBox Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnToggled(Boolean) Called when the Checked property changes. Invokes the Toggled event. Declaration public virtual void OnToggled(bool previousChecked) Parameters Type Name Description System.Boolean previousChecked PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Events Toggled Toggled event, raised when the CheckBox is toggled. Declaration public event EventHandler Toggled Event Type Type Description System.EventHandler < System.Boolean > Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. The passed bool contains the previous state. Implements System.Collections.IEnumerable" + "keywords": "Class CheckBox The CheckBox View shows an on/off toggle that the user can set Inheritance System.Object Responder View CheckBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class CheckBox : View, IEnumerable Constructors CheckBox(ustring, Boolean) Initializes a new instance of CheckBox based on the given text, uses Computed layout and sets the height and width. Declaration public CheckBox(ustring s, bool is_checked = false) Parameters Type Name Description NStack.ustring s S. System.Boolean is_checked If set to true is checked. CheckBox(Int32, Int32, ustring) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s Remarks The size of CheckBox is computed based on the text length. This CheckBox is not toggled. CheckBox(Int32, Int32, ustring, Boolean) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s, bool is_checked) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s System.Boolean is_checked Remarks The size of CheckBox is computed based on the text length. Properties Checked The state of the CheckBox Declaration public bool Checked { get; set; } Property Value Type Description System.Boolean Text The text displayed by this CheckBox Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) OnToggled(Boolean) Called when the Checked property changes. Invokes the Toggled event. Declaration public virtual void OnToggled(bool previousChecked) Parameters Type Name Description System.Boolean previousChecked PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events Toggled Toggled event, raised when the CheckBox is toggled. Declaration public event EventHandler Toggled Event Type Type Description System.EventHandler < System.Boolean > Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. The passed bool contains the previous state. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Clipboard.html": { "href": "api/Terminal.Gui/Terminal.Gui.Clipboard.html", @@ -52,7 +52,7 @@ "api/Terminal.Gui/Terminal.Gui.ComboBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.ComboBox.html", "title": "Class ComboBox", - "keywords": "Class ComboBox ComboBox control Inheritance System.Object Responder View ComboBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.Redraw(Rect) View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ComboBox : View, IEnumerable Constructors ComboBox(Int32, Int32, Int32, Int32, IList) Public constructor Declaration public ComboBox(int x, int y, int w, int h, IList source) Parameters Type Name Description System.Int32 x The x coordinate System.Int32 y The y coordinate System.Int32 w The width System.Int32 h The height System.Collections.Generic.IList < System.String > source Auto completion source Properties Text The currently selected list item Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides View.OnEnter() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent e) Parameters Type Name Description KeyEvent e Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Events Changed Changed event, raised when the selection has been confirmed. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks Client code can hook up to this event, it is raised when the selection has been confirmed. Implements System.Collections.IEnumerable" + "keywords": "Class ComboBox ComboBox control Inheritance System.Object Responder View ComboBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.Redraw(Rect) View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ComboBox : View, IEnumerable Constructors ComboBox(Int32, Int32, Int32, Int32, IList) Public constructor Declaration public ComboBox(int x, int y, int w, int h, IList source) Parameters Type Name Description System.Int32 x The x coordinate System.Int32 y The y coordinate System.Int32 w The width System.Int32 h The height System.Collections.Generic.IList < System.String > source Auto completion source Properties Text The currently selected list item Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods OnEnter() Method invoked when a view gets focus. Declaration public override bool OnEnter() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides View.OnEnter() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent e) Parameters Type Name Description KeyEvent e Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Events Changed Changed event, raised when the selection has been confirmed. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks Client code can hook up to this event, it is raised when the selection has been confirmed. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html": { "href": "api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html", @@ -62,12 +62,12 @@ "api/Terminal.Gui/Terminal.Gui.DateField.html": { "href": "api/Terminal.Gui/Terminal.Gui.DateField.html", "title": "Class DateField", - "keywords": "Class DateField Date editing View Inheritance System.Object Responder View TextField DateField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class DateField : TextField, IEnumerable Remarks The DateField View provides date editing functionality with mouse support. Constructors DateField(DateTime) Initializes a new instance of DateField Declaration public DateField(DateTime date) Parameters Type Name Description System.DateTime date DateField(Int32, Int32, DateTime, Boolean) Initializes a new instance of DateField at an absolute position and fixed size. Declaration public DateField(int x, int y, DateTime date, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime date Initial date contents. System.Boolean isShort If true, shows only two digits for the year. Properties Date Gets or sets the date of the DateField . Declaration public DateTime Date { get; set; } Property Value Type Description System.DateTime Remarks IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" + "keywords": "Class DateField Date editing View Inheritance System.Object Responder View TextField DateField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class DateField : TextField, IEnumerable Remarks The DateField View provides date editing functionality with mouse support. Constructors DateField(DateTime) Initializes a new instance of DateField Declaration public DateField(DateTime date) Parameters Type Name Description System.DateTime date DateField(Int32, Int32, DateTime, Boolean) Initializes a new instance of DateField at an absolute position and fixed size. Declaration public DateField(int x, int y, DateTime date, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime date Initial date contents. System.Boolean isShort If true, shows only two digits for the year. Properties Date Gets or sets the date of the DateField . Declaration public DateTime Date { get; set; } Property Value Type Description System.DateTime Remarks IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Processes key presses for the TextField . Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Dialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.Dialog.html", "title": "Class Dialog", - "keywords": "Class Dialog The Dialog View is a Window that by default is centered and contains one or more Button s. It defaults to the Dialog color scheme and has a 1 cell padding around the edges. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog Implements System.Collections.IEnumerable Inherited Members Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Dialog : Window, IEnumerable Remarks To run the Dialog modally, create the Dialog , and pass it to Run() . This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views or buttons added to the dialog calls RequestStop() . Constructors Dialog(ustring, Int32, Int32, Button[]) Initializes a new instance of the Dialog class using Absolute positioning and an optional set of Button s to display Declaration public Dialog(ustring title, int width, int height, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. System.Int32 width Width for the dialog. System.Int32 height Height for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. Dialog(ustring, Button[]) Initializes a new instance of the Dialog class using Computed positioning and with an optional set of Button s to display Declaration public Dialog(ustring title, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. Methods AddButton(Button) Adds a Button to the Dialog , its layout will be controled by the Dialog Declaration public void AddButton(Button button) Parameters Type Name Description Button button Button to add. LayoutSubviews() Declaration public override void LayoutSubviews() Overrides View.LayoutSubviews() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides Toplevel.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" + "keywords": "Class Dialog The Dialog View is a Window that by default is centered and contains one or more Button s. It defaults to the Dialog color scheme and has a 1 cell padding around the edges. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog Implements System.Collections.IEnumerable Inherited Members Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Dialog : Window, IEnumerable Remarks To run the Dialog modally, create the Dialog , and pass it to Run() . This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views or buttons added to the dialog calls RequestStop() . Constructors Dialog(ustring, Int32, Int32, Button[]) Initializes a new instance of the Dialog class using Absolute positioning and an optional set of Button s to display Declaration public Dialog(ustring title, int width, int height, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. System.Int32 width Width for the dialog. System.Int32 height Height for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. Dialog(ustring, Button[]) Initializes a new instance of the Dialog class using Computed positioning and with an optional set of Button s to display Declaration public Dialog(ustring title, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. Methods AddButton(Button) Adds a Button to the Dialog , its layout will be controled by the Dialog Declaration public void AddButton(Button button) Parameters Type Name Description Button button Button to add. LayoutSubviews() Invoked when a view starts executing or when the dimensions of the view have changed, for example in response to the container view or terminal resizing. Declaration public override void LayoutSubviews() Overrides View.LayoutSubviews() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides Toplevel.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Dim.html": { "href": "api/Terminal.Gui/Terminal.Gui.Dim.html", @@ -77,17 +77,17 @@ "api/Terminal.Gui/Terminal.Gui.FileDialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.FileDialog.html", "title": "Class FileDialog", - "keywords": "Class FileDialog Base class for the OpenDialog and the SaveDialog Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FileDialog : Dialog, IEnumerable Constructors FileDialog(ustring, ustring, ustring, ustring) Initializes a new instance of FileDialog Declaration public FileDialog(ustring title, ustring prompt, ustring nameFieldLabel, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring prompt The prompt. NStack.ustring nameFieldLabel The name field label. NStack.ustring message The message. Properties AllowedFileTypes The array of filename extensions allowed, or null if all file extensions are allowed. Declaration public string[] AllowedFileTypes { get; set; } Property Value Type Description System.String [] The allowed file types. AllowsOtherFileTypes Gets or sets a value indicating whether this FileDialog allows the file to be saved with a different extension Declaration public bool AllowsOtherFileTypes { get; set; } Property Value Type Description System.Boolean true if allows other file types; otherwise, false . Canceled Check if the dialog was or not canceled. Declaration public bool Canceled { get; } Property Value Type Description System.Boolean CanCreateDirectories Gets or sets a value indicating whether this FileDialog can create directories. Declaration public bool CanCreateDirectories { get; set; } Property Value Type Description System.Boolean true if can create directories; otherwise, false . DirectoryPath Gets or sets the directory path for this panel Declaration public ustring DirectoryPath { get; set; } Property Value Type Description NStack.ustring The directory path. FilePath The File path that is currently shown on the panel Declaration public ustring FilePath { get; set; } Property Value Type Description NStack.ustring The absolute file path for the file path entered. IsExtensionHidden Gets or sets a value indicating whether this FileDialog is extension hidden. Declaration public bool IsExtensionHidden { get; set; } Property Value Type Description System.Boolean true if is extension hidden; otherwise, false . Message Gets or sets the message displayed to the user, defaults to nothing Declaration public ustring Message { get; set; } Property Value Type Description NStack.ustring The message. NameFieldLabel Gets or sets the name field label. Declaration public ustring NameFieldLabel { get; set; } Property Value Type Description NStack.ustring The name field label. Prompt Gets or sets the prompt label for the Button displayed to the user Declaration public ustring Prompt { get; set; } Property Value Type Description NStack.ustring The prompt. Methods WillPresent() Declaration public override void WillPresent() Overrides Toplevel.WillPresent() Implements System.Collections.IEnumerable" + "keywords": "Class FileDialog Base class for the OpenDialog and the SaveDialog Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FileDialog : Dialog, IEnumerable Constructors FileDialog(ustring, ustring, ustring, ustring) Initializes a new instance of FileDialog Declaration public FileDialog(ustring title, ustring prompt, ustring nameFieldLabel, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring prompt The prompt. NStack.ustring nameFieldLabel The name field label. NStack.ustring message The message. Properties AllowedFileTypes The array of filename extensions allowed, or null if all file extensions are allowed. Declaration public string[] AllowedFileTypes { get; set; } Property Value Type Description System.String [] The allowed file types. AllowsOtherFileTypes Gets or sets a value indicating whether this FileDialog allows the file to be saved with a different extension Declaration public bool AllowsOtherFileTypes { get; set; } Property Value Type Description System.Boolean true if allows other file types; otherwise, false . Canceled Check if the dialog was or not canceled. Declaration public bool Canceled { get; } Property Value Type Description System.Boolean CanCreateDirectories Gets or sets a value indicating whether this FileDialog can create directories. Declaration public bool CanCreateDirectories { get; set; } Property Value Type Description System.Boolean true if can create directories; otherwise, false . DirectoryPath Gets or sets the directory path for this panel Declaration public ustring DirectoryPath { get; set; } Property Value Type Description NStack.ustring The directory path. FilePath The File path that is currently shown on the panel Declaration public ustring FilePath { get; set; } Property Value Type Description NStack.ustring The absolute file path for the file path entered. IsExtensionHidden Gets or sets a value indicating whether this FileDialog is extension hidden. Declaration public bool IsExtensionHidden { get; set; } Property Value Type Description System.Boolean true if is extension hidden; otherwise, false . Message Gets or sets the message displayed to the user, defaults to nothing Declaration public ustring Message { get; set; } Property Value Type Description NStack.ustring The message. NameFieldLabel Gets or sets the name field label. Declaration public ustring NameFieldLabel { get; set; } Property Value Type Description NStack.ustring The name field label. Prompt Gets or sets the prompt label for the Button displayed to the user Declaration public ustring Prompt { get; set; } Property Value Type Description NStack.ustring The prompt. Methods WillPresent() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after the views have been laid out, and before the views are drawn for the first time. Declaration public override void WillPresent() Overrides Toplevel.WillPresent() Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.FrameView.html": { "href": "api/Terminal.Gui/Terminal.Gui.FrameView.html", "title": "Class FrameView", - "keywords": "Class FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. Inheritance System.Object Responder View FrameView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FrameView : View, IEnumerable Constructors FrameView(ustring) Initializes a new instance of the FrameView class with a title and the result is suitable to have its X, Y, Width and Height properties computed. Declaration public FrameView(ustring title) Parameters Type Name Description NStack.ustring title Title. FrameView(Rect, ustring) Initializes a new instance of the FrameView class with an absolute position and a title. Declaration public FrameView(Rect frame, ustring title) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. FrameView(Rect, ustring, View[]) Initializes a new instance of the FrameView class with an absolute position, a title and View s. Declaration public FrameView(Rect frame, ustring title, View[] views) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. View [] views Views. Properties Title The title to be displayed for this FrameView . Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified View to this container. Declaration public override void Add(View view) Parameters Type Name Description View view View to add to this container Overrides View.Add(View) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Remove(View) Removes a View from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all View s from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks Implements System.Collections.IEnumerable" + "keywords": "Class FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. Inheritance System.Object Responder View FrameView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FrameView : View, IEnumerable Constructors FrameView(ustring) Initializes a new instance of the FrameView class with a title and the result is suitable to have its X, Y, Width and Height properties computed. Declaration public FrameView(ustring title) Parameters Type Name Description NStack.ustring title Title. FrameView(Rect, ustring) Initializes a new instance of the FrameView class with an absolute position and a title. Declaration public FrameView(Rect frame, ustring title) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. FrameView(Rect, ustring, View[]) Initializes a new instance of the FrameView class with an absolute position, a title and View s. Declaration public FrameView(Rect frame, ustring title, View[] views) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. View [] views Views. Properties Title The title to be displayed for this FrameView . Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified View to this container. Declaration public override void Add(View view) Parameters Type Name Description View view View to add to this container Overrides View.Add(View) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a View from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all View s from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.HexView.html": { "href": "api/Terminal.Gui/Terminal.Gui.HexView.html", "title": "Class HexView", - "keywords": "Class HexView An hex viewer and editor View over a System.IO.Stream Inheritance System.Object Responder View HexView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class HexView : View, IEnumerable Remarks HexView provides a hex editor on top of a seekable System.IO.Stream with the left side showing an hex dump of the values in the System.IO.Stream and the right side showing the contents (filterd to non-control sequence ASCII characters). Users can switch from one side to the other by using the tab key. To enable editing, set AllowEdits to true. When AllowEdits is true the user can make changes to the hexadecimal values of the System.IO.Stream . Any changes are tracked in the Edits property (a System.Collections.Generic.SortedDictionary`2 ) indicating the position where the changes were made and the new values. A convenience method, ApplyEdits() will apply the edits to the System.IO.Stream . Control the first byte shown by setting the DisplayStart property to an offset in the stream. Constructors HexView(Stream) Initialzies a HexView Declaration public HexView(Stream source) Parameters Type Name Description System.IO.Stream source The System.IO.Stream to view and edit as hex, this System.IO.Stream must support seeking, or an exception will be thrown. Properties AllowEdits Gets or sets whether this HexView allow editing of the System.IO.Stream of the underlying System.IO.Stream . Declaration public bool AllowEdits { get; set; } Property Value Type Description System.Boolean true if allow edits; otherwise, false . DisplayStart Sets or gets the offset into the System.IO.Stream that will displayed at the top of the HexView Declaration public long DisplayStart { get; set; } Property Value Type Description System.Int64 The display start. Edits Gets a System.Collections.Generic.SortedDictionary`2 describing the edits done to the HexView . Each Key indicates an offset where an edit was made and the Value is the changed byte. Declaration public IReadOnlyDictionary Edits { get; } Property Value Type Description System.Collections.Generic.IReadOnlyDictionary < System.Int64 , System.Byte > The edits. Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame Source Sets or gets the System.IO.Stream the HexView is operating on; the stream must support seeking ( System.IO.Stream.CanSeek == true). Declaration public Stream Source { get; set; } Property Value Type Description System.IO.Stream The source. Methods ApplyEdits() This method applies andy edits made to the System.IO.Stream and resets the contents of the Edits property Declaration public void ApplyEdits() PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class HexView An hex viewer and editor View over a System.IO.Stream Inheritance System.Object Responder View HexView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class HexView : View, IEnumerable Remarks HexView provides a hex editor on top of a seekable System.IO.Stream with the left side showing an hex dump of the values in the System.IO.Stream and the right side showing the contents (filterd to non-control sequence ASCII characters). Users can switch from one side to the other by using the tab key. To enable editing, set AllowEdits to true. When AllowEdits is true the user can make changes to the hexadecimal values of the System.IO.Stream . Any changes are tracked in the Edits property (a System.Collections.Generic.SortedDictionary`2 ) indicating the position where the changes were made and the new values. A convenience method, ApplyEdits() will apply the edits to the System.IO.Stream . Control the first byte shown by setting the DisplayStart property to an offset in the stream. Constructors HexView(Stream) Initialzies a HexView Declaration public HexView(Stream source) Parameters Type Name Description System.IO.Stream source The System.IO.Stream to view and edit as hex, this System.IO.Stream must support seeking, or an exception will be thrown. Properties AllowEdits Gets or sets whether this HexView allow editing of the System.IO.Stream of the underlying System.IO.Stream . Declaration public bool AllowEdits { get; set; } Property Value Type Description System.Boolean true if allow edits; otherwise, false . DisplayStart Sets or gets the offset into the System.IO.Stream that will displayed at the top of the HexView Declaration public long DisplayStart { get; set; } Property Value Type Description System.Int64 The display start. Edits Gets a System.Collections.Generic.SortedDictionary`2 describing the edits done to the HexView . Each Key indicates an offset where an edit was made and the Value is the changed byte. Declaration public IReadOnlyDictionary Edits { get; } Property Value Type Description System.Collections.Generic.IReadOnlyDictionary < System.Int64 , System.Byte > The edits. Frame Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public override Rect Frame { get; set; } Property Value Type Description Rect The frame. Overrides View.Frame Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . Source Sets or gets the System.IO.Stream the HexView is operating on; the stream must support seeking ( System.IO.Stream.CanSeek == true). Declaration public Stream Source { get; set; } Property Value Type Description System.IO.Stream The source. Methods ApplyEdits() This method applies andy edits made to the System.IO.Stream and resets the contents of the Edits property Declaration public void ApplyEdits() PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.html": { "href": "api/Terminal.Gui/Terminal.Gui.html", @@ -122,7 +122,7 @@ "api/Terminal.Gui/Terminal.Gui.Label.html": { "href": "api/Terminal.Gui/Terminal.Gui.Label.html", "title": "Class Label", - "keywords": "Class Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. Inheritance System.Object Responder View Label Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Label : View, IEnumerable Constructors Label(ustring) Initializes a new instance of Label and configures the default Width and Height based on the text, the result is suitable for Computed layout. Declaration public Label(ustring text) Parameters Type Name Description NStack.ustring text Text. Label(Int32, Int32, ustring) Initializes a new instance of Label at the given coordinate with the given string, computes the bounding box based on the size of the string, assumes that the string contains newlines for multiple lines, no special breaking rules are used. Declaration public Label(int x, int y, ustring text) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring text Label(Rect, ustring) Initializes a new instance of Label at the given coordinate with the given string and uses the specified frame for the string. Declaration public Label(Rect rect, ustring text) Parameters Type Name Description Rect rect NStack.ustring text Properties Text The text displayed by the Label . Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring TextAlignment Controls the text-alignemtn property of the label, changing it will redisplay the Label . Declaration public TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. TextColor The color used for the Label . Declaration public Attribute TextColor { get; set; } Property Value Type Description Attribute Methods MaxWidth(ustring, Int32) Computes the the max width of a line or multilines needed to render by the Label control Declaration public static int MaxWidth(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Max width of lines. MeasureLines(ustring, Int32) Computes the number of lines needed to render the specified text by the Label view Declaration public static int MeasureLines(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Number of lines. Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. Inheritance System.Object Responder View Label Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Label : View, IEnumerable Constructors Label(ustring) Initializes a new instance of Label and configures the default Width and Height based on the text, the result is suitable for Computed layout. Declaration public Label(ustring text) Parameters Type Name Description NStack.ustring text Text. Label(Int32, Int32, ustring) Initializes a new instance of Label at the given coordinate with the given string, computes the bounding box based on the size of the string, assumes that the string contains newlines for multiple lines, no special breaking rules are used. Declaration public Label(int x, int y, ustring text) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring text Label(Rect, ustring) Initializes a new instance of Label at the given coordinate with the given string and uses the specified frame for the string. Declaration public Label(Rect rect, ustring text) Parameters Type Name Description Rect rect NStack.ustring text Properties Text The text displayed by the Label . Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring TextAlignment Controls the text-alignemtn property of the label, changing it will redisplay the Label . Declaration public TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. TextColor The color used for the Label . Declaration public Attribute TextColor { get; set; } Property Value Type Description Attribute Methods MaxWidth(ustring, Int32) Computes the the max width of a line or multilines needed to render by the Label control Declaration public static int MaxWidth(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Max width of lines. MeasureLines(ustring, Int32) Computes the number of lines needed to render the specified text by the Label view Declaration public static int MeasureLines(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Number of lines. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html": { "href": "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html", @@ -132,7 +132,7 @@ "api/Terminal.Gui/Terminal.Gui.ListView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ListView.html", "title": "Class ListView", - "keywords": "Class ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. Inheritance System.Object Responder View ListView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ListView : View, IEnumerable Remarks The ListView displays lists of data and allows the user to scroll through the data. Items in the can be activated firing an event (with the ENTER key or a mouse double-click). If the AllowsMarking property is true, elements of the list can be marked by the user. By default ListView uses System.Object.ToString() to render the items of any System.Collections.IList object (e.g. arrays, System.Collections.Generic.List , and other collections). Alternatively, an object that implements the IListDataSource interface can be provided giving full control of what is rendered. ListView can display any object that implements the System.Collections.IList interface. System.String values are converted into NStack.ustring values before rendering, and other values are converted into System.String by calling System.Object.ToString() and then converting to NStack.ustring . To change the contents of the ListView, set the Source property (when providing custom rendering via IListDataSource ) or call SetSource(IList) an System.Collections.IList is being used. When AllowsMarking is set to true the rendering will prefix the rendered items with [x] or [ ] and bind the SPACE key to toggle the selection. To implement a different marking style set AllowsMarking to false and implement custom rendering. Constructors ListView() Initializes a new instance of ListView . Set the Source property to display something. Declaration public ListView() ListView(IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface, with relative positioning. Declaration public ListView(IList source) Parameters Type Name Description System.Collections.IList source An System.Collections.IList data source, if the elements are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(IListDataSource) Initializes a new instance of ListView that will display the provided data source, using relative positioning. Declaration public ListView(IListDataSource source) Parameters Type Name Description IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. ListView(Rect, IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface with an absolute position. Declaration public ListView(Rect rect, IList source) Parameters Type Name Description Rect rect Frame for the listview. System.Collections.IList source An IList data source, if the elements of the IList are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(Rect, IListDataSource) Initializes a new instance of ListView with the provided data source and an absolute position Declaration public ListView(Rect rect, IListDataSource source) Parameters Type Name Description Rect rect Frame for the listview. IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. Properties AllowsMarking Gets or sets whether this ListView allows items to be marked. Declaration public bool AllowsMarking { get; set; } Property Value Type Description System.Boolean true if allows marking elements of the list; otherwise, false . Remarks If set to true, ListView will render items marked items with \"[x]\", and unmarked items with \"[ ]\" spaces. SPACE key will toggle marking. AllowsMultipleSelection If set to true allows more than one item to be selected. If false only allow one item selected. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean SelectedItem Gets or sets the index of the currently selected item. Declaration public int SelectedItem { get; set; } Property Value Type Description System.Int32 The selected item. Source Gets or sets the IListDataSource backing this ListView , enabling custom rendering. Declaration public IListDataSource Source { get; set; } Property Value Type Description IListDataSource The source. Remarks Use SetSource(IList) to set a new System.Collections.IList source. TopItem Gets or sets the item that is displayed at the top of the ListView . Declaration public int TopItem { get; set; } Property Value Type Description System.Int32 The top item. Methods AllowsAll() Prevents marking if it's not allowed mark and if it's not allows multiple selection. Declaration public virtual bool AllowsAll() Returns Type Description System.Boolean MarkUnmarkRow() Marks an unmarked row. Declaration public virtual bool MarkUnmarkRow() Returns Type Description System.Boolean MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) MoveDown() Moves the selected item index to the next row. Declaration public virtual bool MoveDown() Returns Type Description System.Boolean MovePageDown() Moves the selected item index to the previous page. Declaration public virtual bool MovePageDown() Returns Type Description System.Boolean MovePageUp() Moves the selected item index to the next page. Declaration public virtual bool MovePageUp() Returns Type Description System.Boolean MoveUp() Moves the selected item index to the previous row. Declaration public virtual bool MoveUp() Returns Type Description System.Boolean OnOpenSelectedItem() Invokes the OnOpenSelectedItem event if it is defined. Declaration public virtual bool OnOpenSelectedItem() Returns Type Description System.Boolean OnSelectedChanged() Invokes the SelectedChanged event if it is defined. Declaration public virtual bool OnSelectedChanged() Returns Type Description System.Boolean PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) SetSource(IList) Sets the source of the ListView to an System.Collections.IList . Declaration public void SetSource(IList source) Parameters Type Name Description System.Collections.IList source Remarks Use the Source property to set a new IListDataSource source and use custome rendering. SetSourceAsync(IList) Sets the source to an System.Collections.IList value asynchronously. Declaration public Task SetSourceAsync(IList source) Parameters Type Name Description System.Collections.IList source Returns Type Description System.Threading.Tasks.Task An item implementing the IList interface. Remarks Use the Source property to set a new IListDataSource source and use custome rendering. Events OpenSelectedItem This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item. Declaration public event EventHandler OpenSelectedItem Event Type Type Description System.EventHandler < ListViewItemEventArgs > SelectedChanged This event is raised when the selected item in the ListView has changed. Declaration public event EventHandler SelectedChanged Event Type Type Description System.EventHandler < ListViewItemEventArgs > Implements System.Collections.IEnumerable" + "keywords": "Class ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. Inheritance System.Object Responder View ListView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ListView : View, IEnumerable Remarks The ListView displays lists of data and allows the user to scroll through the data. Items in the can be activated firing an event (with the ENTER key or a mouse double-click). If the AllowsMarking property is true, elements of the list can be marked by the user. By default ListView uses System.Object.ToString() to render the items of any System.Collections.IList object (e.g. arrays, System.Collections.Generic.List , and other collections). Alternatively, an object that implements the IListDataSource interface can be provided giving full control of what is rendered. ListView can display any object that implements the System.Collections.IList interface. System.String values are converted into NStack.ustring values before rendering, and other values are converted into System.String by calling System.Object.ToString() and then converting to NStack.ustring . To change the contents of the ListView, set the Source property (when providing custom rendering via IListDataSource ) or call SetSource(IList) an System.Collections.IList is being used. When AllowsMarking is set to true the rendering will prefix the rendered items with [x] or [ ] and bind the SPACE key to toggle the selection. To implement a different marking style set AllowsMarking to false and implement custom rendering. Constructors ListView() Initializes a new instance of ListView . Set the Source property to display something. Declaration public ListView() ListView(IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface, with relative positioning. Declaration public ListView(IList source) Parameters Type Name Description System.Collections.IList source An System.Collections.IList data source, if the elements are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(IListDataSource) Initializes a new instance of ListView that will display the provided data source, using relative positioning. Declaration public ListView(IListDataSource source) Parameters Type Name Description IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. ListView(Rect, IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface with an absolute position. Declaration public ListView(Rect rect, IList source) Parameters Type Name Description Rect rect Frame for the listview. System.Collections.IList source An IList data source, if the elements of the IList are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(Rect, IListDataSource) Initializes a new instance of ListView with the provided data source and an absolute position Declaration public ListView(Rect rect, IListDataSource source) Parameters Type Name Description Rect rect Frame for the listview. IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. Properties AllowsMarking Gets or sets whether this ListView allows items to be marked. Declaration public bool AllowsMarking { get; set; } Property Value Type Description System.Boolean true if allows marking elements of the list; otherwise, false . Remarks If set to true, ListView will render items marked items with \"[x]\", and unmarked items with \"[ ]\" spaces. SPACE key will toggle marking. AllowsMultipleSelection If set to true allows more than one item to be selected. If false only allow one item selected. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean SelectedItem Gets or sets the index of the currently selected item. Declaration public int SelectedItem { get; set; } Property Value Type Description System.Int32 The selected item. Source Gets or sets the IListDataSource backing this ListView , enabling custom rendering. Declaration public IListDataSource Source { get; set; } Property Value Type Description IListDataSource The source. Remarks Use SetSource(IList) to set a new System.Collections.IList source. TopItem Gets or sets the item that is displayed at the top of the ListView . Declaration public int TopItem { get; set; } Property Value Type Description System.Int32 The top item. Methods AllowsAll() Prevents marking if it's not allowed mark and if it's not allows multiple selection. Declaration public virtual bool AllowsAll() Returns Type Description System.Boolean MarkUnmarkRow() Marks an unmarked row. Declaration public virtual bool MarkUnmarkRow() Returns Type Description System.Boolean MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) MoveDown() Moves the selected item index to the next row. Declaration public virtual bool MoveDown() Returns Type Description System.Boolean MovePageDown() Moves the selected item index to the previous page. Declaration public virtual bool MovePageDown() Returns Type Description System.Boolean MovePageUp() Moves the selected item index to the next page. Declaration public virtual bool MovePageUp() Returns Type Description System.Boolean MoveUp() Moves the selected item index to the previous row. Declaration public virtual bool MoveUp() Returns Type Description System.Boolean OnOpenSelectedItem() Invokes the OnOpenSelectedItem event if it is defined. Declaration public virtual bool OnOpenSelectedItem() Returns Type Description System.Boolean OnSelectedChanged() Invokes the SelectedChanged event if it is defined. Declaration public virtual bool OnSelectedChanged() Returns Type Description System.Boolean PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. SetSource(IList) Sets the source of the ListView to an System.Collections.IList . Declaration public void SetSource(IList source) Parameters Type Name Description System.Collections.IList source Remarks Use the Source property to set a new IListDataSource source and use custome rendering. SetSourceAsync(IList) Sets the source to an System.Collections.IList value asynchronously. Declaration public Task SetSourceAsync(IList source) Parameters Type Name Description System.Collections.IList source Returns Type Description System.Threading.Tasks.Task An item implementing the IList interface. Remarks Use the Source property to set a new IListDataSource source and use custome rendering. Events OpenSelectedItem This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item. Declaration public event EventHandler OpenSelectedItem Event Type Type Description System.EventHandler < ListViewItemEventArgs > SelectedChanged This event is raised when the selected item in the ListView has changed. Declaration public event EventHandler SelectedChanged Event Type Type Description System.EventHandler < ListViewItemEventArgs > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html", @@ -152,7 +152,7 @@ "api/Terminal.Gui/Terminal.Gui.MenuBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.MenuBar.html", "title": "Class MenuBar", - "keywords": "Class MenuBar The MenuBar provides a menu for Terminal.Gui applications. Inheritance System.Object Responder View MenuBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class MenuBar : View, IEnumerable Remarks The MenuBar appears on the first row of the terminal. The MenuBar provides global hotkeys for the application. Constructors MenuBar(MenuBarItem[]) Initializes a new instance of the MenuBar class with the specified set of toplevel menu items. Declaration public MenuBar(MenuBarItem[] menus) Parameters Type Name Description MenuBarItem [] menus Individual menu items; a null item will result in a separator being drawn. Properties IsMenuOpen True if the menu is open; otherwise false. Declaration public bool IsMenuOpen { get; protected set; } Property Value Type Description System.Boolean LastFocused Get the lasted focused view before open the menu. Declaration public View LastFocused { get; } Property Value Type Description View Menus Gets or sets the array of MenuBarItem s for the menu. Only set this when the MenuBar is vislble. Declaration public MenuBarItem[] Menus { get; set; } Property Value Type Description MenuBarItem [] The menu array. UseKeysUpDownAsKeysLeftRight Used for change the navigation key style. Declaration public bool UseKeysUpDownAsKeysLeftRight { get; set; } Property Value Type Description System.Boolean Methods CloseMenu() Closes the current Menu programatically, if open. Declaration public void CloseMenu() MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyUp(KeyEvent) OpenMenu() Opens the current Menu programatically. Declaration public void OpenMenu() PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Events OnCloseMenu Raised when a menu is closing. Declaration public event EventHandler OnCloseMenu Event Type Type Description System.EventHandler OnOpenMenu Raised as a menu is opened. Declaration public event EventHandler OnOpenMenu Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" + "keywords": "Class MenuBar The MenuBar provides a menu for Terminal.Gui applications. Inheritance System.Object Responder View MenuBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class MenuBar : View, IEnumerable Remarks The MenuBar appears on the first row of the terminal. The MenuBar provides global hotkeys for the application. Constructors MenuBar(MenuBarItem[]) Initializes a new instance of the MenuBar class with the specified set of toplevel menu items. Declaration public MenuBar(MenuBarItem[] menus) Parameters Type Name Description MenuBarItem [] menus Individual menu items; a null item will result in a separator being drawn. Properties IsMenuOpen True if the menu is open; otherwise false. Declaration public bool IsMenuOpen { get; protected set; } Property Value Type Description System.Boolean LastFocused Get the lasted focused view before open the menu. Declaration public View LastFocused { get; } Property Value Type Description View Menus Gets or sets the array of MenuBarItem s for the menu. Only set this when the MenuBar is vislble. Declaration public MenuBarItem[] Menus { get; set; } Property Value Type Description MenuBarItem [] The menu array. UseKeysUpDownAsKeysLeftRight Used for change the navigation key style. Declaration public bool UseKeysUpDownAsKeysLeftRight { get; set; } Property Value Type Description System.Boolean Methods CloseMenu() Closes the current Menu programatically, if open. Declaration public void CloseMenu() MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.OnKeyUp(KeyEvent) OpenMenu() Opens the current Menu programatically. Declaration public void OpenMenu() PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events OnCloseMenu Raised when a menu is closing. Declaration public event EventHandler OnCloseMenu Event Type Type Description System.EventHandler OnOpenMenu Raised as a menu is opened. Declaration public event EventHandler OnOpenMenu Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.MenuBarItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.MenuBarItem.html", @@ -197,12 +197,12 @@ "api/Terminal.Gui/Terminal.Gui.ProgressBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.ProgressBar.html", "title": "Class ProgressBar", - "keywords": "Class ProgressBar A Progress Bar view that can indicate progress of an activity visually. Inheritance System.Object Responder View ProgressBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ProgressBar : View, IEnumerable Remarks ProgressBar can operate in two modes, percentage mode, or activity mode. The progress bar starts in percentage mode and setting the Fraction property will reflect on the UI the progress made so far. Activity mode is used when the application has no way of knowing how much time is left, and is started when the Pulse() method is called. Call Pulse() repeatedly as progress is made. Constructors ProgressBar() Initializes a new instance of the ProgressBar class, starts in percentage mode and uses relative layout. Declaration public ProgressBar() ProgressBar(Rect) Initializes a new instance of the ProgressBar class, starts in percentage mode with an absolute position and size. Declaration public ProgressBar(Rect rect) Parameters Type Name Description Rect rect Rect. Properties Fraction Gets or sets the ProgressBar fraction to display, must be a value between 0 and 1. Declaration public float Fraction { get; set; } Property Value Type Description System.Single The fraction representing the progress. Methods Pulse() Notifies the ProgressBar that some progress has taken place. Declaration public void Pulse() Remarks If the ProgressBar is is percentage mode, it switches to activity mode. If is in activity mode, the marker is moved. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class ProgressBar A Progress Bar view that can indicate progress of an activity visually. Inheritance System.Object Responder View ProgressBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ProgressBar : View, IEnumerable Remarks ProgressBar can operate in two modes, percentage mode, or activity mode. The progress bar starts in percentage mode and setting the Fraction property will reflect on the UI the progress made so far. Activity mode is used when the application has no way of knowing how much time is left, and is started when the Pulse() method is called. Call Pulse() repeatedly as progress is made. Constructors ProgressBar() Initializes a new instance of the ProgressBar class, starts in percentage mode and uses relative layout. Declaration public ProgressBar() ProgressBar(Rect) Initializes a new instance of the ProgressBar class, starts in percentage mode with an absolute position and size. Declaration public ProgressBar(Rect rect) Parameters Type Name Description Rect rect Rect. Properties Fraction Gets or sets the ProgressBar fraction to display, must be a value between 0 and 1. Declaration public float Fraction { get; set; } Property Value Type Description System.Single The fraction representing the progress. Methods Pulse() Notifies the ProgressBar that some progress has taken place. Declaration public void Pulse() Remarks If the ProgressBar is is percentage mode, it switches to activity mode. If is in activity mode, the marker is moved. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.RadioGroup.html": { "href": "api/Terminal.Gui/Terminal.Gui.RadioGroup.html", "title": "Class RadioGroup", - "keywords": "Class RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Inheritance System.Object Responder View RadioGroup Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class RadioGroup : View, IEnumerable Constructors RadioGroup(Int32, Int32, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. The View frame is computed from the provided radio labels. Declaration public RadioGroup(int x, int y, string[] radioLabels, int selected = 0) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The item to be selected, the value is clamped to the number of items. RadioGroup(String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. Declaration public RadioGroup(string[] radioLabels, int selected = 0) Parameters Type Name Description System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of the item to be selected, the value is clamped to the number of items. RadioGroup(Rect, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected and uses an absolute layout for the result. Declaration public RadioGroup(Rect rect, string[] radioLabels, int selected = 0) Parameters Type Name Description Rect rect Boundaries for the radio group. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of item to be selected, the value is clamped to the number of items. Fields SelectionChanged Invoked when the selected radio label has changed Declaration public Action SelectionChanged Field Value Type Description System.Action < System.Int32 > Properties Cursor The location of the cursor in the RadioGroup Declaration public int Cursor { get; set; } Property Value Type Description System.Int32 RadioLabels The radio labels to display Declaration public string[] RadioLabels { get; set; } Property Value Type Description System.String [] The radio labels. Selected The currently selected item from the list of radio labels Declaration public int Selected { get; set; } Property Value Type Description System.Int32 The selected. Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Inheritance System.Object Responder View RadioGroup Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class RadioGroup : View, IEnumerable Constructors RadioGroup(Int32, Int32, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. The View frame is computed from the provided radio labels. Declaration public RadioGroup(int x, int y, string[] radioLabels, int selected = 0) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The item to be selected, the value is clamped to the number of items. RadioGroup(String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. Declaration public RadioGroup(string[] radioLabels, int selected = 0) Parameters Type Name Description System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of the item to be selected, the value is clamped to the number of items. RadioGroup(Rect, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected and uses an absolute layout for the result. Declaration public RadioGroup(Rect rect, string[] radioLabels, int selected = 0) Parameters Type Name Description Rect rect Boundaries for the radio group. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of item to be selected, the value is clamped to the number of items. Fields SelectionChanged Invoked when the selected radio label has changed Declaration public Action SelectionChanged Field Value Type Description System.Action < System.Int32 > Properties Cursor The location of the cursor in the RadioGroup Declaration public int Cursor { get; set; } Property Value Type Description System.Int32 RadioLabels The radio labels to display Declaration public string[] RadioLabels { get; set; } Property Value Type Description System.String [] The radio labels. Selected The currently selected item from the list of radio labels Declaration public int Selected { get; set; } Property Value Type Description System.Int32 The selected. Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Rect.html": { "href": "api/Terminal.Gui/Terminal.Gui.Rect.html", @@ -222,12 +222,12 @@ "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html", "title": "Class ScrollBarView", - "keywords": "Class ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical Inheritance System.Object Responder View ScrollBarView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollBarView : View, IEnumerable Remarks The scrollbar is drawn to be a representation of the Size, assuming that the scroll position is set at Position. If the region to display the scrollbar is larger than three characters, arrow indicators are drawn. Constructors ScrollBarView() Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView() ScrollBarView(Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView(int size, int position, bool isVertical) Parameters Type Name Description System.Int32 size The size that this scrollbar represents. System.Int32 position The position within this scrollbar. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. ScrollBarView(Rect) Initializes a new instance of the ScrollBarView class using Absolute layout. Declaration public ScrollBarView(Rect rect) Parameters Type Name Description Rect rect Frame for the scrollbar. ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Absolute layout. Declaration public ScrollBarView(Rect rect, int size, int position, bool isVertical) Parameters Type Name Description Rect rect Frame for the scrollbar. System.Int32 size The size that this scrollbar represents. Sets the Size property. System.Int32 position The position within this scrollbar. Sets the Position property. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Sets the IsVertical property. Properties IsVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Declaration public bool IsVertical { get; set; } Property Value Type Description System.Boolean Position The position, relative to Size , to set the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size of content the scrollbar represents. Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Remarks The Size is typically the size of the virtual content. E.g. when a Scrollbar is part of a ScrollView the Size is set to the appropriate dimension of ContentSize . Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events ChangedPosition This event is raised when the position on the scrollbar has changed. Declaration public event Action ChangedPosition Event Type Type Description System.Action Implements System.Collections.IEnumerable" + "keywords": "Class ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical Inheritance System.Object Responder View ScrollBarView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollBarView : View, IEnumerable Remarks The scrollbar is drawn to be a representation of the Size, assuming that the scroll position is set at Position. If the region to display the scrollbar is larger than three characters, arrow indicators are drawn. Constructors ScrollBarView() Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView() ScrollBarView(Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView(int size, int position, bool isVertical) Parameters Type Name Description System.Int32 size The size that this scrollbar represents. System.Int32 position The position within this scrollbar. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. ScrollBarView(Rect) Initializes a new instance of the ScrollBarView class using Absolute layout. Declaration public ScrollBarView(Rect rect) Parameters Type Name Description Rect rect Frame for the scrollbar. ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Absolute layout. Declaration public ScrollBarView(Rect rect, int size, int position, bool isVertical) Parameters Type Name Description Rect rect Frame for the scrollbar. System.Int32 size The size that this scrollbar represents. Sets the Size property. System.Int32 position The position within this scrollbar. Sets the Position property. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Sets the IsVertical property. Properties IsVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Declaration public bool IsVertical { get; set; } Property Value Type Description System.Boolean Position The position, relative to Size , to set the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size of content the scrollbar represents. Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Remarks The Size is typically the size of the virtual content. E.g. when a Scrollbar is part of a ScrollView the Size is set to the appropriate dimension of ContentSize . Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events ChangedPosition This event is raised when the position on the scrollbar has changed. Declaration public event Action ChangedPosition Event Type Type Description System.Action Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ScrollView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ScrollView.html", "title": "Class ScrollView", - "keywords": "Class ScrollView Scrollviews are views that present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView. Inheritance System.Object Responder View ScrollView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollView : View, IEnumerable Remarks The subviews that are added to this ScrollView are offset by the ContentOffset property. The view itself is a window into the space represented by the ContentSize . Use the Constructors ScrollView() Initializes a new instance of the ScrollView class using Computed positioning. Declaration public ScrollView() ScrollView(Rect) Initializes a new instance of the ScrollView class using Absolute positioning. Declaration public ScrollView(Rect frame) Parameters Type Name Description Rect frame Properties ContentOffset Represents the top left corner coordinate that is displayed by the scrollview Declaration public Point ContentOffset { get; set; } Property Value Type Description Point The content offset. ContentSize Represents the contents of the data shown inside the scrolview Declaration public Size ContentSize { get; set; } Property Value Type Description Size The size of the content. ShowHorizontalScrollIndicator Gets or sets the visibility for the horizontal scroll indicator. Declaration public bool ShowHorizontalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . ShowVerticalScrollIndicator /// Gets or sets the visibility for the vertical scroll indicator. Declaration public bool ShowVerticalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . Methods Add(View) Adds the view to the scrollview. Declaration public override void Add(View view) Parameters Type Name Description View view The view to add to the scrollview. Overrides View.Add(View) MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks ScrollDown(Int32) Scrolls the view down. Declaration public bool ScrollDown(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollLeft(Int32) Scrolls the view to the left Declaration public bool ScrollLeft(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollRight(Int32) Scrolls the view to the right. Declaration public bool ScrollRight(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if right was scrolled, false otherwise. ScrollUp(Int32) Scrolls the view up. Declaration public bool ScrollUp(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. Implements System.Collections.IEnumerable" + "keywords": "Class ScrollView Scrollviews are views that present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView. Inheritance System.Object Responder View ScrollView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollView : View, IEnumerable Remarks The subviews that are added to this ScrollView are offset by the ContentOffset property. The view itself is a window into the space represented by the ContentSize . Use the Constructors ScrollView() Initializes a new instance of the ScrollView class using Computed positioning. Declaration public ScrollView() ScrollView(Rect) Initializes a new instance of the ScrollView class using Absolute positioning. Declaration public ScrollView(Rect frame) Parameters Type Name Description Rect frame Properties ContentOffset Represents the top left corner coordinate that is displayed by the scrollview Declaration public Point ContentOffset { get; set; } Property Value Type Description Point The content offset. ContentSize Represents the contents of the data shown inside the scrolview Declaration public Size ContentSize { get; set; } Property Value Type Description Size The size of the content. ShowHorizontalScrollIndicator Gets or sets the visibility for the horizontal scroll indicator. Declaration public bool ShowHorizontalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . ShowVerticalScrollIndicator /// Gets or sets the visibility for the vertical scroll indicator. Declaration public bool ShowVerticalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . Methods Add(View) Adds the view to the scrollview. Declaration public override void Add(View view) Parameters Type Name Description View view The view to add to the scrollview. Overrides View.Add(View) MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks ScrollDown(Int32) Scrolls the view down. Declaration public bool ScrollDown(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollLeft(Int32) Scrolls the view to the left Declaration public bool ScrollLeft(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollRight(Int32) Scrolls the view to the right. Declaration public bool ScrollRight(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if right was scrolled, false otherwise. ScrollUp(Int32) Scrolls the view up. Declaration public bool ScrollUp(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Size.html": { "href": "api/Terminal.Gui/Terminal.Gui.Size.html", @@ -237,7 +237,7 @@ "api/Terminal.Gui/Terminal.Gui.StatusBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusBar.html", "title": "Class StatusBar", - "keywords": "Class StatusBar A status bar is a View that snaps to the bottom of a Toplevel displaying set of StatusItem s. The StatusBar should be context sensitive. This means, if the main menu and an open text editor are visible, the items probably shown will be ~F1~ Help ~F2~ Save ~F3~ Load. While a dialog to ask a file to load is executed, the remaining commands will probably be ~F1~ Help. So for each context must be a new instance of a statusbar. Inheritance System.Object Responder View StatusBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusBar : View, IEnumerable Constructors StatusBar(StatusItem[]) Initializes a new instance of the StatusBar class with the specified set of StatusItem s. The StatusBar will be drawn on the lowest line of the terminal or Parent (if not null). Declaration public StatusBar(StatusItem[] items) Parameters Type Name Description StatusItem [] items A list of statusbar items. Properties Items The items that compose the StatusBar Declaration public StatusItem[] Items { get; set; } Property Value Type Description StatusItem [] Parent The parent view of the StatusBar . Declaration public View Parent { get; set; } Property Value Type Description View Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class StatusBar A status bar is a View that snaps to the bottom of a Toplevel displaying set of StatusItem s. The StatusBar should be context sensitive. This means, if the main menu and an open text editor are visible, the items probably shown will be ~F1~ Help ~F2~ Save ~F3~ Load. While a dialog to ask a file to load is executed, the remaining commands will probably be ~F1~ Help. So for each context must be a new instance of a statusbar. Inheritance System.Object Responder View StatusBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusBar : View, IEnumerable Constructors StatusBar(StatusItem[]) Initializes a new instance of the StatusBar class with the specified set of StatusItem s. The StatusBar will be drawn on the lowest line of the terminal or Parent (if not null). Declaration public StatusBar(StatusItem[] items) Parameters Type Name Description StatusItem [] items A list of statusbar items. Properties Items The items that compose the StatusBar Declaration public StatusItem[] Items { get; set; } Property Value Type Description StatusItem [] Parent The parent view of the StatusBar . Declaration public View Parent { get; set; } Property Value Type Description View Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.StatusItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusItem.html", @@ -252,22 +252,22 @@ "api/Terminal.Gui/Terminal.Gui.TextField.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextField.html", "title": "Class TextField", - "keywords": "Class TextField Single-line text entry View Inheritance System.Object Responder View TextField DateField TimeField Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextField : View, IEnumerable Remarks The TextField View provides editing functionality and mouse support. Constructors TextField(ustring) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(ustring text) Parameters Type Name Description NStack.ustring text Initial text contents. TextField(Int32, Int32, Int32, ustring) Public constructor that creates a text field at an absolute position and size. Declaration public TextField(int x, int y, int w, ustring text) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.Int32 w The width. NStack.ustring text Initial text contents. TextField(String) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(string text) Parameters Type Name Description System.String text Initial text contents. Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CursorPosition Sets or gets the current cursor position. Declaration public int CursorPosition { get; set; } Property Value Type Description System.Int32 Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame ReadOnly If set to true its not allow any changes in the text. Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Secret Sets the secret property. Declaration public bool Secret { get; set; } Property Value Type Description System.Boolean Remarks This makes the text entry suitable for entering passwords. SelectedLength Length of the selected text. Declaration public int SelectedLength { get; set; } Property Value Type Description System.Int32 SelectedStart Start position of the selected text. Declaration public int SelectedStart { get; set; } Property Value Type Description System.Int32 SelectedText The selected text. Declaration public ustring SelectedText { get; set; } Property Value Type Description NStack.ustring Text Sets or gets the text held by the view. Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Used Tracks whether the text field should be considered \"used\", that is, that the user has moved in the entry, so new input should be appended at the cursor position, rather than clearing the entry Declaration public bool Used { get; set; } Property Value Type Description System.Boolean Methods ClearAllSelection() Clear the selected text. Declaration public void ClearAllSelection() Copy() Copy the selected text to the clipboard. Declaration public virtual void Copy() Cut() Cut the selected text to the clipboard. Declaration public virtual void Cut() MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides View.OnLeave() Paste() Paste the selected text from the clipboard. Declaration public virtual void Paste() PositionCursor() Sets the cursor position. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Processes key presses for the TextField . Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Events Changed Changed event, raised when the text has clicked. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks This event is raised when the Text changes. Implements System.Collections.IEnumerable" + "keywords": "Class TextField Single-line text entry View Inheritance System.Object Responder View TextField DateField TimeField Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextField : View, IEnumerable Remarks The TextField View provides editing functionality and mouse support. Constructors TextField(ustring) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(ustring text) Parameters Type Name Description NStack.ustring text Initial text contents. TextField(Int32, Int32, Int32, ustring) Public constructor that creates a text field at an absolute position and size. Declaration public TextField(int x, int y, int w, ustring text) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.Int32 w The width. NStack.ustring text Initial text contents. TextField(String) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(string text) Parameters Type Name Description System.String text Initial text contents. Properties CanFocus Gets or sets a value indicating whether this Responder can focus. Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus CursorPosition Sets or gets the current cursor position. Declaration public int CursorPosition { get; set; } Property Value Type Description System.Int32 Frame Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public override Rect Frame { get; set; } Property Value Type Description Rect The frame. Overrides View.Frame Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . ReadOnly If set to true its not allow any changes in the text. Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Secret Sets the secret property. Declaration public bool Secret { get; set; } Property Value Type Description System.Boolean Remarks This makes the text entry suitable for entering passwords. SelectedLength Length of the selected text. Declaration public int SelectedLength { get; set; } Property Value Type Description System.Int32 SelectedStart Start position of the selected text. Declaration public int SelectedStart { get; set; } Property Value Type Description System.Int32 SelectedText The selected text. Declaration public ustring SelectedText { get; set; } Property Value Type Description NStack.ustring Text Sets or gets the text held by the view. Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Used Tracks whether the text field should be considered \"used\", that is, that the user has moved in the entry, so new input should be appended at the cursor position, rather than clearing the entry Declaration public bool Used { get; set; } Property Value Type Description System.Boolean Methods ClearAllSelection() Clear the selected text. Declaration public void ClearAllSelection() Copy() Copy the selected text to the clipboard. Declaration public virtual void Copy() Cut() Cut the selected text to the clipboard. Declaration public virtual void Cut() MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) OnLeave() Method invoked when a view loses focus. Declaration public override bool OnLeave() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides View.OnLeave() Paste() Paste the selected text from the clipboard. Declaration public virtual void Paste() PositionCursor() Sets the cursor position. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Processes key presses for the TextField . Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events Changed Changed event, raised when the text has clicked. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks This event is raised when the Text changes. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.TextView.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextView.html", "title": "Class TextView", - "keywords": "Class TextView Multi-line text editing View Inheritance System.Object Responder View TextView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextView : View, IEnumerable Remarks TextView provides a multi-line text editor. Users interact with it with the standard Emacs commands for movement or the arrow keys. Shortcut Action 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() Initalizes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties. Declaration public TextView() TextView(Rect) Initalizes a TextView on the specified area, with absolute position and size. Declaration public TextView(Rect frame) Parameters Type Name Description Rect frame Remarks Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CurrentColumn Gets the cursor column. Declaration public int CurrentColumn { get; } Property Value Type Description System.Int32 The cursor column. CurrentRow Gets the current cursor row. Declaration public int CurrentRow { get; } Property Value Type Description System.Int32 ReadOnly Gets or sets whether the TextView is in read-only mode or not Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Boolean value(Default false) Text Sets or gets the text in the TextView . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Methods CloseFile() Closes the contents of the stream into the TextView . Declaration public bool CloseFile() Returns Type Description System.Boolean true , if stream was closed, false otherwise. 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(Stream stream) Parameters Type Name Description System.IO.Stream stream Stream to load the contents from. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor on the current row and column Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) ScrollTo(Int32) Will scroll the TextView to display the specified row at the top Declaration public void ScrollTo(int row) Parameters Type Name Description System.Int32 row Row that should be displayed at the top, if the value is negative it will be reset to zero Events TextChanged Raised when the Text of the TextView changes. Declaration public event EventHandler TextChanged Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" + "keywords": "Class TextView Multi-line text editing View Inheritance System.Object Responder View TextView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextView : View, IEnumerable Remarks TextView provides a multi-line text editor. Users interact with it with the standard Emacs commands for movement or the arrow keys. Shortcut Action 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() Initalizes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties. Declaration public TextView() TextView(Rect) Initalizes a TextView on the specified area, with absolute position and size. Declaration public TextView(Rect frame) Parameters Type Name Description Rect frame Remarks Properties CanFocus Gets or sets a value indicating whether this Responder can focus. Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus CurrentColumn Gets the cursor column. Declaration public int CurrentColumn { get; } Property Value Type Description System.Int32 The cursor column. CurrentRow Gets the current cursor row. Declaration public int CurrentRow { get; } Property Value Type Description System.Int32 ReadOnly Gets or sets whether the TextView is in read-only mode or not Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Boolean value(Default false) Text Sets or gets the text in the TextView . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Methods CloseFile() Closes the contents of the stream into the TextView . Declaration public bool CloseFile() Returns Type Description System.Boolean true , if stream was closed, false otherwise. 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(Stream stream) Parameters Type Name Description System.IO.Stream stream Stream to load the contents from. MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor on the current row and column Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. ScrollTo(Int32) Will scroll the TextView to display the specified row at the top Declaration public void ScrollTo(int row) Parameters Type Name Description System.Int32 row Row that should be displayed at the top, if the value is negative it will be reset to zero Events TextChanged Raised when the Text of the TextView changes. Declaration public event EventHandler TextChanged Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.TimeField.html": { "href": "api/Terminal.Gui/Terminal.Gui.TimeField.html", "title": "Class TimeField", - "keywords": "Class TimeField Time editing View Inheritance System.Object Responder View TextField TimeField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TimeField : TextField, IEnumerable Remarks The TimeField View provides time editing functionality with mouse support. Constructors TimeField(DateTime) Initializes a new instance of TimeField Declaration public TimeField(DateTime time) Parameters Type Name Description System.DateTime time TimeField(Int32, Int32, DateTime, Boolean) Initializes a new instance of TimeField at an absolute position and fixed size. Declaration public TimeField(int x, int y, DateTime time, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime time Initial time contents. System.Boolean isShort If true, the seconds are hidden. Properties IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Time Gets or sets the time of the TimeField . Declaration public DateTime Time { get; set; } Property Value Type Description System.DateTime Remarks Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" + "keywords": "Class TimeField Time editing View Inheritance System.Object Responder View TextField TimeField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TimeField : TextField, IEnumerable Remarks The TimeField View provides time editing functionality with mouse support. Constructors TimeField(DateTime) Initializes a new instance of TimeField Declaration public TimeField(DateTime time) Parameters Type Name Description System.DateTime time TimeField(Int32, Int32, DateTime, Boolean) Initializes a new instance of TimeField at an absolute position and fixed size. Declaration public TimeField(int x, int y, DateTime time, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime time Initial time contents. System.Boolean isShort If true, the seconds are hidden. Properties IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Time Gets or sets the time of the TimeField . Declaration public DateTime Time { get; set; } Property Value Type Description System.DateTime Remarks Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Processes key presses for the TextField . Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Toplevel.html": { "href": "api/Terminal.Gui/Terminal.Gui.Toplevel.html", "title": "Class Toplevel", - "keywords": "Class Toplevel Toplevel views can be modally executed. Inheritance System.Object Responder View Toplevel Window Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Toplevel : View, IEnumerable Remarks Toplevels can be modally executing views, started by calling Run(Toplevel, Boolean) . They return control to the caller when RequestStop() has been called (which sets the Running property to false). A Toplevel is created when an application initialzies Terminal.Gui by callling Init() . The application Toplevel can be accessed via Top . Additional Toplevels can be created and run (e.g. Dialog s. To run a Toplevel, create the Toplevel and call Run(Toplevel, Boolean) . Toplevels can also opt-in to more sophisticated initialization by implementing System.ComponentModel.ISupportInitialize . When they do so, the System.ComponentModel.ISupportInitialize.BeginInit and System.ComponentModel.ISupportInitialize.EndInit methods will be called before running the view. If first-run-only initialization is preferred, the System.ComponentModel.ISupportInitializeNotification can be implemented too, in which case the System.ComponentModel.ISupportInitialize methods will only be called if System.ComponentModel.ISupportInitializeNotification.IsInitialized is false . This allows proper View inheritance hierarchies to override base class layout code optimally by doing so only on first run, instead of on every run. Constructors Toplevel() Initializes a new instance of the Toplevel class with Computed layout, defaulting to full screen. Declaration public Toplevel() Toplevel(Rect) Initializes a new instance of the Toplevel class with the specified absolute layout. Declaration public Toplevel(Rect frame) Parameters Type Name Description Rect frame A superview-relative rectangle specifying the location and size for the new Toplevel Properties CanFocus Gets or sets a value indicating whether this Toplevel can focus. Declaration public override bool CanFocus { get; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus MenuBar Gets or sets the menu for this Toplevel Declaration public MenuBar MenuBar { get; set; } Property Value Type Description MenuBar Modal Determines whether the Toplevel is modal or not. Causes ProcessKey(KeyEvent) to propagate keys upwards by default unless set to true . Declaration public bool Modal { get; set; } Property Value Type Description System.Boolean Running Gets or sets whether the MainLoop for this Toplevel is running or not. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean Remarks Setting this property directly is discouraged. Use RequestStop() instead. StatusBar Gets or sets the status bar for this Toplevel Declaration public StatusBar StatusBar { get; set; } Property Value Type Description StatusBar Methods Add(View) Declaration public override void Add(View view) Parameters Type Name Description View view Overrides View.Add(View) Create() Convenience factory method that creates a new Toplevel with the current terminal dimensions. Declaration public static Toplevel Create() Returns Type Description Toplevel The create. ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Remove(View) Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) RemoveAll() Declaration public override void RemoveAll() Overrides View.RemoveAll() WillPresent() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after the views have been laid out, and before the views are drawn for the first time. Declaration public virtual void WillPresent() Events Ready Fired once the Toplevel's MainLoop has started it's first iteration. Subscribe to this event to perform tasks when the Toplevel has been laid out and focus has been set. changes. A Ready event handler is a good place to finalize initialization after calling ` Run() (topLevel)`. Declaration public event EventHandler Ready Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" + "keywords": "Class Toplevel Toplevel views can be modally executed. Inheritance System.Object Responder View Toplevel Window Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Toplevel : View, IEnumerable Remarks Toplevels can be modally executing views, started by calling Run(Toplevel, Boolean) . They return control to the caller when RequestStop() has been called (which sets the Running property to false). A Toplevel is created when an application initialzies Terminal.Gui by callling Init() . The application Toplevel can be accessed via Top . Additional Toplevels can be created and run (e.g. Dialog s. To run a Toplevel, create the Toplevel and call Run(Toplevel, Boolean) . Toplevels can also opt-in to more sophisticated initialization by implementing System.ComponentModel.ISupportInitialize . When they do so, the System.ComponentModel.ISupportInitialize.BeginInit and System.ComponentModel.ISupportInitialize.EndInit methods will be called before running the view. If first-run-only initialization is preferred, the System.ComponentModel.ISupportInitializeNotification can be implemented too, in which case the System.ComponentModel.ISupportInitialize methods will only be called if System.ComponentModel.ISupportInitializeNotification.IsInitialized is false . This allows proper View inheritance hierarchies to override base class layout code optimally by doing so only on first run, instead of on every run. Constructors Toplevel() Initializes a new instance of the Toplevel class with Computed layout, defaulting to full screen. Declaration public Toplevel() Toplevel(Rect) Initializes a new instance of the Toplevel class with the specified absolute layout. Declaration public Toplevel(Rect frame) Parameters Type Name Description Rect frame A superview-relative rectangle specifying the location and size for the new Toplevel Properties CanFocus Gets or sets a value indicating whether this Toplevel can focus. Declaration public override bool CanFocus { get; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus MenuBar Gets or sets the menu for this Toplevel Declaration public MenuBar MenuBar { get; set; } Property Value Type Description MenuBar Modal Determines whether the Toplevel is modal or not. Causes ProcessKey(KeyEvent) to propagate keys upwards by default unless set to true . Declaration public bool Modal { get; set; } Property Value Type Description System.Boolean Running Gets or sets whether the MainLoop for this Toplevel is running or not. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean Remarks Setting this property directly is discouraged. Use RequestStop() instead. StatusBar Gets or sets the status bar for this Toplevel Declaration public StatusBar StatusBar { get; set; } Property Value Type Description StatusBar Methods Add(View) Adds a subview (child) to this view. Declaration public override void Add(View view) Parameters Type Name Description View view Overrides View.Add(View) Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() Create() Convenience factory method that creates a new Toplevel with the current terminal dimensions. Declaration public static Toplevel Create() Returns Type Description Toplevel The create. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public override void RemoveAll() Overrides View.RemoveAll() WillPresent() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after the views have been laid out, and before the views are drawn for the first time. Declaration public virtual void WillPresent() Events Ready Fired once the Toplevel's MainLoop has started it's first iteration. Subscribe to this event to perform tasks when the Toplevel has been laid out and focus has been set. changes. A Ready event handler is a good place to finalize initialization after calling ` Run() (topLevel)`. Declaration public event EventHandler Ready Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html", @@ -277,7 +277,7 @@ "api/Terminal.Gui/Terminal.Gui.View.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.html", "title": "Class View", - "keywords": "Class View View is the base class for all views on the screen and represents a visible element that can render itself and contains zero or more nested views. Inheritance System.Object Responder View Button CheckBox ComboBox FrameView HexView Label ListView MenuBar ProgressBar RadioGroup ScrollBarView ScrollView StatusBar TextField TextView Toplevel Implements System.Collections.IEnumerable Inherited Members Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class View : Responder, IEnumerable Remarks The View defines the base functionality for user interface elements in Terminal.Gui. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views supports two layout styles: Absolute or Computed. The choice as to which layout style is used by the View is determined when the View is initizlied. To create a View using Absolute layout, call a constructor that takes a Rect parameter to specify the absolute position and size (the View. Frame )/. To create a View using Computed layout use a constructor that does not take a Rect parametr and set the X, Y, Width and Height properties on the view. Both approaches use coordinates that are relative to the container they are being added to. To switch between Absolute and Computed layout, use the LayoutStyle property. Computed layout is more flexible and supports dynamic console apps where controls adjust layout as the terminal resizes or other Views change size or position. The X, Y, Width and Height properties are Dim and Pos objects that dynamically update the position of a view. The X and Y properties are of type Pos and you can use either absolute positions, percentages or anchor points. The Width and Height properties are of type Dim and can use absolute position, percentages and anchors. These are useful as they will take care of repositioning views when view's frames are resized or if the terminal size changes. Absolute layout requires specifying coordiantes and sizes of Views explicitly, and the View will typcialy stay in a fixed position and size. To change the position and size use the Frame property. Subviews (child views) can be added to a View by calling the Add(View) method. The container of a View can be accessed with the SuperView property. To flag a region of the View's Bounds to be redrawn call SetNeedsDisplay(Rect) . To flag the entire view for redraw call SetNeedsDisplay() . Views have a ColorScheme property that defines the default colors that subviews should use for rendering. This ensures that the views fit in the context where they are being used, and allows for themes to be plugged in. For example, the default colors for windows and toplevels uses a blue background, while it uses a white background for dialog boxes and a red background for errors. Subclasses should not rely on ColorScheme being set at construction time. If a ColorScheme is not set on a view, the view will inherit the value from its SuperView and the value might only be valid once a view has been added to a SuperView. By using ColorScheme applications will work both in color as well as black and white displays. Views that are focusable should implement the PositionCursor() to make sure that the cursor is placed in a location that makes sense. Unix terminals do not have a way of hiding the cursor, so it can be distracting to have the cursor left at the last focused view. So views should make sure that they place the cursor in a visually sensible place. The LayoutSubviews() method is invoked when the size or layout of a view has changed. The default processing system will keep the size and dimensions for views that use the Absolute , and will recompute the frames for the vies that use Computed . Constructors View() Initializes a new instance of Computed View class. Declaration public View() Remarks Use X , Y , Width , and Height properties to dynamically control the size and location of the view. View(Rect) Initializes a new instance of a Absolute View class with the absolute dimensions specified in the frame parameter. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Remarks This constructor intitalize a View with a LayoutStyle of Absolute . Use View() to initialize a View with LayoutStyle of Computed Properties Bounds The bounds represent the View-relative rectangle used for this view; the area inside of the view. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. Remarks Updates to the Bounds update the Frame , and has the same side effects as updating the Frame . Because Bounds coordinates are relative to the upper-left corner of the View , the coordinates of the upper-left corner of the rectangle returned by this property are (0,0). Use this property to obtain the size and coordinates of the client area of the control for tasks such as drawing on the surface of the control. ColorScheme The color scheme for this view, if it is not defined, it returns the SuperView 's color scheme. Declaration public ColorScheme ColorScheme { get; set; } Property Value Type Description ColorScheme Driver Points to the current driver in use by the view, it is a convenience property for simplifying the development of new views. Declaration public static ConsoleDriver Driver { get; } Property Value Type Description ConsoleDriver Focused Returns the currently focused view inside this view, or null if nothing is focused. Declaration public View Focused { get; } Property Value Type Description View The focused. Frame Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . HasFocus Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean Overrides Responder.HasFocus Height Gets or sets the height of the view. Only used whe LayoutStyle is Computed . Declaration public Dim Height { get; set; } Property Value Type Description Dim The height. Id Gets or sets an identifier for the view; Declaration public ustring Id { get; set; } Property Value Type Description NStack.ustring The identifier. Remarks The id should be unique across all Views that share a SuperView. IsCurrentTop Returns a value indicating if this View is currently on Top (Active) Declaration public bool IsCurrentTop { get; } Property Value Type Description System.Boolean LayoutStyle Controls how the View's Frame is computed during the LayoutSubviews method, if the style is set to Absolute , LayoutSubviews does not change the Frame . If the style is Computed the Frame is updated using the X , Y , Width , and Height properties. Declaration public LayoutStyle LayoutStyle { get; set; } Property Value Type Description LayoutStyle The layout style. MostFocused Returns the most focused view in the chain of subviews (the leaf view that has the focus). Declaration public View MostFocused { get; } Property Value Type Description View The most focused. Subviews This returns a list of the subviews contained by this view. Declaration public IList Subviews { get; } Property Value Type Description System.Collections.Generic.IList < View > The subviews. SuperView Returns the container for this view, or null if this view has not been added to a container. Declaration public View SuperView { get; } Property Value Type Description View The super view. WantContinuousButtonPressed Gets or sets a value indicating whether this View want continuous button pressed event. Declaration public virtual bool WantContinuousButtonPressed { get; set; } Property Value Type Description System.Boolean WantMousePositionReports Gets or sets a value indicating whether this View wants mouse position reports. Declaration public virtual bool WantMousePositionReports { get; set; } Property Value Type Description System.Boolean true if want mouse position reports; otherwise, false . Width Gets or sets the width of the view. Only used whe LayoutStyle is Computed . Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. X Gets or sets the X position for the view (the column). Only used whe LayoutStyle is Computed . Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Y Gets or sets the Y position for the view (the row). Only used whe LayoutStyle is Computed . Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Methods Add(View) Adds a subview (child) to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() Add(View[]) Adds the specified views (children) to the view. Declaration public void Add(params View[] views) Parameters Type Name Description View [] views Array of one or more views (can be optional parameter). Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row of the View. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Column (view-relative). System.Int32 row Row (view-relative). System.Rune ch Ch. BringSubviewForward(View) Moves the subview backwards in the hierarchy, only one step Declaration public void BringSubviewForward(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. BringSubviewToFront(View) Brings the specified subview to the front so it is drawn on top of any other views. Declaration public void BringSubviewToFront(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks SendSubviewToBack(View) . ChildNeedsDisplay() Indicates that any child views (in the Subviews list) need to be repainted. Declaration public void ChildNeedsDisplay() Clear() Clears the view region with the current color. Declaration public void Clear() Remarks This clears the entire region used by this view. Clear(Rect) Clears the specified region with the current color. Declaration public void Clear(Rect regionScreen) Parameters Type Name Description Rect regionScreen The screen-relative region to clear. Remarks ClearNeedsDisplay() Removes the SetNeedsDisplay() and the ChildNeedsDisplay() setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the ConsoleDriver 's clip region to the current View's Bounds . Declaration public Rect ClipToBounds() Returns Type Description Rect The existing driver's clip region, which can be then re-eapplied by setting Driver .Clip ( Clip ). Remarks Bounds is View-relative. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect region, int padding = 0, bool fill = false) Parameters Type Name Description Rect region View-relative region for the frame to be drawn. System.Int32 padding The padding to add around the outside of the drawn frame. System.Boolean fill If set to true it fill will the contents. DrawHotString(ustring, Boolean, ColorScheme) Utility function to draw strings that contains a hotkey using a ColorScheme and the \"focused\" state. Declaration public void DrawHotString(ustring text, bool focused, ColorScheme scheme) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. System.Boolean focused If set to true this uses the focused colors from the color scheme, otherwise the regular ones. ColorScheme scheme The color scheme to use. DrawHotString(ustring, Attribute, Attribute) Utility function to draw strings that contain a hotkey. Declaration public void DrawHotString(ustring text, Attribute hotColor, Attribute normalColor) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. Attribute hotColor Hot color. Attribute normalColor Normal color. Remarks The hotkey is any character following an underscore ('_') character. EnsureFocus() Finds the first view in the hierarchy that wants to get the focus if nothing is currently focused, otherwise, it does nothing. Declaration public void EnsureFocus() FocusFirst() Focuses the first focusable subview if one exists. Declaration public void FocusFirst() FocusLast() Focuses the last focusable subview if one exists. Declaration public void FocusLast() FocusNext() Focuses the next view. Declaration public bool FocusNext() Returns Type Description System.Boolean true , if next was focused, false otherwise. FocusPrev() Focuses the previous view. Declaration public bool FocusPrev() Returns Type Description System.Boolean true , if previous was focused, false otherwise. GetEnumerator() Gets an enumerator that enumerates the subviews in this view. Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. LayoutSubviews() Invoked when a view starts executing or when the dimensions of the view have changed, for example in response to the container view or terminal resizing. Declaration public virtual void LayoutSubviews() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. Move(Int32, Int32) This moves the cursor to the specified column and row in the view. Declaration public void Move(int col, int row) Parameters Type Name Description System.Int32 col Col (view-relative). System.Int32 row Row (view-relative). OnDrawContent(Rect) Enables overrides to draw infinitely scrolled content and/or a background behind added controls. Declaration public virtual void OnDrawContent(Rect viewport) Parameters Type Name Description Rect viewport The view-relative rectangle describing the currently visible viewport into the View Remarks This method will be called before any subviews added with Add(View) have been drawn. OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides Responder.OnEnter() OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyUp(KeyEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides Responder.OnLeave() OnMouseEnter(MouseEvent) Declaration public override bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseEnter(MouseEvent) OnMouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public virtual bool OnMouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnMouseLeave(MouseEvent) Declaration public override bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseLeave(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public virtual void PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessKey(KeyEvent) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public virtual void RemoveAll() ScreenToView(Int32, Int32) Converts a point from screen-relative coordinates to view-relative coordinates. Declaration public Point ScreenToView(int x, int y) Parameters Type Name Description System.Int32 x X screen-coordinate point. System.Int32 y Y screen-coordinate point. Returns Type Description Point The mapped point. SendSubviewBackwards(View) Moves the subview backwards in the hierarchy, only one step Declaration public void SendSubviewBackwards(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. SendSubviewToBack(View) Sends the specified subview to the front so it is the first view drawn Declaration public void SendSubviewToBack(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks BringSubviewToFront(View) . SetClip(Rect) Sets the clip region to the specified view-relative region. Declaration public Rect SetClip(Rect region) Parameters Type Name Description Rect region View-relative clip region. Returns Type Description Rect The previous screen-relative clip region. SetFocus(View) Causes the specified subview to have focus. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Sets a flag indicating this view needs to be redisplayed because its state has changed. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the view-relative region on this View as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The view-relative region that must be flagged for repaint. ToString() Pretty prints the View Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events DrawContent Event invoked when the content area of the View is to be drawn. Declaration public event EventHandler DrawContent Event Type Type Description System.EventHandler < Rect > Remarks Will be invoked before any subviews added with Add(View) have been drawn. Rect provides the view-relative rectangle describing the currently visible viewport into the View . Enter Event fired when the view gets focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler < View.FocusEventArgs > KeyDown Invoked when a key is pressed Declaration public event EventHandler KeyDown Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyPress Invoked when a character key is pressed and occurs after the key up event. Declaration public event EventHandler KeyPress Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyUp Invoked when a key is released Declaration public event EventHandler KeyUp Event Type Type Description System.EventHandler < View.KeyEventEventArgs > LayoutComplete Fired after the Views's LayoutSubviews() method has completed. Declaration public event EventHandler LayoutComplete Event Type Type Description System.EventHandler < View.LayoutEventArgs > Remarks Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. Leave Event fired when the view looses focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler < View.FocusEventArgs > MouseClick Event fired when a mouse event is generated. Declaration public event EventHandler MouseClick Event Type Type Description System.EventHandler < View.MouseEventEventArgs > MouseEnter Event fired when the view receives the mouse event for the first time. Declaration public event EventHandler MouseEnter Event Type Type Description System.EventHandler < View.MouseEventEventArgs > MouseLeave Event fired when the view receives a mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < View.MouseEventEventArgs > Implements System.Collections.IEnumerable" + "keywords": "Class View View is the base class for all views on the screen and represents a visible element that can render itself and contains zero or more nested views. Inheritance System.Object Responder View Button CheckBox ComboBox FrameView HexView Label ListView MenuBar ProgressBar RadioGroup ScrollBarView ScrollView StatusBar TextField TextView Toplevel Implements System.Collections.IEnumerable Inherited Members Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class View : Responder, IEnumerable Remarks The View defines the base functionality for user interface elements in Terminal.Gui. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views supports two layout styles: Absolute or Computed. The choice as to which layout style is used by the View is determined when the View is initizlied. To create a View using Absolute layout, call a constructor that takes a Rect parameter to specify the absolute position and size (the View. Frame )/. To create a View using Computed layout use a constructor that does not take a Rect parametr and set the X, Y, Width and Height properties on the view. Both approaches use coordinates that are relative to the container they are being added to. To switch between Absolute and Computed layout, use the LayoutStyle property. Computed layout is more flexible and supports dynamic console apps where controls adjust layout as the terminal resizes or other Views change size or position. The X, Y, Width and Height properties are Dim and Pos objects that dynamically update the position of a view. The X and Y properties are of type Pos and you can use either absolute positions, percentages or anchor points. The Width and Height properties are of type Dim and can use absolute position, percentages and anchors. These are useful as they will take care of repositioning views when view's frames are resized or if the terminal size changes. Absolute layout requires specifying coordiantes and sizes of Views explicitly, and the View will typcialy stay in a fixed position and size. To change the position and size use the Frame property. Subviews (child views) can be added to a View by calling the Add(View) method. The container of a View can be accessed with the SuperView property. To flag a region of the View's Bounds to be redrawn call SetNeedsDisplay(Rect) . To flag the entire view for redraw call SetNeedsDisplay() . Views have a ColorScheme property that defines the default colors that subviews should use for rendering. This ensures that the views fit in the context where they are being used, and allows for themes to be plugged in. For example, the default colors for windows and toplevels uses a blue background, while it uses a white background for dialog boxes and a red background for errors. Subclasses should not rely on ColorScheme being set at construction time. If a ColorScheme is not set on a view, the view will inherit the value from its SuperView and the value might only be valid once a view has been added to a SuperView. By using ColorScheme applications will work both in color as well as black and white displays. Views that are focusable should implement the PositionCursor() to make sure that the cursor is placed in a location that makes sense. Unix terminals do not have a way of hiding the cursor, so it can be distracting to have the cursor left at the last focused view. So views should make sure that they place the cursor in a visually sensible place. The LayoutSubviews() method is invoked when the size or layout of a view has changed. The default processing system will keep the size and dimensions for views that use the Absolute , and will recompute the frames for the vies that use Computed . Constructors View() Initializes a new instance of Computed View class. Declaration public View() Remarks Use X , Y , Width , and Height properties to dynamically control the size and location of the view. View(Rect) Initializes a new instance of a Absolute View class with the absolute dimensions specified in the frame parameter. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Remarks This constructor intitalize a View with a LayoutStyle of Absolute . Use View() to initialize a View with LayoutStyle of Computed Properties Bounds The bounds represent the View-relative rectangle used for this view; the area inside of the view. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. Remarks Updates to the Bounds update the Frame , and has the same side effects as updating the Frame . Because Bounds coordinates are relative to the upper-left corner of the View , the coordinates of the upper-left corner of the rectangle returned by this property are (0,0). Use this property to obtain the size and coordinates of the client area of the control for tasks such as drawing on the surface of the control. ColorScheme The color scheme for this view, if it is not defined, it returns the SuperView 's color scheme. Declaration public ColorScheme ColorScheme { get; set; } Property Value Type Description ColorScheme Driver Points to the current driver in use by the view, it is a convenience property for simplifying the development of new views. Declaration public static ConsoleDriver Driver { get; } Property Value Type Description ConsoleDriver Focused Returns the currently focused view inside this view, or null if nothing is focused. Declaration public View Focused { get; } Property Value Type Description View The focused. Frame Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . HasFocus Gets or sets a value indicating whether this Responder has focus. Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean true if has focus; otherwise, false . Overrides Responder.HasFocus Height Gets or sets the height of the view. Only used whe LayoutStyle is Computed . Declaration public Dim Height { get; set; } Property Value Type Description Dim The height. Id Gets or sets an identifier for the view; Declaration public ustring Id { get; set; } Property Value Type Description NStack.ustring The identifier. Remarks The id should be unique across all Views that share a SuperView. IsCurrentTop Returns a value indicating if this View is currently on Top (Active) Declaration public bool IsCurrentTop { get; } Property Value Type Description System.Boolean LayoutStyle Controls how the View's Frame is computed during the LayoutSubviews method, if the style is set to Absolute , LayoutSubviews does not change the Frame . If the style is Computed the Frame is updated using the X , Y , Width , and Height properties. Declaration public LayoutStyle LayoutStyle { get; set; } Property Value Type Description LayoutStyle The layout style. MostFocused Returns the most focused view in the chain of subviews (the leaf view that has the focus). Declaration public View MostFocused { get; } Property Value Type Description View The most focused. Subviews This returns a list of the subviews contained by this view. Declaration public IList Subviews { get; } Property Value Type Description System.Collections.Generic.IList < View > The subviews. SuperView Returns the container for this view, or null if this view has not been added to a container. Declaration public View SuperView { get; } Property Value Type Description View The super view. WantContinuousButtonPressed Gets or sets a value indicating whether this View want continuous button pressed event. Declaration public virtual bool WantContinuousButtonPressed { get; set; } Property Value Type Description System.Boolean WantMousePositionReports Gets or sets a value indicating whether this View wants mouse position reports. Declaration public virtual bool WantMousePositionReports { get; set; } Property Value Type Description System.Boolean true if want mouse position reports; otherwise, false . Width Gets or sets the width of the view. Only used whe LayoutStyle is Computed . Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. X Gets or sets the X position for the view (the column). Only used whe LayoutStyle is Computed . Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Y Gets or sets the Y position for the view (the row). Only used whe LayoutStyle is Computed . Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Methods Add(View) Adds a subview (child) to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() Add(View[]) Adds the specified views (children) to the view. Declaration public void Add(params View[] views) Parameters Type Name Description View [] views Array of one or more views (can be optional parameter). Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row of the View. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Column (view-relative). System.Int32 row Row (view-relative). System.Rune ch Ch. BringSubviewForward(View) Moves the subview backwards in the hierarchy, only one step Declaration public void BringSubviewForward(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. BringSubviewToFront(View) Brings the specified subview to the front so it is drawn on top of any other views. Declaration public void BringSubviewToFront(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks SendSubviewToBack(View) . ChildNeedsDisplay() Indicates that any child views (in the Subviews list) need to be repainted. Declaration public void ChildNeedsDisplay() Clear() Clears the view region with the current color. Declaration public void Clear() Remarks This clears the entire region used by this view. Clear(Rect) Clears the specified region with the current color. Declaration public void Clear(Rect regionScreen) Parameters Type Name Description Rect regionScreen The screen-relative region to clear. Remarks ClearNeedsDisplay() Removes the SetNeedsDisplay() and the ChildNeedsDisplay() setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the ConsoleDriver 's clip region to the current View's Bounds . Declaration public Rect ClipToBounds() Returns Type Description Rect The existing driver's clip region, which can be then re-eapplied by setting Driver .Clip ( Clip ). Remarks Bounds is View-relative. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect region, int padding = 0, bool fill = false) Parameters Type Name Description Rect region View-relative region for the frame to be drawn. System.Int32 padding The padding to add around the outside of the drawn frame. System.Boolean fill If set to true it fill will the contents. DrawHotString(ustring, Boolean, ColorScheme) Utility function to draw strings that contains a hotkey using a ColorScheme and the \"focused\" state. Declaration public void DrawHotString(ustring text, bool focused, ColorScheme scheme) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. System.Boolean focused If set to true this uses the focused colors from the color scheme, otherwise the regular ones. ColorScheme scheme The color scheme to use. DrawHotString(ustring, Attribute, Attribute) Utility function to draw strings that contain a hotkey. Declaration public void DrawHotString(ustring text, Attribute hotColor, Attribute normalColor) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. Attribute hotColor Hot color. Attribute normalColor Normal color. Remarks The hotkey is any character following an underscore ('_') character. EnsureFocus() Finds the first view in the hierarchy that wants to get the focus if nothing is currently focused, otherwise, it does nothing. Declaration public void EnsureFocus() FocusFirst() Focuses the first focusable subview if one exists. Declaration public void FocusFirst() FocusLast() Focuses the last focusable subview if one exists. Declaration public void FocusLast() FocusNext() Focuses the next view. Declaration public bool FocusNext() Returns Type Description System.Boolean true , if next was focused, false otherwise. FocusPrev() Focuses the previous view. Declaration public bool FocusPrev() Returns Type Description System.Boolean true , if previous was focused, false otherwise. GetEnumerator() Gets an enumerator that enumerates the subviews in this view. Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. LayoutSubviews() Invoked when a view starts executing or when the dimensions of the view have changed, for example in response to the container view or terminal resizing. Declaration public virtual void LayoutSubviews() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. Move(Int32, Int32) This moves the cursor to the specified column and row in the view. Declaration public void Move(int col, int row) Parameters Type Name Description System.Int32 col Col (view-relative). System.Int32 row Row (view-relative). OnDrawContent(Rect) Enables overrides to draw infinitely scrolled content and/or a background behind added controls. Declaration public virtual void OnDrawContent(Rect viewport) Parameters Type Name Description Rect viewport The view-relative rectangle describing the currently visible viewport into the View Remarks This method will be called before any subviews added with Add(View) have been drawn. OnEnter() Method invoked when a view gets focus. Declaration public override bool OnEnter() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnEnter() OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyUp(KeyEvent) OnLeave() Method invoked when a view loses focus. Declaration public override bool OnLeave() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnLeave() OnMouseEnter(MouseEvent) Method invoked when a mouse event is generated for the first time. Declaration public override bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnMouseEnter(MouseEvent) OnMouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public virtual bool OnMouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnMouseLeave(MouseEvent) Method invoked when a mouse event is generated for the last time. Declaration public override bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnMouseLeave(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public virtual void PositionCursor() ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public virtual void RemoveAll() ScreenToView(Int32, Int32) Converts a point from screen-relative coordinates to view-relative coordinates. Declaration public Point ScreenToView(int x, int y) Parameters Type Name Description System.Int32 x X screen-coordinate point. System.Int32 y Y screen-coordinate point. Returns Type Description Point The mapped point. SendSubviewBackwards(View) Moves the subview backwards in the hierarchy, only one step Declaration public void SendSubviewBackwards(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. SendSubviewToBack(View) Sends the specified subview to the front so it is the first view drawn Declaration public void SendSubviewToBack(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks BringSubviewToFront(View) . SetClip(Rect) Sets the clip region to the specified view-relative region. Declaration public Rect SetClip(Rect region) Parameters Type Name Description Rect region View-relative clip region. Returns Type Description Rect The previous screen-relative clip region. SetFocus(View) Causes the specified subview to have focus. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Sets a flag indicating this view needs to be redisplayed because its state has changed. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the view-relative region on this View as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The view-relative region that must be flagged for repaint. ToString() Pretty prints the View Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events DrawContent Event invoked when the content area of the View is to be drawn. Declaration public event EventHandler DrawContent Event Type Type Description System.EventHandler < Rect > Remarks Will be invoked before any subviews added with Add(View) have been drawn. Rect provides the view-relative rectangle describing the currently visible viewport into the View . Enter Event fired when the view gets focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler < View.FocusEventArgs > KeyDown Invoked when a key is pressed Declaration public event EventHandler KeyDown Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyPress Invoked when a character key is pressed and occurs after the key up event. Declaration public event EventHandler KeyPress Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyUp Invoked when a key is released Declaration public event EventHandler KeyUp Event Type Type Description System.EventHandler < View.KeyEventEventArgs > LayoutComplete Fired after the Views's LayoutSubviews() method has completed. Declaration public event EventHandler LayoutComplete Event Type Type Description System.EventHandler < View.LayoutEventArgs > Remarks Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. Leave Event fired when the view looses focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler < View.FocusEventArgs > MouseClick Event fired when a mouse event is generated. Declaration public event EventHandler MouseClick Event Type Type Description System.EventHandler < View.MouseEventEventArgs > MouseEnter Event fired when the view receives the mouse event for the first time. Declaration public event EventHandler MouseEnter Event Type Type Description System.EventHandler < View.MouseEventEventArgs > MouseLeave Event fired when the view receives a mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < View.MouseEventEventArgs > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html", @@ -297,7 +297,7 @@ "api/Terminal.Gui/Terminal.Gui.Window.html": { "href": "api/Terminal.Gui/Terminal.Gui.Window.html", "title": "Class Window", - "keywords": "Class Window A Toplevel View that draws a border around its Frame with a Title at the top. Inheritance System.Object Responder View Toplevel Window Dialog Implements System.Collections.IEnumerable Inherited Members Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.ProcessKey(KeyEvent) Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Window : Toplevel, IEnumerable Remarks The 'client area' of a Window is a rectangle deflated by one or more rows/columns from Bounds . A this time there is no API to determine this rectangle. Constructors Window(ustring) Initializes a new instance of the Window class with an optional title. Declaration public Window(ustring title = null) Parameters Type Name Description NStack.ustring title Title. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and an optional title. Declaration public Window(ustring title = null, int padding = 0) Parameters Type Name Description NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title using Absolute positioning. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with Computed . Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title System.Int32 padding Number of characters to use for padding of the drawn frame. Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with LayoutStyle of Computed Properties Title The title to be displayed for this window. Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title Methods Add(View) Declaration public override void Add(View view) Parameters Type Name Description View view Overrides Toplevel.Add(View) GetEnumerator() Enumerates the various View s in the embedded Terminal.Gui.Window.ContentView . Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides Toplevel.Redraw(Rect) Remove(View) Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) RemoveAll() Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Implements System.Collections.IEnumerable" + "keywords": "Class Window A Toplevel View that draws a border around its Frame with a Title at the top. Inheritance System.Object Responder View Toplevel Window Dialog Implements System.Collections.IEnumerable Inherited Members Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.ProcessKey(KeyEvent) Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Window : Toplevel, IEnumerable Remarks The 'client area' of a Window is a rectangle deflated by one or more rows/columns from Bounds . A this time there is no API to determine this rectangle. Constructors Window(ustring) Initializes a new instance of the Window class with an optional title. Declaration public Window(ustring title = null) Parameters Type Name Description NStack.ustring title Title. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and an optional title. Declaration public Window(ustring title = null, int padding = 0) Parameters Type Name Description NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title using Absolute positioning. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with Computed . Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title System.Int32 padding Number of characters to use for padding of the drawn frame. Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with LayoutStyle of Computed Properties Title The title to be displayed for this window. Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title Methods Add(View) Adds a subview (child) to this view. Declaration public override void Add(View view) Parameters Type Name Description View view Overrides Toplevel.Add(View) Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() GetEnumerator() Enumerates the various View s in the embedded Terminal.Gui.Window.ContentView . Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Contains the details about the mouse event. Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides Toplevel.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Unix.Terminal.Curses.Event.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.Event.html", diff --git a/docs/manifest.json b/docs/manifest.json index 13bddb6e8..250fa0354 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -42,7 +42,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Application.html", - "hash": "/ygpfb9k/Ho2HFeyo+cahA==" + "hash": "yPT23nVjyZPKhFMNBFXA/Q==" } }, "is_incremental": false, @@ -66,7 +66,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Button.html", - "hash": "gaBKrB9OBMD1FRjudM/MyA==" + "hash": "Ogiqw8WWs3e+tiBkNjtoaA==" } }, "is_incremental": false, @@ -78,7 +78,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.CheckBox.html", - "hash": "oVTXd4rh3LkklfBHDTvDhg==" + "hash": "auuTn/N2r9yNW5gVjlaxBQ==" } }, "is_incremental": false, @@ -138,7 +138,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ComboBox.html", - "hash": "b26P7IE+pFbgTO2ZYaywKA==" + "hash": "4cdRAEyCUS1eq3/oAy6x4A==" } }, "is_incremental": false, @@ -162,7 +162,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.DateField.html", - "hash": "sAqKHuRHIIVLnVm+O+rWOQ==" + "hash": "0ZzeifsaibVtiJrH53dOtQ==" } }, "is_incremental": false, @@ -174,7 +174,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Dialog.html", - "hash": "4RVcSOhFize5ZsqV4olHdw==" + "hash": "8IkU8xj3u5Np/IOe2kBDMg==" } }, "is_incremental": false, @@ -198,7 +198,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FileDialog.html", - "hash": "9JG5QAHWUZo/lZScAjXjJA==" + "hash": "id0zrYgEoIqU5dH1N5xnLA==" } }, "is_incremental": false, @@ -210,7 +210,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FrameView.html", - "hash": "72XYYZUXq6J0/HYZ9rhpZw==" + "hash": "4Q6FKv69/GJr9tWj2vJ2eA==" } }, "is_incremental": false, @@ -222,7 +222,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.HexView.html", - "hash": "AEvMPIKEdNVN9lwqcByCZw==" + "hash": "vEBheuK6RqqBCFPRz/YL9Q==" } }, "is_incremental": false, @@ -294,7 +294,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Label.html", - "hash": "JvhX8JF59tW1Hg51s+A6AQ==" + "hash": "cOTYMYU6aH58f+TUm8kjZw==" } }, "is_incremental": false, @@ -318,7 +318,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ListView.html", - "hash": "7svIIfhkkOCivVERFzHgKA==" + "hash": "0QkPauXHsAQht7uuiECH/g==" } }, "is_incremental": false, @@ -366,7 +366,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MenuBar.html", - "hash": "GsNO4uH7d/cnoCBFokQLdA==" + "hash": "AMuhNj4f31WAXMYfYJfXmA==" } }, "is_incremental": false, @@ -474,7 +474,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ProgressBar.html", - "hash": "urA3hKzyAQWatUXYgT5Slw==" + "hash": "uV49T7u6viQ37rQhBT3Zzw==" } }, "is_incremental": false, @@ -486,7 +486,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.RadioGroup.html", - "hash": "JZPxpJnq3zQlP5Z78FlMfA==" + "hash": "/BRdhsdF75VLMpGQ343/Pw==" } }, "is_incremental": false, @@ -534,7 +534,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html", - "hash": "+/VIXbP9lOhnCupCTETPxA==" + "hash": "DXaxZYGJtmaSfHa3Jk+gyA==" } }, "is_incremental": false, @@ -546,7 +546,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollView.html", - "hash": "P20wjwoOLWuOXTbCZsi3TQ==" + "hash": "H/44f2Hsi78rcqL5DfzFNQ==" } }, "is_incremental": false, @@ -570,7 +570,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.StatusBar.html", - "hash": "24b7wK4s1Fv70FLe/oee7Q==" + "hash": "aQwab8aCzg9DO76j0n0Lug==" } }, "is_incremental": false, @@ -606,7 +606,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextField.html", - "hash": "mgWemu0D0xX4AYvIJ6JfqQ==" + "hash": "8gROGNtihilMdFc8s8+RwQ==" } }, "is_incremental": false, @@ -618,7 +618,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextView.html", - "hash": "fqCIHXEK2VtjR9smwu7Ypw==" + "hash": "m3SbJApjDnN5g23jI+i4Qg==" } }, "is_incremental": false, @@ -630,7 +630,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TimeField.html", - "hash": "bszIncXCrsuUl6SMrb5oMA==" + "hash": "6GP1VF2MyslnpnjVPryQ6w==" } }, "is_incremental": false, @@ -642,7 +642,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Toplevel.html", - "hash": "vlfGbOThwlVJg1gB3k6PPw==" + "hash": "WW9db75HQNY0g8B19rcKlQ==" } }, "is_incremental": false, @@ -702,7 +702,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.View.html", - "hash": "Ou87bFmeRL+thU9mZ4qVAA==" + "hash": "ikbU1rHcs2278LHBdTs0fA==" } }, "is_incremental": false, @@ -714,7 +714,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Window.html", - "hash": "rIWStvuGdohjUKyftHmM+g==" + "hash": "zCor4GcEaC6RRQktnRbrSw==" } }, "is_incremental": false,