annotate UI code/buttonPanel.h @ 52:89944ab3e129 tip

fix oF linker errors ios8
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Tue, 03 Feb 2015 13:18:23 +0000
parents 2bd658b44c2d
children
rev   line source
rt300@0 1 //
rt300@0 2 // buttonPanel.h
rt300@0 3 // tweakathlon
rt300@0 4 //
rt300@0 5 // Created by Robert Tubb on 11/02/2014.
rt300@0 6 //
rt300@0 7 //
rt300@0 8
rt300@0 9 #ifndef __tweakathlon__buttonPanel__
rt300@0 10 #define __tweakathlon__buttonPanel__
rt300@0 11
rt300@0 12 #include <iostream>
rt300@0 13 #include <iostream>
rt300@0 14 #include "UIElementContainer.h"
rt300@0 15 #include <iostream>
rt300@0 16 #include "globalVariables.h"
rt300@0 17 #include "ofMain.h"
rt300@0 18 #include "UIElement.h"
rt300@0 19 #include "boost/bind.hpp"
rt300@0 20 #include "boost/function.hpp"
rt300@0 21 #include "timeController.h"
rt300@0 22 #include "ButtronSlider.h"
rt300@0 23 #include "ButtronXY.h"
rt300@0 24 #include "Buttron.h"
rt300@0 25 // a row of buttons, spaced out nicely
rt300@0 26
rt300@0 27 class ButtonPanel : public UIElementContainer{
rt300@0 28
rt300@0 29 public:
rt300@0 30 ButtonPanel(float ax,
rt300@0 31 float ay,
rt300@0 32 float awidth,
rt300@0 33 float aheight,
rt300@0 34 const UIProps& aprops,
rt300@0 35 vector<controllerType> elemList);
rt300@0 36 ButtonPanel(float ax,
rt300@0 37 float ay,
rt300@0 38 float awidth,
rt300@0 39 float aheight,
rt300@0 40 const UIProps& aprops);
rt300@0 41 vector<UIElement*> generateControls(vector<controllerType> elemList);
rt300@0 42
rt300@0 43 void addButton(Buttron* aButton){
rt300@0 44 subElements.push_back(aButton);
rt300@0 45 autoArrangeRow();
rt300@0 46 }
rt300@42 47 void turnAllButtonsOff(){
rt300@0 48
rt300@42 49 for( auto eit = subElements.begin(); eit < subElements.end(); eit++){
rt300@42 50
rt300@42 51 (*eit)->setOn(false);
rt300@42 52
rt300@42 53 }
rt300@42 54
rt300@42 55 }
rt300@0 56 };
rt300@0 57
rt300@0 58 #endif /* defined(__tweakathlon__buttonPanel__) */