I need to access a list of all categories for a plugin I'm working on, I know that there is the wp_list_categories
template tag for use in themes. What would be the best way of accessing these categories for use in a plugin? Is there a specific function or is it a case of writing a specific query?
Edit: Here's a screenshot which shows the context of how I'm trying to display a list of categories: