MCPcopy Create free account
hub / github.com/christophhart/HISE / drawButtonBackground

Method drawButtonBackground

hi_scripting/scripting/api/ScriptingGraphics.cpp:4192–4219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4190}
4191
4192void 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
4221void ScriptingObjects::ScriptedLookAndFeel::Laf::drawNumberTag(Graphics& g_, Component& comp, Colour& c, Rectangle<int> area, int offset, int size, int number)
4222{

Callers

nothing calls this directly

Calls 10

varFunction · 0.85
getLocalBoundsMethod · 0.80
getToggleStateMethod · 0.80
getARGBMethod · 0.80
callWithGraphicsMethod · 0.80
getFunction · 0.50
setPropertyMethod · 0.45
toFloatMethod · 0.45
getButtonTextMethod · 0.45
isEnabledMethod · 0.45

Tested by

no test coverage detected