Class ItemObject
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The ItemObject is used to manage the item object.
public class ItemObject
- Inheritance
-
objectItemObject
- Derived
Constructors
View SourceItemObject(IntPtr, EvasObject)
Creates and initializes a new instance of the ItemObject class with parent object.
Declaration
protected ItemObject(IntPtr handle, EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | handle | IntPtr |
EvasObject | parent | Parent EvasObject |
ItemObject(IntPtr)
Creates and initializes a new instance of the ItemObject class.
Declaration
protected ItemObject(IntPtr handle)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | handle | IntPtr |
Properties
View SourceId
Gets the ID of the item object.
Declaration
public int Id { get; }
Property Value
Type | Description |
---|---|
int |
IsEnabled
Sets or gets whether the item object is enabled.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Parent
Gets the parent object for ItemObject.
Declaration
public EvasObject Parent { get; }
Property Value
Type | Description |
---|---|
EvasObject |
Style
Sets or gets the style of the item.
Declaration
public virtual string Style { get; set; }
Property Value
Type | Description |
---|---|
string |
TrackObject
Gets the track object of the item.
Declaration
public EvasObject TrackObject { get; }
Property Value
Type | Description |
---|---|
EvasObject |
Methods
View SourceAddSignalHandler(string, string, Func<string, string, bool>)
Adds a function for a signal emitted by the object item edje.
Declaration
public void AddSignalHandler(string emission, string source, Func<string, string, bool> func)
Parameters
Type | Name | Description |
---|---|---|
string | emission | The signal's name. |
string | source | The signal's source. |
System.Func<T1, T2, TResult><string, string, bool> | func | The function to be executed when the signal is emitted. |
Delete()
Deletes the item object.
Declaration
public void Delete()
DeletePartColor(string)
Deletes the color of the object item.
Declaration
public void DeletePartColor(string part)
Parameters
Type | Name | Description |
---|---|---|
string | part | The text part name. |
EmitSignal(string, string)
Send a signal to the edje object of the widget item.
Declaration
public void EmitSignal(string emission, string source)
Parameters
Type | Name | Description |
---|---|---|
string | emission | The signal's name. |
string | source | The signal's source. |
GetPartColor(string)
Gets the color of the object item.
Declaration
public Color GetPartColor(string part)
Parameters
Type | Name | Description |
---|---|---|
string | part | The text part name (null for the default label). |
Returns
Type | Description |
---|---|
Color | The color of an object item. |
GetPartText(string)
Gets the label of the object item.
Declaration
public string GetPartText(string part)
Parameters
Type | Name | Description |
---|---|---|
string | part | The text part name (null for the default label). |
Returns
Type | Description |
---|---|
string |
OnInvalidate()
OnInvalidate of the object item.
Declaration
protected virtual void OnInvalidate()
RemoveSignalHandler(string, string, Func<string, string, bool>)
Removes a signal-triggered function from the object item edje object.
Declaration
public void RemoveSignalHandler(string emission, string source, Func<string, string, bool> func)
Parameters
Type | Name | Description |
---|---|---|
string | emission | The signal's name. |
string | source | The signal's source. |
System.Func<T1, T2, TResult><string, string, bool> | func | The function to be executed when the signal is emitted. |
SetPartColor(string, Color)
Sets the color of the object item.
Declaration
public void SetPartColor(string part, Color color)
Parameters
Type | Name | Description |
---|---|---|
string | part | The text part name (null for the default label). |
Color | color | The color. |
SetPartContent(string, EvasObject, bool)
. Sets a content of the object item.
Declaration
public void SetPartContent(string part, EvasObject content, bool preserveOldContent)
Parameters
Type | Name | Description |
---|---|---|
string | part | The content part name (null for the default content) |
EvasObject | content | The content of the object item. |
bool | preserveOldContent | Judge whether to delete the old content. |
SetPartContent(string, EvasObject)
Sets a content of an object item and deletes the old content.
Declaration
public void SetPartContent(string part, EvasObject content)
Parameters
Type | Name | Description |
---|---|---|
string | part | The content part name (null for the default content). |
EvasObject | content | The content of the object item. |
SetPartText(string, string)
Sets the label of the object item.
Declaration
public void SetPartText(string part, string text)
Parameters
Type | Name | Description |
---|---|---|
string | part | The text part name (null for the default label). |
string | text | Text of the label. |
Events
View SourceDeleted
Deleted will be triggered when the item object is deleted.
Declaration
public event EventHandler Deleted
Event Type
Type | Description |
---|---|
System.EventHandler |
Operators
View Sourceimplicit operator IntPtr(ItemObject)
Gets the handle of the object item.
Declaration
public static implicit operator IntPtr(ItemObject obj)
Parameters
Type | Name | Description |
---|---|---|
ItemObject | obj | ItemObject |
Returns
Type | Description |
---|---|
System.IntPtr |