28 bool calledWhenReady_;
29 std::function<void()> func_{};
44 std::function<
void()> toWrap,
45 std::function<
void(ThrottledFunction&&)> callback,
46 bool callWhenReady =
false);
Definition: throttle.hpp:10
~ThrottledFunction()
Definition: throttle.cpp:20
ThrottledFunction(ThrottledFunction const &)=delete
ThrottledFunction & operator=(ThrottledFunction const &)=delete
void operator()()
Calls the function if it is valid.
Definition: throttle.cpp:45
ThrottledFunction()
Definition: throttle.cpp:8
bool valid() const
Returns true if this object contains a valid function.
Definition: throttle.cpp:51
Definition: file_dialog.hpp:6
void throttle(int milliseconds, std::function< void()> toWrap, std::function< void(ThrottledFunction &&)> callback, bool callWhenReady=false)
Creates a function that can be used to call a function at most once during the specified interval.
Definition: throttle.cpp:56