Esempio n. 1
0
void ofxUIRadio::init(string _name, vector<string> names, int _orientation, float w, float h, float x, float y, int _size)
{
    rect = new ofxUIRectangle(x,y,w,h);
    name = string(_name);
    kind = OFX_UI_WIDGET_RADIO;
    
    draw_back = false;
    orientation = _orientation;
    
    paddedRect = new ofxUIRectangle(-padding, -padding, w+padding*2.0, h+padding*2.0);
    paddedRect->setParent(rect);
    
    if(names.size() == 0)
    {
        setEmbedded(true);
    }
    else
    {
        for(unsigned int i = 0; i < names.size(); i++)
        {
            string tname = names[i];
            ofxUIToggle *toggle = new ofxUIToggle(0,0, w, h, false, tname, _size);
            toggle->setEmbedded(true);
            toggles.push_back(toggle);
        }
    }
    
    active = NULL;
    allowMultiple = false;
}
Esempio n. 2
0
	void CodeLineEdit::setShowEditorButton(bool showEditorButton)
	{
		mShowEditorButton = showEditorButton;
		mOpenEditor->setEnabled(mShowEditorButton);
		
		mEditorButton->setVisible(showEditorButton);
		
		setEmbedded(mEmbedded);
		
		resizeButtons();
		update();
	}
Esempio n. 3
0
	void CodeLineEdit::setAllowTextCodeChange(bool allowTextCodeChange)
	{
		mAllowTextCodeChange = allowTextCodeChange;
		mSwitchTextCode->setEnabled(mAllowTextCodeChange);
		
		mCodeButton->setVisible(allowTextCodeChange);
		
		setEmbedded(mEmbedded);
		
		resizeButtons();
		update();
	}