Class Responder
Responder base class implemented by objects that want to participate on keyboard and mouse input.
Inheritance
System.Object
Responder
Implements
System.IDisposable
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)
System.Object.ToString()
Assembly: Terminal.Gui.dll
Syntax
public class Responder : IDisposable
Properties
CanFocus
Gets or sets a value indicating whether this
Responder can focus.
Declaration
public virtual bool CanFocus { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
true if can focus; otherwise, false. |
Enabled
Gets or sets a value indicating whether this
Responder can respond to user interaction.
Declaration
public virtual bool Enabled { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
HasFocus
Gets or sets a value indicating whether this
Responder has focus.
Declaration
public virtual bool HasFocus { get; }
Property Value
| Type |
Description |
| System.Boolean |
true if has focus; otherwise, false. |
Visible
Gets or sets a value indicating whether this
Responder and all its child controls are displayed.
Declaration
public virtual bool Visible { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resource.
Declaration
Dispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| System.Boolean |
disposing |
|
MouseEvent(MouseEvent)
Method invoked when a mouse event is generated
Declaration
public virtual 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. |
OnCanFocusChanged()
Method invoked when the
CanFocus property from a view is changed.
Declaration
public virtual void OnCanFocusChanged()
OnEnabledChanged()
Method invoked when the
Enabled property from a view is changed.
Declaration
public virtual void OnEnabledChanged()
OnEnter(View)
Method invoked when a view gets focus.
Declaration
public virtual bool OnEnter(View view)
Parameters
| Type |
Name |
Description |
| View |
view |
The view that is losing focus. |
Returns
| Type |
Description |
| System.Boolean |
true, if the event was handled, false otherwise. |
OnKeyDown(KeyEvent)
Method invoked when a key is pressed.
Declaration
public virtual 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 |
true if the event was handled |
OnKeyUp(KeyEvent)
Method invoked when a key is released.
Declaration
public virtual 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 |
true if the event was handled |
OnLeave(View)
Method invoked when a view loses focus.
Declaration
public virtual bool OnLeave(View view)
Parameters
| Type |
Name |
Description |
| View |
view |
The view that is getting focus. |
Returns
| Type |
Description |
| System.Boolean |
true, if the event was handled, false otherwise. |
OnMouseEnter(MouseEvent)
Method invoked when a mouse event is generated for the first time.
Declaration
public virtual bool OnMouseEnter(MouseEvent mouseEvent)
Parameters
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 virtual bool OnMouseLeave(MouseEvent mouseEvent)
Parameters
Returns
| Type |
Description |
| System.Boolean |
true, if the event was handled, false otherwise. |
OnVisibleChanged()
Method invoked when the
Visible property from a view is changed.
Declaration
public virtual void OnVisibleChanged()
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 virtual 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 |
|
ProcessHotKey(KeyEvent)
This method can be overwritten by view that
want to provide accelerator functionality
(Alt-key for example).
Declaration
public virtual bool ProcessHotKey(KeyEvent kb)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
ProcessKey(KeyEvent)
If the view is focused, gives the view a
chance to process the keystroke.
Declaration
public virtual 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 |
|
Implements
System.IDisposable