macro_rules! grid_layout_row_major_with_start {
($name:ident, $start:expr, ($x:expr, $y:expr, $width:expr, $height:expr),
($rows:expr, $cols:expr, $gap:expr), [$first:ident, $($rest:ident),+ $(,)?]) => { ... };
}Expand description
Creates a row-major grid layout with region IDs starting from a specified value.
This macro generates:
- A region ID enum with variants for each region, starting from the specified value
- Constants for each region in the grid
- A constant for the grid layout array
ยงUsage
use matrix_gui::grid_layout_row_major_with_start;
use matrix_gui::prelude::*;
grid_layout_row_major_with_start!(
Button, 5, (10, 10, 200, 100),
(2, 2, 10), [Ok, Cancel, Reset, Exit]
);