Class Widget

Definition

Namespace:
ElmSharp
Assembly:
ElmSharp.dll

The Widget is an abstract class and the parent of other widgets. Inherits from EvasObject.

C#
Copy
[Obsolete("This has been deprecated in API12")] public abstract class Widget : AccessibleObject, IAccessibleObject
Inheritance
Derived
Implements

Constructors

View Source

Widget()

Creates and initializes a new instance of the Widget class.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] protected Widget()
View Source

Widget(EvasObject)

Creates and initializes a new instance of the Widget class.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] protected Widget(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

The parent of the new Widget instance.

Properties

View Source

AllowTreeFocus

Sets or gets whether a widget and its children are focusable or not.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public bool AllowTreeFocus { get; set; }
Property Value
Type Description
bool
View Source

BackgroundColor

Sets or gets the background color of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual Color BackgroundColor { get; set; }
Property Value
Type Description
Color
Remarks

It could be overridden by special child class.

View Source

IsAutoMirroredMode

Sets or gets the widget's mirrored mode setting. When widget is set to automatic mode(true), it follows the system mirrored mode.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public bool IsAutoMirroredMode { get; set; }
Property Value
Type Description
bool
View Source

IsEnabled

Sets or gets the state of the widget, which might be enabled or disabled.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual bool IsEnabled { get; set; }
Property Value
Type Description
bool
View Source

IsFocusAllowed

Gets whether a widget is focusable or not.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public bool IsFocusAllowed { get; }
Property Value
Type Description
bool
Remarks

Widgets which are meant to be interacted with by input events, are created able to be focused by default.

View Source

IsFocused

Gets whether this widget is focused.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public bool IsFocused { get; }
Property Value
Type Description
bool
View Source

IsMirroredMode

Sets or gets the widget's mirrored mode.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public bool IsMirroredMode { get; set; }
Property Value
Type Description
bool
View Source

Opacity

Sets or gets the opacity of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual int Opacity { get; set; }
Property Value
Type Description
int
Remarks

It could be overridden by special child class.

View Source

Style

Sets or gets the style of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public string Style { get; set; }
Property Value
Type Description
string
View Source

Text

Sets or gets the text of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual string Text { get; set; }
Property Value
Type Description
string
Remarks

It could be overridden by special child class.

Methods

View Source

AllowFocus(bool)

Sets the ability for a widget to be focused.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void AllowFocus(bool isAllowFocus)
Parameters
Type Name Description
bool isAllowFocus

true if the object can be focused, false if not(and on errors).

View Source

FocusNext(FocusDirection)

Gives focus to the next widget in the widget tree.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void FocusNext(FocusDirection direction)
Parameters
Type Name Description
FocusDirection direction

Direction to move the focus.

View Source

GetPartColor(string)

Gets color of the particular part of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual Color GetPartColor(string part)
Parameters
Type Name Description
string part

The name of the particular part.

Returns
Type Description
Color

The color of the particular part.

Remarks

This method is a virtual method, it could be overridden by special child class.

View Source

GetPartOpacity(string)

Gets opacity of the particular part of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public int GetPartOpacity(string part)
Parameters
Type Name Description
string part

The name of the particular part.

Returns
Type Description
int

Opacity value of the particular part.

View Source

GetPartText(string)

Gets text of a particular part of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual string GetPartText(string part)
Parameters
Type Name Description
string part

The name of the particular part.

Returns
Type Description
string

Text of the particular part of the widget.

View Source

OnRealized()

The callback of the Realized event.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] protected override void OnRealized()
Overrides
View Source

SetContent(EvasObject, bool)

Sets content to the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void SetContent(EvasObject content, bool preserveOldContent)
Parameters
Type Name Description
EvasObject content

The content.

bool preserveOldContent

true, preserve old content will be unset and not be deleted. false, preserve old content will be deleted.

View Source

SetContent(EvasObject)

Sets content to the widget, and the preserve old content will be deleted.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void SetContent(EvasObject content)
Parameters
Type Name Description
EvasObject content

The content.

View Source

SetFocus(bool)

Sets the widget to be focused or not.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void SetFocus(bool isFocus)
Parameters
Type Name Description
bool isFocus

Whether be focused.

View Source

SetNextFocusObject(EvasObject, FocusDirection)

Sets the next widget with specific focus direction.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void SetNextFocusObject(EvasObject next, FocusDirection direction)
Parameters
Type Name Description
EvasObject next

Focus next widget.

FocusDirection direction

Focus direction.

View Source

SetPartColor(string, Color)

Sets color of a particular part of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual void SetPartColor(string part, Color color)
Parameters
Type Name Description
string part

The name of the particular part.

Color color

The color to be set to the widget.

Remarks

This method is a virtual method, it could be overridden by special child class.

View Source

SetPartContent(string, EvasObject, bool)

Sets content to the particular part of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual bool SetPartContent(string part, EvasObject content, bool preserveOldContent)
Parameters
Type Name Description
string part

The name of the particular part.

EvasObject content

The content.

bool preserveOldContent

true, preserve old content will be unset and not be deleted. false, preserve old content will be deleted.

Returns
Type Description
bool
View Source

SetPartContent(string, EvasObject)

Sets content to the particular part of the widget, and the preserve old content will be deleted.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual bool SetPartContent(string part, EvasObject content)
Parameters
Type Name Description
string part

The name of the particular part.

EvasObject content

The content.

Returns
Type Description
bool
View Source

SetPartOpacity(string, int)

Sets opacity of the particular part of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void SetPartOpacity(string part, int opacity)
Parameters
Type Name Description
string part

The name of the particular part.

int opacity

The opacity of the particular part.

View Source

SetPartText(string, string)

Sets text to the particular part of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public virtual bool SetPartText(string part, string text)
Parameters
Type Name Description
string part

The name of the particular part.

string text

The text.

Returns
Type Description
bool
View Source

SignalEmit(string, string)

Sends a signal to the edje object of the widget.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public void SignalEmit(string emission, string source)
Parameters
Type Name Description
string emission

The signal's name.

string source

The signal's source.

View Source

UpdatePartContents(EvasObject, string)

Updates the part contents.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] protected void UpdatePartContents(EvasObject content, string part = "__default__")
Parameters
Type Name Description
EvasObject content

The content which is put into the part.

string part

The updated part.

Events

View Source

Focused

Focused will be triggered when the widget is focused.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public event EventHandler Focused
Event Type
Type Description
System.EventHandler
View Source

Unfocused

Unfocused will be triggered when the widget is unfocused.

Declaration
C#
Copy
[Obsolete("This has been deprecated in API12")] public event EventHandler Unfocused
Event Type
Type Description
System.EventHandler

Implements

Extension Methods