void CtrlrLookAndFeel::drawBubble (Graphics &g, BubbleComponent&, const Point<float>& tip, const Rectangle<float>& body) { Path p; p.addBubble (body, body.getUnion (Rectangle<float> (tip.x, tip.y, 1.0f, 1.0f)), tip, getPanelProperty(Ids::uiPanelTooltipCornerRound, 5.0f), jmin (15.0f, body.getWidth() * 0.2f, body.getHeight() * 0.2f)); g.setColour (VAR2COLOUR(getPanelProperty(Ids::uiPanelTooltipBackgroundColour, "0xffeeeebb"))); g.fillPath (p); g.setColour (VAR2COLOUR(getPanelProperty(Ids::uiPanelTooltipOutlineColour, "0xff000000"))); g.strokePath (p, PathStrokeType (1.33f)); }
void CtrlrHyperlink::valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property) { if (property == Ids::uiButtonContent) { buttonContentChanged(); } else if (property == Ids::uiHyperlinkColour) { hyperlinkButton->setColour (HyperlinkButton::textColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiHyperlinkOpensUrl) { hyperlinkButton->setURL (getProperty(property) ? URL(getProperty(property)) : URL(String::empty)); } else if (property == Ids::uiHyperlinkFont || property == Ids::uiHyperlinkFitTextToSize || property == Ids::uiHyperlinkTextJustification) { hyperlinkButton->setFont (STR2FONT(getProperty(Ids::uiHyperlinkFont)), getProperty(Ids::uiHyperlinkFitTextToSize), justificationFromProperty(getProperty(Ids::uiHyperlinkTextJustification))); } else { CtrlrComponent::valueTreePropertyChanged(treeWhosePropertyHasChanged, property); } if (restoreStateInProgress == false) { resized(); } }
CtrlrLuaMethodCodeEditor::CtrlrLuaMethodCodeEditor(CtrlrLuaMethodEditor &_owner, CtrlrLuaMethod *_method) : editorComponent(nullptr), owner(_owner), method(_method), lastFoundPosition(-1) { addAndMakeVisible (editorComponent = new GenericCodeEditorComponent (*this, document, codeTokeniser = new CtrlrLuaCodeTokeniser())); editorComponent->grabKeyboardFocus(); document.replaceAllContent(method->getCode()); document.setSavePoint(); document.addListener (this); editorComponent->addMouseListener (this, true); editorComponent->addKeyListener (this); if (method != nullptr) method->setCodeEditor (this); if (owner.getComponentTree().hasProperty (Ids::luaMethodEditorFont)) { setFontAndColour (owner.getOwner().getOwner().getFontManager().getFontFromString (owner.getComponentTree().getProperty (Ids::luaMethodEditorFont)) ,VAR2COLOUR(owner.getComponentTree().getProperty (Ids::luaMethodEditorBgColour, Colours::white.toString()))); } else { setFontAndColour (Font (Font::getDefaultMonospacedFontName(), 14.0f, Font::plain), Colours::white); } }
void gradientFromProperty (Graphics &g, Rectangle<int> gradientBounds, const ValueTree &propertyHolder, const Identifier &gradientType, const Identifier &colour1, const Identifier &colour2) { if ((int)propertyHolder.getProperty(gradientType) == 1) { g.setGradientFill (ColourGradient (VAR2COLOUR(propertyHolder.getProperty(colour1)), 0.0f, 0.0f, VAR2COLOUR(propertyHolder.getProperty(colour2)), 0.0f, (float) gradientBounds.getHeight(), false)); } else if ((int)propertyHolder.getProperty(gradientType) == 2) { g.setGradientFill (ColourGradient (VAR2COLOUR(propertyHolder.getProperty(colour1)), 0.0f, 0.0f, VAR2COLOUR(propertyHolder.getProperty(colour2)), (float) gradientBounds.getWidth(), 0.0f, false)); } else if ((int)propertyHolder.getProperty(gradientType) == 3) { g.setGradientFill (ColourGradient (VAR2COLOUR(propertyHolder.getProperty(colour1)), gradientBounds.getWidth()/2.0f, gradientBounds.getHeight()/2.0f, VAR2COLOUR(propertyHolder.getProperty(colour2)), 0.0f, 0.0f, true)); } else { g.setColour (VAR2COLOUR(propertyHolder.getProperty(colour1))); } }
void CtrlrMenuBarLookAndFeel::setPanel(CtrlrPanel *_panel) { panel = _panel; if (panel) { setColour (PopupMenu::headerTextColourId, VAR2COLOUR(panel->getProperty (Ids::ctrlrMenuItemHeaderColour))); owner.getMenuBar()->repaint(); } }
//============================================================================== void CtrlrLCDLabel::paint (Graphics& g) { //[UserPrePaint] Add your own custom painting code here.. //[/UserPrePaint] //[UserPaint] Add your own custom painting code here.. int i = getProperty(Ids::uiLabelOutline); g.setColour (VAR2COLOUR (getProperty(Ids::uiLabelBgColour))); g.fillRoundedRectangle (i, i, getWidth() - 2*i, getHeight() - 2*i, 7); // g.fillRect( i, i, (getWidth() - 2*i), (getHeight() - 2*i)); // g.fillRoundedRectangle (2.0f, 2.0f, (float) (getWidth() - 4), (float) (getHeight() - 4), 7.0000f); g.setColour (VAR2COLOUR (getProperty(Ids::uiLabelOutlineColour))); g.drawRoundedRectangle (0, 0, getWidth(), getHeight(), 7, i); // g.drawRect (0, 0, getWidth(), getHeight(), i); // g.setColour (STR2COLOUR (getProperty(Ids::uiLabelBgColour)).darker(0.2f)); // g.drawRoundedRectangle (2.0f, 2.0f, (float) (getWidth() - 4), (float) (getHeight() - 4), 7.0000f, 2.0000f); //[/UserPaint] }
void CtrlrGroup::valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property) { if (property == Ids::uiGroupOutlineColour1 || property == Ids::uiGroupOutlineColour2 || property == Ids::uiGroupBackgroundColour1 || property == Ids::uiGroupBackgroundColour2 || property == Ids::uiGroupBackgroundGradientType || property == Ids::uiGroupOutlineGradientType || property == Ids::uiGroupOutlineRoundAngle || property == Ids::uiGroupOutlineThickness) { repaint(); } else if (property == Ids::uiGroupTextColour) { label->setColour (Label::textColourId, VAR2COLOUR(getProperty(Ids::uiGroupTextColour))); } else if (property == Ids::uiGroupText) { label->setText (getProperty(Ids::uiGroupText), dontSendNotification); } else if (property == Ids::uiGroupTextFont) { label->setFont (STR2FONT(getProperty(Ids::uiGroupTextFont))); } else if (property == Ids::uiGroupTextPlacement) { label->setJustificationType (justificationFromProperty(getProperty(Ids::uiGroupTextPlacement))); } else if (property == Ids::uiGroupTextMargin) { textMargin = getProperty(Ids::uiGroupTextMargin); } else if (property == Ids::uiGroupBackgroundImage || property == Ids::uiGroupBackgroundImageAlpha || property == Ids::uiGroupBackgroundImageLayout ) { setResource(); } else { CtrlrComponent::valueTreePropertyChanged(treeWhosePropertyHasChanged, property); } if (restoreStateInProgress == false) { resized(); } }
Colour CtrlrMenuBarLookAndFeel::getColour (const Identifier &property) { if (panel) { return (VAR2COLOUR(panel->getProperty (property))); } else { if (property == Ids::ctrlrMenuItemBackgroundColour) { return (findColour (PopupMenu::backgroundColourId)); } else if (property == Ids::ctrlrMenuItemTextColour || property == Ids::ctrlrMenuBarTextColour) { return (findColour (PopupMenu::textColourId)); } else if (property == Ids::ctrlrMenuItemHighlightColour || property == Ids::ctrlrMenuBarHighlightColour) { return (Colour (HIGHLIGHT_COLOUR)); } else if (property == Ids::ctrlrMenuItemHighlightedTextColour) { return (findColour (PopupMenu::highlightedTextColourId)); } else if (property == Ids::ctrlrMenuBarBackgroundColour1) { return (Colour(0xfff7f7f7)); } else if (property == Ids::ctrlrMenuBarBackgroundColour2) { return (Colour(0xffcccccc)); } else if (property == Ids::ctrlrMenuItemSeparatorColour) { return (Colour(0x44000000)); } else if (property == Ids::ctrlrMenuItemHeaderColour) { return (findColour (PopupMenu::headerTextColourId)); } return (Colours::white); } }
void CtrlrCustomButtonInternal::drawTextBoxText(Graphics &g, const Rectangle<int> &frameRect, const Rectangle<int> &totalAreaToDraw) { RectangleList<int> list; list.add (totalAreaToDraw); list.subtract (frameRect); Rectangle<int> destination = list.getBounds(); const int destinationWidth = (int)owner.getProperty(::Ids::uiImageButtonTextWidth) ? (int)owner.getProperty(::Ids::uiImageButtonTextWidth) : destination.getWidth(); const int destinatioHeight = (int)owner.getProperty(::Ids::uiImageButtonTextHeight) ? (int)owner.getProperty(::Ids::uiImageButtonTextHeight) : destination.getHeight(); destination.setSize (destinationWidth, destinatioHeight); g.setColour (VAR2COLOUR(owner.getProperty(::Ids::uiImageButtonTextColour))); g.setFont (owner.getOwner().getOwnerPanel().getCtrlrManagerOwner().getFontManager().getFontFromString(owner.getProperty(::Ids::uiButtonTextFont))); g.drawFittedText (getButtonText(), destination.getX(), destination.getY(), destination.getWidth(), destination.getHeight(), justificationFromProperty (owner.getProperty(::Ids::uiButtonTextJustification)), 2); }
void CtrlrPanelCanvasLayer::paint (Graphics &g) { g.fillAll(VAR2COLOUR(getProperty (Ids::uiPanelCanvasLayerColour))); }
void CtrlrImageSlider::valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property) { if (property == Ids::uiImageSliderResource) { setResource(); } else if (property == Ids::resourceImageWidth) { lf->setImage (filmStripImage, (int)getProperty(Ids::resourceImageWidth), (int)getProperty(Ids::resourceImageHeight)); } else if (property == Ids::resourceImageHeight) { lf->setImage (filmStripImage, (int)getProperty(Ids::resourceImageWidth), (int)getProperty(Ids::resourceImageHeight)); } else if (property == Ids::resourceImagePaintMode) { lf->setPaintMode ((RectanglePlacement)(int)getProperty(Ids::resourceImagePaintMode)); } else if (property == Ids::resourceImageOrientation) { lf->setOrientation((bool)getProperty(Ids::resourceImageOrientation)); } else if (property == Ids::uiSliderInterval || property == Ids::uiSliderMax || property == Ids::uiSliderMin) { ctrlrSlider->setRange ( getProperty (Ids::uiSliderMin), getProperty (Ids::uiSliderMax), getProperty (Ids::uiSliderInterval) ); owner.setProperty (Ids::modulatorMax, ctrlrSlider->getMaximum()); owner.setProperty (Ids::modulatorMin, ctrlrSlider->getMinimum()); } else if (property == Ids::uiSliderValueTextColour) { ctrlrSlider->setColour (Slider::textBoxTextColourId, VAR2COLOUR(getProperty (Ids::uiSliderValueTextColour)) ); } else if (property == Ids::uiSliderValueBgColour) { ctrlrSlider->setColour (Slider::textBoxBackgroundColourId, VAR2COLOUR(getProperty (Ids::uiSliderValueBgColour)) ); } else if (property == Ids::uiSliderValueHighlightColour) { ctrlrSlider->setColour (Slider::textBoxHighlightColourId, VAR2COLOUR(getProperty (Ids::uiSliderValueOutlineColour)) ); } else if (property == Ids::uiSliderValueOutlineColour) { ctrlrSlider->setColour (Slider::textBoxOutlineColourId, VAR2COLOUR(getProperty (Ids::uiSliderValueOutlineColour)) ); } else if (property == Ids::uiSliderValuePosition || property == Ids::uiSliderValueHeight || property == Ids::uiSliderValueWidth) { ctrlrSlider->setTextBoxStyle ( (Slider::TextEntryBoxPosition)(int)getProperty (Ids::uiSliderValuePosition), false, getProperty (Ids::uiSliderValueWidth, 64), getProperty (Ids::uiSliderValueHeight, 12)); } else if (property == Ids::uiSliderIncDecButtonColour || property == Ids::uiSliderIncDecTextColour || property == Ids::uiSliderValueFont || property == Ids::uiSliderValueTextJustification ) { lf->setOrientation((bool)getProperty(Ids::resourceImageOrientation)); lf->setImage (filmStripImage, (int)getProperty(Ids::resourceImageWidth), (int)getProperty(Ids::resourceImageHeight)); lookAndFeelChanged(); } else if (property == Ids::uiSliderStyle) { ctrlrSlider->setSliderStyle ((Slider::SliderStyle)CtrlrComponentTypeManager::sliderStringToStyle (getProperty (Ids::uiSliderStyle))); } else if (property == Ids::uiSliderVelocityMode || property == Ids::uiSliderVelocityModeKeyTrigger || property == Ids::uiSliderVelocitySensitivity || property == Ids::uiSliderVelocityThreshold || property == Ids::uiSliderVelocityOffset ) { ctrlrSlider->setVelocityBasedMode((bool)getProperty(Ids::uiSliderVelocityMode)); ctrlrSlider->setVelocityModeParameters ((double)getProperty(Ids::uiSliderVelocitySensitivity), (int)getProperty(Ids::uiSliderVelocityThreshold), (double)getProperty(Ids::uiSliderVelocityOffset), (bool)getProperty(Ids::uiSliderVelocityModeKeyTrigger)); } else if (property == Ids::uiSliderSpringValue) { ctrlrSlider->setValue (getProperty(property), dontSendNotification); } else if (property == Ids::uiSliderDoubleClickValue || property == Ids::uiSliderDoubleClickEnabled) { ctrlrSlider->setDoubleClickReturnValue ((bool)getProperty(Ids::uiSliderDoubleClickEnabled), getProperty(Ids::uiSliderDoubleClickValue)); } else if (property == Ids::uiSliderSpringMode) { if ((bool)getProperty(property) == true) { ctrlrSlider->setValue (getProperty(Ids::uiSliderSpringValue), dontSendNotification); } } else if (property == Ids::uiSliderPopupBubble) { ctrlrSlider->setPopupDisplayEnabled ((bool)getProperty(property), (bool)getProperty(property), owner.getOwnerPanel().getEditor()); } else { CtrlrComponent::valueTreePropertyChanged(treeWhosePropertyHasChanged, property); } if (restoreStateInProgress == false) { resized(); } }
void CtrlrLuaMethodEditor::valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property) { if (property == Ids::luaMethodEditorFont || property == Ids::luaMethodEditorBgColour) { for (int i=0; i<methodEditArea->getTabs()->getNumTabs(); i++) { CtrlrLuaMethodCodeEditor *ed = dynamic_cast<CtrlrLuaMethodCodeEditor*>(methodEditArea->getTabs()->getTabContentComponent(i)); if (ed != nullptr) { ed->setFontAndColour (owner.getOwner().getFontManager().getFontFromString (componentTree.getProperty(Ids::luaMethodEditorFont)), VAR2COLOUR(componentTree.getProperty(Ids::luaMethodEditorBgColour))); } } } }
void CtrlrMidiKeyboard::valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property) { if (property == Ids::uiMidiKeyboardOrientation) { midiKeyboard->setOrientation (CtrlrComponentTypeManager::orientationFromString(getProperty(property))); } else if (property == Ids::uiMidiKeyboardWhiteButtonColour) { midiKeyboard->setColour (MidiKeyboardComponent::whiteNoteColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardBlackButtonColour) { midiKeyboard->setColour (MidiKeyboardComponent::blackNoteColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardSeparatorLineColour) { midiKeyboard->setColour (MidiKeyboardComponent::keySeparatorLineColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardMouseOverColour) { midiKeyboard->setColour (MidiKeyboardComponent::mouseOverKeyOverlayColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardMouseDownColour) { midiKeyboard->setColour (MidiKeyboardComponent::keyDownOverlayColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardTextLabelColour) { midiKeyboard->setColour (MidiKeyboardComponent::textLabelColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardButtonBackgroundColour) { midiKeyboard->setColour (MidiKeyboardComponent::upDownButtonBackgroundColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardButtonArrowColour) { midiKeyboard->setColour (MidiKeyboardComponent::upDownButtonArrowColourId, VAR2COLOUR(getProperty(property))); } else if (property == Ids::uiMidiKeyboardLowestVisibleKey) { midiKeyboard->setLowestVisibleKey((int)getProperty(property)); //midiKeyboard->setKeyPressBaseOctave( (int)getProperty(property)/12 + 1 ); } else if (property == Ids::uiMidiKeyboardBaseOctaveKeyPress) { midiKeyboard->setKeyPressBaseOctave (getProperty(property)); } else if (property == Ids::uiMidiKeyboardOctaveFroMiddleC) { midiKeyboard->setOctaveForMiddleC (getProperty(property)); } else { CtrlrComponent::valueTreePropertyChanged(treeWhosePropertyHasChanged, property); } if (restoreStateInProgress == false) { resized(); } }
void CtrlrLCDLabel::valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property) { if (property == Ids::uiLabelDisplaysAllValues) { if ((bool)getProperty(property) == true) { owner.getOwnerPanel().addPanelListener(this); } else { owner.getOwnerPanel().removePanelListener(this); } } else if (property == Ids::uiLabelText) { ctrlrLabel->setText (getProperty(Ids::uiLabelText), sendNotification); } else if (property == Ids::uiLabelBgColour) { repaint(); } else if (property == Ids::uiLabelTextColour) { ctrlrLabel->setColour (Label::textColourId, VAR2COLOUR(getProperty(Ids::uiLabelTextColour))); ctrlrLabel->setColour (TextEditor::textColourId, VAR2COLOUR(getProperty(Ids::uiLabelTextColour))); } else if (property == Ids::uiLabelFitFont) { ctrlrLabel->getProperties().set ("fh", getProperty(Ids::uiLabelFitFont)); const String t = ctrlrLabel->getText(); ctrlrLabel->setFont (CtrlrFontManager::getBuiltInFont ((int)getProperty(Ids::uiLCDLabelFont)).withHeight((float)getProperty(Ids::uiLCDLabelFontHeight))); ctrlrLabel->setText (t, dontSendNotification); } else if (property == Ids::uiLabelJustification) { ctrlrLabel->setJustificationType (justificationFromProperty(getProperty(property))); } else if (property == Ids::uiLCDLabelFont || property == Ids::uiLCDLabelFontHeight) { ctrlrLabel->setFont(CtrlrFontManager::getBuiltInFont ((int)getProperty(Ids::uiLCDLabelFont)).withHeight((float)getProperty(Ids::uiLCDLabelFontHeight))); } else if (property == Ids::uiLabelEditOnSingleClick || property == Ids::uiLabelEditOnDoubleClick || property == Ids::uiLabelEditFocusDiscardsChanges) { ctrlrLabel->setEditable ((bool)getProperty(Ids::uiLabelEditOnSingleClick),(bool)getProperty(Ids::uiLabelEditOnDoubleClick),(bool)getProperty(Ids::uiLabelEditFocusDiscardsChanges)); } else if (property == Ids::uiLabelChangedCbk) { if (getProperty(property) == String::empty) return; labelChangedCbk = owner.getOwnerPanel().getCtrlrLuaManager().getMethodManager().getMethod(getProperty(property)); } else if (property == Ids::uiLabelInputHighlightTextColour || property == Ids::uiLabelInputHighlightColour) { ctrlrLabel->setColour (TextEditor::highlightColourId, VAR2COLOUR(getProperty(Ids::uiLabelInputHighlightColour))); ctrlrLabel->setColour (TextEditor::highlightedTextColourId, VAR2COLOUR(getProperty(Ids::uiLabelInputHighlightTextColour))); } else { CtrlrComponent::valueTreePropertyChanged(treeWhosePropertyHasChanged, property); } if (restoreStateInProgress == false) { resized(); } }
//============================================================================== void CtrlrXYSurface::paint (Graphics& g) { //[UserPrePaint] Add your own custom painting code here.. //[/UserPrePaint] //[UserPaint] Add your own custom painting code here.. gradientFromProperty (g, usableRectangle.getSmallestIntegerContainer(), getObjectTree(), Ids::uiXYSurfaceBgGradientType, Ids::uiXYSurfaceBackgroundColour1, Ids::uiXYSurfaceBackgroundColour2); g.fillRoundedRectangle ((float)usableRectangle.getTopLeft().getX(), (float)usableRectangle.getTopLeft().getY(), (float)usableRectangle.getWidth(), (float)usableRectangle.getHeight(), getProperty(Ids::uiXYSurfaceCornerSize)); gradientFromProperty (g, usableRectangle.getSmallestIntegerContainer(), getObjectTree(), Ids::uiXYSurfaceOutlineGradientType, Ids::uiXYSurfaceOutlineColour1, Ids::uiXYSurfaceOutlineColour2); g.drawRoundedRectangle ((float)usableRectangle.getX(), (float)usableRectangle.getY(), (float)usableRectangle.getWidth(), (float)usableRectangle.getHeight(), getProperty(Ids::uiXYSurfaceCornerSize), getProperty(Ids::uiXYSurfaceOutlineThickness)); const int snapSize = (int)getProperty (Ids::uiXYSurfaceGradientGrain, 8); Colour colour = VAR2COLOUR(getProperty(Ids::uiXYSurfaceGradientColour)); if (snapSize > 0) { Image backgroundFill(Image::ARGB, snapSize, snapSize, true); Graphics g1(backgroundFill); if (snapSize > 2) { g1.setColour (colour); g1.drawRect (0, 0, snapSize + 1, snapSize + 1); } g.setTiledImageFill (backgroundFill, 0, 0, 1.0f); g.fillRoundedRectangle ((float)usableRectangle.getX(), (float)usableRectangle.getY(), (float)usableRectangle.getWidth(), (float)usableRectangle.getHeight(), getProperty(Ids::uiXYSurfaceCornerSize)); } if (backgroundImage.isValid()) { if ((int)getProperty (Ids::uiXYSurfaceBgImageLayout) == 8192) { g.setTiledImageFill (backgroundImage, 0, 0, (float)getProperty (Ids::uiXYSurfaceBgImageAlpha)/255.0f); g.fillRect ((float)usableRectangle.getX(), (float)usableRectangle.getY(), (float)usableRectangle.getWidth(), (float)usableRectangle.getHeight()); } else { g.setColour (Colours::black.withAlpha ((float)getProperty (Ids::uiXYSurfaceBgImageAlpha)/255.0f)); g.drawImageWithin (backgroundImage, usableRectangle.getX(), usableRectangle.getX(), usableRectangle.getWidth(), usableRectangle.getHeight(), RectanglePlacement(getProperty (Ids::uiXYSurfaceBgImageLayout))); } } if (getProperty (Ids::uiXYSurfaceXTrackEnabled)) { const Point<int> c = surfaceModulator->getBounds().getCentre(); g.setColour (VAR2COLOUR(getProperty(Ids::uiXYSurfaceYTrackColour))); g.drawLine ((float)c.getX(), (float)usableRectangle.getY(), (float)c.getX(), (float)usableRectangle.getBottom(), getProperty(Ids::uiXYSurfaceYTrackThickness)); g.setColour (VAR2COLOUR(getProperty(Ids::uiXYSurfaceXTrackColour))); g.drawLine ((float)usableRectangle.getX(), (float)c.getY(), (float)usableRectangle.getWidth(), (float)c.getY(), getProperty(Ids::uiXYSurfaceXTrackThickness)); } if ((bool)getProperty(Ids::uiXYSurfaceInfoLabelVisible)) { // const int xScale = (int)getProperty(Ids::uiXYSurfaceMaxX); // const int yScale = (int)getProperty(Ids::uiXYSurfaceMaxY); const Point<int> c = surfaceModulator->getBounds().getCentre(); g.setColour (VAR2COLOUR(getProperty (Ids::uiXYSurfaceInfoLabelColour))); g.setFont (STR2FONT(getProperty(Ids::uiXYSurfaceInfoLabelFont))); g.drawText ("X="+String(getValueForPosition(c.getX(), true))+" Y="+String(getValueForPosition(c.getY(), false)), usableRectangle.getX() + 8, usableRectangle.getY() + 8, usableRectangle.getWidth()-16, usableRectangle.getHeight()-16, justificationFromProperty(getProperty (Ids::uiXYSurfaceInfoLabelLocation)), true); } //[/UserPaint] }