26 #ifndef TGUI_CALLBACK_HPP 27 #define TGUI_CALLBACK_HPP 33 #include <TGUI/Global.hpp> 34 #include <TGUI/SharedWidgetPtr.hpp> 71 sf::Vector2f position;
98 void bindCallback(std::function<
void()> func,
unsigned int trigger);
117 template <
typename T>
118 void bindCallback(
void (T::*func)(), T*
const classPtr,
unsigned int trigger)
120 mapCallback(std::bind(func, classPtr), trigger);
137 void bindCallbackEx(std::function<
void(
const Callback&)> func,
unsigned int trigger);
156 template <
typename T>
159 mapCallback(std::bind(func, classPtr, std::ref(m_Callback)), trigger);
177 void bindCallback(
unsigned int trigger);
186 void unbindCallback(
unsigned int trigger);
195 void unbindAllCallback();
204 void mapCallback(
const std::function<
void()>&
function,
unsigned int trigger);
210 std::map<unsigned int, std::list<std::function<void()>>> m_CallbackFunctions;
227 #endif // TGUI_CALLBACK_HPP Namespace that contains all TGUI functions and classes.
Definition: AnimatedPicture.hpp:33
WidgetTypes
A list of all widget types.
Definition: Global.hpp:80
void bindCallbackEx(void(T::*func)(const Callback &), T *const classPtr, unsigned int trigger)
Bind a function to one or more specific callback trigger(s).
Definition: Callback.hpp:157
Definition: Callback.hpp:45
Definition: Callback.hpp:80
void bindCallback(void(T::*func)(), T *const classPtr, unsigned int trigger)
Bind a function to one or more specific callback trigger(s).
Definition: Callback.hpp:118