//============================================================================== void CtrlrGroup::paint (Graphics& g) { //[UserPrePaint] Add your own custom painting code here.. //[/UserPrePaint] //[UserPaint] Add your own custom painting code here.. Rectangle<int> r = getUsableRect(); gradientFromProperty(g, getBounds(), getObjectTree(), Ids::uiGroupOutlineGradientType, Ids::uiGroupOutlineColour1, Ids::uiGroupOutlineColour2); g.drawRoundedRectangle (r.toFloat().reduced((float)getProperty(Ids::uiGroupOutlineThickness)/2.0f), getProperty(Ids::uiGroupOutlineRoundAngle), getProperty(Ids::uiGroupOutlineThickness)); gradientFromProperty(g, getBounds(), getObjectTree(), Ids::uiGroupBackgroundGradientType, Ids::uiGroupBackgroundColour1, Ids::uiGroupBackgroundColour2); g.fillRoundedRectangle (r.toFloat().reduced((float)getProperty(Ids::uiGroupOutlineThickness)/2.0f), getProperty(Ids::uiGroupOutlineRoundAngle)); if (groupBackgroundImage.isValid()) { if ((int)getProperty (Ids::uiGroupBackgroundImageLayout) == 8192) { g.setTiledImageFill (groupBackgroundImage, 0, 0, (float)getProperty (Ids::uiGroupBackgroundImageAlpha)/255.0f); g.fillRect(r); } else { g.setColour (Colours::black.withAlpha ((float)getProperty (Ids::uiGroupBackgroundImageAlpha)/255.0f)); g.drawImageWithin (groupBackgroundImage, r.getX(), r.getY(), r.getWidth(), r.getHeight(), RectanglePlacement(getProperty (Ids::uiGroupBackgroundImageLayout))); } } //[/UserPaint] }
void CtrlrHyperlink::resized() { hyperlinkButton->setBounds (0, 0, getWidth() - 0, getHeight() - 0); //[UserResized] Add your own custom resize handling here.. hyperlinkButton->setBounds (getUsableRect()); //[/UserResized] }
void CtrlrXYSurface::resized() { //[UserResized] Add your own custom resize handling here.. surfaceModulator->setSize (getProperty(Ids::uiXYSurfaceModulatorWidth), getProperty(Ids::uiXYSurfaceModulatorHeight)); CtrlrComponent::resized(); usableRectangle = getUsableRect(); //[/UserResized] }
void CtrlrGroup::resized() { //label->setBounds (0, 0, getWidth() - 0, getHeight() - 0); //[UserResized] Add your own custom resize handling here.. label->setBounds (textMargin, textMargin, getWidth() - (textMargin*2), getHeight() - (textMargin*2)); content.setBounds(getUsableRect()); //[/UserResized] }
void CtrlrImageSlider::resized() { //ctrlrSlider->setBounds (0, 0, getWidth() - 0, getHeight() - 0); //[UserResized] Add your own custom resize handling here.. if (restoreStateInProgress) return; ctrlrSlider->setBounds (getUsableRect()); //[/UserResized] }
void CtrlrLCDLabel::resized() { //ctrlrLabel->setBounds (0, 0, getWidth() - 0, getHeight() - 0); //[UserResized] Add your own custom resize handling here.. if (restoreStateInProgress) return; if ((bool)ctrlrLabel->getProperties() ["fh"] == true) { Font f = ctrlrLabel->getFont(); f.setHeight (getHeight()*0.95f); ctrlrLabel->setFont (f); } ctrlrLabel->setBounds (getUsableRect()); //[/UserResized] }
void CtrlrMidiKeyboard::resized() { midiKeyboard->setBounds (getUsableRect()); }