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.
public class Layout : Container, IAccessibleObject
- Inheritance
- Derived
- Implements
Constructors
View SourceLayout()
Creates and initializes a new instance of the Layout class.
Declaration
protected Layout()
API Level: preview
View SourceLayout(EvasObject)
Creates and initializes a new instance of the Layout class.
Declaration
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 SourceBackgroundColor
Sets the background color of a layout.
Declaration
public override Color BackgroundColor { set; }
Property Value
Type | Description |
---|---|
Color |
Overrides
API Level: preview
View SourceEdjeObject
Gets the edje layout.
Declaration
public EdjeObject EdjeObject { get; }
Property Value
Type | Description |
---|---|
EdjeObject |
API Level: preview
View SourceTextBlockAccessibility
Gets or sets the accessibility state of texblock (text) parts in a layout object.
Declaration
public bool TextBlockAccessibility { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Methods
View SourceBoxAppend(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
public bool BoxAppend(string part, EvasObject child)
Parameters
Type | Name | Description |
---|---|---|
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 SourceBoxInsertAt(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
public bool BoxInsertAt(string part, EvasObject child, uint position)
Parameters
Type | Name | Description |
---|---|---|
String | part | The part. |
EvasObject | child | The child object to insert into the box. |
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 SourceBoxInsertBefore(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
public bool BoxInsertBefore(string part, EvasObject child, EvasObject reference)
Parameters
Type | Name | Description |
---|---|---|
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 SourceBoxPrepend(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
public bool BoxPrepend(string part, EvasObject child)
Parameters
Type | Name | Description |
---|---|---|
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 SourceBoxRemove(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
public bool BoxRemove(string part, EvasObject child)
Parameters
Type | Name | Description |
---|---|---|
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 SourceBoxRemoveAll(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
public bool BoxRemoveAll(string part, bool clear)
Parameters
Type | Name | Description |
---|---|---|
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 SourceCreateHandle(EvasObject)
Sets the content at a part of a given container widget.
Declaration
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 |
---|---|
IntPtr | The new object, otherwise null if it cannot be created. |
Overrides
API Level: preview
View SourceFreeze()
Freezes the Elementary layout object. This function puts all the changes on hold. Successive freezes will nest, requiring an equal number of thaws.
Declaration
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 SourceGetEdjeData(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
public string GetEdjeData(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The data key. |
Returns
Type | Description |
---|---|
String | The data. |
API Level: preview
View SourceGetPartText(String)
Gets the text set in the given part.
Declaration
public override string GetPartText(string part)
Parameters
Type | Name | Description |
---|---|---|
String | part | The text part to retrieve the text off. |
Returns
Type | Description |
---|---|
String |
Overrides
API Level: preview
View SourceGetVerticalTextAlignment(String)
Gets the vertical text alignment of the layout's text part.
Declaration
public virtual double GetVerticalTextAlignment(string part)
Parameters
Type | Name | Description |
---|---|---|
String | part |
Returns
Type | Description |
---|---|
Double |
Remarks
API, elm_layout_text_valign_get, is an internal API only in Tizen. Available since Tizen_4.0.
API Level: preview
View SourceOnRealized()
The callback of the Realized Event.
Declaration
protected override void OnRealized()
Overrides
API Level: preview
View SourceResizing()
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
public void Resizing()
API Level: preview
View SourceResizing(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
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 SourceSetFile(String, String)
Sets the file that is used as a layout.
Declaration
public void SetFile(string file, string group)
Parameters
Type | Name | Description |
---|---|---|
String | file | The path to the file (edje) that is used as a layout. |
String | group | The group that the layout belongs to in the edje file. |
API Level: preview
View SourceSetPartContent(String, EvasObject)
Sets the layout content.
Declaration
public override bool SetPartContent(string part, EvasObject content)
Parameters
Type | Name | Description |
---|---|---|
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 SourceSetPartContent(String, EvasObject, Boolean)
Sets the layout content.
Declaration
public override bool SetPartContent(string part, EvasObject content, bool preserveOldContent)
Parameters
Type | Name | Description |
---|---|---|
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 SourceSetPartText(String, String)
Sets the text set in the given part.
Declaration
public override bool SetPartText(string part, string text)
Parameters
Type | Name | Description |
---|---|---|
String | part | The text part to retrieve the text off. |
String | text | The text to set. |
Returns
Type | Description |
---|---|
Boolean |
Overrides
API Level: preview
View SourceSetTheme(String, String, String)
Sets the edje group from the elementary theme that is used as a layout.
Declaration
public void SetTheme(string klass, string group, string style)
Parameters
Type | Name | Description |
---|---|---|
String | klass | The class of the group. |
String | group | The group. |
String | style | The style to use. |
API Level: preview
View SourceSetVerticalTextAlignment(String, Double)
Sets the vertical text alignment of the layout's text part.
Declaration
public virtual void SetVerticalTextAlignment(string part, double valign)
Parameters
Type | Name | Description |
---|---|---|
String | part | |
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 SourceThaw()
Thaws the Elementary object. If sucessives freezes were done, an equal number of thaws will be required.
Declaration
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 SourceLanguageChanged
LanguageChanged will be triggered when the program's language is changed.
Declaration
public event EventHandler LanguageChanged
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceThemeChanged
ThemeChanged will be triggered when the theme is changed.
Declaration
public event EventHandler ThemeChanged
Event Type
Type | Description |
---|---|
EventHandler |