From 00f84e3b984904e36cbee502a470003ecd7d09cf Mon Sep 17 00:00:00 2001 From: Clyne Sullivan <clyne@bitgloo.com> Date: Sat, 10 Aug 2024 10:46:54 -0400 Subject: initial upload --- attr/ondraw.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 attr/ondraw.hpp (limited to 'attr/ondraw.hpp') diff --git a/attr/ondraw.hpp b/attr/ondraw.hpp new file mode 100644 index 0000000..d0932ef --- /dev/null +++ b/attr/ondraw.hpp @@ -0,0 +1,21 @@ +#ifndef MBUOY_ATTR_ONDRAW_HPP +#define MBUOY_ATTR_ONDRAW_HPP + +#include "position.hpp" +#include "dimensions.hpp" + +namespace mbuoy { + +struct ondraw +{ + void (*func)(const position&, const dimensions&); + + void operator()(const position& pos, const dimensions& dim) const noexcept { + func(pos, dim); + } +}; + +} // namespace mbuoy + +#endif // MBUOY_ATTR_ONDRAW_HPP + -- cgit v1.2.3