Using function pointers

Hey everyone,

I was trying to implement a GUI system and I ended up with the idea of allocating items, like buttons, to a list like Casey did with the renderer, pushing the different types of draw objects into a preallocated slot of memory.

I was wondering if it would be a good idea to store a function pointer on each GUI object, like a button, so I could go through the list of GUI items and if the user interacts with one, I just call the function pointer to initiate the pre-defined action. This feels rather like an object-orientated design, and was wondering if this is a good way of doing things?

Thanks,
Oliver
This might be what Casey would have to say on this matter: http://mollyrocket.com/861
Thanks, the video helped alot.
Here is a very good example of Immediate Mode GUI in C++:
https://github.com/ocornut/imgui