Rework UI architecture and blendshape animation
[opengl.git] / ui.hpp
diff --git a/ui.hpp b/ui.hpp
new file mode 100644 (file)
index 0000000..e77ba11
--- /dev/null
+++ b/ui.hpp
@@ -0,0 +1,18 @@
+#include <vector>
+#include <string>
+class ControlWindowDelegate {
+       public:
+               virtual void weightChanged(int, float) = 0;
+               virtual void solveWeights(std::vector<float> &) = 0;
+               virtual void resetManipulators() = 0;
+               virtual void playbackChanged(bool playing) = 0;
+};
+
+struct ControlWindow {
+       void *window, *controller;
+};
+
+ControlWindow createControlWindow(std::vector<std::string> names, ControlWindowDelegate *delegate);
+void updateWeights(ControlWindow *cw, std::vector<float> weights);
+
+bool isPanelFocused(ControlWindow cw);