Interface ISoftLabelKeyManager
Defines the traits needed to implement SoftLabelKeyManager.
Namespace: Sharpie.Abstractions
Assembly: sharpie.dll
Syntax
[PublicAPI]
public interface ISoftLabelKeyManager
Properties
ColorMixture
Gets or sets the color mixture of the window.
Declaration
ColorMixture ColorMixture { get; set; }
Property Value
Type | Description |
---|---|
ColorMixture |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Enabled
Specifies if the manager is enabled.
Declaration
bool Enabled { get; }
Property Value
Type | Description |
---|---|
bool |
LabelCount
Gets the number of labels within the soft key label panel.
Declaration
int LabelCount { get; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The soft key labels are disabled. |
Style
Gets or sets the style of the window.
Declaration
Style Style { get; set; }
Property Value
Type | Description |
---|---|
Style |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Terminal
The terminal this manager belongs to.
Declaration
ITerminal Terminal { get; }
Property Value
Type | Description |
---|---|
ITerminal |
Methods
Clear()
Clears the soft key labels from the screen. They can be restored by calling Restore() method.
Declaration
void Clear()
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
DisableAttributes(VideoAttribute)
Disables specified attributes and keep the others untouched.
Declaration
void DisableAttributes(VideoAttribute attributes)
Parameters
Type | Name | Description |
---|---|---|
VideoAttribute | attributes | The attributes to disable. |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
EnableAttributes(VideoAttribute)
Enables specified attributes and keep the others untouched.
Declaration
void EnableAttributes(VideoAttribute attributes)
Parameters
Type | Name | Description |
---|---|---|
VideoAttribute | attributes | The attributes to enable. |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
MarkDirty()
Marks the the soft key labels as dirty, and thus, eligible for refresh.
Declaration
void MarkDirty()
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Refresh()
Refreshes the soft label keys.
Declaration
void Refresh()
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Restore()
Restores the soft key labels to the screen. They can be cleared by calling Clear() method.
Declaration
void Restore()
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The terminal or the current window have been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
SetLabel(int, string, SoftLabelKeyAlignment)
Sets a given label within the soft key label panel.
Declaration
void SetLabel(int index, string title, SoftLabelKeyAlignment align)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the label. |
string | title | The title of the label. |
SoftLabelKeyAlignment | align | Alignment of the label title. |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentOutOfRangeException | The |
ObjectDisposedException | The terminal has been disposed. |
NotSupportedException | The soft key labels are disabled. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |