diff UI code/buttonPanel.h @ 0:a223551fdc1f

First commit - copy from tweakathlon.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 10 Oct 2014 11:46:42 +0100
parents
children 2bd658b44c2d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UI code/buttonPanel.h	Fri Oct 10 11:46:42 2014 +0100
@@ -0,0 +1,50 @@
+//
+//  buttonPanel.h
+//  tweakathlon
+//
+//  Created by Robert Tubb on 11/02/2014.
+//
+//
+
+#ifndef __tweakathlon__buttonPanel__
+#define __tweakathlon__buttonPanel__
+
+#include <iostream>
+#include <iostream>
+#include "UIElementContainer.h"
+#include <iostream>
+#include "globalVariables.h"
+#include "ofMain.h"
+#include "UIElement.h"
+#include "boost/bind.hpp"
+#include "boost/function.hpp"
+#include "timeController.h"
+#include "ButtronSlider.h"
+#include "ButtronXY.h"
+#include "Buttron.h"
+// a row of buttons, spaced out nicely
+
+class ButtonPanel : public UIElementContainer{
+    
+public:
+    ButtonPanel(float ax,
+                float ay,
+                float awidth,
+                float aheight,
+                const UIProps& aprops,
+                vector<controllerType> elemList);
+    ButtonPanel(float ax,
+                float ay,
+                float awidth,
+                float aheight,
+                const UIProps& aprops);
+    vector<UIElement*>  generateControls(vector<controllerType> elemList);
+    
+    void addButton(Buttron* aButton){
+        subElements.push_back(aButton);
+        autoArrangeRow();
+    }
+
+};
+
+#endif /* defined(__tweakathlon__buttonPanel__) */