Class Layout

Definition

Namespace:
ElmSharp
Assembly:
ElmSharp.dll
API Level:
preview

This is a container widget that takes a standard edje design file and wraps it very thinly in a widget. Inherits Widget.

C#
Copy
public class Layout : Container, IAccessibleObject
Inheritance
Derived
Implements

Constructors

View Source

Layout()

Creates and initializes a new instance of the Layout class.

Declaration
C#
Copy
protected Layout()
API Level: preview
View Source

Layout(EvasObject)

Creates and initializes a new instance of the Layout class.

Declaration
C#
Copy
public Layout(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

The parent is a given container, which will be attached by the layout as a child. It's EvasObject type.

API Level: preview

Properties

View Source

BackgroundColor

Sets the background color of a layout.

Declaration
C#
Copy
public override Color BackgroundColor { set; }
Property Value
Type Description
Color
Overrides
API Level: preview
View Source

EdjeObject

Gets the edje layout.

Declaration
C#
Copy
public EdjeObject EdjeObject { get; }
Property Value
Type Description
EdjeObject
API Level: preview
View Source

TextBlockAccessibility

Gets or sets the accessibility state of texblock (text) parts in a layout object.

Declaration
C#
Copy
public bool TextBlockAccessibility { get; set; }
Property Value
Type Description
Boolean
API Level: preview

Methods

View Source

BoxAppend(String, EvasObject)

Appends a child to the layout box part. Once the object is appended, it will become a child of the layout. Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.

Declaration
C#
Copy
public bool BoxAppend(string part, EvasObject child)
Parameters
Type Name Description
System.String part

The part.

EvasObject child

The object to append.

Returns
Type Description
Boolean

Success is true.

Remarks

This will only work if the layout edc have box part.

API Level: preview
View Source

BoxInsertAt(String, EvasObject, UInt32)

Inserts a child to the layout box part at a given position. Once the object is inserted, it will become a child of the layout. Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.

Declaration
C#
Copy
public bool BoxInsertAt(string part, EvasObject child, uint position)
Parameters
Type Name Description
System.String part

The part.

EvasObject child

The child object to insert into the box.

System.UInt32 position

The numeric position >=0 to insert the child.

Returns
Type Description
Boolean

Success if true.

Remarks

This will only work if the layout edc have box part.

API Level: preview
View Source

BoxInsertBefore(String, EvasObject, EvasObject)

Inserts a child to the layout box part before a reference object. Once the object is inserted, it will become child of the layout. Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.

Declaration
C#
Copy
public bool BoxInsertBefore(string part, EvasObject child, EvasObject reference)
Parameters
Type Name Description
System.String part

The part.

EvasObject child

The child object to insert into the box.

EvasObject reference

Another reference object to insert before the box.

Returns
Type Description
Boolean

Success is true.

Remarks

This will only work if the layout edc have box part.

API Level: preview
View Source

BoxPrepend(String, EvasObject)

Prepends a child to the layout box part. Once the object is prepended, it will become a child of the layout. Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.

Declaration
C#
Copy
public bool BoxPrepend(string part, EvasObject child)
Parameters
Type Name Description
System.String part

The part.

EvasObject child

The object to prepend.

Returns
Type Description
Boolean

Success is true.

Remarks

This will only work if the layout edc have box part.

API Level: preview
View Source

BoxRemove(String, EvasObject)

Removes a child from the given part box. The object will be removed from the box part and its lifetime will not be handled by the layout anymore.

Declaration
C#
Copy
public bool BoxRemove(string part, EvasObject child)
Parameters
Type Name Description
System.String part

The part.

EvasObject child

The object to remove.

Returns
Type Description
Boolean

Success if true

Remarks

This will only work if the layout edc have box part.

API Level: preview
View Source

BoxRemoveAll(String, Boolean)

Removes all the children from the given part box. The objects will be removed from the box part and their lifetime will not be handled by the layout anymore.

Declaration
C#
Copy
public bool BoxRemoveAll(string part, bool clear)
Parameters
Type Name Description
System.String part

The part.

Boolean clear

If true, then all the objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.

Returns
Type Description
Boolean

Success if true.

Remarks

This will only work if the layout edc have box part.

API Level: preview
View Source

CreateHandle(EvasObject)

Sets the content at a part of a given container widget.

Declaration
C#
Copy
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

The parent is a given container which will be attached by the layout as a child. It's EvasObject type.

Returns
Type Description
System.IntPtr

The new object, otherwise null if it cannot be created.

Overrides
API Level: preview
View Source

Freeze()

Freezes the Elementary layout object. This function puts all the changes on hold. Successive freezes will nest, requiring an equal number of thaws.

Declaration
C#
Copy
public int Freeze()
Returns
Type Description
Int32

The frozen state, or 0 if the object is not frozen or on error.

API Level: preview
View Source

GetEdjeData(String)

Gets the edje data from the given layout. This function fetches the data specified inside the edje theme of this layout. This function returns null if the data is not found.

Declaration
C#
Copy
public string GetEdjeData(string key)
Parameters
Type Name Description
System.String key

The data key.

Returns
Type Description
System.String

The data.

API Level: preview
View Source

GetPartText(String)

Gets the text set in the given part.

Declaration
C#
Copy
public override string GetPartText(string part)
Parameters
Type Name Description
System.String part

The text part to retrieve the text off.

Returns
Type Description
System.String
Overrides
API Level: preview
View Source

GetVerticalTextAlignment(String)

Gets the vertical text alignment of the layout's text part.

Declaration
C#
Copy
public virtual double GetVerticalTextAlignment(string part)
Parameters
Type Name Description
System.String part
Returns
Type Description
System.Double
Remarks

API, elm_layout_text_valign_get, is an internal API only in Tizen. Available since Tizen_4.0.

API Level: preview
View Source

OnRealized()

The callback of the Realized Event.

Declaration
C#
Copy
protected override void OnRealized()
Overrides
API Level: preview
View Source

Resizing()

Eval sizing. Manually forces a sizing re-evaluation. This is useful when the minimum size required by the edje theme of this layout has changed. The change on the minimum size required by the edje theme is not immediately reported to the elementary layout, so one needs to call this function in order to tell the widget (layout) that it needs to reevaluate its own size. The minimum size of the theme is calculated based on the minimum size of parts, the size of elements inside containers like the box and table, etc. All of this can change due to state changes, and that's when this function should be called.

Declaration
C#
Copy
public void Resizing()
API Level: preview
View Source

Resizing(Boolean, Boolean)

Requests sizing re-evaluation, restricted to the current width and/or height. Useful mostly when there are TEXTBLOCK parts defining the height of an object and nothing else, restricting it to a minimum width. Calling this function will restrict minimum size in the Edje calculation to whatever size the layout has at the moment.

Declaration
C#
Copy
public void Resizing(bool width, bool height)
Parameters
Type Name Description
Boolean width

Restrict minimum size of the current width.

Boolean height

Restrict minimum size of the current height.

API Level: preview
View Source

SetFile(String, String)

Sets the file that is used as a layout.

Declaration
C#
Copy
public void SetFile(string file, string group)
Parameters
Type Name Description
System.String file

The path to the file (edje) that is used as a layout.

System.String group

The group that the layout belongs to in the edje file.

API Level: preview
View Source

SetPartContent(String, EvasObject)

Sets the layout content.

Declaration
C#
Copy
public override bool SetPartContent(string part, EvasObject content)
Parameters
Type Name Description
System.String part

The swallow part name in the edje file.

EvasObject content

The child that will be added in this layout object.

Returns
Type Description
Boolean

TRUE on success, FALSE otherwise.

Overrides
API Level: preview
View Source

SetPartContent(String, EvasObject, Boolean)

Sets the layout content.

Declaration
C#
Copy
public override bool SetPartContent(string part, EvasObject content, bool preserveOldContent)
Parameters
Type Name Description
System.String part

The name of a particular part.

EvasObject content

The content.

Boolean preserveOldContent

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

Returns
Type Description
Boolean

TRUE on success, FALSE otherwise.

Overrides
API Level: preview
View Source

SetPartText(String, String)

Sets the text set in the given part.

Declaration
C#
Copy
public override bool SetPartText(string part, string text)
Parameters
Type Name Description
System.String part

The text part to retrieve the text off.

System.String text

The text to set.

Returns
Type Description
Boolean
Overrides
API Level: preview
View Source

SetTheme(String, String, String)

Sets the edje group from the elementary theme that is used as a layout.

Declaration
C#
Copy
public void SetTheme(string klass, string group, string style)
Parameters
Type Name Description
System.String klass

The class of the group.

System.String group

The group.

System.String style

The style to use.

API Level: preview
View Source

SetVerticalTextAlignment(String, Double)

Sets the vertical text alignment of the layout's text part.

Declaration
C#
Copy
public virtual void SetVerticalTextAlignment(string part, double valign)
Parameters
Type Name Description
System.String part
System.Double valign
Remarks

API, elm_layout_text_valign_set, is an internal API only in Tizen. Available since Tizen_4.0.

API Level: preview
View Source

Thaw()

Thaws the Elementary object. If sucessives freezes were done, an equal number of thaws will be required.

Declaration
C#
Copy
public int Thaw()
Returns
Type Description
Int32

The frozen state, or 0 if the object is not frozen or on error.

API Level: preview

Events

View Source

LanguageChanged

LanguageChanged will be triggered when the program's language is changed.

Declaration
C#
Copy
public event EventHandler LanguageChanged
Event Type
Type Description
System.EventHandler
API Level: preview
View Source

ThemeChanged

ThemeChanged will be triggered when the theme is changed.

Declaration
C#
Copy
public event EventHandler ThemeChanged
Event Type
Type Description
System.EventHandler
API Level: preview

Implements

Extension Methods