|
void | bindCallback (std::function< void()> func, unsigned int trigger) |
| Bind a function to one or more specific callback trigger(s). More...
|
|
template<typename T > |
void | bindCallback (void(T::*func)(), T *const classPtr, unsigned int trigger) |
| Bind a function to one or more specific callback trigger(s). More...
|
|
void | bindCallbackEx (std::function< void(const Callback &)> func, unsigned int trigger) |
| Bind a function to one or more specific callback trigger(s). More...
|
|
template<typename T > |
void | bindCallbackEx (void(T::*func)(const Callback &), T *const classPtr, unsigned int trigger) |
| Bind a function to one or more specific callback trigger(s). More...
|
|
void | bindCallback (unsigned int trigger) |
| Bind one or more specific callback trigger(s) to the parent widget. More...
|
|
void | unbindCallback (unsigned int trigger) |
| Unbind all callback function bound to the given trigger. More...
|
|
void | unbindAllCallback () |
| Unbind all callback functions bound to any callback. More...
|
|
void tgui::CallbackManager::bindCallback |
( |
std::function< void()> |
func, |
|
|
unsigned int |
trigger |
|
) |
| |
Bind a function to one or more specific callback trigger(s).
- Parameters
-
func | Free function without parameters. This can actually also take more advanced stuff like a functor or lambda function. |
trigger | In which situation(s) do you want the callback function to be called? |
Usage example:
void function() {}
widget->bindCallback(function, tgui::Widget::Focus);
template<typename T >
void tgui::CallbackManager::bindCallback |
( |
void(T::*)() |
func, |
|
|
T *const |
classPtr, |
|
|
unsigned int |
trigger |
|
) |
| |
|
inline |
Bind a function to one or more specific callback trigger(s).
- Parameters
-
func | Member function without parameters. |
classPtr | Pointer to the widget of the class. |
trigger | In which situation(s) do you want the callback function to be called? |
Usage example:
class myClass {
void function() {};
} myObj;
widget->bindCallback(&myClass::function, &myObj, tgui::Widget::Focus);
void tgui::CallbackManager::bindCallback |
( |
unsigned int |
trigger | ) |
|
Bind one or more specific callback trigger(s) to the parent widget.
- Parameters
-
trigger | In which situation(s) do you want the widget to alert its parent about a callback? |
The widget will tell its parent about the callback and you will receive the callback through the parent widget. If the callback reaches the window, then you will later have to poll the callbacks from this window.
Usage example:
widget->bindCallback(tgui::Widget::Focus);
void tgui::CallbackManager::bindCallbackEx |
( |
std::function< void(const Callback &)> |
func, |
|
|
unsigned int |
trigger |
|
) |
| |
Bind a function to one or more specific callback trigger(s).
- Parameters
-
func | Free function with a constant reference to a Callback widget as parameter. |
trigger | In which situation(s) do you want the callback function to be called? |
Usage example:
void function(const Callback& callback) {}
widget->bindCallbackEx(function, tgui::Widget::Focus);
template<typename T >
void tgui::CallbackManager::bindCallbackEx |
( |
void(T::*)(const Callback &) |
func, |
|
|
T *const |
classPtr, |
|
|
unsigned int |
trigger |
|
) |
| |
|
inline |
Bind a function to one or more specific callback trigger(s).
- Parameters
-
func | Member function with a constant reference to a Callback widget as parameter. |
classPtr | Pointer to the widget of the class. |
trigger | In which situation(s) do you want the callback function to be called? |
Usage example:
class myClass {
void function(const Callback& callback) {};
} myObj;
widget->bindCallbackEx(&myClass::function, &myObj, tgui::Widget::Focus);
void tgui::CallbackManager::unbindAllCallback |
( |
| ) |
|
Unbind all callback functions bound to any callback.
After calling this function, the widget will no longer send any callback.
void tgui::CallbackManager::unbindCallback |
( |
unsigned int |
trigger | ) |
|
Unbind all callback function bound to the given trigger.
- Parameters
-
trigger | In which situation(s) do you no longer want to retreive callback? |
The documentation for this class was generated from the following file: