Class Efl.Ui.Table
Widget container that arranges its elements in a grid. The amount of rows and columns can be controlled with Efl.IPackTable.TableRows and Efl.IPackTable.TableColumns, and elements can be manually positioned with Efl.IPackTable.PackTable(Efl.Gfx.IEntity, System.Int32, System.Int32, System.Int32, System.Int32). Additionally, a fill direction can be defined with Efl.Ui.ILayoutOrientable.Orientation and elements added with Efl.IPack.Pack(Efl.Gfx.IEntity). Elements are then added following this direction (horizontal or vertical) and when the amount of columns or rows has been reached, a step is taken in the orthogonal direction. In this second case there is no need to define both the amount of columns and rows, as the table will expand as needed. The default fill direction is Efl.Ui.LayoutOrientation.Horizontal.
Inheritance
Syntax
public class Table : Widget, IPointer, IColor, IEntity, IHint, IMapping, IStack, IInterface, IPart, IPropertyBind, IView, IObject, IPackLayout, IPackTable, IPack, IContainer, ILayoutOrientable, IWrapper, IDisposable
Constructors
Table(EoWrapper.ConstructingHandle)
Subclasses should override this constructor if they are expected to be instantiated from native code. Do not call this constructor directly.
Declaration
protected Table(EoWrapper.ConstructingHandle ch)
Parameters
Type | Name | Description |
---|---|---|
Efl.Eo.EoWrapper.ConstructingHandle | ch | Tag struct storing the native handle of the object being constructed. |
Table(Object, String)
Initializes a new instance of the Efl.Ui.Table class.
Declaration
public Table(Object parent, string style = null)
Parameters
Type | Name | Description |
---|---|---|
Efl.Object | parent | Parent instance. |
System.String | style | The widget style to use. See Efl.Ui.Widget.SetStyle(System.String) |
Table(IntPtr, Object)
Initializes a new instance of the Efl.Ui.Table class. Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.
Declaration
protected Table(IntPtr baseKlass, Object parent)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | baseKlass | The pointer to the base native Eo class. |
Efl.Object | parent | The Efl.Object parent of this instance. |
Properties
Homogeneous
Control homogeneous mode. This will enable the homogeneous mode where cells are of the same weight and of the same min size which is determined by maximum min size of cells.
Declaration
public (bool, bool)Homogeneous { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<System.Boolean, System.Boolean> |
|
Orientation
Control the direction of a given widget. Use this function to change how your widget is to be disposed: vertically or horizontally or inverted vertically or inverted horizontally.
Mirroring as defined in Efl.Ui.II18n (object still in beta stage) can invert the horizontal
direction: it is ltr
by default, but becomes rtl
if the object is mirrored.
Declaration
public LayoutOrientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Efl.Ui.LayoutOrientation | Direction of the widget. |
TableColumns
Specifies the amount of columns the table will have when the fill direction is horizontal. If it is vertical, the amount of columns depends on the amount of cells added and Efl.IPackTable.TableRows.
Declaration
public int TableColumns { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Amount of columns. |
TableRows
Specifies the amount of rows the table will have when the fill direction is vertical. If it is horizontal, the amount of rows depends on the amount of cells added and Efl.IPackTable.TableColumns.
Declaration
public int TableRows { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Amount of rows. |
TableSize
Combines Efl.IPackTable.TableColumns and Efl.IPackTable.TableRows
Declaration
public (int, int)TableSize { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<System.Int32, System.Int32> | Number of columns |
Methods
ClearPack()
Removes all packed sub-objects and unreferences them.
Declaration
public virtual bool ClearPack()
Returns
Type | Description |
---|---|
System.Boolean |
|
ContentCount()
Returns the number of contained sub-objects. (Since EFL 1.22)
Declaration
public virtual int ContentCount()
Returns
Type | Description |
---|---|
System.Int32 | Number of sub-objects. |
GetHomogeneous(out Boolean, out Boolean)
Control homogeneous mode. This will enable the homogeneous mode where cells are of the same weight and of the same min size which is determined by maximum min size of cells.
Declaration
public virtual void GetHomogeneous(out bool homogeneoush, out bool homogeneousv)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | homogeneoush |
|
System.Boolean | homogeneousv |
|
GetOrientation()
Control the direction of a given widget. Use this function to change how your widget is to be disposed: vertically or horizontally or inverted vertically or inverted horizontally.
Mirroring as defined in Efl.Ui.II18n (object still in beta stage) can invert the horizontal
direction: it is ltr
by default, but becomes rtl
if the object is mirrored.
Declaration
public virtual LayoutOrientation GetOrientation()
Returns
Type | Description |
---|---|
Efl.Ui.LayoutOrientation | Direction of the widget. |
GetTableCellColumn(IEntity, out Int32, out Int32)
column of the subobj
in this container.
Declaration
public virtual bool GetTableCellColumn(IEntity subobj, out int col, out int colspan)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | subobj | Child object |
System.Int32 | col | Column number |
System.Int32 | colspan | Column span |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if item is not a child |
GetTableCellRow(IEntity, out Int32, out Int32)
row of the subobj
in this container.
Declaration
public virtual bool GetTableCellRow(IEntity subobj, out int row, out int rowspan)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | subobj | Child object |
System.Int32 | row | Row number |
System.Int32 | rowspan | Row span |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if item is not a child |
GetTableColumns()
Specifies the amount of columns the table will have when the fill direction is horizontal. If it is vertical, the amount of columns depends on the amount of cells added and Efl.IPackTable.TableRows.
Declaration
public virtual int GetTableColumns()
Returns
Type | Description |
---|---|
System.Int32 | Amount of columns. |
GetTableContent(Int32, Int32)
Returns a child at a given position, see Efl.IPackTable.GetTableContents(System.Int32, System.Int32, System.Boolean).
Declaration
public virtual IEntity GetTableContent(int col, int row)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | col | Column number |
System.Int32 | row | Row number |
Returns
Type | Description |
---|---|
Efl.Gfx.IEntity | Child object |
GetTableContents(Int32, Int32, Boolean)
Returns all objects at a given position in this table.
Declaration
public virtual Iterator<IEntity> GetTableContents(int col, int row, bool below)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | col | Column number |
System.Int32 | row | Row number |
System.Boolean | below | If |
Returns
Type | Description |
---|---|
Eina.Iterator<Efl.Gfx.IEntity> | Iterator to table contents |
GetTableRows()
Specifies the amount of rows the table will have when the fill direction is vertical. If it is horizontal, the amount of rows depends on the amount of cells added and Efl.IPackTable.TableColumns.
Declaration
public virtual int GetTableRows()
Returns
Type | Description |
---|---|
System.Int32 | Amount of rows. |
GetTableSize(out Int32, out Int32)
Combines Efl.IPackTable.TableColumns and Efl.IPackTable.TableRows
Declaration
public virtual void GetTableSize(out int cols, out int rows)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cols | Number of columns |
System.Int32 | rows | Number of rows |
IterateContent()
Begin iterating over this object's contents. (Since EFL 1.22)
Declaration
public virtual Iterator<IEntity> IterateContent()
Returns
Type | Description |
---|---|
Eina.Iterator<Efl.Gfx.IEntity> | Iterator on object's content. |
LayoutRequest()
Requests EFL to recalculate the layout of this object. Internal layout methods might be called asynchronously.
Declaration
public virtual void LayoutRequest()
OnContentAddedEvent(ContainerContentAddedEventArgs)
Method to raise event ContentAddedEvent.
Declaration
public void OnContentAddedEvent(ContainerContentAddedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.ContainerContentAddedEventArgs | e | Event to raise. |
OnContentRemovedEvent(ContainerContentRemovedEventArgs)
Method to raise event ContentRemovedEvent.
Declaration
public void OnContentRemovedEvent(ContainerContentRemovedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.ContainerContentRemovedEventArgs | e | Event to raise. |
OnLayoutUpdatedEvent(EventArgs)
Method to raise event LayoutUpdatedEvent.
Declaration
public void OnLayoutUpdatedEvent(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | Event to raise. |
Pack(IEntity)
Adds a sub-object to this container. Depending on the container this will either fill in the default spot, replacing any already existing element or append to the end of the container if there is no default part.
When this container is deleted, it will request deletion of the given subobj
. Use Efl.IPack.Unpack(Efl.Gfx.IEntity) to remove subobj
from this container without deleting it.
Declaration
public virtual bool Pack(IEntity subobj)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | subobj | The object to pack. |
Returns
Type | Description |
---|---|
System.Boolean |
|
PackTable(IEntity, Int32, Int32, Int32, Int32)
Pack object at a given location in the table.
When this container is deleted, it will request deletion of the given subobj
. Use Efl.IPack.Unpack(Efl.Gfx.IEntity) to remove subobj
from this container without deleting it.
Declaration
public virtual bool PackTable(IEntity subobj, int col, int row, int colspan, int rowspan)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | subobj | A child object to pack in this table. |
System.Int32 | col | Column number |
System.Int32 | row | Row number |
System.Int32 | colspan | 0 means 1, -1 means Efl.IPackTable.TableColumns |
System.Int32 | rowspan | 0 means 1, -1 means Efl.IPackTable.TableRows |
Returns
Type | Description |
---|---|
System.Boolean |
|
SetHomogeneous(Boolean, Boolean)
Control homogeneous mode. This will enable the homogeneous mode where cells are of the same weight and of the same min size which is determined by maximum min size of cells.
Declaration
public virtual void SetHomogeneous(bool homogeneoush, bool homogeneousv)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | homogeneoush |
|
System.Boolean | homogeneousv |
|
SetOrientation(LayoutOrientation)
Control the direction of a given widget. Use this function to change how your widget is to be disposed: vertically or horizontally or inverted vertically or inverted horizontally.
Mirroring as defined in Efl.Ui.II18n (object still in beta stage) can invert the horizontal
direction: it is ltr
by default, but becomes rtl
if the object is mirrored.
Declaration
public virtual void SetOrientation(LayoutOrientation dir)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.LayoutOrientation | dir | Direction of the widget. |
SetTableCellColumn(IEntity, Int32, Int32)
column of the subobj
in this container.
Declaration
public virtual void SetTableCellColumn(IEntity subobj, int col, int colspan)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | subobj | Child object |
System.Int32 | col | Column number |
System.Int32 | colspan | Column span |
SetTableCellRow(IEntity, Int32, Int32)
row of the subobj
in this container.
Declaration
public virtual void SetTableCellRow(IEntity subobj, int row, int rowspan)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | subobj | Child object |
System.Int32 | row | Row number |
System.Int32 | rowspan | Row span |
SetTableColumns(Int32)
Specifies the amount of columns the table will have when the fill direction is horizontal. If it is vertical, the amount of columns depends on the amount of cells added and Efl.IPackTable.TableRows.
Declaration
public virtual void SetTableColumns(int cols)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cols | Amount of columns. |
SetTableRows(Int32)
Specifies the amount of rows the table will have when the fill direction is vertical. If it is horizontal, the amount of rows depends on the amount of cells added and Efl.IPackTable.TableColumns.
Declaration
public virtual void SetTableRows(int rows)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rows | Amount of rows. |
SetTableSize(Int32, Int32)
Combines Efl.IPackTable.TableColumns and Efl.IPackTable.TableRows
Declaration
public virtual void SetTableSize(int cols, int rows)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cols | Number of columns |
System.Int32 | rows | Number of rows |
Unpack(IEntity)
Removes an existing sub-object from the container without deleting it.
Declaration
public virtual bool Unpack(IEntity subobj)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | subobj | The sub-object to unpack. |
Returns
Type | Description |
---|---|
System.Boolean |
|
UnpackAll()
Removes all packed sub-objects without unreferencing them. Use with caution.
Declaration
public virtual bool UnpackAll()
Returns
Type | Description |
---|---|
System.Boolean |
|
UpdateLayout()
Implementation of this container's layout algorithm. EFL will call this function whenever the contents of this container need to be re-laid out on the canvas.
This can be overridden to implement custom layout behaviors.
Declaration
protected virtual void UpdateLayout()
Events
ContentAddedEvent
Sent after a new sub-object was added. (Since EFL 1.22)
Declaration
public event EventHandler<ContainerContentAddedEventArgs> ContentAddedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.ContainerContentAddedEventArgs> |
ContentRemovedEvent
Sent after a sub-object was removed, before unref. (Since EFL 1.22)
Declaration
public event EventHandler<ContainerContentRemovedEventArgs> ContentRemovedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.ContainerContentRemovedEventArgs> |
LayoutUpdatedEvent
Sent after the layout was updated.
Declaration
public event EventHandler LayoutUpdatedEvent
Event Type
Type | Description |
---|---|
System.EventHandler |