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#Copypublic class Layout : Container, IAccessibleObject
- Inheritance
- Derived
- Implements
Constructors
Declaration
C#Copyprotected Layout()
API Level: preview
Declaration
C#Copypublic 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
Declaration
C#Copypublic override Color BackgroundColor { set; }
Property Value
Type | Description |
---|---|
Color |
Overrides
API Level: preview
Declaration
C#Copypublic EdjeObject EdjeObject { get; }
Property Value
Type | Description |
---|---|
EdjeObject |
API Level: preview
TextBlockAccessibility
Gets or sets the accessibility state of texblock (text) parts in a layout object.
Declaration
C#Copypublic bool TextBlockAccessibility { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Methods
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#Copypublic 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
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#Copypublic 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
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#Copypublic 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
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#Copypublic 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
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#Copypublic 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
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#Copypublic 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
Declaration
C#Copyprotected 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
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#Copypublic int Freeze()
Returns
Type | Description |
---|---|
Int32 | The frozen state, or 0 if the object is not frozen or on error. |
API Level: preview
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#Copypublic string GetEdjeData(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The data key. |
Returns
Type | Description |
---|---|
System.String | The data. |
API Level: preview
Declaration
C#Copypublic 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
GetVerticalTextAlignment(String)
Gets the vertical text alignment of the layout's text part.
Declaration
C#Copypublic 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
Declaration
C#Copyprotected override void OnRealized()
Overrides
API Level: preview
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#Copypublic void Resizing()
API Level: preview
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#Copypublic 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
Declaration
C#Copypublic 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
Declaration
C#Copypublic 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
Declaration
C#Copypublic 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
Declaration
C#Copypublic 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
SetTheme(String, String, String)
Sets the edje group from the elementary theme that is used as a layout.
Declaration
C#Copypublic 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
SetVerticalTextAlignment(String, Double)
Sets the vertical text alignment of the layout's text part.
Declaration
C#Copypublic 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
Thaw()
Thaws the Elementary object. If sucessives freezes were done, an equal number of thaws will be required.
Declaration
C#Copypublic int Thaw()
Returns
Type | Description |
---|---|
Int32 | The frozen state, or 0 if the object is not frozen or on error. |
API Level: preview
Events
LanguageChanged
LanguageChanged will be triggered when the program's language is changed.
Declaration
C#Copypublic event EventHandler LanguageChanged
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: preview
Declaration
C#Copypublic event EventHandler ThemeChanged
Event Type
Type | Description |
---|---|
System.EventHandler |