2016-04-11 22:08:35 -07:00
|
|
|
import efl_gfx_types;
|
|
|
|
|
2016-05-12 03:14:03 -07:00
|
|
|
interface Efl.Pack.Grid (Efl.Pack.Linear)
|
2016-04-11 22:08:35 -07:00
|
|
|
{
|
|
|
|
[[2D containers aligned on a grid with rows and columns]]
|
|
|
|
eo_prefix: efl_pack;
|
|
|
|
methods {
|
|
|
|
pack_grid {
|
2016-11-17 03:16:01 -08:00
|
|
|
[[Pack object on the grid]]
|
2016-04-11 22:08:35 -07:00
|
|
|
params {
|
2017-09-15 07:57:44 -07:00
|
|
|
subobj: Efl.Gfx @owned; [[Object]]
|
2016-11-01 06:14:19 -07:00
|
|
|
col: int; [[Column number]]
|
|
|
|
row: int; [[Row number]]
|
2016-04-19 01:43:28 -07:00
|
|
|
colspan: int @optional; [[0 means 1, -1 means @.grid_columns]]
|
|
|
|
rowspan: int @optional; [[0 means 1, -1 means @.grid_rows]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
2016-11-01 06:14:19 -07:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
2016-04-25 23:21:21 -07:00
|
|
|
grid_contents_get {
|
2016-04-19 01:43:28 -07:00
|
|
|
[[Returns all objects at a given position in this grid.]]
|
2017-09-15 07:57:44 -07:00
|
|
|
return: iterator<Efl.Gfx> @owned; [[Iterator to grid contents]]
|
2016-04-11 22:08:35 -07:00
|
|
|
params {
|
2016-11-01 06:14:19 -07:00
|
|
|
@in col: int; [[Column number]]
|
|
|
|
@in row: int; [[Row number]]
|
2016-04-19 01:43:28 -07:00
|
|
|
@in below: bool @optional; [[If $true get objects spanning over this cell.]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2016-04-25 23:21:21 -07:00
|
|
|
grid_content_get {
|
|
|
|
[[Returns a child at a given position, see @.grid_contents_get.]]
|
2016-11-01 06:14:19 -07:00
|
|
|
return: Efl.Gfx; [[Child object]]
|
2016-04-13 22:12:16 -07:00
|
|
|
params {
|
2016-11-01 06:14:19 -07:00
|
|
|
@in col: int; [[Column number]]
|
|
|
|
@in row: int; [[Row number]]
|
2016-04-13 22:12:16 -07:00
|
|
|
}
|
|
|
|
}
|
2016-04-25 23:21:21 -07:00
|
|
|
@property grid_position {
|
2016-11-01 06:14:19 -07:00
|
|
|
[[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]] }
|
2016-04-11 22:08:35 -07:00
|
|
|
keys {
|
2016-11-01 06:14:19 -07:00
|
|
|
subobj: Efl.Gfx; [[Child object]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-11-01 06:14:19 -07:00
|
|
|
col: int; [[Column number]]
|
|
|
|
row: int; [[Row number]]
|
2016-11-17 03:16:01 -08:00
|
|
|
colspan: int; [[Column span]]
|
|
|
|
rowspan: int; [[Row span]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property grid_size {
|
2016-04-19 01:43:28 -07:00
|
|
|
[[Combines @.grid_columns and @.grid_rows]]
|
2016-04-11 22:08:35 -07:00
|
|
|
set {}
|
|
|
|
get {}
|
|
|
|
values {
|
2016-11-01 06:14:19 -07:00
|
|
|
cols: int; [[Number of columns]]
|
|
|
|
rows: int; [[Number of rows]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2016-04-19 01:43:28 -07:00
|
|
|
@property grid_columns {
|
2016-11-24 06:14:20 -08:00
|
|
|
[[Gird columns property]]
|
2016-04-19 01:43:28 -07:00
|
|
|
set { [[Specifies limit for linear adds - if direction is horizontal]] }
|
2016-04-11 22:08:35 -07:00
|
|
|
get {}
|
|
|
|
values {
|
2016-11-01 06:14:19 -07:00
|
|
|
cols: int; [[Number of columns]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2016-04-19 01:43:28 -07:00
|
|
|
@property grid_rows {
|
2016-11-24 06:14:20 -08:00
|
|
|
[[Grid rows property]]
|
2016-04-19 01:43:28 -07:00
|
|
|
set { [[Specifies limit for linear adds - if direction is vertical]] }
|
2016-04-11 22:08:35 -07:00
|
|
|
get {}
|
|
|
|
values {
|
2016-11-01 06:14:19 -07:00
|
|
|
rows: int; [[Number of rows]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-09 07:36:02 -07:00
|
|
|
@property grid_direction {
|
|
|
|
[[Primary and secondary up/left/right/down directions for linear apis.
|
2016-04-19 01:43:28 -07:00
|
|
|
|
2017-08-09 07:36:02 -07:00
|
|
|
Default is horizontal and vertical.
|
|
|
|
This overrides @Efl.Ui.Direction.direction.
|
2016-04-11 22:08:35 -07:00
|
|
|
]]
|
|
|
|
set {}
|
|
|
|
get {}
|
|
|
|
values {
|
2017-08-09 07:36:02 -07:00
|
|
|
primary: Efl.Ui.Dir(Efl.Ui.Dir.horizontal); [[Primary direction]]
|
|
|
|
secondary: Efl.Ui.Dir(Efl.Ui.Dir.vertical); [[Secondary direction]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|