Unless the function you will call isn't static you have to pass a pointer to the object too. Something like this maybe. This code may not compile but you probably get the idea. Not sure about the member function syntax.
class ButtonCallbackListener
{
public:
};
class Button
{
public:
Button(ButtonCallbackListener* object, void (ButtonCallbackListener::*functionPtr)());
void onPressed() { mObject->(*mFunctionPtr)(); }
private:
ButtonCallbackListener* mObject;
void (ButtonCallbackListener::*mFunctionPtr)();
};
class MyClass : public ButtonCallbackListener
{
public:
MyClass() { mButton = new Button(this, &MyClass::callback); }
void callback() {}
private:
Button* mButton;
};