rt300@0: // rt300@0: // buttonPanel.h rt300@0: // tweakathlon rt300@0: // rt300@0: // Created by Robert Tubb on 11/02/2014. rt300@0: // rt300@0: // rt300@0: rt300@0: #ifndef __tweakathlon__buttonPanel__ rt300@0: #define __tweakathlon__buttonPanel__ rt300@0: rt300@0: #include rt300@0: #include rt300@0: #include "UIElementContainer.h" rt300@0: #include rt300@0: #include "globalVariables.h" rt300@0: #include "ofMain.h" rt300@0: #include "UIElement.h" rt300@0: #include "boost/bind.hpp" rt300@0: #include "boost/function.hpp" rt300@0: #include "timeController.h" rt300@0: #include "ButtronSlider.h" rt300@0: #include "ButtronXY.h" rt300@0: #include "Buttron.h" rt300@0: // a row of buttons, spaced out nicely rt300@0: rt300@0: class ButtonPanel : public UIElementContainer{ rt300@0: rt300@0: public: rt300@0: ButtonPanel(float ax, rt300@0: float ay, rt300@0: float awidth, rt300@0: float aheight, rt300@0: const UIProps& aprops, rt300@0: vector elemList); rt300@0: ButtonPanel(float ax, rt300@0: float ay, rt300@0: float awidth, rt300@0: float aheight, rt300@0: const UIProps& aprops); rt300@0: vector generateControls(vector elemList); rt300@0: rt300@0: void addButton(Buttron* aButton){ rt300@0: subElements.push_back(aButton); rt300@0: autoArrangeRow(); rt300@0: } rt300@42: void turnAllButtonsOff(){ rt300@0: rt300@42: for( auto eit = subElements.begin(); eit < subElements.end(); eit++){ rt300@42: rt300@42: (*eit)->setOn(false); rt300@42: rt300@42: } rt300@42: rt300@42: } rt300@0: }; rt300@0: rt300@0: #endif /* defined(__tweakathlon__buttonPanel__) */