NkLayoutRowTemplate

A more powerful way to lay out rows is to use the template mechanism available. By calling NkLayoutRowTemplateBegin(), it's possible to set the template for all rows that follow. Column sizing is defined using one of three template functions. Firstly, NkLayoutRowTemplatePushStatic() specifies that widgets in this column should be of a fixed width. NkLayoutRowTemplatePushDynamic(), like the definition of dynamic allocation without templates, will split the row width among dynamic columns (this could be as little as 0 if no space is available). Finally, there's an additional call to the NkLayoutRowTemplatePushVariable()function; this will ensure that widgets get their minimum required space and will take up any extra space ...

Get Hands-On GUI Application Development in Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.