NkLayoutRow

The easiest approach to layout is to start a new row using NkLayoutRowDynamic() or NkLayoutRowStatic(). Both functions specify the number of cells in the row. The difference between the two is that the dynamic row allocation will split all of the space between the cells and resize them all as the window or container changes size. With a static arrangement, the sizes of all cells will remain the same irrespective of the container size. Widgets added after a row is started will append to the row, until it's full; if further widgets are appended, then a new row will be created for the new widgets. This continues until NkLayoutRowEnd() is called, or a different row configuration is started using one of these alternative functions.

Some added control is made possible by using the NkLayoutRowBegin() function to start a row; this specifies the row height and number of columns, but not how the columns will be sized. Cells are added to the row before widgets are appended by calling NkLayoutRowPush(); this sets a size or ratio for the next cell and should be followed by the declaration of a widget to fill the cell. This type of row should also conclude by calling NkLayoutRowEnd().

Lastly, it's possible to call NkLayoutRow directly to set up the parameters for the following rows, static or dynamic sizing, and specified height or ratio with a specified number of columns.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.209.201