/* This function creates a new icon button group, allocating required memory and properly initializing the object. If there is not enough memory, the function returns NULL. The icon button group will keep a reference count for its members, and will be automatically destroyed when the last member is destroyed. */
struct wtk_icon_group* wtk_icon_group_create(void)
/* This function creates a new icon button group, allocating required memory and properly initializing the object. If there is not enough memory, the function returns NULL. The icon button group will keep a reference count for its members, and will be automatically destroyed when the last member is destroyed. */
struct wtk_icon_group* wtk_icon_group_create(void)
{
	struct wtk_icon_group *icon_group
		= membag_alloc(sizeof(struct wtk_icon_group));
	if (!icon_group) {
		goto outofmem_icon_group;
	}
	icon_group->num_references = 0;
	icon_group->selected = NULL;
	return icon_group;
outofmem_icon_group:
	return NULL;
}