Given a pointer to a ribbon panel returns its index.
Returns -1 if there is no such panel in the category.