efl/src/lib/efl/interfaces/efl_pack_grid.eo

89 lines
2.8 KiB
Plaintext
Raw Normal View History

import efl_gfx_types;
interface Efl.Pack.Grid (Efl.Pack.Linear)
{
[[2D containers aligned on a grid with rows and columns]]
eo_prefix: efl_pack;
methods {
pack_grid {
[[Pack object on the grid]]
params {
subobj: Efl.Gfx @owned; [[Object]]
col: int; [[Column number]]
row: int; [[Row number]]
colspan: int @optional; [[0 means 1, -1 means @.grid_columns]]
rowspan: int @optional; [[0 means 1, -1 means @.grid_rows]]
}
return: bool; [[$true on success, $false otherwise]]
}
grid_contents_get {
[[Returns all objects at a given position in this grid.]]
return: iterator<Efl.Gfx> @owned; [[Iterator to grid contents]]
params {
@in col: int; [[Column number]]
@in row: int; [[Row number]]
@in below: bool @optional; [[If $true get objects spanning over this cell.]]
}
}
grid_content_get {
[[Returns a child at a given position, see @.grid_contents_get.]]
return: Efl.Gfx; [[Child object]]
params {
@in col: int; [[Column number]]
@in row: int; [[Row number]]
}
}
@property grid_position {
[[Position and span of the $subobj in this container, may be modified to move the $subobj]]
get { return: bool; [[Returns false if item is not a child]] }
keys {
subobj: Efl.Gfx; [[Child object]]
}
values {
col: int; [[Column number]]
row: int; [[Row number]]
colspan: int; [[Column span]]
rowspan: int; [[Row span]]
}
}
@property grid_size {
[[Combines @.grid_columns and @.grid_rows]]
set {}
get {}
values {
cols: int; [[Number of columns]]
rows: int; [[Number of rows]]
}
}
@property grid_columns {
[[Gird columns property]]
set { [[Specifies limit for linear adds - if direction is horizontal]] }
get {}
values {
cols: int; [[Number of columns]]
}
}
@property grid_rows {
[[Grid rows property]]
set { [[Specifies limit for linear adds - if direction is vertical]] }
get {}
values {
rows: int; [[Number of rows]]
}
}
@property grid_direction {
[[Primary and secondary up/left/right/down directions for linear apis.
Default is horizontal and vertical.
This overrides @Efl.Ui.Direction.direction.
]]
set {}
get {}
values {
primary: Efl.Ui.Dir(Efl.Ui.Dir.horizontal); [[Primary direction]]
secondary: Efl.Ui.Dir(Efl.Ui.Dir.vertical); [[Secondary direction]]
}
}
}
}