A grid of GridCell with per-row heights, per-column widths and spanning cells. A row or a column sized with zero shares the remaining space with the other automatically sized rows and columns.
Inherits from: Panel
Lua full name: lysa.ui.Grid
|
| integer | add_row () |
| | Appends a row sharing the remaining space and returns its index. More...
|
| |
| integer | add_row (height: number) |
| | Appends a row of the given height and returns its index. More...
|
| |
| integer | add_column () |
| | Appends a column sharing the remaining space and returns its index. More...
|
| |
| integer | add_column (width: number) |
| | Appends a column of the given width and returns its index. More...
|
| |
| nil | insert_row (index: integer) |
| | Inserts a row sharing the remaining space, the rows below being shifted down. More...
|
| |
| nil | insert_row (index: integer, height: number) |
| | Inserts a row of the given height, the rows below being shifted down. More...
|
| |
| nil | insert_column (index: integer) |
| | Inserts a column sharing the remaining space, the columns at its right being shifted right. More...
|
| |
| nil | insert_column (index: integer, width: number) |
| | Inserts a column of the given width, the columns at its right being shifted right. More...
|
| |
| nil | remove_row (index: integer) |
| | Removes a row and the cells it displays. More...
|
| |
| nil | remove_column (index: integer) |
| | Removes a column and the cells it displays. More...
|
| |
| nil | remove_all_rows () |
| | Removes all the rows and the cells they display, the columns are kept. More...
|
| |
| nil | clear () |
| | Removes all the rows, all the columns and all the cells. More...
|
| |
| nil | set_row_height (row: integer, height: number) |
| | Sets the height of a row, zero to share the remaining space. More...
|
| |
| number | get_row_height (row: integer) |
| | Returns the height requested for a row, or zero. More...
|
| |
| nil | set_column_width (column: integer, width: number) |
| | Sets the width of a column, zero to share the remaining space. More...
|
| |
| number | get_column_width (column: integer) |
| | Returns the width requested for a column, or zero. More...
|
| |
| number | get_row_real_height (row: integer) |
| | Returns the height currently used by a row. More...
|
| |
| number | get_column_real_width (column: integer) |
| | Returns the width currently used by a column. More...
|
| |
| number | get_row_position (row: integer) |
| | Returns the Y coordinate of the bottom border of a row. More...
|
| |
| number | get_column_position (column: integer) |
| | Returns the X coordinate of the left border of a column. More...
|
| |
| GridCell|nil | get_cell (row: integer, column: integer) |
| | Returns the cell displaying a position, spans included, or nil. More...
|
| |
| GridCell|nil | get_cell_at (x: number, y: number) |
| | Returns the cell displayed at a position of the UI, or nil. More...
|
| |
| boolean | merge (row: integer, column: integer, row_span: integer, column_span: integer) |
| | Merges a rectangle of cells into the cell at its top-left position, destroying the other ones. More...
|
| |
| nil | split (row: integer, column: integer) |
| | Removes the span of the cell displaying a position, the freed positions getting new empty cells. More...
|
| |
| nil | swap_rows (first: integer, second: integer) |
| | Exchanges two rows, with the widgets they display and their heights. More...
|
| |
| nil | move_row (from: integer, to: integer) |
| | Moves a row to another index, with the widgets it displays and its height. More...
|
| |
| nil | reorder_rows (order: integer[]) |
| | Reorders all the rows, order[1] being the row to display at the top. More...
|
| |
| nil | reset_grid_color () |
| | Draws the lines between the cells with the color of the style. More...
|
| |
| nil | set_resources (res_cell: string) |
| | Reloads the visual style: res_cell = cells. More...
|
| |
|
| integer | row_count |
| | The number of rows. (read-only)
|
| |
| integer | column_count |
| | The number of columns. (read-only)
|
| |
| GridCell[] | cells |
| | All the cells, in creation order, a spanning cell being listed once. (read-only)
|
| |
| boolean | grid_visible |
| | True if the lines between the cells are drawn.
|
| |
| lysa.Vector4 | grid_color |
| | The color of the lines drawn between the cells, overriding the color of the style.
|
| |