Class Window
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
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.
Inherited Members
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, IDisposable, ISupportInitializeNotification, ISupportInitialize
Constructors
| Improve this Doc View SourceWindow()
Declaration
public Window()
Window(ustring)
Declaration
public Window(ustring title = null)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | title | Title. |
Window(ustring, Int32, Border)
Declaration
public Window(ustring title = null, int padding = 0, Border border = null)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | title | Title. |
System.Int32 | padding | Number of characters to use for padding of the drawn frame. |
Border | border | The Border. |
Window(Rect, ustring)
Declaration
public Window(Rect frame, ustring title = null)
Parameters
Type | Name | Description |
---|---|---|
Rect | frame | Superview-relative rectangle specifying the location and size |
NStack.ustring | title | Title |
Window(Rect, ustring, Int32, Border)
Initializes a new instance of the Window using Absolute positioning with the specified frame for its location, with the specified frame padding,
and an optional title.
Declaration
public Window(Rect frame, ustring title = null, int padding = 0, Border border = null)
Parameters
Type | Name | Description |
---|---|---|
Rect | frame | Superview-relative rectangle specifying the location and size |
NStack.ustring | title | Title |
System.Int32 | padding | Number of characters to use for padding of the drawn frame. |
Border | border | The Border. |
Properties
| Improve this Doc View SourceBorder
Declaration
public override Border Border { get; set; }
Property Value
Type | Description |
---|---|
Border |
Overrides
| Improve this Doc View SourceText
The text displayed by the Label.
Declaration
public override ustring Text { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring |
Overrides
| Improve this Doc View SourceTextAlignment
Controls the text-alignment property of the label, changing it will redisplay the Label.
Declaration
public override TextAlignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
TextAlignment | The text alignment. |
Overrides
| Improve this Doc View SourceTitle
The title to be displayed for this window.
Declaration
public ustring Title { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring | The title |
Methods
| Improve this Doc View SourceAdd(View)
Declaration
public override void Add(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view |
Overrides
| Improve this Doc View SourceOnCanFocusChanged()
Declaration
public override void OnCanFocusChanged()
Overrides
| Improve this Doc View SourceOnTitleChanged(ustring, ustring)
Called when the Title has been changed. Invokes the TitleChanged event.
Declaration
public virtual void OnTitleChanged(ustring oldTitle, ustring newTitle)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | oldTitle | The Title that is/has been replaced. |
NStack.ustring | newTitle | The new Title to be replaced. |
OnTitleChanging(ustring, ustring)
Called before the Title changes. Invokes the TitleChanging event, which can be cancelled.
Declaration
public virtual bool OnTitleChanging(ustring oldTitle, ustring newTitle)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | oldTitle | The Title that is/has been replaced. |
NStack.ustring | newTitle | The new Title to be replaced. |
Returns
Type | Description |
---|---|
System.Boolean | `true` if an event handler cancelled the Title change. |
Redraw(Rect)
Declaration
public override void Redraw(Rect bounds)
Parameters
Type | Name | Description |
---|---|---|
Rect | bounds |
Overrides
| Improve this Doc View SourceRemove(View)
Declaration
public override void Remove(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view |
Overrides
| Improve this Doc View SourceRemoveAll()
Declaration
public override void RemoveAll()
Overrides
Events
| Improve this Doc View SourceTitleChanged
Event fired after the Title has been changed.
Declaration
public event Action<Window.TitleEventArgs> TitleChanged
Event Type
Type | Description |
---|---|
System.Action<Window.TitleEventArgs> |
TitleChanging
Declaration
public event Action<Window.TitleEventArgs> TitleChanging
Event Type
Type | Description |
---|---|
System.Action<Window.TitleEventArgs> |
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize