aboutsummaryrefslogtreecommitdiffstats
path: root/attr/ondraw.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'attr/ondraw.hpp')
-rw-r--r--attr/ondraw.hpp21
1 files changed, 21 insertions, 0 deletions
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
+