| 4190 | } |
| 4191 | |
| 4192 | void ScriptingObjects::ScriptedLookAndFeel::Laf::drawButtonBackground(Graphics& g_, Button& button, const Colour& bg, bool isMouseOverButton, bool isButtonDown) |
| 4193 | { |
| 4194 | if (functionDefined("drawDialogButton")) |
| 4195 | { |
| 4196 | auto obj = new DynamicObject(); |
| 4197 | writeId(obj, &button); |
| 4198 | obj->setProperty("area", ApiHelpers::getVarRectangle(button.getLocalBounds().toFloat())); |
| 4199 | obj->setProperty("text", button.getButtonText()); |
| 4200 | obj->setProperty("enabled", button.isEnabled()); |
| 4201 | obj->setProperty("over", isMouseOverButton); |
| 4202 | obj->setProperty("down", isButtonDown); |
| 4203 | obj->setProperty("value", button.getToggleState()); |
| 4204 | obj->setProperty("bgColour", bg.getARGB()); |
| 4205 | obj->setProperty("textColour", textColour.getARGB()); |
| 4206 | |
| 4207 | addParentFloatingTile(button, obj); |
| 4208 | |
| 4209 | if (get()->callWithGraphics(g_, "drawDialogButton", var(obj), &button)) |
| 4210 | return; |
| 4211 | } |
| 4212 | |
| 4213 | static const Identifier pb("PresetBrowser"); |
| 4214 | |
| 4215 | if (getIdOfParentFloatingTile(button) == pb) |
| 4216 | PresetBrowserLookAndFeelMethods::drawPresetBrowserButtonBackground(g_, button, bg, isMouseOverButton, isButtonDown); |
| 4217 | else |
| 4218 | GlobalHiseLookAndFeel::drawButtonBackground(g_, button, bg, isMouseOverButton, isButtonDown); |
| 4219 | } |
| 4220 | |
| 4221 | void ScriptingObjects::ScriptedLookAndFeel::Laf::drawNumberTag(Graphics& g_, Component& comp, Colour& c, Rectangle<int> area, int offset, int size, int number) |
| 4222 | { |
nothing calls this directly
no test coverage detected