Method
IpuzNonogramget_group
Declaration [src]
const gchar*
ipuz_nonogram_get_group (
IpuzNonogram* self,
guint index
)
Description [src]
Returns the group at index
.
This function can be used with ipuz_nonogram_get_n_groups()
to iterate through all the groups in a puzzle. As an example, the
following code snippet will print out all the groups in a color
nonogram as well as their color.
for (guint i = 0; i < ipuz_nonogram_get_n_groups (nonogram); i++)
{
const gchar *group;
IpuzStyle *style;
group = ipuz_nonogram_get_group (nonogram, i);
style = ipuz_puzzle_get_style (IPUZ_PUZZLE (nonogram), group);
g_assert (style); // guard against invalid nonogram files
g_print ("group %s has a color of %s\n", group,
ipuz_style_get_bg_color (style));
}